/* =============================================================================
   NINE LIVES — An Interstellar Field Guide to the Domestic Cat
   Design system + components. Hand-authored, zero external dependencies.
   Palette: warm cat-fur tones (cream, taupe, caramel, deep brown) with a
   cool-grey escape hatch, tuned for WCAG 2.1 AA contrast on a dark theme.
   Type: self-hosted Cormorant Garamond (display) + EB Garamond (body).
   ========================================================================== */

/* ----------------------------------------------------------------------------
   0. Fonts — self-hosted, SIL Open Font License 1.1 (see assets/fonts/OFL.txt)
   ------------------------------------------------------------------------- */
@font-face {
  font-family: "Cormorant Garamond"; font-style: normal; font-weight: 600;
  font-display: swap; src: url("../fonts/cormorant-garamond-600.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond"; font-style: normal; font-weight: 700;
  font-display: swap; src: url("../fonts/cormorant-garamond-700.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond"; font-style: italic; font-weight: 600;
  font-display: swap; src: url("../fonts/cormorant-garamond-600-italic.woff2") format("woff2");
}
@font-face {
  font-family: "EB Garamond"; font-style: normal; font-weight: 400;
  font-display: swap; src: url("../fonts/eb-garamond-400.woff2") format("woff2");
}
@font-face {
  font-family: "EB Garamond"; font-style: normal; font-weight: 500;
  font-display: swap; src: url("../fonts/eb-garamond-500.woff2") format("woff2");
}
@font-face {
  font-family: "EB Garamond"; font-style: normal; font-weight: 700;
  font-display: swap; src: url("../fonts/eb-garamond-700.woff2") format("woff2");
}
@font-face {
  font-family: "EB Garamond"; font-style: italic; font-weight: 400;
  font-display: swap; src: url("../fonts/eb-garamond-400-italic.woff2") format("woff2");
}

/* ----------------------------------------------------------------------------
   1. Design tokens
   ------------------------------------------------------------------------- */
:root {
  /* Core fur palette — deep browns from tabby to tuxedo */
  --void: #1e1915;
  --deep: #241e19;
  --night: #2b2722;
  --surface: #372e27;
  --surface-2: #4b392f;
  --line: rgba(240, 225, 202, 0.12);
  --line-strong: rgba(240, 225, 202, 0.24);

  /* Ink — cream & taupe */
  --ink: #f6f1ee;
  --ink-soft: #e9dfd8;
  --ink-mute: #c9b7a4;
  --ink-faint: #bbad9c;

  /* Signature accents — caramel, sage cat-eye, dusty rose, tuxedo grey */
  --gold: #e3c088;       /* tabby caramel */
  --gold-deep: #c99f63;
  --amber: #d2a069;      /* ginger */
  --eye: #b2c293;        /* cat-eye sage green */
  --eye-deep: #8ca062;
  --coral: #d89a86;      /* dusty rose */
  --violet: #9ba3a8;     /* cool tuxedo grey */
  --sky: #aeb8be;        /* light grey-blue */

  /* Functional */
  --focus: #f2d9a0;
  --good: #b2c293;
  --bad: #e59a86;

  /* Gradients */
  --grad-gold: linear-gradient(135deg, #f3e4c6 0%, #e3c088 42%, #c99f63 100%);
  --grad-cosmic: linear-gradient(135deg, #e3c088 0%, #a8907d 50%, #9ba3a8 100%);
  --grad-eye: radial-gradient(circle at 50% 40%, #dce4c6 0%, #b2c293 42%, #6e7c4e 100%);
  --glow-gold: 0 0 40px rgba(227, 192, 136, 0.30);

  /* Type — elegant self-hosted serifs, with graceful system fallbacks */
  --font-display: "Cormorant Garamond", Cormorant, Didot, "Hoefler Text", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --font-body: "EB Garamond", Garamond, "Palatino Linotype", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "Fira Code", Menlo, Consolas, monospace;

  /* Fluid type scale (clamp: min, preferred vw, max) — nudged up for the serif's smaller x-height */
  --step--1: clamp(0.86rem, 0.82rem + 0.2vw, 0.98rem);
  --step-0: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.45rem, 1.28rem + 0.85vw, 2.05rem);
  --step-3: clamp(1.75rem, 1.48rem + 1.35vw, 2.85rem);
  --step-4: clamp(2.1rem, 1.66rem + 2.2vw, 3.9rem);
  --step-5: clamp(2.6rem, 1.85rem + 3.6vw, 5.6rem);
  --step-6: clamp(3.1rem, 1.9rem + 6vw, 8rem);

  /* Space */
  --space-xs: clamp(0.5rem, 0.45rem + 0.25vw, 0.75rem);
  --space-s: clamp(0.85rem, 0.75rem + 0.5vw, 1.25rem);
  --space-m: clamp(1.35rem, 1.1rem + 1.2vw, 2.25rem);
  --space-l: clamp(2.25rem, 1.8rem + 2.2vw, 4rem);
  --space-xl: clamp(3.5rem, 2.6rem + 4.5vw, 7rem);
  --space-2xl: clamp(5rem, 3.5rem + 7vw, 11rem);

  --radius: 18px;
  --radius-s: 11px;
  --radius-l: 30px;
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.75);
  --shadow-soft: 0 12px 40px -22px rgba(0, 0, 0, 0.6);
  --maxw: 1200px;
  --readw: 68ch;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ----------------------------------------------------------------------------
   2. Reset & base
   ------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--gold-deep) transparent;
}

body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--void);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}

