/* ════════════════════════════════════════════════════════════
   ROSTER — The Story of Every Medal
   World A: the comic past · World B: the digital present
   ════════════════════════════════════════════════════════════ */

:root {
  /* World A — the comic past */
  --a-paper: #ecdcb2;
  --a-paper-deep: #e0c98e;
  --a-ink: #2b2118;
  --a-red: #b8402e;
  --a-blue: #3a4b7c;
  --a-cream: #f6ecd2;

  /* World B — the digital present */
  --b-navy: #0f1a3d;
  --b-navy-deep: #0a1229;
  --b-paper: #f7f5ef;
  --b-ink: #131a2e;
  --b-muted: #6b7390;

  /* The thread that survives both worlds */
  --gold: #c9a24b;
  --gold-bright: #e3c375;

  --font-comic: "Bangers", "Impact", cursive;
  --font-hand: "Gochi Hand", "Comic Sans MS", cursive;
  --font-digital: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-mono: "Space Mono", "Consolas", monospace;

  --rail-w: 92px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  font-family: var(--font-digital);
  background: var(--a-paper);
  color: var(--a-ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; height: 100vh; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }

::selection { background: var(--gold); color: var(--b-navy); }

/* ════════════════ PRELOADER ════════════════ */

#preloader {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center;
  background: var(--a-ink);
  color: var(--a-cream);
  transition: opacity 0.7s ease, visibility 0.7s;
}
#preloader.done { opacity: 0; visibility: hidden; pointer-events: none; }

.preloader-inner { text-align: center; padding: 2rem; max-width: 34rem; }

.preloader-stamp {
  font-family: var(--font-mono);
  font-size: 0.7rem; letter-spacing: 0.45em;
  color: var(--gold);
  margin-bottom: 2.2rem;
  opacity: 0.85;
}

#preloader-line {
  font-family: var(--font-mono);
  font-size: clamp(0.85rem, 2.6vw, 1.1rem);
  letter-spacing: 0.14em;
  min-height: 3em;
  line-height: 1.6;
  white-space: pre-line;
}

.preloader-tick {
  width: 44px; height: 3px; margin: 2.4rem auto 0;
  background: linear-gradient(90deg, var(--gold) var(--tick, 15%), rgba(246,236,210,0.15) 0);
  transition: --tick 0.4s;
}

/* ════════════════ THRESHOLD — THE COVER ════════════════ */

#threshold {
  position: fixed; inset: 0; z-index: 900;
  display: grid; place-items: center;
  background:
    radial-gradient(120% 90% at 50% 10%, #4a3d2c 0%, #241c12 55%, #16110a 100%);
  perspective: 1600px;
  overflow: hidden;
  transition: opacity 0.9s ease 0.55s, visibility 0.9s 0.55s;
}
#threshold.opened { opacity: 0; visibility: hidden; pointer-events: none; }

.threshold-shadow {
  position: absolute; inset: auto 0 8% 0; height: 5vmin;
  margin: 0 auto; width: min(64vmin, 420px);
  background: radial-gradient(50% 50% at 50% 50%, rgba(0,0,0,0.55), transparent 70%);
  filter: blur(6px);
}

.cover {
  position: relative;
  width: min(88vw, 420px, 52vh);
  transform-style: preserve-3d;
  transform-origin: left center;
  transition: transform 1.1s cubic-bezier(0.7, 0, 0.25, 1);
}
#threshold.opened .cover { transform: rotateY(-112deg) translateZ(8px); }

.cover-face {
  position: relative;
  background: var(--a-paper);
  border: 3px solid var(--a-ink);
  border-radius: 4px 10px 10px 4px;
  box-shadow:
    inset 0 0 60px rgba(107, 78, 30, 0.35),
    0 24px 70px rgba(0,0,0,0.6);
  overflow: hidden;
  padding: 1rem 1rem 0.7rem;
}
/* worn creases */
.cover-face::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 5;
  background:
    linear-gradient(100deg, transparent 42%, rgba(60,40,10,0.14) 43%, transparent 45%),
    linear-gradient(12deg, transparent 68%, rgba(60,40,10,0.1) 69%, transparent 72%),
    radial-gradient(140% 100% at 0% 0%, transparent 88%, rgba(50,32,8,0.28) 100%);
  mix-blend-mode: multiply;
}
/* halftone film */
.cover-face::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 4;
  background-image: radial-gradient(rgba(43,33,24,0.16) 1px, transparent 1.4px);
  background-size: 5px 5px;
  mix-blend-mode: multiply;
}

.cover-spine {
  position: absolute; left: -7px; top: 3px; bottom: 3px; width: 8px;
  background: linear-gradient(180deg, #7d6136, #4c3a1c 30%, #6b5330 70%, #4c3a1c);
  border-radius: 4px 0 0 4px;
  transform: translateZ(-2px);
}

.cover-masthead { text-align: center; position: relative; z-index: 6; }
.cover-presents {
  display: inline-block;
  font-family: var(--font-mono); font-size: 0.62rem;
  letter-spacing: 0.5em; text-transform: uppercase;
  color: var(--a-red);
  border-top: 2px solid var(--a-red); border-bottom: 2px solid var(--a-red);
  padding: 0.3em 0.8em; margin-bottom: 0.45rem;
}
.cover-title {
  font-family: var(--font-comic);
  font-size: clamp(2.1rem, 9vw, 3rem);
  line-height: 0.92; letter-spacing: 0.02em;
  color: var(--a-ink);
  text-shadow: 2.5px 2.5px 0 var(--gold), 4px 4px 0 rgba(43,33,24,0.28);
  transform: rotate(-1.3deg);
}

.cover-corner {
  position: absolute; top: 0.8rem; right: 0.85rem; z-index: 7;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: var(--a-cream); border: 2px solid var(--a-ink);
  padding: 0.3rem 0.45rem; border-radius: 3px;
  transform: rotate(3deg);
  font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.08em;
  box-shadow: 1.5px 1.5px 0 rgba(43,33,24,0.5);
}
.cover-price { color: var(--a-red); font-weight: 700; }

.cover-art {
  margin: 0.75rem 0 0.6rem; position: relative; z-index: 3;
  border: 2.5px solid var(--a-ink); border-radius: 3px;
  overflow: hidden;
  background: var(--a-paper-deep);
  aspect-ratio: 3 / 4;
}
.cover-art img { width: 100%; height: 100%; object-fit: cover; }

.cover-strap {
  position: relative; z-index: 6;
  font-family: var(--font-hand);
  font-size: 0.86rem; text-align: center;
  color: var(--a-ink); opacity: 0.82;
  padding-bottom: 0.45rem;
}

/* single quiet cue beneath the cover — fades the instant the book opens */
.cover-open-cue {
  margin-top: 1.5rem;
  text-align: center;
  font-family: var(--font-hand);
  font-size: 1.02rem;
  color: var(--a-cream);
  opacity: 0.85;
  display: flex; flex-direction: column; align-items: center; gap: 0.25em;
  animation: cue-breathe 2.6s ease-in-out infinite;
  transition: opacity 0.2s ease;
}
.cover-open-cue .cue-arrow { color: var(--gold); }
@keyframes cue-breathe { 50% { opacity: 0.55; transform: translateY(4px); } }
#threshold.opened .cover-open-cue { opacity: 0; animation: none; }

/* ════════════════ CHAPTER RAIL ════════════════ */

#rail {
  position: fixed; z-index: 800;
  right: 0; top: 50%; transform: translateY(-50%);
  width: var(--rail-w);
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  transition: opacity 0.5s;
}
#rail[hidden] { display: none; }

