/* ==========================================================================
   WindSock Info — site.css
   One stylesheet for every page. Design rules: docs/DESIGN.md
   House rules (inherited from windsockclub.com):
     • colors come from the tokens below — never hard-code a hex in a page
     • Outfit for display, Geist for text
     • honor prefers-reduced-motion
     • a book page only ever overrides --book-accent (set on <body>)
   ========================================================================== */

/* ── 1. Tokens ──────────────────────────────────────────────────────────── */
:root {
  /* WindSock Club palette (same values as windsockclub.com/css/styles.css) */
  --color-accent:      #0891b2;
  --color-accent-dark: #0e7490;
  --color-accent-soft: #ecfeff;
  --color-ink:         #0f172a;
  --color-ink-2:       #1e293b;
  --color-body:        #475569;
  --color-subtle:      #64748b;   /* smallest readable gray on white (4.8:1) */
  --color-muted:       #94a3b8;   /* decorative only — never body text */
  --color-border:      #e2e8f0;
  --color-surface:     #f8fafc;
  --color-paper:       #ffffff;

  /* WindSock Info additions */
  --color-sock:        #d7191c;   /* windsock red — the brand mark */
  --color-sky:         #eff6ff;
  --color-lilac:       #faf5ff;
  --book-accent:       var(--color-accent);   /* overridden per book page */

  --font-display: 'Outfit', system-ui, sans-serif;
  --font-body:    'Geist', 'Inter', system-ui, sans-serif;

  --radius-sm:   12px;
  --radius-card: 20px;
  --radius-lg:   28px;
  --radius-pill: 999px;

  --shadow-card: 0 1px 2px rgba(15, 23, 42, .04), 0 16px 40px -18px rgba(15, 23, 42, .18);
  --shadow-lift: 0 2px 4px rgba(15, 23, 42, .05), 0 28px 60px -24px rgba(15, 23, 42, .32);

  --container: 1200px;
  --gutter: clamp(16px, 4.5vw, 64px);
  --section-y: clamp(72px, 10vw, 136px);
  --nav-h: 80px;
  --subnav-h: 44px;

  --ease-out: cubic-bezier(.2, .7, .2, 1);
}
@media (max-width: 700px) { :root { --nav-h: 68px; } }