img,
svg,
canvas,
video { display: block; max-width: 100%; }

button,
input,
select,
textarea { font: inherit; color: inherit; }

a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold-deep); }

ul[role="list"],
ol[role="list"] { list-style: none; padding: 0; }

::selection { background: var(--gold); color: var(--void); }

/* Cosmic base backdrop layered behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(1200px 800px at 78% -8%, rgba(180, 142, 92, 0.20), transparent 60%),
    radial-gradient(900px 700px at 10% 8%, rgba(150, 128, 106, 0.16), transparent 55%),
    radial-gradient(1000px 900px at 50% 120%, rgba(120, 92, 60, 0.18), transparent 60%),
    var(--void);
}
/* Fine grain overlay (original, generated via SVG turbulence data URI) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  opacity: 0.05;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ----------------------------------------------------------------------------
   3. Accessibility utilities
   ------------------------------------------------------------------------- */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed;
  top: 0.6rem;
  left: 50%;
  transform: translate(-50%, -160%);
  z-index: 200;
  background: var(--gold);
  color: var(--void);
  font-weight: 700;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.25s var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); color: var(--void); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ----------------------------------------------------------------------------
   4. Layout primitives
   ------------------------------------------------------------------------- */
.shell { width: min(100% - 2.4rem, var(--maxw)); margin-inline: auto; }
.shell--narrow { width: min(100% - 2.4rem, 860px); margin-inline: auto; }

.section { position: relative; padding-block: var(--space-2xl); }
.section__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--eye);
  margin-bottom: var(--space-s);
}
.section__eyebrow::before {
  content: "";
  width: 2rem; height: 1px;
  background: linear-gradient(90deg, var(--eye), transparent);
}
.section__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-4);
  line-height: 1.02;
  letter-spacing: -0.015em;
  color: var(--ink);
  max-width: 20ch;
}
.section__lead {
  margin-top: var(--space-s);
  font-size: var(--step-1);
  color: var(--ink-mute);
  max-width: var(--readw);
  line-height: 1.55;
}

.eyebrow-num { color: var(--gold); font-weight: 700; }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }

/* ----------------------------------------------------------------------------
   5. Buttons & controls
   ------------------------------------------------------------------------- */
.btn {
  --btn-bg: var(--surface-2);
  --btn-fg: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.4rem;
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 650;
  font-size: var(--step-0);
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.btn:active { transform: translateY(0); }
.btn--primary {
  --btn-bg: var(--grad-gold);
  --btn-fg: #241e19;
  border-color: transparent;
  font-weight: 750;
  box-shadow: var(--glow-gold);
}
.btn--ghost { --btn-bg: transparent; }
.btn--eye { --btn-bg: var(--grad-cosmic); --btn-fg: #05201a; border-color: transparent; font-weight: 750; }
.btn__icon { width: 1.15em; height: 1.15em; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  font-size: var(--step--1);
  color: var(--ink-soft);
}

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-m);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(6px);
}