.rail-list { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; }

.rail-item {
  display: flex; flex-direction: column; align-items: center;
  text-decoration: none;
  width: 54px; padding: 0.42em 0.2em;
  transition: transform 0.25s;
}
.rail-item:hover { transform: translateX(-3px); }

.rail-num {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  font-size: 0.72rem;
  transition: all 0.45s cubic-bezier(0.6, 0, 0.3, 1);
}
.rail-name {
  font-size: 0.52rem; margin-top: 0.32em;
  text-align: center; line-height: 1.25;
  letter-spacing: 0.05em;
  opacity: 0; transform: translateY(-3px);
  transition: opacity 0.25s, transform 0.25s;
  max-width: 70px;
}
.rail-item:hover .rail-name, .rail-item.active .rail-name { opacity: 0.85; transform: none; }

/* rail skin — COMIC world */
body[data-world="comic"] .rail-num {
  font-family: var(--font-comic); letter-spacing: 0.05em;
  color: var(--a-ink);
  background: var(--a-cream);
  border: 2px solid var(--a-ink);
  border-radius: 50%;
  box-shadow: 2px 2px 0 rgba(43,33,24,0.45);
  transform: rotate(-4deg);
}
body[data-world="comic"] .rail-item:nth-child(even) .rail-num { transform: rotate(3deg); }
body[data-world="comic"] .rail-item.active .rail-num {
  background: var(--gold); border-color: var(--a-ink); color: var(--a-ink);
}
body[data-world="comic"] .rail-name { font-family: var(--font-hand); color: var(--a-ink); }

/* rail skin — DIGITAL world */
body[data-world="digital"] .rail-num {
  font-family: var(--font-digital); font-weight: 600;
  font-feature-settings: "tnum";
  color: var(--b-paper);
  background: rgba(247,245,239,0.06);
  border: 1px solid rgba(247,245,239,0.25);
  border-radius: 10px;
  transform: none;
  box-shadow: none;
}
body[data-world="digital"] .rail-item.active .rail-num {
  background: var(--gold); border-color: var(--gold); color: var(--b-navy);
}
body[data-world="digital"] .rail-name { font-family: var(--font-digital); color: var(--b-paper); }

.rail-signup .rail-num { color: var(--gold) !important; }
body[data-world="comic"] .rail-signup .rail-num { color: var(--a-red) !important; }

#mute-toggle {
  position: relative;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: transparent; font-size: 0.95rem;
  transition: all 0.4s;
}
#mute-toggle[hidden] { display: none; }
body[data-world="comic"] #mute-toggle { border: 2px dashed var(--a-ink); color: var(--a-ink); }
body[data-world="digital"] #mute-toggle { border: 1px dashed rgba(247,245,239,0.4); color: var(--b-paper); }
/* muted = ♪ with a slash; active = plain ♪ (subtle gold nod) */
#mute-toggle::after {
  content: ""; position: absolute;
  width: 58%; height: 2px; border-radius: 2px;
  background: currentColor;
  transform: rotate(-45deg);
  opacity: 0; transition: opacity 0.25s;
}
#mute-toggle[aria-pressed="false"] { opacity: 0.75; }
#mute-toggle[aria-pressed="false"]::after { opacity: 0.9; }
#mute-toggle[aria-pressed="true"] .mute-note { color: var(--gold); }

/* top-right auth chrome — Log in + Sign up, morphing with the worlds.
   Same body[data-world] switch as the rail, so both change in sync. */
#auth-chrome {
  position: fixed; top: 1rem; right: 1.25rem; z-index: 820;
  display: flex; align-items: center; gap: 1.1rem;
}
#auth-chrome[hidden] { display: none; }
.auth-login, .auth-signup {
  position: relative;
  text-decoration: none;
  transition: all 0.45s cubic-bezier(0.6, 0, 0.3, 1);
}
.auth-login::after { /* gold underline-draw (digital world only) */
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1.5px;
  background: var(--gold);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.6, 0, 0.2, 1);
}

/* WORLD A — comic-era chrome: hand-lettered ink + a stamped sticker */
body[data-world="comic"] .auth-login {
  font-family: var(--font-hand); font-size: 0.95rem;
  color: var(--a-ink); opacity: 0.78;
}
body[data-world="comic"] .auth-login::after { background: transparent; }
body[data-world="comic"] .auth-login:hover {
  opacity: 1; transform: translateY(-1px) rotate(-1.5deg);
}
body[data-world="comic"] .auth-signup {
  font-family: var(--font-hand); font-size: 0.9rem;
  color: var(--a-ink);
  background: var(--a-cream);
  border: 2px solid var(--a-ink);
  border-radius: 185px 12px 155px 12px / 12px 155px 12px 185px;
  padding: 0.32em 0.95em;
  box-shadow: 2px 2.5px 0 rgba(43,33,24,0.35);
  transform: rotate(-1.6deg);
}
body[data-world="comic"] .auth-signup:hover { /* slight paper lift */
  transform: rotate(0.4deg) translateY(-2px);
  box-shadow: 3px 5px 0 rgba(43,33,24,0.28);
}

/* WORLD B — resolved digital: quiet text link + solid gold pill */
body[data-world="digital"] .auth-login {
  font-family: var(--font-digital); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(247,245,239,0.72);
  opacity: 1; transform: none;
}
body[data-world="digital"] .auth-login:hover { color: var(--gold-bright); }
body[data-world="digital"] .auth-login:hover::after { transform: scaleX(1); }
body[data-world="digital"] .auth-signup {
  font-family: var(--font-digital); font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--b-navy);
  background: var(--gold);
  border: 2px solid transparent;
  border-radius: 999px;
  padding: 0.5em 1.15em;
  box-shadow: 0 6px 18px rgba(201,162,75,0.3);
  transform: none;
}
body[data-world="digital"] .auth-signup:hover {
  background: var(--gold-bright);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(201,162,75,0.45);
}

/* ════════════════ SHARED CHAPTER CHROME ════════════════ */

.chapter { position: relative; }

