/* ============================================================
   BODY PRISON — DAWN
   One palette, taken from the cover: the cold steel-blue of the
   body behind the bars, and the red of the title. Every surface
   on the site is a blend of those two over near-black navy.
   ============================================================ */

:root {
  --ink:      #04060c;   /* the ground everything sits on */
  --navy:     #0a1224;
  --navy-2:   #101b33;
  --steel:    #2c4a78;
  --blue:     #4d8ff0;   /* the iris */
  --ice:      #aecbff;
  --red:      #ff2b2b;   /* the title */
  --ember:    #ff5a36;
  --text:     #eef2fb;
  --dim:      #9ba8c4;
  --faint:    #5d6a86;
  --line:     rgba(174, 203, 255, 0.12);

  --grad:     linear-gradient(100deg, var(--blue) 0%, #8a5bd8 48%, var(--red) 100%);
  --grad-btn: linear-gradient(100deg, #ff2b2b 0%, #ff5a36 100%);

  --disp: 'Poppins', 'Inter', system-ui, sans-serif;
  --body: 'Inter', system-ui, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur:  760ms;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;            /* body only — on html it kills scrolling */
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }

/* ── type ─────────────────────────────────────────────────── */
.eyebrow {
  font-family: var(--disp);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ice);
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.eyebrow::before, .eyebrow.both::after {
  content: ''; width: 34px; height: 1px; background: var(--grad); opacity: .8;
}
h1, h2, h3, h4 { font-family: var(--disp); line-height: 1.04; letter-spacing: -0.02em; }
h2.big { font-size: clamp(36px, 5.4vw, 64px); font-weight: 800; }
h3 { font-size: clamp(26px, 3vw, 38px); font-weight: 800; }
.lede { color: var(--dim); font-size: clamp(17px, 1.5vw, 19px); max-width: 640px; }
.red  { color: var(--red); }
.blue { color: var(--blue); }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* ── buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px;
  border-radius: 999px;
  font-family: var(--disp); font-weight: 700; font-size: 15px; letter-spacing: 0.02em;
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), background 220ms;
  white-space: nowrap;
}
.btn-buy {
  background: var(--grad-btn);
  color: #fff;
  box-shadow: 0 10px 30px -8px rgba(255, 43, 43, 0.55), inset 0 1px 0 rgba(255,255,255,.25);
}
.btn-buy:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -8px rgba(255, 60, 43, 0.7), inset 0 1px 0 rgba(255,255,255,.3); }
.btn-buy:active { transform: scale(.97); }
.btn-buy .arr { transition: transform 220ms var(--ease); }
.btn-buy:hover .arr { transform: translateX(4px); }
.btn-buy.is-loading { opacity: .7; pointer-events: none; }
.btn-ghost {
  border: 1px solid rgba(174, 203, 255, 0.28);
  color: var(--ice);
  background: rgba(10, 18, 36, 0.35);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { border-color: var(--ice); background: rgba(77, 143, 240, 0.12); }
.btn-lg { min-height: 60px; padding: 0 38px; font-size: 17px; }

/* ── nav ──────────────────────────────────────────────────── */
#nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  transition: background 300ms, border-color 300ms, backdrop-filter 300ms;
  border-bottom: 1px solid transparent;
}
#nav.scrolled {
  background: rgba(4, 6, 12, 0.78);
  backdrop-filter: blur(14px) saturate(140%);
  border-color: var(--line);
}
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { font-family: var(--disp); font-weight: 900; font-size: 20px; letter-spacing: 0.04em; }
.logo span { color: var(--red); }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a:not(.btn) { font-size: 14px; color: var(--dim); transition: color 200ms; }
.nav-links a:not(.btn):hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-links .btn { min-height: 42px; padding: 0 20px; font-size: 14px; }
/* the product link reads as the product: red, bolder, then a divider
   before the in-page section links */
