/* ═══════════════════════════════════════════════════════════════
   AGORA COSMICA · THE WELL OF TIME
   A vertical descent through 2,500 years. Navy strata, gold seams.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --c-surface-a: #262E6B;
  --c-surface-b: #222A63;
  --c-modern: #1C2456;
  --c-steam: #171D49;
  --c-enl: #12173C;
  --c-mystics: #0D1233;
  --c-antiquity: #0A0E29;
  --c-void: #080B20;
  --dur: 0.95s;
  --dur-slow: 1.2s;
  --ease: var(--ease-out-expo);
}

/* ── Base ─────────────────────────────────────────────────────── */

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

html { overflow-x: hidden; scroll-behavior: auto; }
body { overflow-x: hidden; }
@supports (overflow-x: clip) {
  html, body { overflow-x: clip; }
}

html {
  background: var(--c-void);
  color-scheme: dark;
}

body {
  background: var(--bg-cosmic-void);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-gated { overflow: hidden; height: 100vh; }

img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
a { color: inherit; }
ul { list-style: none; }
blockquote { quotes: none; }

::selection { background: rgba(230, 188, 92, 0.28); color: #D2D2D2; }

:focus { outline: none; }
:focus-visible {
  outline: 1px solid var(--gold-ui);
  outline-offset: 4px;
  border-radius: 3px;
}

html { scrollbar-width: thin; scrollbar-color: rgba(230, 188, 92, 0.25) transparent; }
::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(230, 188, 92, 0.2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(230, 188, 92, 0.38); }

.wrap { width: min(1180px, 88vw); margin-inline: auto; position: relative; z-index: 3; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: fixed; top: 16px; left: 50%; transform: translate(-50%, -180%);
  z-index: 120; padding: 0.8em 1.6em; border-radius: 999px;
  background: var(--bg-card); border: 1px solid var(--gold-ui);
  color: var(--text-primary); text-decoration: none;
  font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase;
  transition: transform 0.5s var(--ease);
}
.skip-link:focus-visible { transform: translate(-50%, 0); }

/* ── Reveal system (one motion language) ──────────────────────── */

html.js .r {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
html.js .r.in { opacity: 1; transform: none; }

html.js .r-stagger > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
html.js .r-stagger.in > * { opacity: 1; transform: none; }
html.js .r-stagger.in > *:nth-child(1) { transition-delay: 0.05s; }
html.js .r-stagger.in > *:nth-child(2) { transition-delay: 0.14s; }
html.js .r-stagger.in > *:nth-child(3) { transition-delay: 0.23s; }
html.js .r-stagger.in > *:nth-child(4) { transition-delay: 0.32s; }
html.js .r-stagger.in > *:nth-child(5) { transition-delay: 0.41s; }
html.js .r-stagger.in > *:nth-child(6) { transition-delay: 0.5s; }
html.js .r-stagger.in > *:nth-child(7) { transition-delay: 0.59s; }
html.js .r-stagger.in > *:nth-child(8) { transition-delay: 0.68s; }

html.js .poem.in > *:nth-child(1) { transition-delay: 0.1s; }
html.js .poem.in > *:nth-child(2) { transition-delay: 0.5s; }
html.js .poem.in > *:nth-child(3) { transition-delay: 0.9s; }

/* ── Buttons ──────────────────────────────────────────────────── */

.btn {
  display: inline-block;
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1.05em 2.2em;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color 0.5s var(--ease), background-color 0.5s var(--ease),
              border-color 0.5s var(--ease), box-shadow 0.5s var(--ease),
              transform 0.5s var(--ease);
}
.btn:hover { transform: translateY(-2px); }

.btn-gold {
  border-color: var(--gold-ui);
  color: var(--gold-primary);
  background: rgba(230, 188, 92, 0.07);
}
.btn-gold:hover, .btn-gold:focus-visible {
  background: var(--gold-primary);
  border-color: var(--gold-primary);
  color: #10143C;
  box-shadow: 0 0 34px rgba(230, 188, 92, 0.35), 0 8px 30px rgba(8, 11, 32, 0.5);
}

.btn-ghost {
  border-color: rgba(210, 210, 210, 0.22);
  color: var(--text-secondary);
}
.btn-ghost:hover, .btn-ghost:focus-visible {
  border-color: var(--gold-hover);
  color: var(--gold-hover);
  box-shadow: 0 0 24px rgba(230, 188, 92, 0.16);
}

.btn-cta { padding: 1.25em 3.1em; font-size: 0.9rem; }

/* ── Entry gate ───────────────────────────────────────────────── */

#gate {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center;
  background: radial-gradient(90% 90% at 50% 38%, #10173F 0%, var(--c-void) 78%);
  opacity: 1;
  transition: opacity 1.1s var(--ease-in-out-soft), visibility 0s linear 1.1s;
}
#gate.is-entered { opacity: 0; visibility: hidden; pointer-events: none; }

.gate-inner {
  text-align: center;
  padding: 2rem;
  max-width: 34rem;
  transition: transform 1.1s var(--ease-in-out-soft);
}
#gate.is-entered .gate-inner { transform: translateY(-30px) scale(0.985); }

.gate-logo { overflow: visible; margin-bottom: 2.4rem; }

.gl-ring {
  stroke-dasharray: 478;
  stroke-dashoffset: 478;
  animation: gl-draw 1.6s var(--ease-out-expo) 0.35s forwards;
}
.gl-halo {
  opacity: 0;
  filter: blur(3px);
  animation: gl-halo-in 1.4s var(--ease-in-out-soft) 1.1s forwards;
}
.gl-core {
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0);
  animation: gl-core-in 1.1s var(--ease-out-expo) 1s forwards;
}
.gl-corona {
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  filter: blur(7px);
  animation: gl-corona-in 1.4s var(--ease-in-out-soft) 1.3s forwards,
             gl-breathe 5s var(--ease-in-out-soft) 2.8s infinite;
}
@keyframes gl-draw { to { stroke-dashoffset: 0; } }
@keyframes gl-halo-in { to { opacity: 0.16; } }
@keyframes gl-core-in { to { transform: scale(1); } }
@keyframes gl-corona-in { from { opacity: 0; transform: scale(0.6); } to { opacity: 0.35; transform: scale(1.35); } }
@keyframes gl-breathe {
  0%, 100% { opacity: 0.35; transform: scale(1.35); }
  50% { opacity: 0.18; transform: scale(1.2); }
}

.gate-title {
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: var(--step-4);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-indent: 0.28em;
  color: var(--text-primary);
}

.gate-tagline {
  margin-top: 1rem;
  font-family: var(--font-content);
  font-style: italic;
  font-size: var(--step-1);
  color: var(--gold-primary);
}

.gate-load {
  width: 190px; height: 1px;
  margin: 2.6rem auto 0;
  background: rgba(230, 188, 92, 0.14);
  overflow: hidden;
  transition: opacity 0.6s var(--ease);
}
.gate-load-bar {
  display: block; width: 100%; height: 100%;
  background: var(--gold-primary);
  transform: scaleX(var(--p, 0));
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}
#gate.is-ready .gate-load { opacity: 0; }

.gate-actions {
  display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
  margin-top: -1px;
  padding-top: 2.6rem;
  opacity: 0; transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.9s var(--ease) 0.15s, transform 0.9s var(--ease) 0.15s;
}
#gate.is-ready .gate-actions { opacity: 1; transform: none; pointer-events: auto; }

.gate-hint {
  margin-top: 1.8rem;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  opacity: 0;
  transition: opacity 1.2s var(--ease) 0.5s;
}
#gate.is-ready .gate-hint { opacity: 0.85; }

/* ── Persistent chrome ────────────────────────────────────────── */

.chrome {
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.4s var(--ease) 0.3s;
}
body.is-entered .chrome { opacity: 1; }
body.is-entered .mute { pointer-events: auto; }

.site-head {
  position: fixed; top: 20px; left: 24px; z-index: 70;
  display: flex; align-items: center; gap: 12px;
  font-size: 0.74rem; font-weight: 400;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--text-secondary);
}
.site-head svg { opacity: 0.9; }

/* Year ticker, the wayfinding instrument */
.ticker {
  position: fixed; top: 0; bottom: 0;
  right: clamp(16px, 2.4vw, 40px);
  z-index: 70;
  display: flex; flex-direction: column; justify-content: center;
}
.ticker-box { text-align: right; padding-right: 18px; position: relative; }
.ticker-year {
  display: block;
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: clamp(1.55rem, 2.4vw, 2.3rem);
  line-height: 1;
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
  color: var(--gold-primary);
  text-shadow: 0 0 26px rgba(230, 188, 92, 0.35);
  will-change: transform;
  transition: opacity 0.6s var(--ease);
}
.ticker-era {
  display: block;
  margin-top: 0.7em;
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  transition: opacity 0.6s var(--ease);
}
.ticker-timeless {
  position: absolute; right: 18px; top: 50%;
  transform: translateY(-50%);
  font-size: 0.66rem; font-weight: 400;
  letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--gold-primary);
  text-shadow: 0 0 20px rgba(230, 188, 92, 0.4);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}