.chapter-plate {
  min-height: 52vh;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; padding: 14vh 1.5rem 6vh;
}
.plate-issue {
  font-family: var(--font-mono); font-size: 0.68rem;
  letter-spacing: 0.5em; text-transform: uppercase;
  color: var(--a-red);
  margin-bottom: 1.1rem;
}
.plate-title { line-height: 0.95; }
.comic-title {
  font-family: var(--font-comic);
  font-size: clamp(3rem, 11vw, 6.5rem);
  color: var(--a-ink);
  letter-spacing: 0.02em;
  text-shadow: 3px 3px 0 var(--gold), 6px 6px 0 rgba(43,33,24,0.22);
  transform: rotate(-1deg);
}

/* ════════════════ WORLD A — COMIC CHAPTERS ════════════════ */

.chapter-comic {
  background:
    radial-gradient(140% 90% at 50% 0%, rgba(255,244,214,0.55), transparent 60%),
    var(--a-paper);
  color: var(--a-ink);
  overflow: hidden;
}
.chapter-comic::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image: url("../assets/textures/paper-aged.webp");
  background-size: 900px; background-repeat: repeat;
  opacity: 0.4; mix-blend-mode: multiply;
}
.chapter-comic::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image: radial-gradient(rgba(43,33,24,0.1) 1px, transparent 1.4px);
  background-size: 6px 6px; mix-blend-mode: multiply;
}
.chapter-comic > * { position: relative; z-index: 1; }

/* hero spread */
.spread-hero {
  min-height: 70vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 4vh 1.5rem 10vh; gap: 7vh;
}
.comic-hero {
  font-family: var(--font-comic);
  font-size: clamp(2.4rem, 8.5vw, 5.2rem);
  line-height: 1.04;
  display: flex; flex-direction: column; gap: 0.12em;
}
.hero-word { display: block; }
.hero-gold {
  color: var(--gold);
  -webkit-text-stroke: 1.5px var(--a-ink);
  text-shadow: 3px 3px 0 rgba(43,33,24,0.35);
}
.scroll-cue {
  font-family: var(--font-hand); font-size: 1rem; opacity: 0.7;
  display: flex; flex-direction: column; align-items: center; gap: 0.3em;
}
.cue-arrow { animation: cue-bob 1.6s ease-in-out infinite; font-size: 0.8em; }
@keyframes cue-bob { 50% { transform: translateY(6px); } }

/* ch1 track — vertical album by default (mobile / touch / reduced motion) */
.ch1-track {
  max-width: 1060px; margin: 0 auto;
  padding: 0 1.4rem 10vh;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(2.4rem, 6vw, 4.5rem) clamp(1.4rem, 4vw, 3rem);
  align-items: start;
}
.ch1-track .spread-hero, .ch1-track .chapter-close { grid-column: 1 / -1; }
.panel-wide { grid-column: 1 / -1; max-width: 780px; justify-self: center; width: 100%; }
.panel-tall { grid-row: span 2; }

/* ch1 horizontal spread — desktop, fine pointer, full motion (body.ch1-h set by JS) */
body.ch1-h #ch1-pin { height: 100vh; height: 100svh; overflow: hidden; }
body.ch1-h .ch1-stage { height: 100%; perspective: 1400px; position: relative; }
body.ch1-h .ch1-track {
  display: flex; align-items: center;
  max-width: none; margin: 0;
  height: 100%;
  width: max-content;
  gap: clamp(6rem, 9vw, 12rem);
  padding: 0 14vw 0 10vw;
  will-change: transform;
}
body.ch1-h .ch1-track .spread-hero {
  min-height: 0; width: 58vw; flex: none; padding: 0;
}
body.ch1-h .ch1-track .chapter-close { width: 52vw; flex: none; padding: 0; }
body.ch1-h .panel { flex: none; }
body.ch1-h .panel-wide { width: min(44vw, 72vh); max-width: none; justify-self: auto; }
body.ch1-h .panel-half { width: min(36vw, 62vh); }
body.ch1-h .panel-tall { width: min(26vw, 48vh); grid-row: auto; }

.page-shade {
  position: absolute; inset: 0; z-index: 6; pointer-events: none; opacity: 0;
  background: linear-gradient(100deg, transparent 25%, rgba(43,33,24,0.12) 55%, rgba(43,33,24,0.5) 100%);
}

/* in horizontal mode the section grows a huge pin spacer — swap the
   full-section blend-mode texture layers for viewport-sized ones on the
   stage, so the compositor never has to hold a 5000px blended layer */
body.ch1-h #ch1::before, body.ch1-h #ch1::after { content: none; }
body.ch1-h .ch1-stage::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("../assets/textures/paper-aged.webp");
  background-size: 900px; background-repeat: repeat;
  opacity: 0.4; mix-blend-mode: multiply;
}
body.ch1-h .ch1-stage::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(rgba(43,33,24,0.1) 1px, transparent 1.4px);
  background-size: 6px 6px; mix-blend-mode: multiply;
}
body.ch1-h .ch1-track, body.ch1-h .page-shade { position: relative; z-index: 1; }
body.ch1-h .page-shade { position: absolute; }

.panel { position: relative; perspective: 950px; }
/* soft sheet-shadow beneath the paper (moves with the bend, transform-only) */
.panel::before {
  content: ""; position: absolute; z-index: 0;
  left: 8%; right: -3%; top: 10%; bottom: -5%;
  background: radial-gradient(55% 55% at 50% 50%, rgba(43,33,24,0.34), rgba(43,33,24,0.12) 55%, transparent 75%);
  opacity: var(--sheet-o, 0);
  transform: var(--sheet-t, none);
  pointer-events: none;
}
.panel-frame {
  position: relative;
  border: 3px solid var(--a-ink);
  border-radius: 3px;
  background: var(--a-cream);
  box-shadow: 5px 6px 0 rgba(43,33,24,0.3);
  overflow: hidden;
  transform: rotate(var(--tilt, -0.6deg));
}
.panel:nth-child(even) .panel-frame { --tilt: 0.7deg; }
.panel-keystone .panel-frame { --tilt: -1.1deg; box-shadow: 7px 9px 0 rgba(43,33,24,0.32); }

/* light catching the page as it tilts (transform-only sheen) */
.panel-frame::before {
  content: ""; position: absolute; inset: -40%; z-index: 2; pointer-events: none;
  background: linear-gradient(112deg, transparent 42%, rgba(255, 249, 228, 0.34) 50%, transparent 58%);
  transform: translateX(var(--sheen-x, -80%));
  opacity: var(--sheen-o, 0);
}

/* page-corner curl on hover */
.panel-frame::after {
  content: ""; position: absolute; right: 0; bottom: 0; width: 0; height: 0;
  background: linear-gradient(315deg, var(--a-paper-deep) 47%, rgba(43,33,24,0.25) 50%, var(--a-cream) 52%);
  box-shadow: -3px -3px 6px rgba(43,33,24,0.18);
  border-top-left-radius: 6px;
  transition: width 0.35s cubic-bezier(0.5, 0, 0.2, 1), height 0.35s cubic-bezier(0.5, 0, 0.2, 1);
  z-index: 3;
}
.panel-frame:hover::after { width: 44px; height: 44px; }