/* ----------------------------------------------------------------------------
   6. Navigation
   ------------------------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
  padding: 0.7rem clamp(0.9rem, 3vw, 2rem);
  background: linear-gradient(180deg, rgba(30, 25, 21, 0.85), rgba(30, 25, 21, 0.4));
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease), padding 0.4s var(--ease);
}
.nav.is-stuck { border-color: var(--line); background: rgba(30, 25, 21, 0.92); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.brand__mark { width: 34px; height: 34px; flex: none; }
.brand__word { font-size: 1.15rem; }
.brand__word b { color: var(--gold); font-weight: 600; letter-spacing: 0.14em; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  list-style: none;
}
.nav__links a {
  display: inline-block;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  color: var(--ink-mute);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 550;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav__links a:hover,
.nav__links a[aria-current="true"] { color: var(--ink); background: rgba(255, 255, 255, 0.06); }

.nav__tools { display: flex; align-items: center; gap: 0.5rem; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease), border-color 0.2s;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.09); transform: translateY(-1px); }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn .icon-on { display: none; }
.icon-btn[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); }
.icon-btn[aria-pressed="true"] .icon-on { display: block; }
.icon-btn[aria-pressed="true"] .icon-off { display: none; }

.nav__toggle { display: none; }

/* Mobile nav */
@media (max-width: 860px) {
  .nav__links {
    position: fixed;
    inset: 64px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 1rem clamp(0.9rem, 3vw, 2rem) 1.4rem;
    background: rgba(36, 30, 25, 0.98);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
    transform: translateY(-140%);
    transition: transform 0.4s var(--ease);
    box-shadow: var(--shadow);
  }
  .nav__links.is-open { transform: translateY(0); }
  .nav__links a { padding: 0.85rem 1rem; font-size: 1.05rem; }
  .nav__toggle { display: inline-grid; }
}

/* ----------------------------------------------------------------------------
   7. Hero
   ------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: calc(var(--space-2xl) + 3rem) 1.2rem var(--space-xl);
  overflow: hidden;
}
.hero__canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%; height: 100%;
}
.hero__content { position: relative; z-index: 2; max-width: 60rem; }

.hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--eye);
  padding: 0.4rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(178, 194, 147, 0.06);
  margin-bottom: var(--space-m);
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-6);
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: var(--space-s);
}
.hero__title .glyph {
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 60px rgba(227, 192, 136, 0.25);
}
.hero__cat { width: min(340px, 74vw); margin: 0 auto var(--space-s); }
.hero__lead {
  font-size: var(--step-1);
  color: var(--ink-soft);
  max-width: 40ch;
  margin: 0 auto var(--space-m);
}
.hero__lead em { color: var(--gold); font-style: normal; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; }

.hero__scroll {
  position: absolute;
  bottom: 1.4rem; left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: var(--ink-mute);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: none;
}
.hero__scroll svg { width: 22px; height: 22px; animation: bob 2.2s var(--ease-in-out) infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(7px); } }

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(1.2rem, 4vw, 3rem);
  margin-top: var(--space-l);
}
.hero__stat b {
  display: block;
  font-family: var(--font-display);
  font-size: var(--step-3);
  color: var(--gold);
  line-height: 1;
}
.hero__stat span { font-size: var(--step--1); color: var(--ink-mute); letter-spacing: 0.04em; }

/* ----------------------------------------------------------------------------
   8. Origin / myth section
   ------------------------------------------------------------------------- */
.myth { position: relative; }
.tablet {
  position: relative;
  border-radius: var(--radius-l);
  padding: clamp(1.5rem, 4vw, 3.2rem);
  background:
    linear-gradient(180deg, rgba(227, 192, 136, 0.06), rgba(227, 192, 136, 0.02)),
    var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.tablet::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cg fill='none' stroke='%23ffd479' stroke-width='0.6' opacity='0.12'%3E%3Cpath d='M8 14h44M8 30h30M8 46h38'/%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
  pointer-events: none;
}
.tablet__quote {
  position: relative;
  font-family: var(--font-display);
  font-size: var(--step-3);
  line-height: 1.2;
  color: var(--ink);
  max-width: 22ch;
}
.tablet__cite { position: relative; margin-top: var(--space-m); color: var(--eye); font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: 0.1em; }

.myth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: var(--space-m);
  margin-top: var(--space-l);
}
.myth-card h3 { font-family: var(--font-display); font-size: var(--step-2); color: var(--ink); margin-bottom: 0.4rem; }
.myth-card p { color: var(--ink-mute); }
.myth-card .myth-card__ico { width: 46px; height: 46px; margin-bottom: var(--space-s); color: var(--gold); }