.ticker.is-timeless .ticker-year, .ticker.is-timeless .ticker-era { opacity: 0; }
.ticker.is-timeless .ticker-timeless { opacity: 1; }

.ticker-spine {
  position: absolute; right: 0; top: 9vh; bottom: 9vh; width: 1px;
  background: linear-gradient(to bottom,
    rgba(230, 188, 92, 0), rgba(230, 188, 92, 0.3) 18%,
    rgba(230, 188, 92, 0.3) 82%, rgba(230, 188, 92, 0));
}
.ticker-node {
  position: absolute; left: -2.5px; top: 0;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold-primary);
  box-shadow: 0 0 12px rgba(230, 188, 92, 0.8);
}

/* Mute toggle */
.mute {
  position: fixed; right: 18px; bottom: 18px; z-index: 72;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid rgba(230, 188, 92, 0.28);
  background: rgba(13, 19, 56, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: grid; place-items: center;
  transition: border-color 0.5s var(--ease), box-shadow 0.5s var(--ease), opacity 1.4s var(--ease) 0.3s;
}
.mute:hover { border-color: var(--gold-hover); box-shadow: 0 0 18px rgba(230, 188, 92, 0.2); }
.eq { display: flex; gap: 3px; align-items: flex-end; height: 14px; position: relative; }
.eq i {
  width: 2px; border-radius: 1px;
  background: var(--gold-primary);
  height: 100%;
  transform-origin: bottom;
  animation: eq-dance 1.15s var(--ease-in-out-soft) infinite alternate;
}
.eq i:nth-child(1) { animation-delay: 0s; }
.eq i:nth-child(2) { animation-delay: 0.22s; }
.eq i:nth-child(3) { animation-delay: 0.44s; }
@keyframes eq-dance {
  from { transform: scaleY(0.25); }
  to { transform: scaleY(1); }
}
.mute.is-off .eq i { animation: none; transform: scaleY(0.18); background: var(--text-tertiary); }
.mute.is-off::after {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  width: 22px; height: 1px;
  background: var(--text-tertiary);
  transform: translate(-50%, -50%) rotate(-42deg);
}

/* ── Atmosphere layers ────────────────────────────────────────── */

#dust { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 40; pointer-events: none; }

.vignette {
  position: fixed; inset: 0; z-index: 91; pointer-events: none;
  background: radial-gradient(125% 95% at 50% 44%, rgba(8, 11, 32, 0) 52%, rgba(8, 11, 32, 0.52) 100%);
}

.grain {
  position: fixed; inset: -120px; z-index: 92; pointer-events: none;
  opacity: 0.055;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 1.4s steps(7) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  15% { transform: translate(-38px, 24px); }
  30% { transform: translate(26px, -42px); }
  45% { transform: translate(-14px, -30px); }
  60% { transform: translate(42px, 18px); }
  75% { transform: translate(-30px, 40px); }
  90% { transform: translate(18px, -22px); }
  100% { transform: translate(0, 0); }
}

/* Custom cursor */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 100;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0;
  mix-blend-mode: screen;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--gold-hover);
  box-shadow: 0 0 10px rgba(246, 213, 92, 0.8);
}
.cursor-ring {
  width: 32px; height: 32px;
  border: 1px solid rgba(230, 188, 92, 0.55);
  transition: width 0.4s var(--ease), height 0.4s var(--ease), border-color 0.4s var(--ease);
}
html.has-cursor .cursor-dot, html.has-cursor .cursor-ring { opacity: 1; }
html.has-cursor, html.has-cursor a, html.has-cursor button { cursor: none; }
.cursor-ring.is-hover { width: 52px; height: 52px; border-color: rgba(246, 213, 92, 0.9); }