/* caption bits — typed album labels crossed with comic caption boxes */
.panel-bit {
  position: relative;
  display: table; /* shrink-wrap to content, stays centered via margin */
  margin: 1.1rem auto 0;
  max-width: 88%;
  font-family: var(--font-hand);
  font-size: clamp(0.85rem, 2vw, 1.02rem);
  line-height: 1.35;
  text-align: center;
  color: var(--a-ink);
  background: #f8f1dc;
  border: 2px solid var(--a-ink);
  /* hand-drawn wobble — asymmetric radii, not a perfect rectangle */
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  padding: 0.5em 1.1em 0.55em;
  box-shadow: 2.5px 3px 0 rgba(43,33,24,0.35);
  transform: rotate(-0.7deg);
}
.panel:nth-child(even) .panel-bit,
[data-decay]:nth-child(even) .panel-bit { transform: rotate(0.8deg); }
/* a hint of tape on some bits */
.panel-bit.has-tape::before {
  content: ""; position: absolute; top: -11px; left: 50%; z-index: 2;
  width: 62px; height: 20px;
  transform: translateX(-50%) rotate(-2.5deg);
  background: rgba(228, 214, 168, 0.85);
  border-left: 1px dashed rgba(120, 96, 44, 0.5);
  border-right: 1px dashed rgba(120, 96, 44, 0.5);
  box-shadow: 0 1px 2px rgba(43,33,24,0.25);
}
/* one corner slightly lifted */
.panel-bit.has-tape::after {
  content: ""; position: absolute; right: -2px; bottom: -2px;
  width: 14px; height: 14px;
  background: linear-gradient(315deg, transparent 48%, rgba(43,33,24,0.18) 50%, #efe5c8 52%);
}

/* speech bubbles */
.bubble {
  position: absolute; z-index: 2;
  font-family: var(--font-hand);
  font-size: clamp(0.95rem, 2.4vw, 1.25rem);
  color: var(--a-ink);
  background: #fdf6e0;
  border: 2.5px solid var(--a-ink);
  padding: 0.5em 0.9em;
  line-height: 1.15;
  filter: drop-shadow(2px 3px 0 rgba(43,33,24,0.3));
}
.bubble-speech { border-radius: 1.2em; }
.bubble-speech::after {
  content: ""; position: absolute; bottom: -14px; width: 0; height: 0;
  border: 9px solid transparent;
  border-top: 16px solid var(--a-ink);
}
.bubble-speech::before {
  content: ""; position: absolute; bottom: -9px; width: 0; height: 0; z-index: 1;
  border: 7px solid transparent;
  border-top: 13px solid #fdf6e0;
}
.bubble-right { top: 6%; right: 5%; transform: rotate(2deg); }
.panel-keystone .bubble-right { top: 15%; } /* clears the ANNUAL SPORTS DAY banner */
.bubble-right::after { left: 22%; } .bubble-right::before { left: calc(22% + 2px); }
.bubble-left { top: 7%; left: 5%; transform: rotate(-2deg); }
.bubble-left::after { right: 24%; } .bubble-left::before { right: calc(24% + 2px); }

.bubble-burst {
  top: 8%; left: 6%;
  font-family: var(--font-comic);
  font-size: clamp(1.1rem, 3vw, 1.7rem);
  letter-spacing: 0.06em;
  color: var(--a-red);
  background: #fdf6e0;
  clip-path: polygon(0% 18%, 8% 12%, 5% 0%, 18% 9%, 27% 0%, 33% 11%, 45% 2%, 50% 13%, 63% 4%, 66% 14%, 80% 8%, 79% 19%, 95% 16%, 87% 29%, 100% 34%, 89% 42%, 100% 54%, 87% 58%, 96% 72%, 82% 71%, 86% 87%, 71% 79%, 68% 95%, 57% 84%, 48% 100%, 42% 85%, 30% 96%, 27% 82%, 13% 90%, 17% 74%, 2% 76%, 10% 62%, 0% 54%, 9% 45%, 0% 36%, 10% 30%);
  padding: 1em 1.4em;
  border: none;
}

/* taped photo panels */
.tape {
  position: absolute; z-index: 4;
  width: 88px; height: 30px;
  background: rgba(228, 214, 168, 0.82);
  border-left: 1px dashed rgba(120, 96, 44, 0.5);
  border-right: 1px dashed rgba(120, 96, 44, 0.5);
  box-shadow: 0 1px 3px rgba(43,33,24,0.25);
  opacity: 0.9;
}
.tape-tl { top: -12px; left: 8%; transform: rotate(-38deg); }
.tape-br { bottom: -12px; right: 8%; transform: rotate(-38deg); }

.chapter-close { text-align: center; padding: 6vh 1.5rem 16vh; }
.comic-close {
  font-family: var(--font-hand);
  font-size: clamp(1.15rem, 3vw, 1.6rem);
  line-height: 1.55; max-width: 34ch; margin: 0 auto;
}
.comic-close em { color: var(--a-red); font-style: normal; }

/* ════════════════ CH.2 — DECAY ════════════════ */

.chapter-decay {
  background:
    radial-gradient(120% 80% at 50% 100%, rgba(148, 118, 62, 0.35), transparent 55%),
    var(--a-paper);
}
.chapter-decay .plate-issue { color: rgba(43,33,24,0.55); }
.chapter-decay .comic-title { text-shadow: 3px 3px 0 rgba(201,162,75,0.5), 6px 6px 0 rgba(43,33,24,0.15); opacity: 0.92; }

.decay-stage {
  max-width: 900px; margin: 0 auto;
  padding: 4vh 1.4rem 6vh;
  display: flex; flex-direction: column;
  gap: clamp(9rem, 22vh, 15rem);
}
.decay-panel { max-width: 620px; }
.decay-panel:nth-child(odd) { align-self: flex-start; }
.decay-panel:nth-child(even) { align-self: flex-end; }

.decay-caption { opacity: 0.75; }

/* yellowing film scrubbed by JS (opacity) */
.decay-yellow {
  position: absolute; inset: 0; z-index: 2; opacity: 0;
  background:
    radial-gradient(90% 70% at 20% 15%, rgba(146, 108, 34, 0.55), transparent 60%),
    radial-gradient(80% 60% at 85% 80%, rgba(120, 84, 20, 0.5), transparent 55%),
    rgba(160, 122, 44, 0.32);
  mix-blend-mode: multiply;
}
/* tear overlay scrubbed by JS (clip-path) */
.decay-torn {
  position: absolute; top: -2%; right: -2%; width: 46%; height: 104%; z-index: 3;
  background: var(--a-paper);
  clip-path: polygon(18% 0, 100% 0, 100% 100%, 30% 100%, 12% 84%, 26% 66%, 8% 52%, 24% 34%, 10% 18%);
  box-shadow: -4px 0 8px rgba(43,33,24,0.3);
  transform: translateX(105%) rotate(2deg);
  opacity: 0;
}
.decay-dust {
  position: absolute; inset: 0; z-index: 2; opacity: 0;
  background:
    radial-gradient(120% 40% at 50% 0%, rgba(214, 202, 170, 0.65), transparent 55%),
    repeating-linear-gradient(115deg, transparent 0 7px, rgba(196, 182, 148, 0.16) 7px 8px);
  mix-blend-mode: soft-light;
  backdrop-filter: saturate(0.8);
}
.tape-loose { transform-origin: left center; }

/* whatsapp chat that scrolls away */
.decay-chat { max-width: 380px; width: 100%; align-self: flex-end; }
.chat-window {
  border: 3px solid var(--a-ink); border-radius: 14px;
  overflow: hidden;
  background: #e8e0cf;
  box-shadow: 5px 6px 0 rgba(43,33,24,0.3);
  transform: rotate(0.8deg);
}
.chat-head {
  position: relative; z-index: 2;
  font-family: var(--font-digital); font-weight: 600; font-size: 0.8rem;
  background: #4c6b57; color: #f2eee0;
  padding: 0.6em 0.9em;
  display: flex; align-items: center; gap: 0.5em;
}
.chat-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); display: inline-block; }
.chat-scroll { height: 230px; overflow: hidden; padding: 0.8em; position: relative; }
.chat-msg {
  font-family: var(--font-digital); font-size: 0.74rem; line-height: 1.4;
  background: #f7f2e2;
  border-radius: 8px; border-top-left-radius: 2px;
  padding: 0.5em 0.8em; margin-bottom: 0.55em;
  max-width: 88%;
  box-shadow: 0 1px 1px rgba(43,33,24,0.15);
}
.chat-msg b { color: #4c6b57; display: block; font-size: 0.68rem; }
.chat-img { background: #ece4cd; color: #6d6046; font-style: italic; }
.chat-faded { opacity: 0.45; background: transparent; box-shadow: none; text-align: center; max-width: 100%; font-style: italic; }

.decay-verdict {
  min-height: 60vh;
  display: grid; place-items: center;
  text-align: center; padding: 8vh 1.5rem 18vh;
}
.decay-line {
  font-family: var(--font-comic);
  font-size: clamp(2rem, 7.5vw, 4.4rem);
  line-height: 1.1;
  opacity: 0.92;
}
.decay-line-2 { color: var(--a-red); display: inline-block; }

/* ════════════════ CH.3 — THE MORPH ════════════════ */

.chapter-morph { background: var(--a-paper); }
.morph-pin {
  position: relative; height: 100vh; height: 100svh;
  overflow: hidden;
  display: grid; place-items: center;
}
#morph-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.morph-copy {
  position: relative; z-index: 3;
  text-align: center; padding: 0 1.5rem;
  display: flex; flex-direction: column; gap: 0.5em;
}
.gap-line {
  font-family: var(--font-digital);
  font-weight: 300;
  font-size: clamp(1.5rem, 5vw, 3rem);
  color: var(--b-paper);
  opacity: 0; transform: translateY(24px);
  letter-spacing: -0.01em;
}
.gap-punch { font-weight: 800; margin-top: 0.3em; }
.gap-nothing { color: var(--gold); position: relative; white-space: nowrap; }
.gap-nothing::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.02em; height: 3px;
  background: var(--gold); transform: scaleX(var(--gap-underline, 0)); transform-origin: left;
}
.gap-sub {
  font-family: var(--font-digital); font-weight: 400;
  font-size: clamp(0.9rem, 2.4vw, 1.15rem);
  color: rgba(247,245,239,0.72);
  max-width: 44ch; margin: 1.6em auto 0;
  opacity: 0; transform: translateY(18px);
  line-height: 1.6;
}