.disclaimer {
  margin-top: var(--space-l);
  font-size: var(--step--1);
  color: var(--ink-faint);
  font-style: italic;
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}
.disclaimer svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--eye); }

/* ----------------------------------------------------------------------------
   9. Timeline
   ------------------------------------------------------------------------- */
.timeline { position: relative; margin-top: var(--space-l); padding-left: 0; }
.timeline__track {
  display: grid;
  gap: var(--space-m);
}
.tl-item {
  position: relative;
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: var(--space-m);
  align-items: start;
  padding-bottom: var(--space-m);
}
.tl-item__year {
  font-family: var(--font-display);
  font-size: var(--step-2);
  color: var(--gold);
  text-align: right;
  line-height: 1;
}
.tl-item__year small { display: block; font-family: var(--font-mono); font-size: 0.62em; color: var(--ink-faint); letter-spacing: 0.1em; }
.tl-item__body { position: relative; padding-left: var(--space-m); border-left: 2px solid var(--line-strong); }
.tl-item__body::before {
  content: "";
  position: absolute;
  left: -8px; top: 6px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--grad-gold);
  box-shadow: 0 0 0 4px rgba(227, 192, 136, 0.12);
}
.tl-item h3 { font-size: var(--step-1); color: var(--ink); margin-bottom: 0.25rem; }
.tl-item p { color: var(--ink-mute); }

@media (max-width: 620px) {
  .tl-item { grid-template-columns: 1fr; gap: 0.35rem; }
  .tl-item__year { text-align: left; }
  .tl-item__body { padding-left: var(--space-s); }
}

/* ----------------------------------------------------------------------------
   10. Cinematic player
   ------------------------------------------------------------------------- */
.cinema { }
.cinema__frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #16110d;
  box-shadow: var(--shadow), 0 0 80px -40px rgba(178, 194, 147, 0.5);
  aspect-ratio: 16 / 9;
}
.cinema__canvas { width: 100%; height: 100%; display: block; }
.cinema__caption {
  position: absolute;
  left: 50%; bottom: 12%;
  transform: translateX(-50%);
  max-width: 82%;
  text-align: center;
  font-size: clamp(0.95rem, 2.4vw, 1.4rem);
  line-height: 1.4;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
  font-family: var(--font-display);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.cinema__caption.is-on { opacity: 1; }
.cinema__overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, rgba(36, 30, 25, 0.35), rgba(22, 17, 13, 0.82));
  transition: opacity 0.5s var(--ease);
}
.cinema__overlay.is-hidden { opacity: 0; pointer-events: none; }
.cinema__play {
  display: inline-grid;
  place-items: center;
  width: 92px; height: 92px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: rgba(227, 192, 136, 0.12);
  color: var(--gold);
  cursor: pointer;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
  backdrop-filter: blur(4px);
}
.cinema__play:hover { transform: scale(1.06); background: rgba(227, 192, 136, 0.22); }
.cinema__play svg { width: 40px; height: 40px; margin-left: 4px; }

.cinema__controls {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--surface);
}
.cinema__scrub {
  flex: 1;
  height: 8px;
  cursor: pointer;
  accent-color: var(--gold-deep);
}
.cinema__time { font-family: var(--font-mono); font-size: 0.82rem; color: var(--ink-mute); min-width: 5.5ch; }
.cinema__scene-label { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--eye); }

/* ----------------------------------------------------------------------------
   11. Anatomy lab
   ------------------------------------------------------------------------- */
.anatomy__stage {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--space-l);
  align-items: center;
  margin-top: var(--space-l);
}
.anatomy__figure {
  position: relative;
  border-radius: var(--radius);
  background:
    radial-gradient(80% 80% at 50% 40%, rgba(178, 194, 147, 0.08), transparent 70%),
    var(--surface);
  border: 1px solid var(--line);
  padding: var(--space-m);
}
.anatomy__svg { width: 100%; height: auto; }

.hot {
  cursor: pointer;
  transition: transform 0.2s var(--ease);
  transform-box: fill-box;
  transform-origin: center;
}
.hot__dot {
  fill: var(--gold);
  stroke: #fff;
  stroke-width: 1.5;
  transition: r 0.2s var(--ease), fill 0.2s var(--ease);
}
.hot__pulse { fill: var(--gold); opacity: 0.35; transform-box: fill-box; transform-origin: center; }
.hot:hover .hot__dot,
.hot[aria-pressed="true"] .hot__dot { fill: var(--eye); r: 11; }
.hot:focus-visible { outline: none; }
.hot:focus-visible .hot__dot { stroke: var(--focus); stroke-width: 3; }