.nav-links a.nav-book { color: #ff4a3d; font-weight: 600; text-shadow: 0 0 14px rgba(255, 43, 43, 0.45); }
.nav-links a.nav-book:hover, .nav-links a.nav-book[aria-current="page"] { color: #ff6a55; }
.nav-sep { width: 1px; height: 18px; background: rgba(174, 203, 255, 0.25); margin: 0 -8px; }
/* phones keep only the product page link and the buy button */
@media (max-width: 760px) {
  .nav-links { gap: 16px; }
  .nav-links a:not(.btn) { display: none; }
  .nav-links a[href="book.html"]:not(.btn) { display: inline; white-space: nowrap; font-size: 13px; }
  .nav-sep { display: none; }
  .nav-in .logo { font-size: 17px; }
  .nav-links .btn { padding: 0 16px; font-size: 13px; }
}

/* ============================================================
   HERO — a dawn sky, an eye rising behind the mountains, four
   transparent strips of land stacked in front. The strips rise
   at different speeds as you scroll; the eye sinks.
   ============================================================ */
#hero {
  position: relative;
  min-height: max(860px, 108vh);
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(120% 60% at 50% 74%, rgba(255, 70, 50, 0.55) 0%, rgba(160, 40, 70, 0.28) 32%, transparent 62%),
    radial-gradient(90% 70% at 50% 10%, rgba(44, 74, 120, 0.55) 0%, transparent 70%),
    linear-gradient(180deg, #03050b 0%, #0a1430 38%, #1d2350 60%, #4a2140 76%, #2a1020 100%);
}
.hz { position: absolute; left: 50%; pointer-events: none; will-change: transform; }
.hz img { width: 100%; height: auto; }

/* the eye rides above the ridge line, centred */
/* the eye sits in the sky BETWEEN the copy and the book: the iris
   peeks through the gap, the clouds trail behind both */
.hz-eye {
  width: min(820px, 64vw);
  top: 17%;
  margin-left: calc(min(820px, 64vw) / -2 + min(60px, 4vw));
  opacity: 0;
  transition: opacity 1600ms var(--ease) 300ms;
  mix-blend-mode: screen;
}
.hz-eye img { animation: breathe 14s ease-in-out infinite; }
.ready .hz-eye { opacity: .78; }
@keyframes breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.035); } }

/* the land: three strips, widest in front. bottom-anchored, with
   an overhang below the hero so a strip can rise without a gap */
.hz-land { width: max(100%, 1500px); margin-left: calc(max(100%, 1500px) / -2); }
.hz-far  { bottom: 4%;  z-index: 1; }
.hz-mid  { bottom: -2%; z-index: 2; }
.hz-near { bottom: -9%; z-index: 4; }
.hz-far img  { filter: saturate(1.05); }

/* the ground: the near strip's bottom edge melts into the page colour */
.hz-hem {
  position: absolute; inset: auto 0 0; height: 30%; z-index: 5;
  background: linear-gradient(180deg, transparent 0%, rgba(4, 6, 12, 0.7) 55%, var(--ink) 100%);
  pointer-events: none;
}

