/* Beata Biarda — site styles. Colours come from the cover of „Śledztwo w klapkach”;
   a book page can override --bg, --ink, --accent, --paper on <body>. */

@font-face { font-family: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url(fonts/figtree-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url(fonts/figtree-latin-ext-wght-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/fraunces-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/fraunces-latin-ext-wght-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url(fonts/fraunces-latin-wght-italic.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url(fonts/fraunces-latin-ext-wght-italic.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }


:root {
  --bg: #c9e9e6;
  --ink: #12383e;
  --accent: #c64a1a;
  --paper: #fbf5e9;
  --text: #1c2b2e;
  --deep: #0f4750; /* dark sea green for the buy section and pull quotes */
  --deep-ink: #f3fbfa;
  --sun: #ffd84a;
  --muted: color-mix(in srgb, var(--text) 70%, transparent);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --hw: 500; /* heading weight */
  --hls: -.02em;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 18px;
  --wrap: 1180px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; font: 400 1.125rem/1.65 var(--sans); color: var(--text); background: var(--paper);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: var(--hw); line-height: 1.05; letter-spacing: var(--hls); margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
:where(ul, ol)[role="list"] { list-style: none; margin: 0; padding: 0; }
blockquote { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--ink); color: var(--bg); padding: .75rem 1rem; }
.skip:focus { left: 1rem; top: 1rem; }

.eyebrow {
  font: 600 .78rem/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 1.25rem;
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--accent); --btn-fg: #fff;
  display: inline-flex; align-items: center; gap: .6rem; min-height: 3.1rem; padding: .7rem 1.35rem;
  border-radius: 999px; border: 1.5px solid transparent; background: var(--btn-bg); color: var(--btn-fg);
  font: 600 .98rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--btn-bg) 80%, transparent); }
.btn img { width: 22px; height: 22px; border-radius: 6px; background: #fff; padding: 2px; object-fit: contain; }
.btn strong { font-weight: 700; }
.btn--ghost { --btn-bg: transparent; --btn-fg: currentColor; border-color: color-mix(in srgb, currentColor 30%, transparent); }
.btn--ghost:hover { background: color-mix(in srgb, currentColor 8%, transparent); box-shadow: none; }
.btn--small { min-height: 2.5rem; padding: .45rem 1.05rem; font-size: .9rem; }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 50; color: var(--ink);
  transition: background .35s var(--ease), box-shadow .35s var(--ease), color .35s;
}
.topbar.is-scrolled {
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--ink) 8%, transparent), 0 12px 30px -18px rgba(0,0,0,.25);
}
.topbar__inner { display: flex; align-items: center; gap: .25rem; min-height: 76px; transition: min-height .35s var(--ease); }
.topbar.is-scrolled .topbar__inner { min-height: 62px; }
.brand {
  margin-right: auto; text-decoration: none; font: 600 .82rem/1 var(--sans); letter-spacing: .26em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: .7rem;
}
.brand::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.topnav__link, .topbar__icon {
  font: 500 .95rem var(--sans); padding: .55rem .85rem; border-radius: 999px;
  display: inline-flex; align-items: center; gap: .4rem; text-decoration: none; color: inherit;
  transition: background .2s;
}
.topnav__link:hover, .topbar__icon:hover { background: color-mix(in srgb, var(--ink) 10%, transparent); }
.topbar__icon { padding: .55rem; }
.topbar__icon svg { width: 18px; height: 18px; fill: currentColor; }
.topbar .btn--small { margin-left: .5rem; }
.hero, .intro { padding-top: 76px; }

/* ---------- Shared dark hero ---------- */
.hero, .intro {
  position: relative; overflow: hidden; color: var(--ink); background: var(--bg);
  isolation: isolate;
}
.hero::after, .intro::after, .feature::after {
  content: ""; position: absolute; inset: 0; background: var(--grain); pointer-events: none; z-index: -1; opacity: .9;
}
.hero__glow {
  position: absolute; z-index: -1; width: 70vmax; height: 70vmax; right: -20vmax; top: -25vmax; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--sun) 70%, transparent), transparent);
  filter: blur(20px); opacity: .6;
}