.anatomy__readout {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
}
.readout__num { font-family: var(--font-mono); color: var(--eye); font-size: 0.8rem; letter-spacing: 0.16em; }
.readout__title { font-family: var(--font-display); font-size: var(--step-3); color: var(--ink); line-height: 1.05; }
.readout__stat { font-family: var(--font-display); font-size: var(--step-2); color: var(--gold); }
.readout__body { color: var(--ink-mute); }
.readout__hint { margin-top: auto; font-size: var(--step--1); color: var(--ink-faint); }

.anatomy__pills { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: var(--space-m); }

@media (max-width: 860px) {
  .anatomy__stage { grid-template-columns: 1fr; }
}

/* ----------------------------------------------------------------------------
   12. Senses
   ------------------------------------------------------------------------- */
.senses__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  gap: var(--space-m);
  margin-top: var(--space-l);
}
.sense {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  min-height: 100%;
}
.sense__head { display: flex; align-items: center; gap: 0.75rem; }
.sense__ico {
  width: 52px; height: 52px; flex: none;
  display: grid; place-items: center;
  border-radius: 14px;
  background: rgba(227, 192, 136, 0.1);
  color: var(--gold);
  border: 1px solid var(--line-strong);
}
.sense__ico svg { width: 28px; height: 28px; }
.sense h3 { font-family: var(--font-display); font-size: var(--step-1); color: var(--ink); }
.sense p { color: var(--ink-mute); font-size: var(--step-0); }
.sense__stat { font-family: var(--font-display); font-size: var(--step-2); color: var(--eye); line-height: 1; }

.nightvision { position: relative; border-radius: var(--radius-s); overflow: hidden; border: 1px solid var(--line); }
.nightvision svg { width: 100%; height: auto; display: block; }
.nightvision__control { display: flex; align-items: center; gap: 0.75rem; margin-top: var(--space-s); }
.nightvision__control label { font-size: var(--step--1); color: var(--ink-mute); white-space: nowrap; }
input[type="range"].slider {
  flex: 1;
  accent-color: var(--eye-deep);
  height: 30px;
  cursor: pointer;
}

.bars { display: flex; flex-direction: column; gap: 0.6rem; margin-top: var(--space-s); }
.bar { display: grid; grid-template-columns: 84px 1fr auto; gap: 0.65rem; align-items: center; font-size: var(--step--1); }
.bar__label { color: var(--ink-soft); }
.bar__track { height: 12px; background: rgba(255, 255, 255, 0.06); border-radius: 999px; overflow: hidden; }
.bar__fill { height: 100%; width: 0; border-radius: 999px; background: var(--grad-cosmic); transition: width 1.1s var(--ease); }
.bar__fill--gold { background: var(--grad-gold); }
.bar__val { font-family: var(--font-mono); color: var(--ink); }

/* ----------------------------------------------------------------------------
   13. Translator / soundboard
   ------------------------------------------------------------------------- */
.translator__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-l);
  margin-top: var(--space-l);
  align-items: start;
}
@media (max-width: 860px) { .translator__grid { grid-template-columns: 1fr; } }

.soundboard { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-s); }
@media (max-width: 460px) { .soundboard { grid-template-columns: 1fr; } }