/* ── 2. Reset & base ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 24px); }
body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-ink);
  background: linear-gradient(128.2deg, var(--color-sky) 0%, var(--color-paper) 50%, var(--color-lilac) 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, canvas, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; }
p { text-wrap: pretty; }
strong { font-weight: 600; color: var(--color-ink); }

:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 18px; border-radius: var(--radius-pill);
  background: var(--color-ink); color: var(--color-paper); font-weight: 600;
}
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(48px, 7vw, 88px); }
.section--surface { background: var(--color-surface); border-block: 1px solid var(--color-border); }

/* ── 3. Type helpers ────────────────────────────────────────────────────── */
/* Kicker: the small line that names a section (windsockclub "eyebrow",
   used only where it carries information). Sentence case, accent color. */
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: .875rem;
  color: var(--color-accent-dark); letter-spacing: .01em;
}
.kicker--light { color: #67e8f9; }
.section-head { display: grid; gap: 16px; max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head h2 { font-size: clamp(2rem, 3.8vw, 3.25rem); font-weight: 700; }
.section-head p { color: var(--color-body); font-size: 1.125rem; max-width: 62ch; }
.section-head--row { max-width: none; grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: 40px; }
@media (max-width: 760px) { .section-head--row { grid-template-columns: 1fr; } }

.lede { font-size: clamp(1.0625rem, 1.4vw, 1.25rem); line-height: 1.6; color: var(--color-body); }
.prose p + p { margin-top: 1.1em; }
.prose { color: var(--color-body); max-width: 66ch; }

.sock-glyph { width: 22px; height: 14px; flex-shrink: 0; }

/* ── 4. Buttons, chips ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 24px; border-radius: var(--radius-pill);
  font-family: var(--font-body); font-weight: 600; font-size: .875rem;
  text-transform: uppercase; letter-spacing: .04em; white-space: nowrap;
  border: 1px solid transparent;
  transition: background-color .15s, border-color .15s, color .15s, transform .15s var(--ease-out), box-shadow .15s;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--color-accent); color: var(--color-paper); box-shadow: 0 10px 24px -12px rgba(8, 145, 178, .8); }
.btn--primary:hover { background: var(--color-accent-dark); }
.btn--outline { background: var(--color-paper); border-color: var(--color-border); color: var(--color-ink); }
.btn--outline:hover { border-color: var(--color-accent); color: var(--color-accent-dark); }
.btn--ghost-light { border-color: rgba(255, 255, 255, .35); color: var(--color-paper); }
.btn--ghost-light:hover { border-color: var(--color-paper); background: rgba(255, 255, 255, .08); }
.btn--light { background: var(--color-paper); color: var(--color-ink); }
.btn--light:hover { background: var(--color-accent-soft); }
.btn--lg { min-height: 58px; padding: 16px 32px; font-size: .9375rem; }
.btn--block { width: 100%; }

.text-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; color: var(--color-accent-dark);
  text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--color-accent) 35%, transparent);
  text-underline-offset: 4px; text-decoration-thickness: 1.5px;
  transition: text-decoration-color .15s;
}
.text-link:hover { text-decoration-color: currentColor; }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: var(--radius-pill);
  border: 1.5px solid var(--color-border); background: var(--color-paper);
  font-size: .8125rem; font-weight: 600; color: var(--color-body);
  transition: border-color .15s, color .15s, background-color .15s;
}
.chip:hover { border-color: var(--color-accent); color: var(--color-accent-dark); }
.chip[aria-pressed="true"] { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-paper); }
.chip__count { font-size: .6875rem; padding: 1px 7px; border-radius: var(--radius-pill); background: rgba(15, 23, 42, .08); }
.chip[aria-pressed="true"] .chip__count { background: rgba(255, 255, 255, .25); }

/* ── 5. Navbar (mirrors windsockclub.com) ───────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: rgba(255, 255, 255, .95);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.navbar__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand img { width: 54px; height: auto; }
.brand__text { display: grid; line-height: 1.05; }
.brand__name { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; color: var(--color-ink); }
.brand__tag { font-size: .75rem; font-weight: 500; color: var(--color-subtle); }
.navbar__links { display: flex; align-items: center; gap: 4px; }
.navbar__links a {
  padding: 8px 14px; border-radius: var(--radius-pill);
  font-size: .9375rem; font-weight: 500; color: var(--color-ink);
  transition: color .15s, background-color .15s;
}
.navbar__links a:hover, .navbar__links a[aria-current="page"] { color: var(--color-accent); }
.navbar__actions { display: flex; align-items: center; gap: 10px; }
.navbar__actions .btn { min-height: 42px; padding: 10px 20px; font-size: .8125rem; }
.navbar__burger { display: none; width: 44px; height: 44px; border-radius: 12px; align-items: center; justify-content: center; flex-direction: column; gap: 5px; }
.navbar__burger span { display: block; width: 22px; height: 2px; background: var(--color-ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
.navbar__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.navbar__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Collection bar: the dark band under the navbar, one link per book */
.subnav { position: relative; z-index: 45; background: var(--color-ink); }
.subnav__inner { display: flex; align-items: center; gap: 4px; height: var(--subnav-h); overflow-x: auto; scrollbar-width: none; justify-content: center; }
.subnav__inner::-webkit-scrollbar { display: none; }
.subnav__label { flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; padding-right: 12px; margin-right: 4px; border-right: 1px solid rgba(255, 255, 255, .14); font-size: .8125rem; font-weight: 600; color: rgba(255, 255, 255, .55); }
.subnav a {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; height: 100%;
  padding: 0 14px; font-size: .8125rem; font-weight: 600; color: rgba(255, 255, 255, .82);
  transition: color .15s, box-shadow .15s;
}
.subnav a:hover { color: var(--color-paper); }
.subnav a[aria-current="page"] { color: var(--color-paper); box-shadow: inset 0 -2px 0 var(--color-accent); }
.subnav__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dot, var(--color-accent)); box-shadow: 0 0 0 2px rgba(255, 255, 255, .15); }
.subnav__soon { font-size: .6875rem; font-weight: 700; padding: 2px 7px; border-radius: var(--radius-pill); background: rgba(255, 255, 255, .12); color: #a5f3fc; }

.mobile-nav {
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: 48;
  padding: 20px var(--gutter) 32px; overflow-y: auto;
  background: var(--color-paper);
  display: flex; flex-direction: column; gap: 4px;
  transform: translateY(-8px); opacity: 0; visibility: hidden;
  transition: opacity .2s, transform .2s, visibility 0s .2s;
}
.mobile-nav.is-open { opacity: 1; transform: none; visibility: visible; transition: opacity .2s, transform .2s; }
.mobile-nav a:not(.btn) { padding: 12px 0; border-bottom: 1px solid var(--color-border); font-size: 1.125rem; font-weight: 600; }
.mobile-nav__group { margin-top: 18px; font-size: .8125rem; font-weight: 600; color: var(--color-subtle); }
.mobile-nav .btn { margin-top: 20px; }

@media (max-width: 980px) {
  .navbar__links, .navbar__actions .btn--outline { display: none; }
  .navbar__burger { display: inline-flex; }
}
@media (max-width: 760px) {
  .subnav__inner { justify-content: flex-start; }
  .navbar__actions .btn--primary { display: none; }
  .brand img { width: 46px; }
}
body.nav-open { overflow: hidden; }

/* ── 6. Breadcrumb ──────────────────────────────────────────────────────── */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .875rem; color: var(--color-subtle); }
.crumbs a { font-weight: 500; color: var(--color-body); }
.crumbs a:hover { color: var(--color-accent-dark); }
.crumbs li + li::before { content: '/'; margin-right: 8px; color: var(--color-muted); }
.crumbs [aria-current="page"] { color: var(--color-accent-dark); font-weight: 500; }

/* ── 7. Scene containers (three.js) ─────────────────────────────────────── */
/* The fallback (an <svg>/<picture>/CSS book) shows until the WebGL scene
   reports ready, then cross-fades — same pattern as windsockclub's globe. */
.scene { position: relative; }
.scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .9s var(--ease-out); touch-action: pan-y; }
.scene.is-live canvas { opacity: 1; }
.scene__fallback { transition: opacity .6s var(--ease-out); }
.scene.is-live .scene__fallback { opacity: 0; pointer-events: none; }