.tags { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1.4rem; }
.tags li {
  font: 600 .74rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase;
  padding: .45rem .7rem; border-radius: 999px; border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
}
.tags .tag--series { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- Book in 3D ---------- */
.book3d { perspective: 1600px; display: grid; place-items: center; }
.book3d .cover {
  width: 100%; border-radius: 3px 8px 8px 3px;
  transform: rotateY(-16deg) rotateX(4deg);
  transform-origin: left center;
  box-shadow:
    inset 6px 0 10px -6px rgba(255,255,255,.35),
    -2px 0 0 rgba(0,0,0,.25),
    28px 40px 60px -20px rgba(0,0,0,.65),
    8px 10px 20px -8px rgba(0,0,0,.4);
  transition: transform .8s var(--ease);
}
.book3d:hover .cover { transform: rotateY(-6deg) rotateX(2deg) translateY(-6px); }
.book3d--flat .cover { transform: rotateY(-8deg); }

/* ---------- Book landing hero ---------- */
.hero__grid {
  display: grid; gap: 2.5rem; align-items: center; padding-block: clamp(2.5rem, 7vw, 6.5rem);
}
.hero__book { order: -1; width: min(62vw, 300px); margin-inline: auto; }
.hero__title { font-size: clamp(2.8rem, 6.4vw, 5.2rem); margin-bottom: .6rem; line-height: 1; }
.hero__author { font: 500 1rem var(--sans); opacity: .75; margin-bottom: 1.6rem; }
.hero__hook { font: italic 400 clamp(1.25rem, 2.3vw, 1.6rem)/1.4 var(--serif); max-width: 34ch; margin-bottom: 1.6rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2rem; }

.rating { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .4rem .7rem; text-decoration: none; font-size: .95rem; opacity: .9; }
.rating:hover span:not(.stars):not(.stars__fill) { text-decoration: underline; }
.rating__note { flex-basis: 100%; opacity: .7; font-size: .9rem; }
.stars {
  position: relative; display: inline-block; font-size: 1.15rem; letter-spacing: .12em; line-height: 1; white-space: nowrap;
  color: color-mix(in srgb, currentColor 22%, transparent);
}
.stars__fill { position: absolute; inset: 0 auto 0 0; overflow: hidden; color: var(--star, #f5b300); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(3.5rem, 8vw, 7rem); }
.section__title { font-size: clamp(2rem, 4.5vw, 3.2rem); margin-bottom: .8rem; }
.section__lead { color: var(--muted); margin-bottom: 2.5rem; }
.section__lead a { color: var(--text); }

/* Snapshot quotes */
.snaps { background: var(--paper); padding-block: clamp(2.5rem, 5vw, 4rem); border-bottom: 1px solid rgba(0,0,0,.08); }
.snaps__list { display: grid; gap: 1.25rem; }
.snap { padding: 1.6rem 1.6rem 1.4rem; background: #fff; border-radius: var(--radius); box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 18px 40px -28px rgba(0,0,0,.3); }
.snap__label { font: 600 .74rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: .9rem; }
.snap blockquote p { font: var(--hw) 1.28rem/1.35 var(--serif); margin-bottom: .9rem; }
.cite { font-size: .88rem; color: var(--muted); margin: 0; }

/* Story */
.story { background: var(--paper); }
.story__grid { display: grid; gap: 2.5rem; }
.story__body p { font: 400 clamp(1.08rem, 1.5vw, 1.2rem)/1.75 var(--sans); }
.story__body p:first-child::first-letter {
  float: left; font: var(--hw) 4.6em/.8 var(--serif); padding: .08em .1em 0 0; color: var(--accent);
}
.pull { margin: 0; padding: 2rem; border-radius: var(--radius); background: var(--deep); color: var(--deep-ink); position: relative; }
.pull::before { content: "„"; position: absolute; top: -.62em; left: .3em; font: var(--hw) 6rem/1 var(--serif); color: var(--sun); }
.pull blockquote p { font: italic 400 1.3rem/1.45 var(--serif); margin: 0 0 .7rem; }
.pull blockquote p:first-child { margin-top: 1.4rem; }
.pull figcaption { font-size: .9rem; opacity: .75; }
.pull figcaption::before { content: "— "; }

.cast { margin-bottom: 3rem; }
.cast__list { display: grid; gap: 1rem; }
.castcard { position: relative; padding: 1.6rem 1.6rem 1.4rem; border-radius: var(--radius); background: #fff; overflow: hidden; }
.castcard__num { position: absolute; right: 1rem; top: .2rem; font: var(--hw) 4.5rem/1 var(--serif); color: color-mix(in srgb, var(--accent) 16%, transparent); }
.castcard h3 { font-size: 1.8rem; margin-bottom: .35rem; }
.castcard p { margin: 0; color: var(--muted); font-size: 1.05rem; }
.cast:not(.cast--long) .castcard p { font: italic 400 1.2rem/1.3 var(--serif); color: var(--text); }

/* Reviews */
.reviews { background: #fff; }
.reviews__grid { columns: 1; column-gap: 1.25rem; }
.review { break-inside: avoid; margin: 0 0 1.25rem; padding: 1.6rem; border-radius: var(--radius); background: var(--paper); }
.review blockquote p { font: 400 1.02rem/1.65 var(--sans); margin-bottom: .9rem; }
.review figcaption { font-size: .88rem; color: var(--muted); font-weight: 600; }

/* Buy */
.buy { --ink: var(--deep-ink); background: var(--deep); color: var(--ink); position: relative; isolation: isolate; overflow: hidden; }
.buy::before {
  content: ""; position: absolute; z-index: -1; inset: auto -20% -60% auto; width: 80vmax; height: 80vmax; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--sun) 30%, transparent), transparent); opacity: .5;
}
.buy .section__lead, .buy .section__lead a { color: color-mix(in srgb, var(--ink) 70%, transparent); }
.buy__grid { display: grid; gap: 3rem; align-items: center; }
.buy__cover { width: min(55vw, 260px); margin-inline: auto; }
.stores { display: grid; gap: .8rem; margin-bottom: 2.5rem; }
.store {
  display: grid; grid-template-columns: 48px 1fr auto; grid-template-rows: auto auto; column-gap: 1rem; align-items: center;
  padding: 1rem 1.25rem; border-radius: 16px; text-decoration: none;
  background: color-mix(in srgb, var(--ink) 7%, transparent); border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  transition: transform .25s var(--ease), background .25s, border-color .25s;
}
.store:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--ink) 12%, transparent); border-color: color-mix(in srgb, var(--ink) 30%, transparent); }
.store img { grid-row: span 2; width: 48px; height: 48px; border-radius: 12px; background: #fff; padding: 4px; object-fit: contain; }
.store__format { font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.store__name { font: var(--hw) 1.2rem/1.2 var(--serif); }
.store__go { grid-row: 1 / span 2; grid-column: 3; font-size: 1.3rem; opacity: .6; }
.store--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.store--primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); border-color: transparent; }
.buy .eyebrow { color: color-mix(in srgb, var(--ink) 65%, transparent); margin-bottom: .8rem; }
.details { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem 1.5rem; margin: 0; }
.details dt { font-size: .8rem; opacity: .65; }
.details dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