.morph-card-stage {
  position: absolute; z-index: 2; inset: 0;
  display: grid; place-items: center;
  pointer-events: none;
}
.torn-card { position: relative; width: min(64vw, 300px); aspect-ratio: 3/4; }
.torn-piece {
  position: absolute;
  background:
    repeating-linear-gradient(180deg, transparent 0 16px, rgba(43,33,24,0.12) 16px 17px),
    radial-gradient(60% 40% at 70% 78%, rgba(201,162,75,0.4), transparent 60%),
    var(--a-cream);
  border: 2px solid var(--a-ink);
  box-shadow: 3px 4px 0 rgba(43,33,24,0.3);
}
.torn-p1 { width: 52%; height: 46%; top: 0; left: 0; clip-path: polygon(0 0, 100% 0, 88% 100%, 0 92%); }
.torn-p2 { width: 54%; height: 48%; top: 0; right: 0; clip-path: polygon(12% 0, 100% 0, 100% 94%, 0 100%); }
.torn-p3 { width: 50%; height: 52%; bottom: 0; left: 0; clip-path: polygon(0 8%, 92% 0, 100% 100%, 0 100%); }
.torn-p4 { width: 56%; height: 50%; bottom: 0; right: 0; clip-path: polygon(8% 4%, 100% 0, 100% 100%, 0 100%); }
.clean-card {
  position: absolute; inset: 0;
  background: var(--b-paper);
  border-radius: 18px;
  box-shadow: 0 30px 70px rgba(0,0,0,0.45), 0 0 0 1px rgba(201,162,75,0.35);
  opacity: 0; transform: scale(0.92);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.2rem;
}
.clean-card-seal {
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gold); color: var(--b-navy);
  font-size: 1.8rem; font-weight: 800;
  box-shadow: 0 6px 18px rgba(201,162,75,0.45);
}
.clean-card-lines { display: flex; flex-direction: column; gap: 0.55rem; width: 60%; }
.clean-card-lines i { height: 8px; border-radius: 4px; background: rgba(19,26,46,0.14); }
.clean-card-lines i:first-child { width: 80%; background: rgba(19,26,46,0.3); }

/* ════════════════ WORLD B — DIGITAL CHAPTERS ════════════════ */

.chapter-digital {
  background: linear-gradient(180deg, var(--b-navy) 0%, var(--b-navy-deep) 100%);
  color: var(--b-paper);
  font-family: var(--font-digital);
  overflow: hidden;
}
.chapter-digital::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(247,245,239,0.028) 1px, transparent 1px);
  background-size: 22px 22px;
}
.chapter-digital > * { position: relative; }

.plate-digital { min-height: 46vh; }
.digital-issue {
  color: var(--gold); letter-spacing: 0.55em;
  border: 1px solid rgba(201,162,75,0.4);
  border-radius: 999px; padding: 0.6em 1.4em;
}
.digital-title {
  font-family: var(--font-digital); font-weight: 800;
  font-size: clamp(2.3rem, 7.5vw, 5rem);
  letter-spacing: -0.03em;
  text-shadow: none; transform: none;
}