.sound {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  padding: 1.1rem 1.15rem;
  border-radius: var(--radius-s);
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  overflow: hidden;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s;
}
.sound:hover { transform: translateY(-3px); border-color: var(--gold); }
.sound.is-playing { border-color: var(--eye); background: linear-gradient(180deg, rgba(178, 194, 147, 0.14), rgba(178, 194, 147, 0.03)); }
.sound__emoji { font-size: 1.9rem; line-height: 1; }
.sound__name { font-family: var(--font-display); font-size: var(--step-1); }
.sound__desc { font-size: var(--step--1); color: var(--ink-mute); }
.sound__wave {
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: var(--grad-cosmic);
  transform: scaleX(0);
  transform-origin: left;
}
.sound.is-playing .sound__wave { animation: soundwave var(--dur, 1s) linear; }
@keyframes soundwave { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.purrmeter {
  margin-top: var(--space-m);
  padding: var(--space-m);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}
.purrmeter h3 { font-family: var(--font-display); font-size: var(--step-1); color: var(--ink); margin-bottom: 0.5rem; }
.purrviz { width: 100%; height: 120px; border-radius: var(--radius-s); background: #05070f; border: 1px solid var(--line); }
.purrmeter__hint { font-size: var(--step--1); color: var(--ink-faint); margin-top: 0.6rem; }

/* ----------------------------------------------------------------------------
   14. Builder (Genesis Lab)
   ------------------------------------------------------------------------- */
.builder__stage {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--space-l);
  margin-top: var(--space-l);
  align-items: start;
}
@media (max-width: 860px) { .builder__stage { grid-template-columns: 1fr; } }

.builder__preview {
  position: sticky;
  top: 90px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    radial-gradient(70% 60% at 50% 35%, rgba(155, 163, 168, 0.14), transparent 70%),
    var(--surface);
  padding: var(--space-m);
  text-align: center;
}
@media (max-width: 860px) { .builder__preview { position: static; } }
.builder__cat { width: min(300px, 70%); margin: 0 auto; }
.builder__name {
  margin-top: var(--space-s);
  font-family: var(--font-display);
  font-size: var(--step-2);
  color: var(--gold);
}
.builder__genotype {
  margin-top: 0.4rem;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--eye);
  letter-spacing: 0.08em;
}
.builder__controls { display: flex; flex-direction: column; gap: var(--space-m); }
.control__label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-weight: 650; color: var(--ink); margin-bottom: 0.6rem;
}
.control__fact { font-size: var(--step--1); color: var(--ink-faint); font-weight: 400; font-style: italic; max-width: 32ch; text-align: right; }
.swatches { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.swatch {
  width: 46px; height: 46px;
  border-radius: 12px;
  border: 2px solid var(--line-strong);
  cursor: pointer;
  position: relative;
  transition: transform 0.15s var(--ease), border-color 0.15s;
}
.swatch:hover { transform: scale(1.08); }
.swatch[aria-pressed="true"] { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(227, 192, 136, 0.25); }
.swatch__check { position: absolute; inset: 0; display: none; place-items: center; color: #fff; }
.swatch[aria-pressed="true"] .swatch__check { display: grid; }

.seg { display: inline-flex; flex-wrap: wrap; gap: 0.4rem; }
.seg button {
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 0.92rem;
  transition: all 0.15s var(--ease);
}
.seg button[aria-pressed="true"] { background: var(--grad-gold); color: #2b2722; border-color: transparent; font-weight: 700; }

.builder__actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: var(--space-s); }

/* ----------------------------------------------------------------------------
   15. Quiz (The Trials)
   ------------------------------------------------------------------------- */
.quiz { max-width: 780px; margin-inline: auto; margin-top: var(--space-l); }
.quiz__card {
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  padding: clamp(1.4rem, 4vw, 2.6rem);
  box-shadow: var(--shadow);
}
.quiz__progress {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-mono); font-size: var(--step--1); color: var(--ink-mute);
  letter-spacing: 0.12em; margin-bottom: var(--space-s);
}
.quiz__bar { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; margin-bottom: var(--space-m); }
.quiz__bar span { display: block; height: 100%; width: 0; background: var(--grad-gold); transition: width 0.5s var(--ease); }
.quiz__q { font-family: var(--font-display); font-size: var(--step-2); color: var(--ink); margin-bottom: var(--space-m); line-height: 1.15; }
.quiz__options { display: grid; gap: 0.7rem; }
.opt {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-s);
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.02);
  color: var(--ink);
  cursor: pointer; text-align: left; width: 100%;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease), transform 0.15s;
}
.opt:hover:not(:disabled) { transform: translateX(4px); border-color: var(--gold); }
.opt__key {
  flex: none;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono); font-size: 0.85rem; color: var(--ink-mute);
}
.opt.is-correct { border-color: var(--good); background: rgba(178, 194, 147, 0.12); }
.opt.is-correct .opt__key { background: var(--good); color: #05201a; border-color: transparent; }
.opt.is-wrong { border-color: var(--bad); background: rgba(229, 154, 134, 0.1); }
.opt.is-wrong .opt__key { background: var(--bad); color: #2a0508; border-color: transparent; }
.opt:disabled { cursor: default; }
.quiz__feedback { margin-top: var(--space-m); font-size: var(--step-0); color: var(--ink-soft); min-height: 1.5em; }
.quiz__feedback b { color: var(--gold); }
.quiz__nav { display: flex; justify-content: flex-end; gap: 0.7rem; margin-top: var(--space-m); }

.quiz__result { text-align: center; }
.quiz__score { font-family: var(--font-display); font-size: var(--step-5); background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.quiz__rank { font-family: var(--font-display); font-size: var(--step-2); color: var(--ink); margin: 0.5rem 0; }
.quiz__blurb { color: var(--ink-mute); max-width: 44ch; margin: 0 auto var(--space-m); }

/* ----------------------------------------------------------------------------
   16. Facts counters
   ------------------------------------------------------------------------- */
.facts__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: var(--space-m);
  margin-top: var(--space-l);
}
.fact { text-align: center; padding: var(--space-m) var(--space-s); }
.fact__num {
  font-family: var(--font-display);
  font-size: var(--step-4);
  line-height: 1;
  background: var(--grad-cosmic);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.fact__num .unit { font-size: 0.5em; -webkit-text-fill-color: var(--ink-soft); color: var(--ink-soft); }
.fact__label { margin-top: 0.5rem; color: var(--ink-mute); font-size: var(--step-0); }

/* ----------------------------------------------------------------------------
   17. Footer / colophon
   ------------------------------------------------------------------------- */
.colophon {
  border-top: 1px solid var(--line);
  padding-block: var(--space-xl) var(--space-l);
  background: linear-gradient(180deg, transparent, rgba(178, 194, 147, 0.03));
}
.colophon__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-l);
}
@media (max-width: 720px) { .colophon__grid { grid-template-columns: 1fr; gap: var(--space-m); } }
.colophon h4 { font-family: var(--font-display); color: var(--ink); font-size: var(--step-1); margin-bottom: var(--space-s); }
.colophon p { color: var(--ink-mute); font-size: var(--step--1); }
.colophon ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.colophon a { color: var(--ink-soft); text-decoration: none; font-size: var(--step--1); }
.colophon a:hover { color: var(--gold); }
.colophon__brand { display: flex; align-items: center; gap: 0.7rem; margin-bottom: var(--space-s); }
.colophon__brand svg { width: 40px; height: 40px; }
.colophon__bottom {
  margin-top: var(--space-l);
  padding-top: var(--space-m);
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 0.6rem 1.2rem; justify-content: space-between;
  color: var(--ink-faint); font-size: var(--step--1);
}
.badge-a11y { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--eye); }
.badge-a11y svg { width: 18px; height: 18px; }