/* Sticky mobile CTA */
.sticky {
  position: fixed; z-index: 40; left: .75rem; right: .75rem; bottom: .75rem; display: flex; align-items: center; gap: .75rem;
  padding: .55rem .55rem .55rem 1.1rem; border-radius: 999px; color: var(--ink);
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 16px 40px -12px rgba(0,0,0,.5);
  transform: translateY(150%); transition: transform .4s var(--ease);
}
.sticky.is-visible { transform: none; }
.sticky__title { flex: 1; min-width: 0; font: var(--hw) 1rem/1.2 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Home ---------- */
.intro__grid { display: grid; gap: 2.5rem; align-items: center; padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3rem, 6vw, 5rem); }
.intro__title { font-size: clamp(3rem, 7.5vw, 5.5rem); line-height: .95; margin-bottom: 1.5rem; }
.intro__title em { font-weight: 400; color: var(--accent); }
.intro__quote { font: italic 400 clamp(1.2rem, 2.2vw, 1.5rem)/1.45 var(--serif); max-width: 32ch; opacity: .85; margin-bottom: 2.2rem; }
.intro__actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.intro--404 { min-height: 70vh; display: grid; place-items: center; padding-block: 5rem; }
.intro--404 .intro__title { font-size: clamp(2.6rem, 8vw, 5.5rem); }