/* ── 1 · The surface ──────────────────────────────────────────── */

.scene { position: relative; }

#surface {
  background: linear-gradient(180deg, var(--c-surface-a) 0%, var(--c-surface-b) 42%, #1F2759 100%);
  padding: 24vh 0 26vh;
  overflow: hidden;
}

.dawn {
  position: absolute; inset: 0 0 auto 0; height: 52vh;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(246, 213, 92, 0.15), rgba(246, 213, 92, 0.05) 40%, rgba(246, 213, 92, 0) 78%),
    radial-gradient(64% 34vh at 50% 0%, rgba(230, 188, 92, 0.26), rgba(230, 188, 92, 0.07) 55%, rgba(230, 188, 92, 0) 88%);
}
.dawn::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg,
    rgba(230, 188, 92, 0) 4%, rgba(246, 213, 92, 0.75) 50%, rgba(230, 188, 92, 0) 96%);
  filter: blur(0.4px);
}

.shaft-wall {
  position: absolute; top: 0; bottom: -10vh; width: 11vw;
  pointer-events: none;
}
.shaft-l {
  left: 0;
  background: linear-gradient(90deg, rgba(8, 11, 32, 0.55), rgba(8, 11, 32, 0));
  border-right: 1px solid rgba(230, 188, 92, 0.07);
}
.shaft-r {
  right: 0;
  background: linear-gradient(270deg, rgba(8, 11, 32, 0.55), rgba(8, 11, 32, 0));
  border-left: 1px solid rgba(230, 188, 92, 0.07);
}

.poem {
  min-height: 62vh;
  display: flex; flex-direction: column; justify-content: center;
  gap: 1.1em;
  text-align: center;
}
.poem-line {
  font-family: var(--font-content);
  font-style: italic;
  font-size: var(--step-3);
  line-height: 1.45;
  color: var(--text-primary);
}
.poem-line:last-child { color: var(--gold-primary); }

.surface-intro {
  max-width: 44ch;
  margin: 10vh auto 0;
  text-align: center;
  font-size: var(--step-0);
  font-weight: 300;
  color: var(--text-secondary);
}

.questions { margin: 16vh auto 0; text-align: center; }
.questions-label {
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 3rem;
}
.questions-list {
  display: flex; flex-direction: column; gap: 1.15em;
}
.questions-list li {
  font-family: var(--font-content);
  font-style: italic;
  font-size: var(--step-1);
  color: var(--text-tertiary);
  opacity: 0.75;
}
.questions-list li.q-hot {
  color: var(--gold-primary);
  opacity: 1;
  text-shadow: 0 0 30px rgba(230, 188, 92, 0.35);
}