/* records assemble into passport */
.assemble-stage { padding: 4vh 1.4rem 12vh; text-align: center; }
.assemble-lead {
  font-weight: 300; font-size: clamp(1.15rem, 3.4vw, 1.8rem);
  color: rgba(247,245,239,0.8); margin-bottom: 7vh;
}
.assemble-scene {
  position: relative;
  max-width: 520px; margin: 0 auto;
  min-height: 70vh;
  display: grid; place-items: center;
}
.scrap {
  position: absolute; width: clamp(90px, 22vw, 150px);
  border: 3px solid var(--a-ink);
  background: var(--a-cream); padding: 4px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.5);
  z-index: 1;
  filter: sepia(0.35);
}
.scrap img { width: 100%; height: auto; }
.scrap-1 { top: 4%; left: -4%; transform: rotate(-14deg); }
.scrap-2 { top: 0%; right: -2%; transform: rotate(11deg); }
.scrap-3 { bottom: 8%; left: -2%; transform: rotate(8deg); }
.scrap-4 { bottom: 3%; right: -5%; transform: rotate(-9deg); }

/* ── Ch.4 DESKTOP — contained convergence stage (mobile untouched) ──
   Fixed-width stage centred on the card; scraps centre-anchored so JS
   drives them from a fixed-px constellation inward. GSAP owns their
   transforms once initialised. */
body.ch4-desk .assemble-scene {
  width: min(960px, 94vw); max-width: 960px;
  min-height: min(78vh, 660px);
}
body.ch4-desk .scrap {
  top: 50%; left: 50%; right: auto; bottom: auto;
  margin: 0; width: 150px;
}
/* gold border-flare as each memory is absorbed (inset — the card clips
   overflow, so an outer glow would be cut off) */
.passport-pulse {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  border-radius: 20px;
  box-shadow:
    inset 0 0 0 2px rgba(201,162,75,0.9),
    inset 0 0 24px 3px rgba(201,162,75,0.45);
  opacity: 0;
}

/* the Athlete Passport — pure code */
.passport {
  position: relative; z-index: 2;
  width: min(88vw, 380px);
  background: linear-gradient(165deg, #17244d 0%, #101b3f 60%, #0d1734 100%);
  border: 1px solid rgba(201,162,75,0.45);
  border-radius: 20px;
  padding: 1.4rem 1.4rem 0;
  text-align: left;
  box-shadow: 0 40px 90px rgba(0,0,0,0.55), inset 0 1px 0 rgba(247,245,239,0.08);
  overflow: hidden;
}
.passport::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 60% at 85% -10%, rgba(201,162,75,0.14), transparent 55%);
}
.passport-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: 1rem; border-bottom: 1px solid rgba(247,245,239,0.1);
}
.passport-brand { font-weight: 800; letter-spacing: 0.34em; font-size: 0.9rem; color: var(--gold); }
.passport-kind { font-size: 0.66rem; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(247,245,239,0.55); }

.passport-id { display: flex; align-items: center; gap: 1rem; padding: 1.15rem 0; position: relative; }
.passport-photo {
  width: 64px; height: 64px; border-radius: 14px; overflow: hidden;
  border: 2px solid rgba(201,162,75,0.55);
  flex: none;
}
.passport-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.passport-meta { display: flex; flex-direction: column; gap: 0.22em; min-width: 0; }
.passport-name { font-weight: 800; font-size: 1.12rem; letter-spacing: -0.01em; }
.passport-line { font-size: 0.72rem; color: rgba(247,245,239,0.6); }
.passport-num { font-feature-settings: "tnum"; letter-spacing: 0.12em; color: rgba(201,162,75,0.85); }
.passport-seal { margin-left: auto; color: var(--gold); flex: none; }

.passport-rows { display: flex; flex-direction: column; }
.passport-row {
  display: flex; align-items: center; gap: 0.8em;
  font-size: 0.76rem;
  padding: 0.68em 0;
  border-top: 1px solid rgba(247,245,239,0.07);
}
.row-date { font-feature-settings: "tnum"; color: rgba(247,245,239,0.5); flex: none; width: 3.4em; }
.row-what { color: rgba(247,245,239,0.88); text-align: left; }
.row-check { margin-left: auto; color: var(--gold); font-weight: 800; }

.passport-foot {
  margin: 0.9rem -1.4rem 0; padding: 0.75em 1.4rem;
  background: rgba(201,162,75,0.1);
  font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold-bright);
}

.assemble-copy {
  margin-top: 8vh;
  font-size: clamp(1.05rem, 3vw, 1.5rem);
  font-weight: 300; line-height: 1.65;
  color: rgba(247,245,239,0.85);
}
.assemble-copy strong { font-weight: 800; color: var(--b-paper); }
.assemble-gold { color: var(--gold-bright); }

/* product walk */
.product-walk {
  max-width: 1020px; margin: 0 auto;
  padding: 4vh 1.4rem 14vh;
  display: flex; flex-direction: column; gap: clamp(6rem, 16vh, 10rem);
}
.product-block {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: center;
}
.product-flip .product-copy { order: 2; }
.product-h {
  font-size: clamp(1.4rem, 3.6vw, 2.1rem);
  font-weight: 800; letter-spacing: -0.02em;
  margin-bottom: 0.7em;
}
.product-copy p { color: rgba(247,245,239,0.66); line-height: 1.75; font-size: 0.95rem; max-width: 42ch; }

/* verified achievement card */
.achieve-card {
  position: relative;
  background: var(--b-paper); color: var(--b-ink);
  border-radius: 18px;
  padding: 1.6rem 1.7rem 1.8rem;
  max-width: 360px; margin: 0 auto;
  box-shadow: 0 30px 70px rgba(0,0,0,0.5);
}
.achieve-top { display: flex; flex-direction: column; gap: 0.2em; }
.achieve-event { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; }
.achieve-meet { font-size: 0.76rem; color: var(--b-muted); }
.achieve-athlete { margin-top: 1.1em; font-size: 0.85rem; font-weight: 600; }
.achieve-date { font-size: 0.74rem; color: var(--b-muted); font-feature-settings: "tnum"; }
.gold-seal {
  position: absolute; right: 1.2rem; bottom: 1.1rem;
  color: var(--gold);
  transform: rotate(-8deg);
}

/* timeline mock */
.timeline-mock {
  max-width: 340px; margin: 0 auto;
  display: flex; flex-direction: column;
  border-left: 2px solid rgba(247,245,239,0.14);
  padding-left: 1.4rem; gap: 1.5rem;
}
.tl-item { position: relative; display: flex; gap: 0.9em; align-items: flex-start; }
.tl-dot {
  position: absolute; left: calc(-1.4rem - 7px); top: 0.25em;
  width: 12px; height: 12px; border-radius: 50%;
  background: rgba(247,245,239,0.35);
  border: 2px solid var(--b-navy);
}
.tl-gold { background: var(--gold); box-shadow: 0 0 12px rgba(201,162,75,0.5); }
.tl-body { display: flex; flex-direction: column; gap: 0.15em; }
.tl-body b { font-size: 0.88rem; }
.tl-body span { font-size: 0.72rem; color: rgba(247,245,239,0.5); font-feature-settings: "tnum"; }