/* ── 8. Home hero ───────────────────────────────────────────────────────── */
.hero {
  position: relative; isolation: isolate;
  min-height: clamp(620px, calc(100svh - var(--nav-h) - var(--subnav-h)), 880px);
  display: flex; align-items: center;
  padding-block: clamp(40px, 6vw, 72px);
  overflow: hidden;
}
.hero::before {           /* soft sky that the sock flies in */
  content: ''; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(60% 70% at 72% 40%, rgba(186, 230, 253, .55) 0%, rgba(186, 230, 253, 0) 70%),
    radial-gradient(40% 50% at 95% 90%, rgba(233, 213, 255, .45) 0%, rgba(233, 213, 255, 0) 70%);
}
.hero__scene { position: absolute; z-index: -1; top: 0; bottom: 0; right: 0; width: min(62%, 1040px); }
.hero__scene .scene__fallback { position: absolute; inset: 8% 6% 18% 10%; width: auto; height: auto; }
.hero__inner { position: relative; }
.hero__copy { max-width: 600px; }
.hero__kicker { margin-bottom: 22px; }
.hero__title {
  font-size: clamp(3rem, 6.6vw, 6rem);
  font-weight: 800; line-height: .95; letter-spacing: -0.045em;
  color: var(--color-ink);
}
.hero__title span { display: block; }
.hero__lede { margin-top: 26px; max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero__note { margin-top: 22px; font-size: .875rem; color: var(--color-subtle); }

/* Page-load sequence: the one orchestrated moment on the home page */
.hero__title span, .hero__lede, .hero__actions, .hero__note, .hero__kicker {
  animation: rise .9s var(--ease-out) both;
}
.hero__kicker { animation-delay: .05s; }
.hero__title span:nth-child(1) { animation-delay: .12s; }
.hero__title span:nth-child(2) { animation-delay: .24s; }
.hero__lede { animation-delay: .38s; }
.hero__actions { animation-delay: .5s; }
.hero__note { animation-delay: .6s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* Wind readout — the windsockclub weather-card language (Beaufort badge) */
.wind-readout {
  position: absolute; right: var(--gutter); bottom: clamp(20px, 4vw, 40px); z-index: 2;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 18px 12px 12px; border-radius: 18px;
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, .9);
  box-shadow: var(--shadow-card);
  opacity: 0; transform: translateY(8px);
  transition: opacity .6s .4s var(--ease-out), transform .6s .4s var(--ease-out);
}
.hero.is-live .wind-readout { opacity: 1; transform: none; }
.wind-readout__badge {
  position: relative; width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--color-ink); color: var(--color-paper);
  font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; line-height: 1;
}
.wind-readout__badge small { position: absolute; top: 6px; left: 0; right: 0; text-align: center; font-family: var(--font-body); font-size: .5625rem; font-weight: 600; letter-spacing: .06em; color: #67e8f9; }
.wind-readout__badge b { margin-top: 10px; font-weight: 700; }
.wind-readout__text { display: grid; gap: 2px; min-width: 168px; }
.wind-readout__name { font-family: var(--font-display); font-weight: 600; font-size: 1.0625rem; color: var(--color-ink); }
.wind-readout__speed { font-size: .8125rem; color: var(--color-body); font-variant-numeric: tabular-nums; }
.wind-readout__hint { font-size: .75rem; color: var(--color-subtle); }

@media (max-width: 1100px) {
  .hero { --scene-h: clamp(270px, 46svh, 440px); flex-direction: column; align-items: stretch; min-height: 0; padding-top: 0; }
  .hero__scene { position: relative; z-index: 0; width: auto; height: var(--scene-h); }
  .hero__scene .scene__fallback { inset: 10% 8% 16% 6%; }
  .wind-readout { top: calc(var(--scene-h) - 70px); bottom: auto; right: var(--gutter); padding: 8px 14px 8px 8px; gap: 10px; }
  .wind-readout__badge { width: 44px; height: 44px; font-size: 1.25rem; }
  .wind-readout__badge small { top: 4px; }
  .wind-readout__text { min-width: 0; }
  .wind-readout__hint { display: none; }
  .hero__copy { max-width: 760px; margin-top: 8px; }
}

/* ── 9. Collection ──────────────────────────────────────────────────────── */
.collection { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); gap: clamp(20px, 2.4vw, 32px); }
.book-card {
  --tint: color-mix(in srgb, var(--book-accent) 9%, var(--color-paper));
  position: relative; display: flex; flex-direction: column;
  background: var(--color-paper); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-card);
  container-type: inline-size;
}
.book-card__inner { display: flex; flex-direction: column; flex: 1; }
.collection > .book-card:only-of-type { grid-column: 1 / -1; }   /* a lone card takes the full row */
.book-card__stage {
  position: relative; display: grid; place-items: center;
  min-height: clamp(360px, 31vw, 440px);
  padding: clamp(36px, 5vw, 56px) 24px clamp(40px, 5vw, 60px);
  background:
    radial-gradient(70% 80% at 50% 35%, color-mix(in srgb, var(--book-accent) 16%, transparent) 0%, transparent 70%),
    var(--tint);
  border-bottom: 1px solid color-mix(in srgb, var(--book-accent) 14%, var(--color-border));
}
.book-card__num {
  position: absolute; top: 18px; left: 20px;
  font-family: var(--font-display); font-weight: 700; font-size: .875rem;
  color: var(--book-accent);
}
.book-card__body { display: flex; flex-direction: column; gap: 12px; padding: clamp(24px, 3vw, 34px); flex: 1; }
.book-card__category { font-size: .8125rem; font-weight: 600; color: var(--book-accent); }
.book-card__title { font-size: clamp(1.5rem, 2.2vw, 1.875rem); font-weight: 700; }
.book-card__title a:hover { color: var(--color-accent-dark); }
.book-card__sub { font-family: var(--font-display); font-weight: 500; color: var(--color-body); margin-top: -4px; }
.book-card__hook { color: var(--color-body); }
.book-card__facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; padding: 0; list-style: none; }
.book-card__facts li { padding: 5px 12px; border-radius: var(--radius-pill); background: var(--color-surface); border: 1px solid var(--color-border); font-size: .8125rem; font-weight: 500; color: var(--color-body); }
.book-card__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 14px; }
/* A card with room (e.g. a lone "More from the collection" card) lays out sideways */
@container (min-width: 760px) {
  .book-card__inner { flex-direction: row; }
  .book-card__stage { flex: 0 0 42%; border-bottom: 0; border-right: 1px solid color-mix(in srgb, var(--book-accent) 14%, var(--color-border)); }
  .book-card__body { justify-content: center; padding: clamp(32px, 4vw, 56px); }
  .book-card__actions { margin-top: 8px; }
}
.book-card__soon { position: absolute; top: 16px; right: 18px; padding: 4px 10px; border-radius: var(--radius-pill); background: var(--color-ink); color: var(--color-paper); font-size: .75rem; font-weight: 700; }

.next-card {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 24px;
  padding: 24px clamp(20px, 3vw, 34px);
  border: 1.5px dashed color-mix(in srgb, var(--color-accent) 45%, var(--color-border));
  border-radius: var(--radius-lg); background: rgba(255, 255, 255, .6);
}
.next-card__icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--color-accent-soft); color: var(--color-accent-dark); }
.next-card__icon svg { width: 26px; height: 26px; }
.next-card h3 { font-size: 1.25rem; font-weight: 700; }
.next-card p { color: var(--color-body); font-size: .9375rem; margin-top: 4px; }
@media (max-width: 680px) { .next-card { grid-template-columns: 1fr; text-align: left; } }