.hero-in {
  position: relative; z-index: 6;
  padding-top: 118px;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 40px;
  align-items: center;
}
.hero-copy h1 {
  font-size: clamp(38px, 4.5vw, 66px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 20px 0 20px;
  text-shadow: 0 4px 40px rgba(4, 6, 12, 0.6);
}
/* the mask needs room for descenders (g, y) or they get sliced */
.hero-copy h1 .line { display: block; overflow: hidden; padding-bottom: .14em; margin-bottom: -.1em; }
.ready .hero-copy h1 .line:nth-child(4) > span { transition-delay: 330ms; }
.hero-copy h1 .line > span { display: inline-block; transform: translateY(108%); transition: transform 1000ms var(--ease); }
.ready .hero-copy h1 .line > span { transform: none; }
.ready .hero-copy h1 .line:nth-child(2) > span { transition-delay: 110ms; }
.ready .hero-copy h1 .line:nth-child(3) > span { transition-delay: 220ms; }
.hero-sub { color: #c9d4ec; font-size: clamp(17px, 1.45vw, 19px); max-width: 520px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
/* glass chips so they read clearly over the fence and the mountains */
.hero-trust {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px;
  font-size: 13.5px; font-weight: 500; color: #e6eeff;
}
.hero-trust span {
  padding: 7px 14px 7px 12px; border-radius: 999px;
  background: rgba(4, 6, 12, 0.62);
  border: 1px solid rgba(110, 170, 255, 0.35);
  backdrop-filter: blur(8px);
  box-shadow: 0 0 18px -4px rgba(77, 143, 240, 0.55), inset 0 0 12px -6px rgba(77, 143, 240, 0.6);
}
.hero-trust span::before {
  content: '✓'; color: #7fb4ff; margin-right: 8px; font-weight: 800;
  text-shadow: 0 0 8px rgba(77, 143, 240, 0.95), 0 0 2px #fff;
}

/* staged entrance for the non-headline bits */
.enter { opacity: 0; transform: translateY(18px); transition: opacity 800ms var(--ease), transform 800ms var(--ease); }
.ready .enter { opacity: 1; transform: none; }
.ready .enter.d1 { transition-delay: 380ms; }
.ready .enter.d2 { transition-delay: 500ms; }
.ready .enter.d3 { transition-delay: 620ms; }
.ready .enter.d4 { transition-delay: 760ms; }

/* ── the book: a real 3D object, the cover on the front face ── */
.book-stage { perspective: 1600px; display: flex; justify-content: center; }
/* geometry: a box T deep. front at +T/2, back at -T/2, and each side
   face is a T-wide strip centred ON its edge (left: edge - T/2) and
   turned 90° about its own centre, so it spans -T/2..+T/2 exactly */
.book {
  --rx: 4deg; --ry: -24deg; --t: 24px;
  position: relative;
  width: min(330px, 70vw);
  aspect-ratio: 840 / 1191;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 900ms var(--ease);
}
.book-face, .book-pages, .book-spine, .book-back { position: absolute; }
.book-face {
  inset: 0; transform: translateZ(calc(var(--t) / 2));
  border-radius: 2px 6px 6px 2px; overflow: hidden;
  box-shadow: inset 4px 0 8px -4px rgba(255,255,255,.35);
}
.book-face img { width: 100%; height: 100%; object-fit: cover; }
.book-face::after {          /* a gloss that slides with the tilt */
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.16) 46%, transparent 60%);
  transform: translateX(var(--gloss, 0%));
  mix-blend-mode: screen;
}
.book-pages {          /* the page block, slightly inset like a real book */
  top: 1.2%; bottom: 1.2%; width: var(--t);
  left: calc(100% - var(--t) / 2 - 2px);
  transform: rotateY(90deg);
  background:
    linear-gradient(90deg, rgba(0,0,0,.35), transparent 18%, transparent 82%, rgba(0,0,0,.35)),
    repeating-linear-gradient(90deg, #e4e6ec 0 1px, #b9bdc9 1px 2px);
}
.book-spine {
  top: 0; bottom: 0; width: var(--t);
  left: calc(var(--t) / -2);
  transform: rotateY(-90deg);
  background: linear-gradient(90deg, #070b16, #18233f 60%, #070b16);
}
.book-back { inset: 0; transform: translateZ(calc(var(--t) / -2)) rotateY(180deg); background: #070b16; border-radius: 6px 2px 2px 6px; }
.book-shadow {
  position: absolute; left: 6%; right: -6%; bottom: -9%; height: 12%;
  background: radial-gradient(closest-side, rgba(0,0,0,.75), transparent);
  filter: blur(6px);
  transform: translateZ(-40px) rotateX(90deg);
}
.book-glow {
  position: absolute; inset: -18%;
  background: radial-gradient(closest-side, rgba(77, 143, 240, 0.32), transparent 72%);
  z-index: -1; filter: blur(10px);
}
.book-tag {
  position: absolute; right: -24%; bottom: -7%;   /* below the subtitle, never on it */
  transform: translateZ(60px);
  background: rgba(4, 6, 12, 0.82);
  border: 1px solid rgba(174, 203, 255, 0.22);
  backdrop-filter: blur(10px);
  border-radius: 14px; padding: 12px 16px;
  font-family: var(--disp); line-height: 1.15;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,.8);
}
.book-tag b { display: block; font-size: 26px; font-weight: 800; }
.book-tag span { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ice); }

.hero-scroll {
  position: absolute; left: 50%; bottom: 34px; z-index: 7; transform: translateX(-50%);
  font-size: 11px; letter-spacing: .4em; text-transform: uppercase; color: var(--dim);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  transition: opacity 400ms;
}
.moved .hero-scroll { opacity: 0; }
.hero-trust { text-shadow: 0 1px 12px rgba(4, 6, 12, 0.9); }
.hero-scroll::after {
  content: ''; width: 1px; height: 40px;
  background: linear-gradient(var(--ice), transparent);
  animation: drip 2.2s var(--ease) infinite;
  transform-origin: top;
}
@keyframes drip { 0% { transform: scaleY(0); opacity: 1; } 70% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

@media (max-width: 900px) {
  #hero { min-height: auto; padding-bottom: 46vw; }
  .hero-in { grid-template-columns: 1fr; padding-top: 96px; text-align: center; gap: 22px; }
  /* on a phone the book comes first: "this is a book" before any words */
  .hero-in .book-stage { order: -1; }
  .hero-copy h1 { font-size: clamp(32px, 9vw, 44px); margin: 14px 0 14px; }
  .hero-sub { font-size: 16px; }
  .hero-cta { margin-top: 22px; }
  .hero-copy .eyebrow { justify-content: center; }
  .hero-sub { margin-inline: auto; }
  .hero-cta, .hero-trust { justify-content: center; }
  .book { width: min(160px, 42vw); --ry: -18deg; }
  .book-tag { right: -62%; bottom: 8%; padding: 9px 12px; }
  .book-tag b { font-size: 20px; }
  .hz-eye { top: 70px; bottom: auto; width: 170vw; margin-left: -85vw; }
  .hz-land { width: max(100%, 900px); margin-left: calc(max(100%, 900px) / -2); }
  .hero-scroll { display: none; }
}

/* ── the facts strip ─────────────────────────────────────── */
.facts {
  position: relative; z-index: 2;
  border-block: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(77,143,240,.07), rgba(255,43,43,.07));
}
.facts-in {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 10px 0;
  padding: 18px 0;
  font-family: var(--disp); font-weight: 600; font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ice);
}
.facts-in span { padding: 0 22px; position: relative; }
.facts-in span + span::before {
  content: ''; position: absolute; left: 0; top: 50%; width: 4px; height: 4px; margin-top: -2px;
  border-radius: 50%; background: var(--red);
}