/* share card mock */
.share-mock { max-width: 320px; margin: 0 auto; position: relative; }
.share-card {
  background: linear-gradient(160deg, #17244d, #0d1734);
  border: 1px solid rgba(201,162,75,0.4);
  border-radius: 16px;
  padding: 1.6rem 1.4rem;
  display: flex; flex-direction: column; align-items: center; gap: 0.4em;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.share-medal { font-size: 2rem; }
.share-card b { font-size: 1.05rem; }
.share-card span { font-size: 0.74rem; color: rgba(247,245,239,0.6); }
.share-verify { margin-top: 0.8em; color: var(--gold-bright) !important; letter-spacing: 0.08em; font-size: 0.68rem !important; text-transform: uppercase; }
.share-chrome { display: flex; gap: 6px; justify-content: center; margin-top: 0.9rem; }
.share-chrome span { width: 34px; height: 34px; border-radius: 50%; background: rgba(247,245,239,0.08); border: 1px solid rgba(247,245,239,0.14); }

/* ════════════════ CH.5 — ACADEMY ════════════════ */

.academy-lead {
  text-align: center; padding: 0 1.5rem 8vh;
  font-size: clamp(1.15rem, 3.4vw, 1.75rem);
  font-weight: 300; line-height: 1.6;
  color: rgba(247,245,239,0.85);
}

.academy-grid {
  max-width: 1020px; margin: 0 auto;
  padding: 0 1.4rem 10vh;
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.4rem, 4vw, 2.6rem);
}
.academy-point {
  border: 1px solid rgba(247,245,239,0.12);
  border-radius: 18px;
  padding: 1.8rem 1.7rem;
  background: rgba(247,245,239,0.025);
  transition: border-color 0.3s, transform 0.3s;
}
.academy-point:hover { border-color: rgba(201,162,75,0.5); transform: translateY(-4px); }
.point-num {
  font-feature-settings: "tnum";
  font-size: 0.72rem; letter-spacing: 0.3em; color: var(--gold);
  display: block; margin-bottom: 1.1em;
}
.academy-point h3 { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 0.5em; }
.academy-point p { font-size: 0.86rem; color: rgba(247,245,239,0.6); line-height: 1.7; }

/* dashboard glimpse */
.dashboard-glimpse { padding: 0 1.4rem 12vh; }
.dash-mock {
  max-width: 780px; margin: 0 auto;
  display: flex;
  background: linear-gradient(165deg, #16213f, #0c1530);
  border: 1px solid rgba(247,245,239,0.12);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,0.55);
}
.dash-side {
  width: 58px; flex: none;
  border-right: 1px solid rgba(247,245,239,0.08);
  display: flex; flex-direction: column; align-items: center;
  padding: 1.1rem 0; gap: 1rem;
}
.dash-logo {
  width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--gold); color: var(--b-navy);
  font-weight: 800; font-size: 0.9rem;
  margin-bottom: 0.6rem;
}
.dash-navdot { width: 8px; height: 8px; border-radius: 50%; background: rgba(247,245,239,0.18); }
.dash-navdot.active { background: var(--gold); }

.dash-main { flex: 1; padding: 1.3rem 1.4rem; min-width: 0; }
.dash-head b { font-size: 0.95rem; display: block; }
.dash-head span { font-size: 0.68rem; color: rgba(247,245,239,0.5); font-feature-settings: "tnum"; }
.dash-cards { display: flex; gap: 0.8rem; margin: 1.1rem 0; flex-wrap: wrap; }
.dash-card {
  flex: 1; min-width: 108px;
  background: rgba(247,245,239,0.04);
  border: 1px solid rgba(247,245,239,0.1);
  border-radius: 13px;
  padding: 0.85rem 0.95rem;
  display: flex; flex-direction: column; gap: 0.18em;
}
.dash-card span:last-child { font-size: 0.62rem; color: rgba(247,245,239,0.5); }
.dash-big { font-size: 1.25rem; font-weight: 800; font-feature-settings: "tnum"; }
.dash-card-gold { border-color: rgba(201,162,75,0.5); }
.dash-card-gold .dash-big { color: var(--gold-bright); }