.feature { position: relative; isolation: isolate; overflow: hidden; background: var(--bg); color: var(--ink); }
.feature__grid { display: grid; gap: 2.5rem; align-items: center; padding-block: clamp(3.5rem, 8vw, 7rem); }
.feature__book { width: min(58vw, 290px); margin-inline: auto; }
.feature__title { font-size: clamp(2.3rem, 5.5vw, 4.2rem); margin-bottom: 1.2rem; }
.feature__title a { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size .5s var(--ease); }
.feature__title a:hover { background-size: 100% 2px; }
.feature__hook { font: italic 400 clamp(1.15rem, 2vw, 1.45rem)/1.45 var(--serif); max-width: 40ch; opacity: .9; }
.feature__actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2rem; }
.feature__more {
  display: inline-flex; align-items: center; gap: .8rem; margin-top: 1.6rem;
  font: 400 1.35rem/1 var(--serif); font-style: italic; text-decoration: none;
}
.feature__more-icon {
  display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%;
  background: var(--accent); color: #fff;
  transition: transform .35s var(--ease), box-shadow .25s var(--ease);
}
.feature__more:hover .feature__more-icon { transform: translateX(4px); box-shadow: 0 8px 20px -8px var(--accent); }
.feature .rating { margin-top: .4rem; }

/* Footer */
.footer { background: var(--paper); color: var(--text); border-top: 1px solid rgba(0,0,0,.08); padding-block: 3rem 6rem; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; }
.footer__social { display: flex; gap: 1.25rem; }
.footer__social a { text-decoration: none; opacity: .8; }
.footer__social a:hover { opacity: 1; text-decoration: underline; }
.footer__copy { margin: 0; opacity: .7; font-size: .9rem; width: 100%; }
.footer__copy a { color: inherit; }