.descend {
  margin-top: 18vh;
  text-align: center;
}
.descend p {
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.descend-line {
  display: block;
  width: 1px; height: 72px;
  margin: 0 auto 1.6rem;
  background: linear-gradient(to bottom, rgba(230, 188, 92, 0), var(--gold-primary));
  animation: descend-pulse 2.6s var(--ease-in-out-soft) infinite;
  transform-origin: top;
}
@keyframes descend-pulse {
  0%, 100% { transform: scaleY(0.55); opacity: 0.45; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ── Strata shared ────────────────────────────────────────────── */

.stratum {
  position: relative;
  background: var(--bg);
  padding-bottom: 16vh;
}
#era-modern { --bg: var(--c-modern); --prev: #1F2759; }
#era-steam { --bg: var(--c-steam); --prev: var(--c-modern); }
#era-enlightenment { --bg: var(--c-enl); --prev: var(--c-steam); }
#era-mystics { --bg: var(--c-mystics); --prev: var(--c-enl); }
#era-antiquity { --bg: var(--c-antiquity); --prev: var(--c-mystics); }

.stratum::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 26vh;
  background: linear-gradient(var(--prev), rgba(8, 11, 32, 0));
  opacity: 0.4;
  pointer-events: none;
}

.strata-edge {
  position: absolute; top: -1px; left: 0; right: 0;
  height: clamp(42px, 7vw, 90px);
  z-index: 4;
  pointer-events: none;
}
.strata-edge svg { width: 100%; height: 100%; display: block; }
.edge-fill { fill: var(--prev); }
.edge-seam { stroke: rgba(230, 188, 92, 0.16); stroke-width: 1.2; }

.era-head {
  padding-top: 22vh;
  position: relative;
}
.era-num {
  position: absolute;
  top: 4vh; right: -6vw;
  font-family: var(--font-content);
  font-size: clamp(14rem, 30vw, 26rem);
  line-height: 0.8;
  color: rgba(230, 188, 92, 0.045);
  z-index: 0;
  user-select: none;
}
.era-kicker {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-ui);
  margin-bottom: 1.4rem;
}
.era-head h2 {
  position: relative; z-index: 1;
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: var(--step-5);
  line-height: 1.04;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  max-width: 14ch;
}
.era-caption {
  margin-top: 1.6rem;
  font-family: var(--font-content);
  font-style: italic;
  font-size: var(--step-1);
  color: var(--text-tertiary);
  max-width: 36ch;
}

/* Landscape art bands, fossil imprints in the wall */
.era-art {
  position: relative;
  margin: 12vh 0 4vh;
  z-index: 1;
}
.art-band {
  width: 100%;
  height: 46vh;
  object-fit: cover;
  opacity: 0.36;
  filter: saturate(0.5) brightness(0.66) contrast(1.02);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent);
  will-change: transform;
}
.era-art::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--bg) 0%, rgba(13, 19, 56, 0.14) 30%, rgba(13, 19, 56, 0.14) 70%, var(--bg) 100%);
  pointer-events: none;
}

/* Abstract sediment where no landscape exists */
.sediment {
  height: 42vh;
  margin: 10vh 0 2vh;
  position: relative;
  z-index: 1;
  will-change: transform;
}
.sed-a {
  background:
    repeating-linear-gradient(174deg,
      rgba(230, 188, 92, 0) 0 88px, rgba(230, 188, 92, 0.05) 88px 90px,
      rgba(230, 188, 92, 0) 90px 210px),
    radial-gradient(55% 90% at 28% 50%, rgba(42, 51, 116, 0.55), rgba(42, 51, 116, 0) 70%),
    radial-gradient(40% 70% at 78% 30%, rgba(28, 36, 92, 0.5), rgba(28, 36, 92, 0) 70%);
}
.sed-b {
  background:
    repeating-linear-gradient(187deg,
      rgba(230, 188, 92, 0) 0 110px, rgba(230, 188, 92, 0.045) 110px 112px,
      rgba(230, 188, 92, 0) 112px 240px),
    radial-gradient(50% 80% at 70% 60%, rgba(42, 51, 116, 0.4), rgba(42, 51, 116, 0) 72%);
}

.cloister-light {
  position: absolute;
  left: 0; right: 0; top: 26%;
  height: 56vh;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(90deg,
    rgba(230, 188, 92, 0) 0 11vw, rgba(230, 188, 92, 0.04) 11vw 14vw,
    rgba(230, 188, 92, 0) 14vw 25vw);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 72%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 72%, transparent);
}

/* ── Figures in their niches ──────────────────────────────────── */

.cameo-field {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  row-gap: 16vh;
  margin-top: 14vh;
  z-index: 3;
}

.cameo {
  grid-column: var(--c) / span var(--s);
  margin-top: var(--lift, 0vh);
  justify-self: center;
  width: min(100%, var(--nw, 190px));
  will-change: transform;
}

.niche {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 50% 50% 14px 14px / 40% 40% 14px 14px;
  overflow: hidden;
  border: 1px solid rgba(230, 188, 92, 0.13);
  background: var(--bg-deep-space);
  box-shadow: 0 0 0 rgba(230, 188, 92, 0);
  transition: border-color var(--dur-slow) var(--ease), box-shadow var(--dur-slow) var(--ease);
}
.niche img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(0.9) brightness(0.44) contrast(0.96) sepia(0.14);
  transform: scale(1.07);
  transition: filter var(--dur-slow) var(--ease), transform 1.5s var(--ease);
}
.niche::before {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(13, 19, 56, 0.12) 0%, rgba(13, 19, 56, 0) 40%),
    linear-gradient(0deg, rgba(8, 11, 32, 0.55) 0%, rgba(8, 11, 32, 0) 42%),
    rgba(13, 19, 56, 0.34);
  transition: opacity var(--dur-slow) var(--ease);
  pointer-events: none;
}
.niche::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(130% 62% at 50% -10%, rgba(246, 213, 92, 0.5), rgba(246, 213, 92, 0) 56%);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity var(--dur-slow) var(--ease);
  pointer-events: none;
}

.wake.awake .niche {
  border-color: rgba(230, 188, 92, 0.55);
  box-shadow:
    0 0 40px rgba(230, 188, 92, 0.16),
    0 0 110px rgba(230, 188, 92, 0.07),
    0 26px 60px rgba(8, 11, 32, 0.55);
}
.wake.awake .niche img { filter: none; transform: scale(1); }
.wake.awake .niche::before { opacity: 0.35; }
.wake.awake .niche::after { opacity: 1; }

.cameo figcaption {
  margin-top: 1.1rem;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  opacity: 0.55;
  transition: opacity var(--dur-slow) var(--ease), color var(--dur-slow) var(--ease);
}
.cameo.awake figcaption { opacity: 1; color: var(--text-secondary); }