/* ============================================================
   BANDS — flat ink ground, each band lit by its own glow
   ============================================================ */
/* clip, not hidden: the glows must not widen the page, and clip
   doesn't turn the band into a scroll container */
.band { position: relative; padding: clamp(80px, 11vw, 140px) 0; isolation: isolate; overflow-x: clip; }
.band.tight { padding-block: clamp(60px, 8vw, 100px); }
.glow { position: absolute; z-index: -1; pointer-events: none; border-radius: 50%; filter: blur(20px); }
.glow-blue { background: radial-gradient(closest-side, rgba(77, 143, 240, 0.22), transparent); }
.glow-red  { background: radial-gradient(closest-side, rgba(255, 43, 43, 0.18), transparent); }

.center { text-align: center; }
.center .lede { margin-inline: auto; }
.head { margin-bottom: clamp(44px, 6vw, 72px); }
.head h2 { margin: 18px 0 18px; }

/* ── slabs: copy one side, the real thing the other ───────── */
.slab {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 70px);
  align-items: center;
  padding: clamp(28px, 4.5vw, 60px);
  border-radius: 28px;
  background:
    linear-gradient(var(--navy), var(--navy)) padding-box,
    linear-gradient(140deg, rgba(77,143,240,.45), rgba(174,203,255,.06) 40%, rgba(255,43,43,.4)) border-box;
  border: 1px solid transparent;
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255,255,255,.02) inset;
  overflow: hidden;
}
.slab + .slab { margin-top: 28px; }
.slab::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(60% 80% at 0% 100%, rgba(77,143,240,.12), transparent 60%),
              radial-gradient(60% 80% at 100% 0%, rgba(255,43,43,.10), transparent 60%);
}
.slab > * { position: relative; z-index: 1; }
.slab.flip .slab-copy { order: 2; }
.slab-copy h3 { margin: 16px 0 16px; }
.slab-copy p { color: var(--dim); }
.ticks { list-style: none; margin-top: 24px; display: grid; gap: 12px; }
.ticks li { display: flex; gap: 12px; align-items: baseline; }
.ticks li::before {
  content: ''; flex: none; width: 8px; height: 8px; border-radius: 2px; transform: translateY(-1px) rotate(45deg);
  background: var(--grad);
}
.slab-art img { border-radius: 10px; box-shadow: 0 30px 60px -24px rgba(0,0,0,.9); }
.slab-art.wrapimg img { border-radius: 6px; transform: perspective(1400px) rotateY(-10deg) rotateX(3deg); transition: transform 900ms var(--ease); }
.slab:hover .slab-art.wrapimg img { transform: perspective(1400px) rotateY(-4deg) rotateX(1deg); }