.dash-list { display: flex; flex-direction: column; }
.dash-row {
  display: flex; align-items: center; gap: 0.7em;
  font-size: 0.78rem;
  padding: 0.6em 0;
  border-top: 1px solid rgba(247,245,239,0.06);
}
.dash-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; flex: none;
  background: rgba(201,162,75,0.18); color: var(--gold-bright);
  font-size: 0.68rem; font-weight: 700;
}
.dash-row em { margin-left: auto; font-style: normal; font-size: 0.64rem; color: #7fc99a; letter-spacing: 0.06em; }
.dash-row .dash-late { color: var(--gold-bright); }

/* CTA */
.cta-block { text-align: center; padding: 4vh 1.5rem 16vh; }
.cta-kicker {
  font-size: 0.7rem; letter-spacing: 0.5em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1.4rem;
}
.cta-h {
  font-size: clamp(1.6rem, 5vw, 3rem);
  font-weight: 800; letter-spacing: -0.02em;
  line-height: 1.18;
  margin-bottom: 2.6rem;
}
.cta-gold { color: var(--gold-bright); }

.cta-row { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.cta {
  display: inline-flex; align-items: center; gap: 0.6em;
  text-decoration: none;
  font-weight: 600; font-size: 0.95rem;
  border-radius: 999px;
  padding: 1em 1.9em;
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s, color 0.25s;
  will-change: transform;
}
.cta-primary {
  background: var(--gold); color: var(--b-navy);
  box-shadow: 0 12px 34px rgba(201,162,75,0.35);
}
.cta-primary:hover { background: var(--gold-bright); box-shadow: 0 16px 44px rgba(201,162,75,0.5); }
.cta-arrow { transition: transform 0.25s; }
.cta-primary:hover .cta-arrow { transform: translateX(4px); }
.cta-secondary {
  border: 1px solid rgba(247,245,239,0.3); color: var(--b-paper);
  background: transparent;
}
.cta-secondary:hover { border-color: var(--gold); color: var(--gold-bright); }
.cta-ghost { border: 1px solid rgba(247,245,239,0.3); color: var(--b-paper); }
.cta-ghost:hover { border-color: var(--gold); color: var(--gold-bright); }

/* gold underline draw on product headings */
.product-h { position: relative; display: inline-block; }
.product-h::after {
  content: ""; position: absolute; left: 0; bottom: -0.18em;
  width: 100%; height: 2px; background: var(--gold);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.7s cubic-bezier(0.6, 0, 0.2, 1) 0.15s;
}
[data-reveal].is-in .product-h::after { transform: scaleX(1); }

/* ════════════════ PROOF STRIP ════════════════ */

.proof-strip {
  border-top: 1px solid rgba(247,245,239,0.08);
  padding: 10vh 1.5rem;
  text-align: center;
  position: relative;
}
.proof-seal { color: var(--gold); margin-bottom: 1.6rem; display: inline-block; }
.proof-line { max-width: 46ch; margin: 0 auto 0.8em; color: rgba(247,245,239,0.8); line-height: 1.7; font-size: 0.98rem; }
.proof-tag { font-size: 0.72rem; letter-spacing: 0.4em; text-transform: uppercase; color: var(--gold); }
.proof-placeholders {
  margin-top: 3rem;
  display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
}
.proof-slot {
  font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(247,245,239,0.35);
  border: 1px dashed rgba(247,245,239,0.2);
  border-radius: 10px;
  padding: 1.1em 1.8em;
}

/* ════════════════ BACK COVER ════════════════ */

.back-cover {
  position: relative;
  background:
    radial-gradient(110% 80% at 50% 0%, #16244c 0%, var(--b-navy-deep) 60%);
  color: var(--b-paper);
  text-align: center;
  padding: 16vh 1.5rem 8vh;
  border-top: 1px solid rgba(201,162,75,0.25);
  overflow: hidden;
}
.back-kicker { font-size: 0.72rem; letter-spacing: 0.45em; text-transform: uppercase; color: rgba(247,245,239,0.5); margin-bottom: 1.6rem; }
.back-h {
  font-weight: 800; letter-spacing: -0.02em;
  font-size: clamp(1.8rem, 6vw, 3.6rem);
  margin-bottom: 2.8rem;
}
.back-seal { color: var(--gold); margin: 7vh auto 2.2rem; }
.back-colophon { font-size: 0.72rem; color: rgba(247,245,239,0.45); line-height: 2; letter-spacing: 0.06em; }
.back-colophon span { font-size: 0.64rem; opacity: 0.7; }

/* ════════════════ LIVING CURSOR (desktop / fine pointer) ════════════════ */

/* native pointer hidden ONLY while the module is active and healthy —
   the class is added by JS after a successful init */
html.cursor-active, html.cursor-active * { cursor: none !important; }

#cursor-layer {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1005; /* above everything incl. the preloader; hit-testing unaffected */
}
#cursor-layer[hidden] { display: none; }
#cursor-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

#cursor {
  position: absolute; left: 0; top: 0;
  will-change: transform;
  opacity: 0; /* until the first real pointer position arrives */
}
#cursor > * { position: absolute; transition: opacity 0.16s ease; }
.cur-nib { left: -3px; top: -3px; }                 /* nib tip = hotspot */
.cur-stamp { left: -13px; top: -22px; }             /* stamp centred over point */
.cur-ring {
  left: 0; top: 0; width: 18px; height: 18px;
  border: 1.5px solid var(--gold); border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.16s ease, transform 0.22s cubic-bezier(0.5, 0, 0.2, 1);
}
.cur-dot {
  left: 0; top: 0; width: 4px; height: 4px; border-radius: 50%;
  background: var(--gold);
  transform: translate(-50%, -50%);
}

/* ════════════════ REVEAL DEFAULTS (JS enhances) ════════════════ */

[data-reveal] { opacity: 0; transform: translateY(40px); }
[data-reveal].is-in { opacity: 1; transform: none; transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.4, 0, 0.2, 1); }
html.no-js [data-reveal], html.reduce-motion-fallback [data-reveal] { opacity: 1; transform: none; }

/* ════════════════ RESPONSIVE ════════════════ */

@media (max-width: 880px) {
  .product-block { grid-template-columns: 1fr; gap: 2.2rem; }
  .product-flip .product-copy { order: 0; }
  .product-copy { text-align: center; }
  .product-copy p { margin: 0 auto; }
}

@media (max-width: 720px) {
  :root { --rail-w: 0px; }

  #rail {
    top: auto; bottom: 0; right: 0; left: 0; transform: none;
    width: 100%;
    flex-direction: row; justify-content: center;
    padding: 0.5rem 0.6rem calc(0.5rem + env(safe-area-inset-bottom));
    gap: 0.6rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  body[data-world="comic"] #rail { background: rgba(236,220,178,0.88); border-top: 2px solid var(--a-ink); }
  body[data-world="digital"] #rail { background: rgba(10,18,41,0.85); border-top: 1px solid rgba(247,245,239,0.12); }

  .rail-list { flex-direction: row; gap: 0.45rem; }
  .rail-item { width: auto; padding: 0.2em; }
  .rail-item:hover { transform: none; }
  .rail-num { width: 34px; height: 34px; font-size: 0.62rem; }
  .rail-name { display: none; }
  #mute-toggle { width: 34px; height: 34px; font-size: 0.8rem; }

  body { padding-bottom: 62px; }

  /* compact auth chrome — thumb-safe, clear of the bottom rail */
  #auth-chrome { top: 0.7rem; right: 0.85rem; gap: 0.8rem; }
  .auth-login { padding: 0.6em 0.35em; } /* invisible tap-area padding */
  body[data-world="comic"] .auth-login { font-size: 0.88rem; }
  body[data-world="comic"] .auth-signup { font-size: 0.86rem; padding: 0.5em 1em; }
  body[data-world="digital"] .auth-login { font-size: 0.74rem; }
  body[data-world="digital"] .auth-signup { font-size: 0.76rem; padding: 0.65em 1.1em; }

  .ch1-track { grid-template-columns: 1fr; }
  .panel-tall { grid-row: auto; }
  .panel-wide, .panel { justify-self: stretch; }

  .decay-panel:nth-child(odd), .decay-panel:nth-child(even), .decay-chat { align-self: center; }

  .academy-grid { grid-template-columns: 1fr; }

  .dash-mock { flex-direction: column; }
  .dash-side { width: 100%; flex-direction: row; padding: 0.7rem 1rem; border-right: none; border-bottom: 1px solid rgba(247,245,239,0.08); }
  .dash-logo { margin-bottom: 0; }


  .scrap-1 { left: 2%; } .scrap-2 { right: 2%; }
  .scrap-3 { left: 3%; } .scrap-4 { right: 2%; }
}

/* ════════════════ REDUCED MOTION ════════════════ */

@media (prefers-reduced-motion: reduce) {
  .cue-arrow { animation: none; }
  .cover, #threshold, #preloader { transition-duration: 0.3s; }
  #threshold.opened .cover { transform: none; opacity: 0; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .panel-frame:hover::after { width: 0; height: 0; }
  * { scroll-behavior: auto !important; }
}