.cameo-name { display: block; }
.cameo-epithet {
  display: block;
  margin-top: 0.55em;
  font-family: var(--font-content);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.86rem;
  color: var(--gold-primary);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--dur-slow) var(--ease) 0.2s, transform var(--dur-slow) var(--ease) 0.2s;
}
.cameo.awake .cameo-epithet { opacity: 1; transform: none; }

/* ── Hero stops ───────────────────────────────────────────────── */

.hero-stop {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: center;
  margin-top: 26vh;
  position: relative;
  z-index: 3;
}

.hero-fig {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 430px;
  justify-self: center;
  will-change: transform;
}
.hero-fig img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 50% 50% 16px 16px / 40% 40% 16px 16px;
  border: 1px solid rgba(230, 188, 92, 0.13);
  filter: grayscale(0.9) brightness(0.44) contrast(0.96) sepia(0.14);
  transition: filter var(--dur-slow) var(--ease), border-color var(--dur-slow) var(--ease),
              box-shadow var(--dur-slow) var(--ease);
}
.hero-fig::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 50% 50% 16px 16px / 40% 40% 16px 16px;
  background: radial-gradient(135% 60% at 50% -8%, rgba(246, 213, 92, 0.42), rgba(246, 213, 92, 0) 58%);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity var(--dur-slow) var(--ease);
  pointer-events: none;
}
.hero-fig.awake img {
  filter: none;
  border-color: rgba(230, 188, 92, 0.6);
  box-shadow:
    0 0 60px rgba(230, 188, 92, 0.2),
    0 0 160px rgba(230, 188, 92, 0.08),
    0 40px 90px rgba(8, 11, 32, 0.6);
}
.hero-fig.awake::after { opacity: 1; }

.side-right .hero-fig { grid-column: 7 / span 5; grid-row: 1; }
.side-right .hero-text { grid-column: 1 / span 5; grid-row: 1; }
.side-left .hero-fig { grid-column: 1 / span 5; grid-row: 1; }
.side-left .hero-text { grid-column: 7 / span 5; grid-row: 1; }

.side-center { text-align: center; }
.side-center .hero-fig { grid-column: 4 / span 6; grid-row: 1; max-width: 460px; }
.side-center .hero-text { grid-column: 2 / span 10; grid-row: 2; margin-top: 4rem; }
.side-center .hero-wisdom, .side-center .honesty { margin-inline: auto; }
.side-center .honesty { justify-content: center; }

.hero-text { position: relative; z-index: 1; }

.hero-epithet {
  font-size: 0.74rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-primary);
}
.hero-text h3 {
  margin-top: 1rem;
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: var(--step-2);
  letter-spacing: 0.02em;
  color: var(--text-primary);
}
.hero-wisdom {
  margin-top: 2.2rem;
  max-width: 24ch;
  font-family: var(--font-content);
  font-style: italic;
  font-size: var(--step-3);
  line-height: 1.38;
  color: var(--text-primary);
}

.honesty {
  margin-top: 2.4rem;
  display: flex; align-items: center; gap: 0.7em;
  font-size: 0.74rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
}
.h-dot {
  flex: none;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--gold-ui);
  box-shadow: 0 0 8px rgba(230, 188, 92, 0.7);
}