/* challenge switcher */
.chal-tabs { display: grid; gap: 10px; margin-top: 26px; }
.chal-tab {
  display: flex; align-items: center; gap: 16px; text-align: left;
  padding: 14px 18px; border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(4, 6, 12, 0.4);
  transition: border-color 220ms, background 220ms, transform 220ms var(--ease);
}
.chal-tab:hover { transform: translateX(4px); border-color: rgba(174,203,255,.3); }
.chal-tab b { font-family: var(--disp); font-size: 22px; font-weight: 800; color: var(--faint); width: 34px; transition: color 220ms; }
.chal-tab span { display: block; font-family: var(--disp); font-weight: 700; font-size: 16px; }
.chal-tab small { display: block; color: var(--dim); font-size: 13.5px; line-height: 1.4; }
.chal-tab[aria-selected="true"] {
  border-color: rgba(255, 70, 50, 0.55);
  background: linear-gradient(100deg, rgba(77,143,240,.12), rgba(255,43,43,.12));
}
.chal-tab[aria-selected="true"] b { color: var(--red); }
.chal-page { position: relative; aspect-ratio: 797 / 1132; max-width: 420px; margin-inline: auto; }
.chal-page img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: translateY(14px) scale(.98);
  transition: opacity 500ms var(--ease), transform 600ms var(--ease);
}
.chal-page img.on { opacity: 1; transform: none; }
.chal-tab.locked span { color: var(--dim); }
.chal-tab.locked[aria-selected="true"] span { color: var(--text); }
.chal-lock {
  position: absolute; inset: 0; z-index: 2; border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  text-align: center; padding: 30px;
  background: radial-gradient(circle at 50% 45%, rgba(10,18,36,.55), rgba(4,6,12,.85));
  color: var(--ice);
  opacity: 0; pointer-events: none; transition: opacity 400ms var(--ease);
}
.chal-lock b { font-family: var(--disp); font-weight: 800; font-size: 26px; color: var(--text); letter-spacing: .02em; }
.chal-lock span { color: var(--dim); font-size: 15px; max-width: 240px; margin-bottom: 8px; }
.chal-lock .btn { min-height: 46px; font-size: 14px; padding: 0 22px; }
[data-chal].is-locked .chal-lock { opacity: 1; pointer-events: auto; }

@media (max-width: 860px) {
  .slab { grid-template-columns: 1fr; }
  .slab.flip .slab-copy { order: 0; }
}

/* ── the three walls ─────────────────────────────────────── */
.walls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.wall {
  position: relative; padding: 34px 30px 32px; border-radius: 22px;
  background: linear-gradient(180deg, var(--navy-2), var(--navy));
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 300ms var(--ease), border-color 300ms;
}
.wall:hover { transform: translateY(-6px); border-color: rgba(255, 70, 50, 0.4); }
.wall::after {           /* the bar: one rusty-red stripe per wall */
  content: ''; position: absolute; left: 30px; top: 0; width: 46px; height: 3px; background: var(--grad);
}
.wall-n { font-family: var(--disp); font-weight: 800; font-size: 13px; letter-spacing: .3em; color: var(--ice); }
.wall h4 { font-size: 26px; font-weight: 800; margin: 14px 0 12px; }
.wall p { color: var(--dim); font-size: 16px; }
@media (max-width: 860px) { .walls { grid-template-columns: 1fr; } }