/* CSS 3D book (cards + no-WebGL fallback on book pages) */
.book3d { --w: 200px; --t: 22px; perspective: 1500px; width: var(--w); }
.book3d__body {
  position: relative; width: var(--w); aspect-ratio: var(--ar, 2 / 3);
  transform-style: preserve-3d;
  transform: rotateY(-24deg) rotateX(3deg);
  transition: transform .7s var(--ease-out);
}
.book3d__cover {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  border-radius: 2px 5px 5px 2px;
  transform: translateZ(calc(var(--t) / 2));
  box-shadow: inset 4px 0 6px -4px rgba(255, 255, 255, .5);
}
.book3d__body::before {            /* page block */
  content: ''; position: absolute; top: 3px; bottom: 3px; left: 0;
  width: calc(var(--t) - 2px);
  transform: translateX(calc(var(--w) - var(--t) / 2 - 2px)) rotateY(90deg);
  background: repeating-linear-gradient(90deg, #fdfdfb 0 2px, #e7e5df 2px 3px);
}
.book3d__body::after {             /* back board + floor shadow */
  content: ''; position: absolute; inset: 0;
  transform: translateZ(calc(var(--t) / -2));
  background: color-mix(in srgb, var(--book-accent) 82%, #000);
  border-radius: 2px 5px 5px 2px;
  box-shadow: -18px 22px 44px -6px rgba(15, 23, 42, .38);
}
.book3d--lg { --w: clamp(220px, 26vw, 320px); --t: 30px; }
a:hover .book3d__body, a:focus-visible .book3d__body, .book3d:hover .book3d__body { transform: rotateY(-10deg) rotateX(2deg) translateY(-6px); }

/* ── 10. Manifesto ("Why we write") ─────────────────────────────────────── */
.manifesto {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(128.2deg, #0f172a 0%, #1e293b 50%, #1a1025 100%);
  color: #cbd5e1;
  padding-block: var(--section-y);
}
.manifesto::before {   /* faint wind lines */
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='240' viewBox='0 0 600 240'%3E%3Cg fill='none' stroke='%2367e8f9' stroke-opacity='.10' stroke-width='1.2' stroke-linecap='round'%3E%3Cpath d='M0 40c120-18 220 18 340 0s180-20 260 0'/%3E%3Cpath d='M-20 120c140-22 240 22 380 0s160-18 260 4'/%3E%3Cpath d='M0 200c100-14 210 14 320 0s200-16 280 0'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 600px 240px;
}
.manifesto__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(40px, 7vw, 112px); align-items: start; }
.manifesto__head { position: sticky; top: calc(var(--nav-h) + 40px); display: grid; gap: 22px; }
.manifesto__head h2 { color: var(--color-paper); font-size: clamp(2.4rem, 4.6vw, 4rem); font-weight: 700; letter-spacing: -0.035em; line-height: 1; }
.manifesto__head p { color: #94a3b8; font-size: 1.0625rem; max-width: 40ch; }
.manifesto__text { font-size: clamp(1.0625rem, 1.3vw, 1.1875rem); line-height: 1.75; max-width: 60ch; }
.manifesto__text p + p { margin-top: 1.25em; }
.manifesto__text strong { color: var(--color-paper); }
.manifesto__key {
  margin-block: 1.6em !important;
  padding-left: 22px; border-left: 3px solid var(--color-sock);
  font-family: var(--font-display); font-weight: 500; font-size: clamp(1.375rem, 2.2vw, 1.875rem); line-height: 1.3; letter-spacing: -0.015em;
  color: var(--color-paper);
}
.manifesto__steps {
  display: grid; margin-top: clamp(64px, 9vw, 120px);
  font-family: var(--font-display); font-weight: 800; letter-spacing: -0.045em; line-height: .98;
  font-size: clamp(2.5rem, 7.2vw, 6.25rem); color: var(--color-paper);
}
.manifesto__steps span { display: block; transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.manifesto__steps span:nth-child(2) { padding-left: 4vw; }
.manifesto__steps span:nth-child(3) { padding-left: 8vw; }
.js .manifesto__steps span { opacity: .14; transform: translateX(-24px); }
.js .manifesto__steps span.is-in { opacity: 1; transform: none; }
.manifesto__close { margin-top: clamp(40px, 5vw, 64px); max-width: 52ch; margin-left: auto; font-size: clamp(1.125rem, 1.6vw, 1.375rem); line-height: 1.55; color: #e2e8f0; }
@media (max-width: 900px) {
  .manifesto__grid { grid-template-columns: 1fr; }
  .manifesto__head { position: static; }
  .manifesto__steps span:nth-child(n) { padding-left: 0; }
}

/* ── 11. Author + family ────────────────────────────────────────────────── */
.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 2.4vw, 32px); }
@media (max-width: 860px) { .duo { grid-template-columns: 1fr; } }
.panel {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 16px;
  padding: clamp(28px, 3.6vw, 48px);
  background: var(--color-paper); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.panel h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 700; }
.panel p { color: var(--color-body); }
.panel .btn { align-self: flex-start; margin-top: auto; }
.panel__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 8px; }
.panel__actions .btn { margin-top: 0; }
.monogram { width: 76px; height: 76px; border-radius: 22px; display: grid; place-items: center; background: var(--color-ink); color: var(--color-paper); font-family: var(--font-display); font-weight: 800; font-size: 1.75rem; letter-spacing: -0.04em; position: relative; overflow: hidden; }
.monogram::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: repeating-linear-gradient(90deg, var(--color-sock) 0 15.2px, #fff 15.2px 30.4px); }
.panel--family { padding: 0; background: var(--color-ink); color: #cbd5e1; border-color: var(--color-ink); }
.panel--family .panel__media { aspect-ratio: 3 / 1.45; overflow: hidden; background: #f7f7f7; }
.panel--family .panel__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }
.panel--family .panel__body { display: flex; flex-direction: column; gap: 14px; padding: clamp(24px, 3.2vw, 40px); flex: 1; }
.panel--family h2 { color: var(--color-paper); }
.panel--family p { color: #94a3b8; }
.panel--family .family-logo { display: flex; align-items: center; gap: 12px; font-size: .875rem; font-weight: 600; color: #67e8f9; }
.panel--family .family-logo img { width: 40px; }

/* ── 12. CTA band ───────────────────────────────────────────────────────── */
.cta-band {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg);
  padding: clamp(36px, 6vw, 72px);
  background: linear-gradient(100deg, var(--color-ink) 0%, color-mix(in srgb, var(--color-accent-dark) 45%, var(--color-ink)) 55%, var(--color-accent-dark) 100%);
  color: #e2e8f0;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 32px;
}
.cta-band h2 { color: var(--color-paper); font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 800; letter-spacing: -0.035em; }
.cta-band p { margin-top: 12px; max-width: 52ch; color: #cbd5e1; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-band__sock { position: absolute; right: -40px; top: -30px; width: 260px; opacity: .08; pointer-events: none; }
@media (max-width: 860px) { .cta-band { grid-template-columns: 1fr; } }

/* ── 13. Footer (mirrors windsockclub.com) ──────────────────────────────── */
.footer { background: var(--color-ink); color: #94a3b8; font-size: .9375rem; }
.footer__top { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 40px; padding-block: 64px 48px; }
.footer__brand { display: grid; gap: 16px; align-content: start; max-width: 360px; }
.footer__brand .brand__name { color: var(--color-paper); }
.footer__brand .brand__tag { color: #94a3b8; }
.footer__brand p { line-height: 1.6; }
.footer__col { display: grid; gap: 10px; align-content: start; }
.footer__col h2 { font-family: var(--font-body); font-size: .8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--color-paper); margin-bottom: 6px; }
.footer__col a { color: #cbd5e1; transition: color .15s; }
.footer__col a:hover { color: #67e8f9; }
.footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; padding-block: 24px 32px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .8125rem; }
.footer__legal p { max-width: 80ch; }
@media (max-width: 900px) { .footer__top { grid-template-columns: 1fr 1fr; } .footer__brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer__top { grid-template-columns: 1fr; } }

/* ══════════════════════════════════════════════════════════════════════════
   BOOK PAGES
   ══════════════════════════════════════════════════════════════════════════ */
.book-hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding-block: clamp(28px, 4vw, 44px) clamp(56px, 8vw, 104px);
}
.book-hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(55% 75% at 22% 45%, color-mix(in srgb, var(--book-accent) 16%, transparent) 0%, transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--book-accent) 5%, transparent) 0%, transparent 100%);
}
.book-hero__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 80px); align-items: center; margin-top: clamp(20px, 3vw, 36px); }
.book-stage { aspect-ratio: 1 / 1.08; display: grid; place-items: center; cursor: grab; }
.book-stage:active { cursor: grabbing; }
.book-stage__hint { position: absolute; left: 50%; top: 3%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: var(--radius-pill); background: rgba(255, 255, 255, .8); border: 1px solid var(--color-border); font-size: .75rem; font-weight: 500; color: var(--color-subtle); white-space: nowrap; opacity: 0; transition: opacity .5s .6s; pointer-events: none; }
.book-stage.is-live .book-stage__hint { opacity: 1; }
.book-stage__hint svg { width: 14px; height: 14px; }

.book-info { display: grid; gap: 18px; }
.book-info__series { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: .875rem; font-weight: 600; color: var(--color-body); }
.book-info__series .tag { padding: 4px 12px; border-radius: var(--radius-pill); background: var(--book-accent); color: var(--color-paper); font-size: .75rem; font-weight: 700; }
.book-info h1 { font-size: clamp(2.25rem, 4.4vw, 3.75rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; }
.book-info__subtitle { font-family: var(--font-display); font-size: clamp(1.25rem, 2vw, 1.625rem); font-weight: 500; color: var(--book-accent); line-height: 1.25; margin-top: -6px; }
.book-info__by { font-size: .9375rem; color: var(--color-body); }
.book-info__by a { font-weight: 600; color: var(--color-ink); text-decoration: underline; text-decoration-color: var(--color-border); text-underline-offset: 4px; }
.book-info__by a:hover { text-decoration-color: var(--color-accent); }

/* Buy box */
.buybox { display: grid; gap: 14px; padding: clamp(18px, 2.4vw, 24px); margin-top: 6px; border-radius: var(--radius-card); background: var(--color-paper); border: 1px solid var(--color-border); box-shadow: var(--shadow-card); }
.formats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; border: 0; padding: 0; }
.format { position: relative; display: grid; gap: 2px; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--color-border); cursor: pointer; transition: border-color .15s, background-color .15s, box-shadow .15s; }
.format:hover { border-color: color-mix(in srgb, var(--color-accent) 50%, var(--color-border)); }
.format input { position: absolute; opacity: 0; pointer-events: none; }
.format:has(input:checked) { border-color: var(--color-accent); background: var(--color-accent-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 18%, transparent); }
.format:has(input:focus-visible) { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.format__name { font-weight: 600; font-size: .9375rem; color: var(--color-ink); }
.format__price { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.02em; color: var(--color-ink); }
.format__note { font-size: .8125rem; color: var(--color-subtle); }
.format--single { cursor: default; }
.store-pick { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; font-size: .8125rem; color: var(--color-subtle); }
.store-pick label { display: inline-flex; align-items: center; gap: 8px; }
.store-pick select { appearance: none; padding: 7px 34px 7px 12px; border-radius: var(--radius-pill); border: 1px solid var(--color-border); background: var(--color-paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; font-size: .8125rem; font-weight: 600; color: var(--color-ink); cursor: pointer; }
.store-pick__note { width: 100%; color: #b45309; }
.store-pick__note:empty { display: none; }

.book-facts { display: flex; flex-wrap: wrap; gap: 10px 28px; padding: 0; list-style: none; font-size: .875rem; color: var(--color-body); }
.book-facts li { display: inline-flex; align-items: center; gap: 8px; }
.book-facts svg { width: 18px; height: 18px; color: var(--book-accent); }

@media (max-width: 900px) {
  .book-hero__grid { grid-template-columns: 1fr; }
  .book-stage { max-width: 440px; width: 100%; margin-inline: auto; aspect-ratio: 1 / .95; }
}

/* Highlights ("What's inside") */
.highlights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--color-border); }
.highlight { display: grid; gap: 10px; align-content: start; padding: 28px 28px 32px 0; border-bottom: 1px solid var(--color-border); }
.highlight:not(:nth-child(3n + 1)) { padding-left: 28px; border-left: 1px solid var(--color-border); }
.highlight__icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--book-accent) 10%, var(--color-paper)); color: var(--book-accent); margin-bottom: 6px; }
.highlight__icon svg { width: 22px; height: 22px; }
.highlight h3 { font-size: 1.25rem; font-weight: 700; }
.highlight p { color: var(--color-body); font-size: .9875rem; }
@media (max-width: 900px) {
  .highlights { grid-template-columns: 1fr 1fr; }
  .highlight:nth-child(n) { padding: 24px 20px 28px 0; border-left: 0; }
  .highlight:nth-child(2n) { padding-left: 20px; border-left: 1px solid var(--color-border); }
}
@media (max-width: 560px) {
  .highlights { grid-template-columns: 1fr; }
  .highlight:nth-child(n) { padding: 22px 0; border-left: 0; }
}