/* Manuscript texture behind Dickinson */
.manuscripts { position: absolute; inset: -10% -3%; z-index: 0; pointer-events: none; }
.manuscripts img {
  position: absolute;
  border-radius: 8px;
  mix-blend-mode: luminosity;
  opacity: 0.09;
  filter: brightness(0.8) contrast(0.9);
  -webkit-mask-image: radial-gradient(78% 78% at 50% 50%, #000 40%, transparent 92%);
  mask-image: radial-gradient(78% 78% at 50% 50%, #000 40%, transparent 92%);
  will-change: transform;
}
.manuscripts img:first-child { width: 30%; left: 30%; top: -4%; transform: rotate(-6deg); }
.manuscripts img:last-child { width: 26%; right: -1%; bottom: -8%; transform: rotate(5deg); }

/* Backdrop behind Aurelius */
.hero-backdrop {
  position: absolute; inset: -14% 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  will-change: transform;
}
.hero-backdrop img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.13;
  filter: saturate(0.55) brightness(0.65);
  -webkit-mask-image: radial-gradient(75% 65% at 50% 50%, #000 30%, transparent 78%);
  mask-image: radial-gradient(75% 65% at 50% 50%, #000 30%, transparent 78%);
}

/* Foreword chip and voice buttons */
.fw-chip {
  margin-top: 2.6rem;
  display: inline-flex; align-items: center; gap: 1.2rem;
}
.fw-meta { display: flex; flex-direction: column; gap: 0.35em; text-align: left; }
.fw-meta strong {
  font-weight: 400;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.fw-meta em {
  font-family: var(--font-content);
  font-style: italic;
  font-size: 0.82rem;
  color: var(--text-tertiary);
}

.voice-btn {
  position: relative;
  flex: none;
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(230, 188, 92, 0.4);
  background: rgba(230, 188, 92, 0.06);
  display: grid; place-items: center;
  transition: border-color 0.5s var(--ease), background-color 0.5s var(--ease),
              box-shadow 0.5s var(--ease), transform 0.5s var(--ease);
}
.voice-btn:hover {
  border-color: var(--gold-hover);
  background: rgba(230, 188, 92, 0.12);
  box-shadow: 0 0 22px rgba(230, 188, 92, 0.25);
  transform: scale(1.04);
}
.vb-large { width: 78px; height: 78px; }

.vb-halo {
  position: absolute; inset: -7px;
  border-radius: 50%;
  border: 1px solid rgba(230, 188, 92, 0.35);
  opacity: 0;
  transform: scale(0.9);
  box-shadow: 0 0 calc(12px + var(--amp, 0) * 52px) rgba(230, 188, 92, 0.45);
  transition: opacity 0.6s var(--ease);
}
.voice-btn.is-playing .vb-halo {
  opacity: calc(0.35 + var(--amp, 0) * 0.65);
  transform: scale(calc(1 + var(--amp, 0) * 0.16));
}

.vb-glyph {
  width: 0; height: 0;
  border-style: solid;
  border-width: 7px 0 7px 12px;
  border-color: transparent transparent transparent var(--gold-primary);
  margin-left: 3px;
  transition: opacity 0.3s var(--ease);
}
.vb-large .vb-glyph { border-width: 9px 0 9px 15px; }
.voice-btn.is-playing .vb-glyph {
  border: none; margin-left: 0;
  width: 12px; height: 15px;
  background:
    linear-gradient(var(--gold-primary), var(--gold-primary)) left / 3.5px 100% no-repeat,
    linear-gradient(var(--gold-primary), var(--gold-primary)) right / 3.5px 100% no-repeat;
}

/* ── The recurring question ───────────────────────────────────── */

.era-question {
  margin-top: 24vh;
  text-align: center;
  max-width: 48ch;
}
.eq-tick {
  display: block;
  width: 1px; height: 58px;
  margin: 0 auto 2.4rem;
  background: linear-gradient(to bottom, rgba(230, 188, 92, 0), var(--gold-primary));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 1.2s var(--ease) 0.2s;
}
.era-question.in .eq-tick { transform: scaleY(1); }
.eq-text {
  font-family: var(--font-content);
  font-style: italic;
  font-size: var(--step-3);
  line-height: 1.4;
  color: var(--gold-primary);
  text-shadow: 0 0 44px rgba(230, 188, 92, 0.22);
}
.eq-note {
  margin-top: 1.8rem;
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

/* ── 7 · Threshold ────────────────────────────────────────────── */

#threshold {
  background: linear-gradient(var(--c-antiquity), var(--c-void) 70%);
  padding: 34vh 0 30vh;
  text-align: center;
}
.threshold-line {
  font-family: var(--font-content);
  font-style: italic;
  font-weight: 400;
  font-size: var(--step-4);
  line-height: 1.3;
  color: var(--text-primary);
  max-width: 22ch;
  margin-inline: auto;
}
.threshold-sub {
  margin-top: 1.6rem;
  font-size: var(--step-0);
  color: var(--text-tertiary);
}

/* ── 8 · Constellation ────────────────────────────────────────── */

#constellation { background: var(--c-void); }
.const-stage {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
#const-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.const-line {
  position: absolute;
  top: 11%;
  left: 50%;
  transform: translateX(-50%);
  width: min(90vw, 40ch);
  text-align: center;
  font-family: var(--font-content);
  font-style: italic;
  font-size: var(--step-2);
  color: var(--text-secondary);
  opacity: 0;
  visibility: hidden;
}

.const-result {
  position: absolute;
  left: 50%;
  bottom: 9%;
  transform: translateX(-50%);
  text-align: center;
  width: 92vw;
  opacity: 0;
  visibility: hidden;
}
.stat {
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: var(--step-3);
  letter-spacing: 0.08em;
  color: var(--gold-primary);
  text-shadow: 0 0 40px rgba(230, 188, 92, 0.3);
}
.const-sub {
  margin-top: 0.9rem;
  font-family: var(--font-content);
  font-style: italic;
  font-size: var(--step-0);
  color: var(--text-tertiary);
}

/* ── 9 · Council ──────────────────────────────────────────────── */

#council {
  background: linear-gradient(var(--c-void) 0%, var(--c-void) 55%, var(--c-antiquity) 100%);
  padding: 26vh 0 24vh;
  text-align: center;
}
.council-kicker {
  font-family: var(--font-content);
  font-style: italic;
  font-size: var(--step-1);
  color: var(--gold-primary);
}
#council h2 {
  margin-top: 1.2rem;
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: var(--step-4);
  color: var(--text-primary);
}
.council-intro {
  margin: 2.2rem auto 0;
  max-width: 46ch;
  font-family: var(--font-content);
  font-size: var(--step-1);
  color: var(--text-secondary);
}
.council-sub {
  margin: 1rem auto 0;
  max-width: 44ch;
  font-size: var(--step-0);
  font-weight: 300;
  color: var(--text-tertiary);
}
.council-player {
  margin: 4rem auto 2.6rem;
  display: inline-flex;
  align-items: center;
  gap: 1.8rem;
}
.council-meta { display: flex; flex-direction: column; gap: 0.7em; text-align: left; }
.council-meta strong {
  font-weight: 400;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.council-time {
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
}
.council-track {
  display: block;
  width: clamp(150px, 26vw, 260px);
  height: 1px;
  background: rgba(210, 210, 210, 0.16);
}
.council-prog {
  display: block;
  height: 100%;
  background: var(--gold-ui);
  box-shadow: 0 0 8px rgba(230, 188, 92, 0.5);
  transform: scaleX(0);
  transform-origin: left;
}
#council .honesty { justify-content: center; }

/* ── 10 · The rise ────────────────────────────────────────────── */

#rise { background: var(--c-antiquity); }
.rise-stage {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: linear-gradient(180deg, var(--c-antiquity) 0%, var(--c-steam) 55%, var(--c-surface-b) 100%);
}
.streaks { position: absolute; inset: 0; }
.streaks span {
  position: absolute;
  top: 0;
  width: 1px;
  border-radius: 2px;
  background: linear-gradient(to bottom,
    rgba(230, 188, 92, 0), rgba(230, 188, 92, 0.4) 30%,
    rgba(180, 200, 255, 0.35) 70%, rgba(180, 200, 255, 0));
  will-change: transform;
}
.rise-train { position: absolute; inset: 0; z-index: 1; }
.rise-train li {
  position: absolute;
  left: 6vw;
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: clamp(2.2rem, 7vw, 5.2rem);
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: rgba(210, 210, 210, 0.1);
  will-change: transform;
}
.rise-train li:nth-child(even) { left: auto; right: 8vw; }
.rise-line {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(90vw, 30ch);
  text-align: center;
  font-family: var(--font-content);
  font-style: italic;
  font-size: var(--step-3);
  line-height: 1.4;
  color: var(--text-primary);
  text-shadow: 0 0 50px rgba(8, 11, 32, 0.9);
  opacity: 0;
  visibility: hidden;
  z-index: 2;
}

/* ── 11 · The unfinished stratum ──────────────────────────────── */

#unfinished {
  position: relative;
  background: linear-gradient(180deg, var(--c-surface-b) 0%, var(--c-modern) 62%, var(--c-steam) 100%);
  padding: 30vh 0 24vh;
  overflow: hidden;
}
.dawn-soft {
  height: 38vh;
  opacity: 0.8;
}
.wireframe {
  position: absolute;
  left: 0; right: 0; top: 7%;
  opacity: 0.9;
  pointer-events: none;
}
.wireframe svg { width: 100%; height: 48vh; display: block; }
.wf {
  fill: none;
  stroke: rgba(230, 188, 92, 0.15);
  stroke-width: 1;
  stroke-dasharray: 0.4 1.1;
  animation: wf-slide 40s linear infinite;
}
.wf-2 { stroke: rgba(180, 200, 255, 0.1); animation-duration: 52s; animation-direction: reverse; }
.wf-3 { animation-duration: 46s; }
.wf-4 { stroke: rgba(230, 188, 92, 0.1); animation-duration: 58s; animation-direction: reverse; }
@keyframes wf-slide { to { stroke-dashoffset: -100; } }
.wf-node {
  fill: rgba(246, 213, 92, 0.55);
  animation: wf-pulse 4s var(--ease-in-out-soft) infinite;
}
.wf-node:nth-of-type(2) { animation-delay: 0.9s; }
.wf-node:nth-of-type(3) { animation-delay: 1.7s; }
.wf-node:nth-of-type(4) { animation-delay: 2.3s; }
.wf-node:nth-of-type(5) { animation-delay: 3.1s; }
@keyframes wf-pulse {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.9; }
}

#unfinished h2 {
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: var(--step-4);
  color: var(--text-primary);
  max-width: 18ch;
}
.unfinished-sub {
  margin-top: 1.8rem;
  font-family: var(--font-content);
  font-style: italic;
  font-size: var(--step-1);
  color: var(--text-tertiary);
  max-width: 42ch;
}