/* ── real pages: the cover, then three pages, fanned ─────── */
.pages-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 2.4vw, 30px); align-items: end; }
.pages-grid figure { transition: transform 500ms var(--ease); }
.pages-grid figure:nth-child(odd)  { transform: rotate(-2deg) translateY(10px); }
.pages-grid figure:nth-child(even) { transform: rotate(2deg); }
.pages-grid figure:hover { transform: rotate(0) translateY(-10px) scale(1.03); z-index: 1; }
.pages-grid img {
  width: 100%; border-radius: 8px;
  box-shadow: 0 30px 60px -22px rgba(0,0,0,.95), 0 0 0 1px rgba(174,203,255,.1);
}
.pages-grid figcaption {
  margin-top: 14px; text-align: center;
  font-family: var(--disp); font-weight: 600; font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--faint);
}
@media (max-width: 760px) { .pages-grid { grid-template-columns: 1fr 1fr; } }

/* ── stats ───────────────────────────────────────────────── */
.stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-radius: 24px; overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(100deg, rgba(77,143,240,.08), rgba(255,43,43,.08));
}
.stat { padding: 34px 20px; text-align: center; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat b {
  display: block; font-family: var(--disp); font-weight: 900; font-size: clamp(40px, 5vw, 60px); line-height: 1;
  font-variant-numeric: tabular-nums;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat span { display: block; margin-top: 10px; font-size: 12px; letter-spacing: .26em; text-transform: uppercase; color: var(--dim); }
@media (max-width: 700px) { .stat { padding: 26px 8px; } .stat span { letter-spacing: .14em; font-size: 11px; } }

/* ── quotes ──────────────────────────────────────────────── */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.quotes blockquote {
  font-family: var(--disp); font-weight: 700; font-size: clamp(20px, 2vw, 24px); line-height: 1.3;
  padding: 30px; border-left: 2px solid; border-image: var(--grad) 1;
  background: linear-gradient(90deg, rgba(77,143,240,.06), transparent);
}
.quotes cite { display: block; margin-top: 16px; font-style: normal; font-family: var(--body); font-weight: 500; font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--faint); }
@media (max-width: 860px) { .quotes { grid-template-columns: 1fr; } }

/* ── author ─────────────────────────────────────────────── */
.author { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(30px, 6vw, 80px); align-items: center; }
.author-mark {
  aspect-ratio: 1; border-radius: 28px; display: grid; place-items: center;
  background:
    radial-gradient(circle at 50% 50%, rgba(77,143,240,.35), transparent 60%),
    radial-gradient(circle at 70% 80%, rgba(255,43,43,.3), transparent 55%),
    var(--navy);
  border: 1px solid var(--line);
  overflow: hidden;
}
.author-mark img { width: 120%; max-width: none; opacity: .9; mix-blend-mode: screen; }
/* the real cover, standing in the lit square, slightly turned */
.author-mark.cover-mark img {
  width: 58%; opacity: 1; mix-blend-mode: normal; border-radius: 4px;
  transform: rotate(-3deg);
  box-shadow: 0 40px 70px -24px rgba(0,0,0,.95), 0 0 0 1px rgba(174,203,255,.1);
  transition: transform 700ms var(--ease);
}
.author-mark.cover-mark:hover img { transform: rotate(0) scale(1.03); }
.author h2 { margin: 16px 0 20px; }
.author p { color: var(--dim); }
.author p + p { margin-top: 14px; }
.author .sig { margin-top: 24px; font-family: var(--disp); font-weight: 800; font-size: 22px; color: var(--text); }
@media (max-width: 860px) { .author { grid-template-columns: 1fr; } .author-mark { max-width: 340px; margin-inline: auto; width: 100%; } }

/* ── offer ───────────────────────────────────────────────── */
.offer {
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(30px, 5vw, 70px); align-items: center;
  padding: clamp(30px, 5vw, 64px); border-radius: 32px;
  background:
    linear-gradient(var(--navy), var(--navy)) padding-box,
    var(--grad) border-box;
  border: 1.5px solid transparent;
  box-shadow: 0 50px 120px -50px rgba(255, 43, 43, 0.45), 0 50px 120px -60px rgba(77, 143, 240, 0.5);
  position: relative; overflow: hidden;
}
.offer .book-stage { padding: 20px 0; }
.offer h2 { margin: 16px 0 10px; }
.price-row { display: flex; align-items: baseline; gap: 16px; margin: 22px 0 6px; }
.price { font-family: var(--disp); font-weight: 900; font-size: clamp(54px, 6vw, 76px); line-height: 1; letter-spacing: -0.03em; }
.price-note { color: var(--dim); font-size: 14px; }
.offer .ticks { margin: 22px 0 30px; }
.secure { margin-top: 16px; font-size: 13px; color: var(--faint); }
@media (max-width: 860px) { .offer { grid-template-columns: 1fr; text-align: center; } .offer .ticks { text-align: left; max-width: 380px; margin-inline: auto; } .price-row { justify-content: center; } }

/* ── FAQ ─────────────────────────────────────────────────── */
.faq { max-width: 820px; margin-inline: auto; display: grid; gap: 12px; }
.faq details {
  border: 1px solid var(--line); border-radius: 16px;
  background: rgba(10, 18, 36, 0.6);
  transition: border-color 220ms;
}
.faq details[open] { border-color: rgba(174, 203, 255, 0.25); }
.faq summary {
  list-style: none; cursor: pointer;
  padding: 20px 24px; display: flex; justify-content: space-between; gap: 20px; align-items: center;
  font-family: var(--disp); font-weight: 700; font-size: 17px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 24px; font-weight: 400; color: var(--ice); transition: transform 300ms var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); color: var(--red); }