/* Reveal on scroll (enabled by site.js) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Breakpoints ---------- */
@media (min-width: 768px) {
  .snaps__list { grid-template-columns: repeat(3, 1fr); }
  .reviews__grid { columns: 2; }
  .cast__list { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
  .sticky { display: none; }
  .footer { padding-bottom: 3rem; }
}
@media (min-width: 1024px) {
  .hero__grid { grid-template-columns: 1.25fr 1fr; min-height: 92vh; }
  .hero__book { order: 0; width: min(100%, 400px); }
  .story__grid { grid-template-columns: 1.6fr 1fr; gap: 4rem; align-items: start; }
  .story__aside { position: sticky; top: 100px; }
  .reviews__grid { columns: 3; }
  .buy__grid { grid-template-columns: 1fr 1.5fr; gap: 5rem; }
  .buy__cover { width: min(100%, 340px); }
  .intro__grid { grid-template-columns: 1fr 1.15fr; gap: 4rem; min-height: 86vh; }
  .feature__grid { grid-template-columns: 1fr 1.4fr; gap: 5rem; }
  .feature--flip .feature__grid { grid-template-columns: 1.4fr 1fr; }
  .feature--flip .feature__book { order: 2; }
  .feature__book { width: min(100%, 340px); }
}
@media (max-width: 767px) {
  .topbar .btn, .topbar__icon { display: none; }
  .hero__actions .btn, .feature__actions .btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
.story__title { margin-bottom: 2rem; }
@media (min-width: 1024px) { .story__grid--solo { grid-template-columns: minmax(0, 46rem); } }

/* ---------- Photos ---------- */
.photo { margin: 0; }
.photo img { width: 100%; border-radius: var(--radius); box-shadow: 0 30px 60px -30px rgba(15, 71, 80, .55); }
.photo--tilt img { transform: rotate(1.2deg); }
.intro__photo { position: relative; }
.intro__photo::before {
  content: ""; position: absolute; z-index: -1; inset: 8% -6% -8% 10%; border-radius: var(--radius);
  background: var(--sun); transform: rotate(-2.5deg);
}

/* For whom */
.forwho { background: var(--bg); color: var(--ink); }
.forwho__list { display: grid; gap: 1rem; }
.forwho__item {
  display: flex; gap: 1rem; align-items: baseline; padding: 1.3rem 1.5rem; border-radius: var(--radius);
  background: color-mix(in srgb, #fff 70%, transparent); font: var(--hw) 1.3rem/1.35 var(--serif);
}
.forwho__item::before { content: ""; flex: none; width: .7rem; height: .7rem; border-radius: 50%; background: var(--accent); }

/* Audiobook strip */
.listen { background: var(--sun); color: #2a2205; padding-block: clamp(2rem, 4vw, 3rem); }
.listen__grid { display: grid; gap: 1.25rem; align-items: center; }
.listen h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: .3rem; }
.listen p { margin: 0; }
.listen .btn { --btn-bg: #2a2205; justify-self: start; }

/* Author */
.author { background: var(--paper); }
.author__grid { display: grid; gap: 2.5rem; align-items: center; }
.author__photo { width: min(100%, 420px); margin-inline: auto; }
.author__body p { font-size: clamp(1.08rem, 1.5vw, 1.2rem); line-height: 1.75; }
.author__actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.8rem; }

/* Signed copies */
.signed { background: #fff; }
.signed__grid { display: grid; gap: 2.5rem; align-items: center; }
.signed p { font-size: 1.15rem; max-width: 44ch; }

@media (min-width: 768px) {
  .forwho__list { grid-template-columns: repeat(2, 1fr); }
  .listen__grid { grid-template-columns: 1fr auto; }
}
@media (min-width: 1024px) {
  .author__grid { grid-template-columns: 1fr 1.4fr; gap: 5rem; }
  .author--flip .author__grid { grid-template-columns: 1.4fr 1fr; }
  .author--flip .author__photo { order: 2; }
  .signed__grid { grid-template-columns: 1.2fr 1fr; gap: 5rem; }
}

/* Home: the book feature sits on warm paper, intro on the cover's sky */
.home-book .feature { background: var(--paper); color: var(--text); }
.home-book .feature::after { display: none; }
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.intro__quote { max-width: 30ch; }

/* =====================================================================
   Holiday mood: sky-to-sand hero, waves, playful cards
   ===================================================================== */
:root { --sky: #9fdfe6; --sand: #fdf0d2; --coral: #ff7a59; --mint: #dcf3ee; --butter: #fff1bd; --peach: #ffe2d4; --radius: 22px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
@keyframes sway { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-28px); } }

/* Hero: sky fading into sand, like the cover */
.hero, .intro { background: linear-gradient(180deg, var(--sky) 0%, #c7eeea 48%, var(--sand) 100%); padding-bottom: clamp(36px, 6vw, 90px); }
.hero::after, .intro::after { display: none; }
.hero__glow {
  width: 60vmax; height: 60vmax; right: -18vmax; top: -24vmax; filter: blur(30px); opacity: .7;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--sun) 75%, transparent), transparent);
}
.topbar.is-scrolled { background: color-mix(in srgb, #fff 86%, transparent); }

/* Waves between sections */
.wave { position: absolute; left: 0; bottom: -1px; width: 100%; height: clamp(36px, 6vw, 90px); fill: var(--paper); pointer-events: none; overflow: visible; }
.wave__back { opacity: .55; animation: sway 9s ease-in-out infinite; }
.wave--top { bottom: auto; top: 1px; transform: translateY(-100%); }
.buy { overflow: visible; }
.buy::before { display: none; }
.buy .wave { fill: var(--deep); }
.footer { position: relative; background: var(--sand); border-top: 0; }
.footer .wave { fill: var(--sand); }

/* Headings: hand-drawn squiggle */
.section__title::after, .feature__title::after {
  content: ""; display: block; width: 120px; height: 14px; margin-top: .55rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 14'%3E%3Cpath d='M3 9c10-9 18 7 28-1s18 7 28-1 18 7 28-1 18 6 30 0' fill='none' stroke='%23ff7a59' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat;
}
.buy .section__title::after, .listen h2::after { filter: hue-rotate(28deg) brightness(1.5) saturate(1.2); }
.intro__title em { position: relative; white-space: nowrap; }
.hero__title { background: linear-gradient(transparent 68%, color-mix(in srgb, var(--sun) 85%, transparent) 68% 92%, transparent 92%); display: inline; box-decoration-break: clone; -webkit-box-decoration-break: clone; padding-inline: .08em; }
.hero__author { margin-top: 1.1rem; }

/* Buttons you want to press */
.btn { font-weight: 700; box-shadow: 0 4px 0 color-mix(in srgb, var(--btn-bg) 70%, #000); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 color-mix(in srgb, var(--btn-bg) 70%, #000); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 color-mix(in srgb, var(--btn-bg) 70%, #000); }
.btn--ghost { background: #fff; --btn-fg: var(--text); border-color: transparent; box-shadow: 0 4px 0 rgba(15, 71, 80, .18); }
.btn--ghost:hover { background: #fff; box-shadow: 0 6px 0 rgba(15, 71, 80, .18); }
.btn--ghost:active { box-shadow: 0 1px 0 rgba(15, 71, 80, .18); }
.tags li { background: #fff; border-color: transparent; color: var(--accent); box-shadow: 0 2px 0 rgba(15, 71, 80, .12); }

/* Cover floats */
.book3d .cover { animation: bob 6s ease-in-out infinite; box-shadow: inset 6px 0 10px -6px rgba(255,255,255,.35), -2px 0 0 rgba(0,0,0,.2), 28px 40px 60px -24px rgba(15, 71, 80, .6), 8px 10px 20px -8px rgba(15, 71, 80, .35); }
.hero__book, .intro__photo, .feature__book { position: relative; }
.flipflops { width: 56px; height: auto; }

/* Photos like holiday prints */
.photo img { border: 10px solid #fff; border-radius: 14px; }
.photo { position: relative; }
.photo::after { content: ""; position: absolute; top: -14px; left: 50%; width: 110px; height: 30px; translate: -50% 0; rotate: -3deg; background: color-mix(in srgb, var(--sun) 80%, transparent); border-radius: 3px; box-shadow: 0 2px 4px rgba(0,0,0,.08); }
.intro__photo .photo { rotate: 1.5deg; }
.intro__photo::before { background: var(--coral); inset: 10% -5% -7% 12%; border-radius: 26px; }
.author__photo .photo { rotate: -2deg; }
.author--flip .author__photo .photo { rotate: 2deg; }
.photo--tilt img { transform: none; }

/* Reader snapshots: three tilted cards */
.snaps { border-bottom: 0; }
.snap { border-radius: var(--radius); border-top: 8px solid var(--coral); transition: rotate .4s var(--ease), translate .4s var(--ease); }
.snap:nth-child(1) { rotate: -1.6deg; }
.snap:nth-child(2) { rotate: 1deg; border-top-color: #1aa7b0; translate: 0 10px; }
.snap:nth-child(3) { rotate: -.6deg; border-top-color: var(--sun); }
.snap:hover { rotate: 0deg; translate: 0 -6px; }
.snap__label { display: inline-block; background: var(--butter); color: #6b4a00; padding: .4rem .7rem; border-radius: 999px; }
.snap blockquote p { font-size: 1.35rem; }

/* Cast */
.castcard { padding-top: 1.4rem; transition: translate .35s var(--ease), rotate .35s var(--ease); box-shadow: 0 18px 40px -30px rgba(15, 71, 80, .5); }
.castcard:hover { translate: 0 -6px; rotate: -1deg; }
.castcard__icon { display: grid; place-items: center; width: 3.4rem; height: 3.4rem; border-radius: 50%; font-size: 1.7rem; margin-bottom: .9rem; background: var(--butter); }
.castcard:nth-child(2) .castcard__icon { background: var(--mint); }
.castcard:nth-child(3) .castcard__icon { background: var(--peach); }
.castcard:nth-child(4) .castcard__icon { background: #e3e9ff; }
.pull { rotate: 1.2deg; box-shadow: 0 24px 50px -28px rgba(15, 71, 80, .7); }
.pull::after { content: ""; position: absolute; top: -13px; right: 2.2rem; width: 96px; height: 28px; rotate: 4deg; background: color-mix(in srgb, var(--sun) 85%, transparent); border-radius: 3px; }

/* For whom */
.forwho { background: linear-gradient(180deg, var(--paper), var(--mint) 30%, var(--mint) 70%, #fff); }
.forwho__item { align-items: center; background: #fff; box-shadow: 0 16px 36px -28px rgba(15, 71, 80, .55); transition: translate .35s var(--ease); }
.forwho__item:hover { translate: 0 -4px; }
.forwho__item::before { display: none; }
.forwho__icon { flex: none; display: grid; place-items: center; width: 3.2rem; height: 3.2rem; border-radius: 50%; background: var(--butter); font-size: 1.6rem; }

/* Reviews in three pastel tints */
.review { padding-top: 1.3rem; background: var(--mint); transition: translate .35s var(--ease); }
.review:nth-child(3n+2) { background: var(--butter); }
.review:nth-child(3n) { background: var(--peach); }
.review:hover { translate: 0 -4px; }
.review::before { content: "”"; display: block; height: 2.1rem; font: 600 4.2rem/1 var(--serif); color: var(--accent); }
.review blockquote p { font-size: 1.08rem; }

/* Audiobook strip: beach-towel stripes */
.listen { background: repeating-linear-gradient(115deg, var(--sun) 0 46px, #ffe680 46px 92px); }
.listen__icon { font-size: 2.6rem; display: grid; place-items: center; width: 4.6rem; height: 4.6rem; background: #fff; border-radius: 50%; box-shadow: 0 4px 0 rgba(0,0,0,.12); }
.listen h2::after { display: none; }

/* Home */
.home-book .feature { overflow: visible; }
.feature__book::before { content: ""; position: absolute; z-index: -1; inset: 6% -12% 0 -8%; border-radius: 46% 54% 58% 42% / 50% 44% 56% 50%; background: var(--butter); }
.feature__more-icon { box-shadow: 0 4px 0 color-mix(in srgb, var(--accent) 70%, #000); }
.author { background: linear-gradient(180deg, var(--paper), #fff); }
.footer__inner .flipflops { width: 46px; }
.footer__social { margin-left: auto; }

@media (min-width: 768px) {
  .listen__grid { grid-template-columns: auto 1fr auto; }
  .cast__list { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 767px) {
  .snap:nth-child(2) { translate: 0; }
}

/* Home: short intro so the book starts within the first screen */
.intro__grid { padding-block: clamp(2rem, 4.5vw, 4rem); }
.home-book .feature__grid { padding-top: clamp(2rem, 4vw, 3.5rem); }
@media (min-width: 1024px) {
  .intro__grid { min-height: 0; grid-template-columns: 1.1fr 1fr; }
  .intro__photo { width: min(100%, 520px); justify-self: end; }
}

/* Landing: short hero so the reader quotes start within the first screen */
.hero__grid { padding-block: clamp(2rem, 4.5vw, 4rem); }
.snaps { padding-top: clamp(1.5rem, 3vw, 2.5rem); }
@media (min-width: 1024px) {
  .hero__grid { min-height: 0; }
  .hero__book { width: min(100%, 330px); justify-self: center; }
  .hero__title { font-size: clamp(2.8rem, 5.4vw, 4.6rem); }
}
@media (max-width: 767px) {
  .hero__book { width: min(48vw, 220px); }
}

/* Home: hovering the book title draws the same yellow marker as the landing title */
.feature__title a {
  background: linear-gradient(transparent 68%, color-mix(in srgb, var(--sun) 85%, transparent) 68% 92%, transparent 92%) 0 0 / 0 100% no-repeat;
  box-decoration-break: clone; -webkit-box-decoration-break: clone; padding-inline: .08em; margin-inline: -.08em;
  transition: background-size .6s var(--ease);
}
.feature__title a:hover, .feature__title a:focus-visible { background-size: 12em 100%; } /* wider than any line; % falls short on wrapped titles */

/* Footer: flip-flops, name and copyright in one tidy row (stacked and centred on phones) */
.footer__inner { gap: .9rem 1.1rem; }
.footer .brand { margin-right: 0; }
.footer__copy { width: auto; margin-left: auto; }
@media (max-width: 767px) {
  .footer { padding-block: 2.5rem 6.5rem; }
  .footer__inner { flex-direction: column; text-align: center; gap: .8rem; }
  .footer__copy, .footer__social { margin-left: 0; }
}

/* Logo: flip-flops instead of the dot */
.brand::before { display: none; }
.brand { gap: .6rem; }
.brand .flipflops { width: 34px; flex: none; transition: rotate .4s var(--ease); }
.brand:hover .flipflops { rotate: -12deg; }
.footer .brand .flipflops { width: 42px; }
@media (max-width: 767px) { .footer .brand { flex-direction: column; } }
.brand, .topnav__link { white-space: nowrap; }
.topnav { display: flex; }
@media (max-width: 767px) {
  .topbar .brand { letter-spacing: .16em; font-size: .78rem; gap: .45rem; }
  .topbar .brand .flipflops { width: 28px; }
  .topnav__link { padding: .5rem .5rem; font-size: .9rem; }
}
/* Top bar: flat button, so its label sits on the same line as the menu links */
.topbar .btn, .topbar .btn:hover, .topbar .btn:active { box-shadow: none; transform: none; }
.topbar .btn:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.signed-note { margin-top: .8rem; font-size: .95rem; opacity: .8; }
.signed .signed-note { font-size: .95rem; }