.cw-card {
  margin-top: 10vh;
  max-width: 580px;
  padding: clamp(2rem, 4.5vw, 3.2rem);
  border-radius: 20px;
  background: linear-gradient(155deg, var(--bg-card) 0%, var(--bg-primary) 100%);
  border: 1px solid rgba(230, 188, 92, 0.22);
  box-shadow:
    0 34px 90px rgba(8, 11, 32, 0.55),
    0 0 70px rgba(230, 188, 92, 0.05);
  position: relative;
  overflow: hidden;
}
.cw-card::after {
  content: '';
  position: absolute; top: -40%; right: -25%;
  width: 70%; aspect-ratio: 1;
  background: radial-gradient(circle, rgba(230, 188, 92, 0.1), transparent 65%);
  pointer-events: none;
}
.cw-kicker {
  font-family: var(--font-content);
  font-style: italic;
  font-size: var(--step-0);
  color: var(--gold-primary);
}
.cw-card h3 {
  margin-top: 1.1rem;
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: var(--step-3);
  letter-spacing: 0.01em;
  color: var(--text-primary);
}
.cw-line {
  margin-top: 0.9rem;
  font-family: var(--font-content);
  font-size: var(--step-1);
  color: var(--text-secondary);
}
.cw-detail {
  margin: 1.1rem 0 2.4rem;
  font-size: var(--step-0);
  font-weight: 300;
  color: var(--text-tertiary);
}

/* ── 12 · Outro + footer ──────────────────────────────────────── */

#outro {
  background: linear-gradient(180deg, var(--c-steam) 0%, #131845 55%, var(--bg-cosmic-void) 100%);
  padding-top: 28vh;
  text-align: center;
}
#outro:focus { outline: none; }
.outro-kicker {
  font-size: 0.76rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-ui);
}
.outro-line {
  margin-top: 1.6rem;
  font-family: var(--font-content);
  font-style: italic;
  font-weight: 400;
  font-size: var(--step-5);
  line-height: 1.15;
  color: var(--text-primary);
}
.outro-sub {
  margin: 2rem auto 3.4rem;
  max-width: 40ch;
  font-size: var(--step-1);
  font-weight: 300;
  color: var(--text-secondary);
}

.site-foot {
  margin-top: 24vh;
  border-top: 1px solid rgba(230, 188, 92, 0.12);
  padding: 4.5rem 0 4rem;
}
.foot-mark { margin: 0 auto 1.8rem; opacity: 0.9; }
.foot-trust {
  font-size: 0.84rem;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}