.faq .a { padding: 0 24px 22px; color: var(--dim); }

/* ── the door line: the back cover's last words, above the offer ── */
.door-line { text-align: center; margin-bottom: clamp(40px, 6vw, 64px); }
.door-line span {
  display: inline-block;
  font-family: var(--disp); font-weight: 800; font-size: clamp(26px, 3.4vw, 42px); line-height: 1.2; letter-spacing: -0.02em;
}
.door-line em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ── footer ──────────────────────────────────────────────── */
footer { border-top: 1px solid var(--line); padding: 44px 0 110px; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: center; }
.foot-tag { display: block; font-size: 13px; color: var(--faint); margin-top: 4px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 22px; font-size: 14px; color: var(--dim); }
.foot nav a:hover { color: var(--text); }
.foot nav a.copied { color: var(--ice); }
.foot-copy { margin-top: 26px; font-size: 12px; color: var(--faint); }
@media (min-width: 761px) { footer { padding-bottom: 44px; } }

/* ── mobile buy bar ─────────────────────────────────────── */
.buybar {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60;
  display: none; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 10px 10px 18px; border-radius: 18px;
  background: rgba(10, 18, 36, 0.9);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(174, 203, 255, 0.18);
  box-shadow: 0 20px 50px -10px rgba(0,0,0,.8);
  transform: translateY(140%); transition: transform 500ms var(--ease);
}
.buybar.show { transform: none; }
.buybar b { display: block; font-family: var(--disp); font-weight: 800; font-size: 15px; line-height: 1.2; }
.buybar small { color: var(--dim); font-size: 12px; }
.buybar .btn { min-height: 46px; padding: 0 20px; font-size: 15px; }
@media (max-width: 760px) { .buybar { display: flex; } }