/* Audience + quote */
.audience { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.audience__quote { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.75rem, 3.2vw, 2.75rem); line-height: 1.15; letter-spacing: -0.025em; color: var(--color-ink); }
.audience__quote::before { content: ''; display: block; width: 56px; height: 6px; border-radius: 3px; margin-bottom: 24px; background: var(--book-accent); }
.audience__quote cite { display: block; margin-top: 18px; font-family: var(--font-body); font-style: normal; font-size: .875rem; font-weight: 500; letter-spacing: 0; color: var(--color-subtle); }
.audience__list { display: grid; gap: 10px; padding: 0; list-style: none; }
.audience__list li { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 14px; background: var(--color-paper); border: 1px solid var(--color-border); font-weight: 600; }
.audience__list svg { width: 20px; height: 20px; color: var(--book-accent); flex-shrink: 0; }
@media (max-width: 860px) { .audience { grid-template-columns: 1fr; } }

/* Signature — Emergency: the five worlds from the cover band */
.worlds { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow-card); }
.world { --c: #ca1315; display: grid; gap: 8px; align-content: start; padding: 26px 20px 28px; background: var(--c); color: rgba(255, 255, 255, .9); min-height: 220px; }
.world svg { width: 36px; height: 36px; color: var(--color-paper); margin-bottom: 8px; }
.world h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: var(--color-paper); letter-spacing: -0.01em; }
.world p { font-size: .875rem; line-height: 1.5; }
.world--firstaid { --c: #ca1315; }
.world--water    { --c: #1f589f; }
.world--air      { --c: #4f82c4; }
.world--marine   { --c: #176732; }
.world--snow     { --c: #6b7280; }
@media (max-width: 960px) { .worlds { grid-template-columns: repeat(2, minmax(0, 1fr)); } .world--firstaid { grid-column: 1 / -1; min-height: 0; } .world { min-height: 0; } }
@media (max-width: 480px) { .worlds { grid-template-columns: 1fr; } }

.quickref { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px 28px; align-items: center; margin-top: clamp(24px, 3vw, 36px); padding: 22px clamp(20px, 3vw, 32px); border-radius: var(--radius-card); background: var(--color-paper); border: 1px solid var(--color-border); border-left: 4px solid var(--color-sock); }
.quickref__sos { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; background: #fee2e2; color: var(--color-sock); font-family: var(--font-display); font-weight: 800; font-size: 1rem; }
.quickref h3 { font-size: 1.0625rem; font-weight: 700; margin-bottom: 4px; }
.quickref ul { display: flex; flex-wrap: wrap; gap: 4px 22px; padding: 0; list-style: none; font-size: .9375rem; color: var(--color-body); }
.quickref ul b { font-family: var(--font-display); font-weight: 700; color: var(--color-ink); }
@media (max-width: 760px) { .quickref { grid-template-columns: 1fr; } }

/* Signature — Three Generations: the sports explorer */
.sports-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.sports { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; padding: 0; list-style: none; }
.sport { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--color-paper); border: 1px solid var(--color-border); font-weight: 600; font-size: .9375rem; transition: opacity .25s, transform .25s var(--ease-out); }
.sport__el { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; background: var(--el); }
.sport[data-el="air"]   { --el: #38bdf8; }
.sport[data-el="water"] { --el: #2563eb; }
.sport[data-el="land"]  { --el: #f59e0b; }
.sport[data-el="snow"]  { --el: #94a3b8; }
.sport[hidden] { display: none; }
.sports-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 20px; font-size: .8125rem; color: var(--color-subtle); }
.sports-legend span { display: inline-flex; align-items: center; gap: 8px; }

/* Look inside / video (optional per book) */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.gallery button { border-radius: 14px; overflow: hidden; border: 1px solid var(--color-border); background: var(--color-paper); box-shadow: var(--shadow-card); transition: transform .3s var(--ease-out); }
.gallery button:hover { transform: translateY(-3px); }
.gallery img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.lightbox { padding: 0; border: 0; background: transparent; max-width: min(92vw, 900px); max-height: 92vh; }
.lightbox::backdrop { background: rgba(15, 23, 42, .82); }
.lightbox img { max-height: 86vh; width: auto; margin-inline: auto; border-radius: 10px; }
.lightbox button { position: fixed; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; background: var(--color-paper); font-size: 1.5rem; line-height: 1; }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-card); overflow: hidden; background: var(--color-ink); box-shadow: var(--shadow-lift); }
.video button { position: absolute; inset: 0; display: grid; place-items: center; width: 100%; }
.video img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.video__play { position: relative; width: 78px; height: 78px; border-radius: 50%; background: var(--color-paper); display: grid; place-items: center; box-shadow: var(--shadow-lift); }
.video__play svg { width: 28px; height: 28px; margin-left: 4px; color: var(--color-ink); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Preview callout (when there are no sample images yet) */
.preview { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 24px 32px; align-items: center; padding: clamp(24px, 3vw, 36px); border-radius: var(--radius-lg); background: var(--color-paper); border: 1px solid var(--color-border); box-shadow: var(--shadow-card); }
.preview img { width: 88px; border-radius: 4px; box-shadow: 0 10px 24px -10px rgba(15, 23, 42, .5); }
.preview h2 { font-size: clamp(1.375rem, 2.4vw, 1.875rem); font-weight: 700; }
.preview p { color: var(--color-body); margin-top: 6px; }
@media (max-width: 760px) { .preview { grid-template-columns: 1fr; } }

/* Details + FAQ */
.details-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
@media (max-width: 900px) { .details-grid { grid-template-columns: 1fr; } }
.details-grid h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 700; margin-bottom: 20px; }
.spec { display: grid; gap: 22px; }
.spec__group { border-radius: var(--radius-card); background: var(--color-paper); border: 1px solid var(--color-border); overflow: hidden; }
.spec__group h3 { padding: 14px 20px; font-family: var(--font-body); font-size: .875rem; font-weight: 600; color: var(--color-ink); background: var(--color-surface); border-bottom: 1px solid var(--color-border); }
.spec dl { display: grid; grid-template-columns: auto minmax(0, 1fr); }
.spec dt, .spec dd { padding: 11px 20px; border-bottom: 1px solid var(--color-border); font-size: .9375rem; }
.spec dt { color: var(--color-subtle); }
.spec dd { text-align: right; font-weight: 500; color: var(--color-ink); font-variant-numeric: tabular-nums; }
.spec dl > :nth-last-child(-n + 2) { border-bottom: 0; }

.faq { display: grid; gap: 10px; }
.faq details { border-radius: 16px; background: var(--color-paper); border: 1px solid var(--color-border); transition: border-color .15s; }
.faq details[open] { border-color: color-mix(in srgb, var(--color-accent) 40%, var(--color-border)); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--color-surface); color: var(--color-accent-dark); font-size: 1.25rem; font-weight: 400; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 22px 20px; color: var(--color-body); }
.faq details > div p + p { margin-top: .8em; }
.faq a { color: var(--color-accent-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* Sticky buy bar */
.buybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -12px 32px -20px rgba(15, 23, 42, .35);
  transform: translateY(110%); transition: transform .35s var(--ease-out);
}
.buybar.is-visible { transform: none; }
.buybar__inner { display: flex; align-items: center; gap: 14px; }
.buybar img { width: 36px; border-radius: 3px; box-shadow: 0 4px 10px -4px rgba(15, 23, 42, .5); }
.buybar__text { display: grid; min-width: 0; flex: 1; line-height: 1.3; }
.buybar__text strong { font-family: var(--font-display); font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.buybar__text span { font-size: .8125rem; color: var(--color-subtle); }
.buybar .btn { min-height: 44px; padding: 10px 20px; }

/* ── 404 ────────────────────────────────────────────────────────────────── */
.notfound { min-height: 64vh; display: grid; place-items: center; text-align: center; padding-block: var(--section-y); }
.notfound__code { font-family: var(--font-display); font-weight: 800; font-size: clamp(6rem, 18vw, 12rem); line-height: .9; letter-spacing: -0.06em; color: var(--color-ink); }
.notfound p { color: var(--color-body); margin: 16px auto 28px; max-width: 46ch; }
.notfound .hero__actions { justify-content: center; }
.notfound svg { width: 160px; margin: 0 auto 24px; transform-origin: 8% 30%; transform: rotate(52deg); }

/* ── 15. Look inside: the open-book reader ──────────────────────────────── */
/* Clicking the 3D book (or "Look inside") lifts the stage out of the hero
   (a placeholder keeps the layout), grows it to the whole screen, plays the
   book's opening film (scenes.js) and raises the sample pages out of it.
   The pages are books/<slug>/samples/page-NN-*.webp (tools/make-pages.py). */
.book-stage__open { position: absolute; left: 50%; bottom: 3%; transform: translateX(-50%); z-index: 3; min-height: 42px; padding: 10px 18px; font-size: .8125rem; border-color: var(--color-border); box-shadow: var(--shadow-card); }
.book-stage__open:hover { background: var(--color-paper); border-color: var(--color-accent); color: var(--color-accent-dark); }
.book-stage__open svg { width: 18px; height: 18px; }
.book-stage__skip { position: absolute; left: 50%; bottom: 4%; transform: translateX(-50%); z-index: 3; padding: 6px 14px; border-radius: var(--radius-pill); background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .28); color: #fff; font-size: .75rem; font-weight: 600; letter-spacing: .02em; white-space: nowrap; opacity: 0; transition: opacity .3s; pointer-events: none; }
.book-stage.is-film .book-stage__skip { opacity: 1; transition-delay: .9s; }
.book-stage.is-film { cursor: pointer; }

.book-stage-placeholder { width: 100%; }
html.is-reading { overflow: hidden; }
/* the hero is its own stacking context (isolation), so it must sit above the sticky navbar while the stage is out */
html.is-reading .book-hero { z-index: 80; }
.book-stage.is-open {
  position: fixed; z-index: 70; margin: 0; max-width: none; aspect-ratio: auto; display: block; overflow: hidden; cursor: default;
  transition: top .55s var(--ease-out), left .55s var(--ease-out), width .55s var(--ease-out), height .55s var(--ease-out);
}
.book-stage::before {   /* the dark backdrop, faded in while the stage grows (same ink as the manifesto) */
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .55s var(--ease-out);
  background:
    radial-gradient(60% 50% at 50% 100%, color-mix(in srgb, var(--book-accent) 30%, transparent) 0%, transparent 70%),
    linear-gradient(180deg, #0f172a 0%, #1e293b 55%, #1a1025 100%);
}
.book-stage.is-open::before { opacity: 1; }
.book-stage.is-open .book-stage__open, .book-stage.is-open .book-stage__hint, .book-stage.is-open .scene__fallback { opacity: 0; pointer-events: none; }
.book-stage.is-open canvas { touch-action: none; }

.reader { position: absolute; inset: 0; z-index: 4; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: clamp(8px, 1.5vh, 16px); padding: clamp(10px, 2vh, 22px) clamp(12px, 3vw, 40px) clamp(8px, 1.5vh, 16px); }
.reader[hidden] { display: none; }
.reader__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; }
.reader__title { display: grid; line-height: 1.2; }
.reader__title span { font-size: .6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: #94a3b8; }
.reader__title strong { font-family: var(--font-display); font-size: 1.125rem; color: var(--color-paper); }
.reader__counter { font-size: .875rem; font-weight: 500; color: #cbd5e1; font-variant-numeric: tabular-nums; }
.reader__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.reader__actions .btn { min-height: 40px; padding: 8px 16px; font-size: .75rem; }
.reader__actions .btn--light { border-color: var(--color-border); }
.reader__stage { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; justify-items: center; column-gap: clamp(6px, 1.5vw, 20px); min-height: 0; }
.reader__nav { width: 46px; height: 46px; border-radius: 50%; background: var(--color-paper); border: 1px solid var(--color-border); box-shadow: var(--shadow-card); color: var(--color-ink); display: grid; place-items: center; transition: transform .15s var(--ease-out), border-color .15s, opacity .2s; }
.reader__nav svg { width: 22px; height: 22px; }
.reader__nav--prev svg { transform: scaleX(-1); }
.reader__nav:hover:not(:disabled) { border-color: var(--color-accent); transform: scale(1.06); }
.reader__nav:disabled { opacity: .3; cursor: default; }
.reader__book { position: relative; perspective: 2600px; transform-style: preserve-3d; filter: drop-shadow(0 28px 40px rgba(0, 0, 0, .55)); }
.reader__page { position: absolute; top: 0; bottom: 0; width: 50%; background: var(--color-paper); overflow: hidden; }
.reader__page--left { left: 0; border-radius: 6px 0 0 6px; }
.reader__page--right { right: 0; border-radius: 0 6px 6px 0; }
.reader__page::after { content: ''; position: absolute; inset: 0; pointer-events: none; }
.reader__page--left::after { background: linear-gradient(90deg, transparent 82%, rgba(15, 23, 42, .12) 100%); }
.reader__page--right::after { background: linear-gradient(270deg, transparent 82%, rgba(15, 23, 42, .12) 100%); }
.reader__page img, .reader__leaf img { display: block; width: 100%; height: 100%; object-fit: contain; background: var(--color-paper); }
.reader__leaf { position: absolute; top: 0; bottom: 0; left: 50%; width: 50%; z-index: 3; transform-origin: left center; transform-style: preserve-3d; transition: transform .95s var(--ease-out); }
.reader__leaf[hidden] { display: none; }
.reader__leaf.is-turned { transform: rotateY(-180deg); }
.reader__leaf-front, .reader__leaf-back { position: absolute; inset: 0; overflow: hidden; background: var(--color-paper); -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.reader__leaf-front { border-radius: 0 6px 6px 0; }
.reader__leaf-back { transform: rotateY(180deg); border-radius: 6px 0 0 6px; }
.reader__endpaper { display: grid; place-items: center; height: 100%; background: linear-gradient(90deg, #efeadf, #f7f4ec 30%, #f5f2ea); }
.reader__endpaper .sock-glyph { width: 64px; height: 40px; opacity: .22; }
.reader__end { display: grid; align-content: center; justify-items: start; gap: 12px; height: 100%; padding: clamp(16px, 6%, 40px); background: linear-gradient(270deg, #efeadf, #f7f4ec 30%, #f5f2ea); color: var(--color-body); font-size: clamp(.8125rem, 1.6vw, 1rem); line-height: 1.5; }
.reader__end-kicker { font-size: .6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--color-subtle); }
.reader__end .btn { min-height: 42px; padding: 10px 18px; font-size: .75rem; }
.reader__hint { text-align: center; font-size: .75rem; color: #94a3b8; }
.reader.is-single .reader__page--left { display: none; }
.reader.is-single .reader__page--right { width: 100%; border-radius: 6px; }
.reader.is-single .reader__page--right::after { display: none; }
.book-stage.is-reading .reader { animation: reader-rise .9s var(--ease-out) both; }
.book-stage.is-closing .reader { animation: reader-fall .32s ease-in both; }
@keyframes reader-rise { 0% { opacity: 0; transform: translateY(26vh) scale(.5); filter: blur(8px) brightness(1.8); } 60% { opacity: 1; filter: blur(0) brightness(1.15); } 100% { opacity: 1; transform: none; filter: none; } }
@keyframes reader-fall { to { opacity: 0; transform: translateY(18vh) scale(.6); filter: blur(6px); } }
.preview__actions { display: grid; gap: 10px; }
@media (max-width: 700px) {
  .reader { padding-inline: 10px; }
  .reader__stage { position: relative; grid-template-columns: minmax(0, 1fr); }   /* the arrows float over the page edges */
  .reader__nav { position: absolute; top: 50%; z-index: 5; width: 40px; height: 40px; transform: translateY(-50%); opacity: .9; }
  .reader__nav--prev { left: 0; } .reader__nav--next { right: 0; }
  .reader__nav:hover:not(:disabled) { transform: translateY(-50%); }
  .reader__hint { display: none; }
  .reader__actions .btn--outline { display: none; }   /* the end card still links to Amazon */
  .reader__title strong { font-size: 1rem; }
}

/* ── Motion & print ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js .manifesto__steps span { opacity: 1; transform: none; }
}
@media print {
  .navbar, .subnav, .mobile-nav, .buybar, .hero__scene, .book-stage canvas, .footer { display: none !important; }
  body { background: #fff; }
}

/* Direct PDF purchases, with Kindle offered at the end of each book page. */
[data-paypal] { text-transform: none; letter-spacing: normal; white-space: normal; text-align: center; }
[data-paypal][aria-disabled="true"] { opacity: .65; cursor: not-allowed; }
.purchase-format { font-weight: 600; margin-bottom: 14px; }
.kindle-option { padding-bottom: 48px; font-size: .9375rem; color: var(--color-subtle); }
@media (max-width: 480px) { .buybar .btn { max-width: 160px; padding: 10px 14px; } }