.foot-company {
  margin-top: 0.7rem;
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
}
.foot-links {
  margin-top: 2.4rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.2rem 2.8rem;
}
.foot-links a {
  font-size: 0.76rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-primary);
  text-decoration: none;
  transition: color 0.4s var(--ease), text-shadow 0.4s var(--ease);
}
.foot-links a:hover { color: var(--gold-hover); text-shadow: 0 0 18px rgba(246, 213, 92, 0.5); }

/* ── Sleep offscreen strata ───────────────────────────────────── */

.stratum.asleep .cameo-field,
.stratum.asleep .era-art,
.stratum.asleep .hero-stop { visibility: hidden; }

/* ── Responsive ───────────────────────────────────────────────── */

@media (max-width: 960px) {
  .side-right .hero-fig, .side-left .hero-fig, .side-center .hero-fig {
    grid-column: 1 / -1; grid-row: 1;
    max-width: min(64vw, 360px);
  }
  .side-right .hero-text, .side-left .hero-text, .side-center .hero-text {
    grid-column: 1 / -1; grid-row: 2;
    margin-top: 3rem;
  }
  .hero-stop { text-align: center; }
  .hero-wisdom, .hero-stop .honesty { margin-inline: auto; }
  .hero-stop .honesty { justify-content: center; }
  .era-head h2 { max-width: none; }
}

@media (max-width: 720px) {
  .wrap { width: 90vw; }

  .ticker {
    top: max(14px, env(safe-area-inset-top));
    bottom: auto;
    right: 16px;
    justify-content: flex-start;
  }
  .ticker-box { padding-right: 0; }
  .ticker-year { font-size: 1.15rem; text-shadow: 0 0 16px rgba(230, 188, 92, 0.4); }
  .ticker-era { margin-top: 0.5em; font-size: 0.5rem; letter-spacing: 0.22em; }
  .ticker-timeless { right: 0; top: 0.4rem; transform: none; font-size: 0.55rem; }
  .ticker-spine { display: none; }

  .site-head { top: 16px; left: 16px; font-size: 0.62rem; gap: 9px; }
  .site-head svg { width: 20px; height: 20px; }

  .cameo-field {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 13vh;
    column-gap: 5vw;
  }
  .cameo {
    grid-column: auto / span 1;
    margin-top: 0;
    width: min(100%, 200px);
  }
  .cameo:nth-child(even) { margin-top: 12vh; }

  .era-num { right: -12vw; font-size: 44vw; }

  .fw-chip { flex-direction: row; }
  .council-player { flex-direction: column; gap: 1.6rem; }
  .council-meta { align-items: center; text-align: center; }

  .manuscripts img:first-child { width: 52%; left: 30%; }
  .manuscripts img:last-child { width: 46%; }

  .rise-train li { left: 5vw; }
  .rise-train li:nth-child(even) { right: 5vw; }

  .const-line { font-size: var(--step-1); }
  .const-result { bottom: 7%; }

  .poem { min-height: 56vh; }
  .questions { margin-top: 12vh; }
  .era-question { margin-top: 18vh; }
  .mute { right: 14px; bottom: 14px; width: 42px; height: 42px; }
}

@media (max-width: 420px) {
  .gate-title { letter-spacing: 0.2em; text-indent: 0.2em; }
  .gate-actions { flex-direction: column; align-items: stretch; }
  .btn { text-align: center; }
  .cameo:nth-child(even) { margin-top: 9vh; }
  .cameo-field { row-gap: 10vh; }
}

/* ── Reduced motion, a designed stillness ─────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .grain, .descend-line, .eq i, .wf, .wf-node, .gl-corona { animation: none; }
  .gl-ring { animation: none; stroke-dashoffset: 0; }
  .gl-halo { animation: none; opacity: 0.16; }
  .gl-core { animation: none; transform: scale(1); }
  .gl-corona { opacity: 0.3; transform: scale(1.3); }
  .descend-line { transform: none; opacity: 0.8; }
  .btn, .voice-btn { transition-duration: 0.01s; }
  .btn:hover, .voice-btn:hover { transform: none; }
}

html.reduced .r, html.reduced .r-stagger > * {
  opacity: 1; transform: none; transition: none;
}
html.reduced .wake .niche img, html.reduced .hero-fig img { filter: none; transform: none; }
html.reduced .niche { border-color: rgba(230, 188, 92, 0.45); }
html.reduced .niche::after, html.reduced .hero-fig::after { opacity: 0.8; }
html.reduced .cameo figcaption { opacity: 1; color: var(--text-secondary); }
html.reduced .cameo-epithet { opacity: 1; transform: none; }
html.reduced .hero-fig img {
  border-color: rgba(230, 188, 92, 0.5);
  box-shadow: 0 0 60px rgba(230, 188, 92, 0.16);
}
html.reduced .eq-tick { transform: scaleY(1); transition: none; }
html.reduced #dust, html.reduced .cursor-dot, html.reduced .cursor-ring { display: none; }

html.reduced .const-stage { height: auto; padding: 18vh 0 10vh; }
html.reduced #const-canvas { position: relative; height: 62vh; }
html.reduced .const-line {
  position: static; transform: none; width: auto;
  opacity: 1; visibility: visible;
  margin: 0 auto 2rem; max-width: 40ch;
}
html.reduced .const-result {
  position: static; transform: none; width: auto;
  opacity: 1; visibility: visible;
  margin-top: 3rem;
}

html.reduced .rise-stage { height: auto; padding: 26vh 0; }
html.reduced .streaks { display: none; }
html.reduced .rise-train { display: none; }
html.reduced .rise-line {
  position: static; transform: none; width: auto;
  opacity: 1; visibility: visible;
  margin-inline: auto; max-width: 30ch;
}