.to-top {
  position: fixed;
  right: 1.2rem; bottom: 1.2rem;
  z-index: 90;
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s var(--ease);
}
.to-top.is-on { opacity: 1; visibility: visible; transform: none; }

/* ----------------------------------------------------------------------------
   18. Toast (audio hint)
   ------------------------------------------------------------------------- */
.toast {
  position: fixed;
  left: 50%; bottom: 1.4rem;
  transform: translate(-50%, 200%);
  z-index: 150;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-size: var(--step--1);
  display: flex; align-items: center; gap: 0.6rem;
  transition: transform 0.4s var(--ease);
}
.toast.is-on { transform: translate(-50%, 0); }
.toast svg { width: 20px; height: 20px; color: var(--gold); }

/* ----------------------------------------------------------------------------
   19. Divider glyph
   ------------------------------------------------------------------------- */
.paw-divider { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: var(--space-l) 0; color: var(--line-strong); }
.paw-divider::before, .paw-divider::after { content: ""; height: 1px; flex: 1; max-width: 160px; background: linear-gradient(90deg, transparent, var(--line-strong), transparent); }
.paw-divider svg { width: 26px; height: 26px; color: var(--gold-deep); }

/* ----------------------------------------------------------------------------
   20. Reduced motion
   ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero__scroll svg { animation: none; }
}

/* Motion opt-out toggled by JS (class on <html>) — mirrors the reduced-motion
   media query so the nav toggle actually halts every CSS animation/transition. */
.no-motion { scroll-behavior: auto; }
.no-motion *,
.no-motion *::before,
.no-motion *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
  scroll-behavior: auto !important;
}
.no-motion .reveal { opacity: 1 !important; transform: none !important; }
.no-motion .hero__scroll svg { animation: none !important; }