/* ── reveal system ───────────────────────────────────────── */
[data-rv] > * {
  opacity: 0; transform: translateY(26px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
[data-rv] > *:nth-child(2) { transition-delay: 90ms; }
[data-rv] > *:nth-child(3) { transition-delay: 180ms; }
[data-rv] > *:nth-child(4) { transition-delay: 270ms; }
[data-rv].in > * { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-rv] > *, .enter, .hero-copy h1 .line > span { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hz-eye { opacity: .78; transition: none; }
  .hz-eye img, .hero-scroll::after { animation: none; }
}

/* ============================================================
   PRODUCT PAGE
   ============================================================ */
.pp { padding: 120px 0 60px; position: relative; isolation: isolate; }
.pp::before {
  content: ''; position: absolute; inset: 0 0 auto; height: 900px; z-index: -1;
  background: radial-gradient(60% 60% at 25% 30%, rgba(77,143,240,.18), transparent 70%),
              radial-gradient(50% 50% at 85% 10%, rgba(255,43,43,.14), transparent 70%);
}
.crumbs { font-size: 13px; color: var(--faint); margin-bottom: 26px; }
.crumbs a:hover { color: var(--text); }
.pp-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(30px, 5vw, 70px); align-items: start; }
.gallery-main {
  position: relative; aspect-ratio: 4 / 4.2; border-radius: 26px; overflow: hidden;
  background: radial-gradient(circle at 50% 45%, rgba(77,143,240,.28), transparent 65%), var(--navy);
  border: 1px solid var(--line);
  display: grid; place-items: center;
}
/* a % max-height doesn't resolve against an aspect-ratio box,
   so the image is pinned absolutely and contained instead */
.gallery-main img {
  position: absolute; inset: 7%; width: 86%; height: 86%; object-fit: contain;
  filter: drop-shadow(0 30px 40px rgba(0,0,0,.85));
  transition: opacity 300ms;
}
.gallery-main img.wide { inset: 4%; width: 92%; height: 92%; }
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.thumbs button {
  aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 1px solid var(--line);
  background: var(--navy); display: grid; place-items: center; padding: 6px;
  transition: border-color 200ms, transform 200ms var(--ease);
}
.thumbs button:hover { transform: translateY(-2px); }
.thumbs button[aria-current="true"] { border-color: var(--red); }
.thumbs img { max-height: 100%; width: auto; border-radius: 3px; }

.buybox { position: sticky; top: 96px; }
.buybox h1 { font-size: clamp(40px, 4.6vw, 60px); font-weight: 900; margin: 14px 0 6px; }
.buybox .by { color: var(--dim); }
.buybox .pitch { margin: 20px 0 6px; color: #c9d4ec; }
.spec { margin: 26px 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.spec div { display: flex; justify-content: space-between; gap: 20px; padding: 13px 18px; font-size: 15px; }
.spec div + div { border-top: 1px solid var(--line); }
.spec dt { color: var(--dim); }
.spec dd { font-weight: 600; text-align: right; }
.buybox .btn-buy { width: 100%; }

.toc { columns: 2; column-gap: 40px; list-style: none; max-width: 900px; margin-inline: auto; }
.toc li { break-inside: avoid; display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.toc code { font-family: var(--disp); font-weight: 600; font-size: 12px; letter-spacing: .1em; color: var(--ice); min-width: 62px; padding-top: 3px; }
/* a censor bar: black ink, faint scan lines, and a slow light sweep */
.toc li { align-items: center; }
.redact {
  position: relative; display: inline-block; flex: none;
  width: var(--w, 50%); height: 1.1em; border-radius: 2px;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, transparent 1px 3px),
    #000;
  box-shadow: 0 0 0 1px rgba(174, 203, 255, 0.07);
  overflow: hidden;
}
.redact::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 43, 43, .16) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: sweep 5.5s var(--ease) infinite;
}
.toc li:nth-child(3n) .redact::after { animation-delay: 1.4s; }
.toc li:nth-child(3n+1) .redact::after { animation-delay: 2.8s; }
@keyframes sweep { 0%, 55% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .redact::after { animation: none; } }
/* colours from the printed contents page: BR (before rebirth) is
   blue, AR (after) is a red prefix with white digits and red titles */
.toc { --c-br: #6cc6e6; }
.toc .br code, .toc .br { color: var(--c-br); }
.toc .ar code { color: #fff; }
.toc .ar code i { font-style: normal; color: var(--red); }
.toc .ar { color: #ff5a5a; }
.toc .ch { color: var(--c-br); }
.toc .ar:has(.ch) { color: #fff; }       /* challenge names are white, like the book */
.toc .part.part-br { color: var(--c-br); border-bottom-color: rgba(108, 198, 230, .3); }
.toc .tt { flex: 1; min-width: 0; }   /* blockified flex item: inline text keeps its spaces */
.toc .tt .redact { vertical-align: middle; }
.toc .toc-end { color: var(--faint); font-style: italic; border-bottom: 0; }
.toc .locked-name { color: var(--faint); margin-left: 6px; }
.toc .locked-name::before { content: '🔒 '; filter: grayscale(1); opacity: .7; }
.toc .part { color: var(--red); font-family: var(--disp); font-weight: 800; letter-spacing: .3em; font-size: 13px; border-bottom-color: rgba(255,43,43,.3); }
@media (max-width: 860px) {
  .pp-grid { grid-template-columns: 1fr; }
  .buybox { position: static; }
  .toc { columns: 1; }
}
