/* davidhunter.ai — "The Corridor" scroll redesign (2026-09-01)
   Journey (dark, choreographed) → Reading Room (parchment, normal flow).
   Fallback order: html.no-js (static flow, no choreography) is the default;
   app.js swaps to html.js and activates the corridor. prefers-reduced-motion
   gets the same static layout via html.static set by app.js. */

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

:root {
  /* dark zone (journey) */
  --bg:          #0e0c0a;
  --bg-mid:      #13100d;
  --bg-card:     #1a1610;
  --amber:       #c8902a;
  --amber-dim:   #8a5e12;
  --amber-glow:  rgba(200, 144, 42, 0.12);
  --text:        #e8dcc8;
  --text-dim:    #b0a184;
  --text-muted:  #3d3328;
  --amber-text:  #a87921;
  --text-quiet:  #90806a;
  /* light zone (reading room) */
  --parch:        #ece4d2;
  --parch-deep:   #e3d9c3;
  --ink:          #221c12;
  --ink-dim:      #5c5140;
  --ink-faint:    rgba(34, 28, 18, 0.08);
  --line-light:   rgba(34, 28, 18, 0.18);
  /* type */
  --mono:  'JetBrains Mono', monospace;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans:  'Instrument Sans', system-ui, sans-serif;
  --max:   1100px;
  --ease-out:   cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-inout: cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--amber); color: var(--bg); }
html { scrollbar-color: var(--amber-dim) var(--bg); }

img { max-width: 100%; display: block; }

/* ── Loader ── */
#loader {
  position: fixed; inset: 0; z-index: 400;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.6rem;
  transition: opacity 0.7s var(--ease-out), visibility 0.7s;
}
#loader.done { opacity: 0; visibility: hidden; }
.loader-brand { font-family: var(--serif); font-weight: 300; font-size: 1.5rem; letter-spacing: 0.04em; color: var(--text); }
.loader-track { width: min(220px, 50vw); height: 1px; background: var(--text-muted); overflow: hidden; }
#loader-bar { width: 0%; height: 100%; background: var(--amber); transition: width 0.3s var(--ease-out); }
#loader-percent { font-family: var(--mono); font-size: 0.55rem; letter-spacing: 0.2em; color: var(--text-dim); }
html.no-js #loader, html.static #loader { display: none; }

/* ── Nav + scroll progress ── */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.1rem clamp(1.2rem, 4vw, 3rem);
  transition: background 0.4s, backdrop-filter 0.4s;
}
#nav.scrolled { background: rgba(14, 12, 10, 0.82); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
#nav.on-light.scrolled { background: rgba(236, 228, 210, 0.88); }
.nav__logo {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text); text-decoration: none; transition: color 0.3s;
}
.nav__links { display: flex; gap: 1.6rem; list-style: none; }
.nav__links a {
  font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-dim); text-decoration: none; transition: color 0.25s;
}
.nav__links a:hover { color: var(--amber); }
#nav.on-light .nav__logo { color: var(--ink); }
#nav.on-light .nav__links a { color: var(--ink-dim); }
#nav.on-light .nav__links a:hover { color: var(--amber-dim); }
#scroll-progress {
  position: fixed; top: 0; left: 0; z-index: 101;
  height: 2px; width: 0%; background: var(--amber);
}

/* ── Hero (standalone 100svh) ── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  background:
    radial-gradient(ellipse 60% 45% at 50% 62%, rgba(200, 144, 42, 0.10), transparent 70%),
    var(--bg);
  overflow: hidden;
}
.hero::after {
  /* film grain — pure CSS, no asset */
  content: ''; position: absolute; inset: -50%;
  background-image: repeating-conic-gradient(rgba(232, 220, 200, 0.015) 0% 0.0001%, transparent 0.0002% 0.0004%);
  pointer-events: none;
}
.hero__content { position: relative; z-index: 1; padding: 0 1.2rem; }
.hero__stage {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--amber); margin-bottom: 2.2rem;
}
.hero__name {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(4.2rem, 15vw, 12.5rem);
  line-height: 0.95; letter-spacing: -0.015em;
  color: var(--text);
}
.hero__name .w { display: inline-block; }
.hero__byline {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: clamp(1.3rem, 3vw, 2.1rem);
  color: var(--text-dim); margin-top: 0.8rem;
}
.hero__rule { width: 56px; height: 1px; background: var(--amber-dim); margin: 2.4rem auto; }
.hero__tagline {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--text-dim);
}
.hero__cue {
  position: absolute; bottom: 2.2rem; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 0.52rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--text-quiet);
  display: flex; flex-direction: column; align-items: center; gap: 0.7rem;
}
.hero__cue::after {
  content: ''; width: 1px; height: 42px;
  background: linear-gradient(to bottom, var(--amber), transparent);
  animation: cue-drip 2.4s var(--ease-inout) infinite;
}
@keyframes cue-drip {
  0% { transform: scaleY(0); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: top; }
  56% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ── Corridor: fixed visual layer (the "frames") ── */
.corridor {
  position: fixed; inset: 0; z-index: 1;
  clip-path: circle(0% at 50% 50%);
  visibility: hidden;
  pointer-events: none;
}
html.js .corridor { visibility: visible; }
.corridor__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0;
  transform: scale(1.06);
  filter: brightness(1.45) contrast(1.04) saturate(1.08);
  will-change: opacity, transform;
}
.corridor__img.active { opacity: 1; }
.corridor__vignette {
  position: absolute; inset: 0;
  background:
    linear-gradient(to right, rgba(14, 12, 10, 0.72) 0%, rgba(14, 12, 10, 0.28) 32%, rgba(14, 12, 10, 0) 52%, rgba(14, 12, 10, 0.18) 100%),
    linear-gradient(to bottom, rgba(14, 12, 10, 0.5), transparent 18%, transparent 78%, rgba(14, 12, 10, 0.6));
}
.corridor__counter {
  position: absolute; right: clamp(1.2rem, 4vw, 3rem); bottom: 2rem;
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.26em;
  color: var(--text-dim);
}
.corridor__counter b { color: var(--amber); font-weight: 400; }

/* dark overlay for the stats chapter */
#dark-overlay {
  position: fixed; inset: 0; z-index: 2;
  background: rgba(8, 7, 5, 0.9);
  opacity: 0; pointer-events: none;
}

/* ── Marquees (fixed in journey) ── */
.marquee-wrap {
  position: fixed; left: 0; right: 0; top: 76%; transform: translateY(-50%);
  z-index: 2; overflow: hidden; white-space: nowrap;
  opacity: 0; pointer-events: none;
  visibility: hidden;
}
html.js .marquee-wrap { visibility: visible; }
.marquee-text {
  display: inline-block;
  font-family: var(--serif); font-weight: 300; font-style: italic;
  font-size: 13vw; line-height: 1;
  color: rgba(232, 220, 200, 0.14);
  letter-spacing: 0.02em;
  padding-left: 100vw;
}
.marquee-text b { font-weight: 300; color: rgba(200, 144, 42, 0.32); }

/* ── Scroll container + choreographed sections ── */
#scroll-container { position: relative; z-index: 3; }
html.js #scroll-container { height: 760vh; }

.scroll-section { padding: 0 clamp(1.2rem, 4vw, 3rem); }
html.js .scroll-section {
  position: absolute; left: 0; right: 0;
  transform: translateY(-50%);
  opacity: 0;
  visibility: hidden;
}
html.js .scroll-section.on { visibility: visible; }

/* side alignment — text lives in the outer 40%, corridor owns the center-right */
.align-left  { padding-right: 55vw; }
.align-right { padding-left: 58vw; }
.align-left .section-inner, .align-right .section-inner { max-width: min(40vw, 520px); }
.align-center { text-align: center; }
.align-center .section-inner { max-width: 760px; margin: 0 auto; }

.section-label {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--amber); margin-bottom: 1.3rem;
}
.section-heading {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.4rem, 5.2vw, 4.6rem);
  line-height: 1.02; color: var(--text);
  margin-bottom: 1.4rem;
  text-wrap: balance;
}
.section-body {
  font-size: clamp(0.95rem, 1.25vw, 1.08rem); line-height: 1.75;
  color: var(--text-dim);
  margin-bottom: 1.1rem;
}
.section-note {
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-quiet); margin-bottom: 1.6rem;
}
.enter-btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--amber); background: rgba(14, 12, 10, 0.55);
  border: 1px solid var(--amber-dim); border-radius: 2px;
  padding: 0.75rem 1.2rem; cursor: pointer;
  /* transform belongs to GSAP here — CSS only transitions paint props */
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.enter-btn:hover { background: var(--amber); color: var(--bg); border-color: var(--amber); }

/* stats chapter */
.section-stats .stats-grid {
  display: grid; grid-template-columns: repeat(4, auto);
  gap: clamp(1.6rem, 5vw, 4.5rem);
  justify-content: center;
}
.stat { text-align: center; }
.stat-number {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.8rem, 6vw, 5.2rem); line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.stat-suffix { font-family: var(--serif); font-size: clamp(1.2rem, 2vw, 1.8rem); color: var(--amber); margin-left: 0.15rem; }
.stat-label {
  display: block; margin-top: 0.8rem;
  font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-dim);
}
.section-stats .stats-kicker { margin-bottom: 3rem; }

/* ── Static fallback layout (no-js / reduced motion) ── */
html.no-js .scroll-section, html.static .scroll-section {
  position: static; transform: none; opacity: 1; visibility: visible;
  padding-top: 16vh; padding-bottom: 16vh;
  padding-left: clamp(1.2rem, 6vw, 6rem); padding-right: clamp(1.2rem, 6vw, 6rem);
}
html.no-js .align-left .section-inner, html.static .align-left .section-inner,
html.no-js .align-right .section-inner, html.static .align-right .section-inner { max-width: 620px; }
html.no-js .align-right, html.static .align-right { display: flex; justify-content: flex-end; }
html.no-js .corridor, html.static .corridor,
html.no-js .marquee-wrap, html.static .marquee-wrap,
html.no-js #dark-overlay, html.static #dark-overlay,
html.no-js #scroll-progress, html.static #scroll-progress { display: none; }
html.no-js .stage-figure, html.static .stage-figure {
  display: block; margin: 0 0 2rem;
  max-width: 520px; border: 1px solid var(--text-muted); border-radius: 3px;
}
html.js .stage-figure { display: none; }

/* ── Reading Room (light zone, normal flow) ── */
.reading-room {
  position: relative; z-index: 5;
  background: var(--parch);
  color: var(--ink);
}
.reading-room::before {
  /* seam: dark journey dissolves into parchment */
  content: ''; position: absolute; top: -140px; left: 0; right: 0; height: 140px;
  background: linear-gradient(to bottom, transparent, var(--parch));
  pointer-events: none;
}
.rr-inner { max-width: var(--max); margin: 0 auto; padding: 0 clamp(1.2rem, 4vw, 3rem); }

.rr-head { padding: 9rem 0 4rem; }
.rr-label {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--amber-dim); margin-bottom: 1.2rem;
}
.rr-title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.6rem, 6vw, 5rem); line-height: 1.02;
  color: var(--ink); text-wrap: balance;
}

/* manifesto entries — ghost numerals, alternating offsets */
.creed { padding-bottom: 3rem; }
.creed__entry {
  position: relative;
  max-width: 640px;
  padding: 4.5rem 0;
}
.creed__entry:nth-child(even) { margin-left: auto; }
.creed__num {
  position: absolute; top: 0.4rem; left: -1.2rem; z-index: 0;
  font-family: var(--serif); font-weight: 300; font-style: italic;
  font-size: clamp(7rem, 14vw, 13rem); line-height: 1;
  color: var(--ink-faint);
  pointer-events: none; user-select: none;
}
.creed__title {
  position: relative; z-index: 1;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.05;
  color: var(--ink); margin-bottom: 1.5rem; text-wrap: balance;
}
.creed__body { position: relative; z-index: 1; }
.creed__body p {
  font-size: clamp(1rem, 1.3vw, 1.13rem); line-height: 1.8;
  color: var(--ink-dim); margin-bottom: 1.1em;
}
.creed__body em { font-style: italic; color: var(--ink); }

/* light-zone marquee band */
.rr-marquee { overflow: hidden; white-space: nowrap; padding: 4rem 0 5rem; }
.rr-marquee__text {
  display: inline-block;
  font-family: var(--serif); font-weight: 300;
  font-size: 10vw; line-height: 1; letter-spacing: 0.01em;
  color: rgba(34, 28, 18, 0.1);
}
.rr-marquee__text b { font-weight: 300; color: rgba(138, 94, 18, 0.35); }

/* projects — editorial index */
.projects { padding: 2rem 0 7rem; }
.projects__header { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 2.6rem; flex-wrap: wrap; }
.projects__title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.2rem, 4.5vw, 3.6rem); color: var(--ink); text-wrap: balance;
}
.projects__count { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-dim); }
.project-item {
  display: grid; grid-template-columns: 3rem 1fr auto;
  gap: 1.4rem; align-items: baseline;
  padding: 1.5rem 0.4rem;
  border-top: 1px solid var(--line-light);
  text-decoration: none;
  transition: background 0.3s, padding-left 0.3s var(--ease-out);
}
.project-item:last-child { border-bottom: 1px solid var(--line-light); }
a.project-item:hover { background: rgba(200, 144, 42, 0.07); padding-left: 0.9rem; }
.project-item__num { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.1em; color: var(--amber-dim); }
.project-item__name { font-family: var(--serif); font-weight: 400; font-size: clamp(1.25rem, 2vw, 1.6rem); color: var(--ink); margin-bottom: 0.35rem; }
.project-item__desc { font-size: 0.86rem; line-height: 1.6; color: var(--ink-dim); max-width: 560px; }
.project-item__tags { display: flex; align-items: center; gap: 0.5rem; }
.tag {
  font-family: var(--mono); font-size: 0.52rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-dim); border: 1px solid var(--line-light); border-radius: 2px;
  padding: 0.25rem 0.5rem; white-space: nowrap;
}
.tag--stage { color: var(--amber-dim); border-color: rgba(138, 94, 18, 0.4); }
.project-item__arrow { font-size: 0.9rem; color: var(--amber-dim); }

/* ── Closing (dark again; the persistent end) ── */
.closing {
  position: relative; z-index: 5;
  background: var(--bg);
  padding: 9rem clamp(1.2rem, 4vw, 3rem) 7rem;
  text-align: center;
}
.closing::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 120px;
  background: linear-gradient(to bottom, var(--parch), transparent);
  opacity: 0.12; pointer-events: none;
}
.closing__tagline {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.2rem, 5.5vw, 4.4rem); line-height: 1.1;
  color: var(--text); max-width: 800px; margin: 0 auto 2.6rem;
  text-wrap: balance;
}
.closing__tagline em { font-style: italic; color: var(--amber); }
.closing__text {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.14em; line-height: 2.1;
  text-transform: uppercase; color: var(--text-dim);
}
.closing__text strong { color: var(--amber); font-weight: 400; }

footer {
  background: var(--bg);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: 2rem clamp(1.2rem, 4vw, 3rem) 2.6rem;
  border-top: 1px solid var(--text-muted);
  position: relative; z-index: 5;
}
.footer__name { font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-quiet); }
.footer__links { display: flex; gap: 1.4rem; list-style: none; }
.footer__links a { font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim); text-decoration: none; transition: color 0.25s; }
.footer__links a:hover { color: var(--amber); }

/* ════ STAGE OVERLAYS — carried from the 2026-07 build, unchanged ════ */
.s1 { position: fixed; inset: 0; z-index: 200; display: none; }
.s1.open { display: block; }
.s1__scrim {
  position: absolute; inset: 0;
  background: rgba(8,7,5,0.88);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: s1fade 0.4s var(--ease-out);
}
@keyframes s1fade { from { opacity: 0; } to { opacity: 1; } }

.s1__panel {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
  height: 100%;
  overflow-y: auto;
  background: var(--bg);
  border-left: 1px solid var(--text-muted);
  border-right: 1px solid var(--text-muted);
  padding: 5.5rem 3.2rem 6rem;
  animation: s1rise 0.5s var(--ease-out);
}
@keyframes s1rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

.s1__close {
  position: fixed; top: 1.5rem; right: 1.5rem; z-index: 3;
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-dim); background: var(--bg-card);
  border: 1px solid var(--text-muted); border-radius: 2px;
  padding: 0.5rem 0.75rem; cursor: pointer; transition: color 0.2s, border-color 0.2s;
}
.s1__close:hover { color: var(--amber); border-color: var(--amber-dim); }

.s1__kicker { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--amber); margin-bottom: 1.4rem; }
.s1__title { font-family: var(--serif); font-weight: 300; font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.06; color: var(--text); margin-bottom: 1.8rem; }
.s1__lead { font-family: var(--serif); font-weight: 300; font-size: clamp(1.05rem, 1.7vw, 1.28rem); line-height: 1.75; color: var(--text-dim); margin-bottom: 1.1em; }
.s1__lead em { font-style: italic; color: var(--text); }
.s1__rule { width: 100%; height: 1px; background: var(--text-muted); margin: 3.4rem 0; }
.s1__h { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--amber); margin-bottom: 1rem; }
.s1__sub { font-family: var(--serif); font-size: clamp(1.4rem, 2.6vw, 1.7rem); font-weight: 300; color: var(--text); margin-bottom: 0.6rem; }
.s1__p { font-family: var(--sans); font-weight: 300; font-size: 0.92rem; line-height: 1.7; color: var(--text-dim); margin-bottom: 1.6rem; }
.s1__cap { font-family: var(--sans); font-size: 0.72rem; font-weight: 300; font-style: italic; color: var(--text-dim); margin-top: 0.8rem; }

/* builder */
.s1b { display: flex; flex-direction: column; gap: 1.3rem; }
.s1pb { background: #0b0907; border: 1px solid var(--text-muted); border-radius: 3px; overflow: hidden; }
.s1pb__bar { display: flex; align-items: center; gap: 0.45rem; padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--text-muted); }
.s1pb__bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--text-muted); }
.s1pb__bar span { font-family: var(--mono); font-size: 0.55rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); margin-left: 0.4rem; }
.s1pb__body { padding: 1.4rem; min-height: 156px; font-family: var(--mono); font-size: 0.86rem; line-height: 1.7; color: var(--text); }
.s1pb__ph { color: var(--text-dim); font-style: italic; }
.s1line { margin-bottom: 0.7rem; }
.s1line:last-child { margin-bottom: 0; }
.s1line__k { color: var(--amber); }
.s1line__t { color: var(--text); }

.s1meter { display: flex; align-items: center; gap: 1rem; }
.s1meter__track { flex: 1; height: 4px; background: var(--bg-card); border: 1px solid var(--text-muted); border-radius: 999px; overflow: hidden; }
.s1meter__fill { height: 100%; width: 0; background: var(--amber); transition: width 0.5s var(--ease-inout); }
.s1meter__label { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); min-width: 62px; text-align: right; transition: color 0.3s; }

.s1comps { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.s1comp { text-align: left; background: var(--bg-card); border: 1px solid var(--text-muted); border-left: 2px solid var(--amber-dim); border-radius: 3px; padding: 0.9rem 1rem; cursor: pointer; transition: 0.2s; }
.s1comp:hover { border-color: var(--amber-dim); border-left-color: var(--amber); }
.s1comp[aria-pressed="true"] { border-left-color: var(--amber); box-shadow: inset 0 0 0 1px var(--amber-dim); }
.s1comp__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.3rem; }
.s1comp__lab { font-family: var(--serif); font-size: 1.05rem; color: var(--text); }
.s1comp__add { font-family: var(--mono); font-size: 0.5rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); border: 1px solid var(--text-muted); border-radius: 2px; padding: 0.15rem 0.4rem; transition: 0.2s; }
.s1comp[aria-pressed="true"] .s1comp__add { color: var(--bg); background: var(--amber); border-color: var(--amber); }
.s1comp[aria-pressed="true"] .s1comp__add::after { content: " ✓"; }
.s1comp__what { font-family: var(--sans); font-size: 0.72rem; font-weight: 300; color: var(--text-dim); line-height: 1.4; }

/* Stage 03 / 04 shared accordion + artifact styles */
.s3steps { list-style: none; margin: 0.3rem 0 0; padding: 0; }
.s3step__head { width: 100%; text-align: left; background: transparent; border: none; border-bottom: 1px solid var(--text-muted); padding: 0.9rem 0; cursor: pointer; display: flex; align-items: baseline; gap: 0.9rem; transition: border-color 0.2s; }
.s3step__head:hover { border-bottom-color: var(--amber-dim); }
.s3step__num { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.1em; color: var(--amber); min-width: 24px; flex-shrink: 0; }
.s3step__t { font-family: var(--serif); font-size: 1.15rem; color: var(--text); flex: 1; line-height: 1.2; }
.s3step__more { font-family: var(--mono); font-size: 0.95rem; color: var(--text-dim); transition: transform 0.25s var(--ease-inout), color 0.2s; }
.s3step[aria-expanded="true"] .s3step__more { transform: rotate(45deg); color: var(--amber); }
.s3step__body { max-height: 0; overflow: hidden; transition: max-height 0.35s var(--ease-inout); }
.s3step__inner { padding: 1rem 0 1.1rem; }
.s3step__label { font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber); margin-bottom: 0.55rem; }
.s3step__text { font-family: var(--sans); font-size: 0.82rem; font-weight: 300; color: var(--text-dim); line-height: 1.6; }
.s3artifacts { display: flex; flex-direction: column; gap: 0.85rem; margin: 0.3rem 0 0; }
.s3art { background: var(--bg-card); border: 1px solid var(--text-muted); border-left: 2px solid var(--amber-dim); border-radius: 3px; padding: 1rem 1.1rem; }
.s3art__hd { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.4rem; flex-wrap: wrap; }
.s3art__name { font-family: var(--serif); font-size: 1.1rem; color: var(--text); }
.s3art__when { font-family: var(--mono); font-size: 0.55rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber); white-space: nowrap; }
.s3art__desc { font-family: var(--sans); font-size: 0.78rem; font-weight: 300; color: var(--text-dim); line-height: 1.55; margin-bottom: 0.5rem; }
.s3art__stack { font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.08em; color: var(--text-quiet); }
.s3art__link { color: var(--amber); text-decoration: none; }
.s3art__link:hover { text-decoration: underline; }

.s1__ghost { font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); background: transparent; border: 1px solid var(--text-muted); border-radius: 2px; padding: 0.45rem 0.8rem; cursor: pointer; transition: 0.2s; align-self: flex-start; }
.s1__ghost:hover { color: var(--amber); border-color: var(--amber-dim); }

.s1tpl { position: relative; background: #0b0907; border: 1px solid var(--text-muted); border-radius: 3px; padding: 1.2rem 1.3rem; margin-top: 1.8rem; overflow-x: auto; }
.s1tpl pre { font-family: var(--mono); font-size: 0.8rem; line-height: 1.9; color: var(--text); white-space: pre; }
.s1tpl .k { color: var(--amber); }
.s1tpl__copy { position: absolute; top: 0.7rem; right: 0.7rem; font-family: var(--mono); font-size: 0.54rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); background: var(--bg-card); border: 1px solid var(--text-muted); border-radius: 2px; padding: 0.35rem 0.6rem; cursor: pointer; transition: 0.2s; }
.s1tpl__copy:hover { color: var(--amber); border-color: var(--amber-dim); }

.s1pair { margin-top: 1.8rem; }
.s1pair__cap { font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 0.7rem; }
.s1art { padding: 0.6rem 0 0.6rem 1rem; border-left: 1px solid var(--text-muted); margin-bottom: 0.5rem; }
.s1art--late { border-left-color: var(--amber); }
.s1art__yr { display: block; font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.14em; color: var(--amber-text); margin-bottom: 0.35rem; }
.s1art--late .s1art__yr { color: var(--amber); }
.s1art__q { font-family: var(--mono); font-size: 0.78rem; line-height: 1.65; color: var(--text-dim); }
.s1art--late .s1art__q { color: var(--text); }

/* Stage 02 timeline */
.s2anat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; margin: 0.3rem 0 0.4rem; }
.s2anat__cell { background: var(--bg-card); border: 1px solid var(--text-muted); border-left: 2px solid var(--amber-dim); border-radius: 3px; padding: 0.9rem 1rem; }
.s2anat__k { font-family: var(--serif); font-size: 1.1rem; color: var(--text); margin-bottom: 0.25rem; }
.s2anat__v { font-family: var(--sans); font-size: 0.72rem; font-weight: 300; color: var(--text-dim); line-height: 1.4; }

.s2tl { list-style: none; margin: 0.3rem 0 0; padding: 0; position: relative; }
.s2tl::before { content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px; background: var(--text-muted); }
.s2tl__item { position: relative; padding-left: 2rem; }
.s2tl__item::before { content: ''; position: absolute; left: 3px; top: 1.15rem; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 1px solid var(--amber-dim); transition: background 0.2s, border-color 0.2s; }
.s2tl__item[aria-expanded="true"]::before { background: var(--amber); border-color: var(--amber); }
.s2tl__head { width: 100%; text-align: left; background: transparent; border: none; border-bottom: 1px solid var(--text-muted); padding: 0.9rem 0; cursor: pointer; display: flex; align-items: baseline; gap: 0.9rem; transition: border-color 0.2s; }
.s2tl__head:hover { border-bottom-color: var(--amber-dim); }
.s2tl__yr { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.1em; color: var(--amber); min-width: 74px; flex-shrink: 0; }
.s2tl__t { font-family: var(--serif); font-size: 1.15rem; color: var(--text); flex: 1; line-height: 1.2; }
.s2tl__more { font-family: var(--mono); font-size: 0.95rem; color: var(--text-dim); transition: transform 0.25s var(--ease-inout), color 0.2s; }
.s2tl__item[aria-expanded="true"] .s2tl__more { transform: rotate(45deg); color: var(--amber); }
.s2tl__body { max-height: 0; overflow: hidden; transition: max-height 0.35s var(--ease-inout); }
.s2tl__inner { padding: 0.9rem 0 1.1rem; }
.s2tl__q { font-family: var(--mono); font-size: 0.78rem; line-height: 1.65; color: var(--text-dim); margin-bottom: 0.5rem; }
.s2tl__q:last-child { margin-bottom: 0; }
.s2tl__note { font-family: var(--sans); font-size: 0.78rem; font-weight: 300; color: var(--text-dim); font-style: italic; line-height: 1.5; margin-top: 0.5rem; }

.s2quote { font-family: var(--serif); font-style: italic; font-size: clamp(1.2rem, 2.4vw, 1.5rem); font-weight: 300; color: var(--text); line-height: 1.45; border-left: 2px solid var(--amber); padding-left: 1.1rem; margin: 1.5rem 0; }
.s2stat { display: flex; gap: 2.4rem; flex-wrap: wrap; background: var(--bg-card); border: 1px solid var(--text-muted); border-left: 2px solid var(--amber); border-radius: 3px; padding: 1.2rem 1.4rem; margin: 1.5rem 0; }
.s2stat__n { font-family: var(--serif); font-size: 2rem; font-weight: 300; color: var(--amber); line-height: 1; }
.s2stat__l { font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); margin-top: 0.4rem; }

.s2docs { margin-top: 1rem; border: 1px solid var(--text-muted); border-radius: 3px; background: var(--bg-card); }
.s2docs > summary { list-style: none; cursor: pointer; padding: 0.8rem 1rem; font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); display: flex; align-items: center; gap: 0.5rem; }
.s2docs > summary::-webkit-details-marker { display: none; }
.s2docs > summary::before { content: '+'; font-size: 0.95rem; line-height: 1; }
.s2docs[open] > summary::before { content: '\2013'; }
.s2docs__body { padding: 0 1.1rem 1.2rem; }
.s2docs__note { font-family: var(--sans); font-size: 0.72rem; font-style: italic; color: var(--text-dim); margin: 0 0 0.8rem; }
.s2docs pre { font-family: var(--mono); font-size: 0.7rem; line-height: 1.6; color: var(--text-dim); white-space: pre-wrap; word-break: break-word; margin: 0; }

/* ── Focus language (shared) ── */
.nav__logo:focus-visible,
.nav__links a:focus-visible,
.footer__links a:focus-visible,
.enter-btn:focus-visible,
.s3art__link:focus-visible,
.s1__close:focus-visible,
.s1comp:focus-visible,
.s1__ghost:focus-visible,
.s1tpl__copy:focus-visible,
.s2tl__head:focus-visible,
.s3step__head:focus-visible,
.s2docs > summary:focus-visible {
  outline: 1px solid var(--amber);
  outline-offset: 2px;
}
a.project-item:focus-visible {
  outline: 1px solid var(--amber-dim);
  outline-offset: -1px;
  background: rgba(200, 144, 42, 0.08);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .section-stats .stats-grid { grid-template-columns: repeat(2, auto); gap: 2.4rem 3rem; }
}
@media (max-width: 768px) {
  /* mobile: collapse side zones to centered text over a dimmed corridor */
  html.js #scroll-container { height: 560vh; }
  .align-left, .align-right { padding-left: clamp(1.2rem, 6vw, 2rem); padding-right: clamp(1.2rem, 6vw, 2rem); }
  .align-left .section-inner, .align-right .section-inner { max-width: 34rem; margin: 0 auto; text-align: center; }
  .corridor__vignette {
    background:
      rgba(14, 12, 10, 0.55),
      linear-gradient(to bottom, rgba(14,12,10,0.7), transparent 25%, transparent 70%, rgba(14,12,10,0.8));
  }
  .corridor__counter { display: none; }
  .marquee-text { font-size: 19vw; }
  .creed__entry { padding: 3rem 0; }
  .creed__num { left: -0.4rem; }
  .project-item { grid-template-columns: 2rem 1fr; }
  .project-item__tags { grid-column: 2; justify-content: flex-start; }
  .rr-head { padding: 6rem 0 2.5rem; }
  .s1__panel { padding: 5rem 1.4rem 4rem; }
  .s1comps { grid-template-columns: 1fr; }
  .s1__close { top: 1rem; right: 1rem; }
  .s2anat { grid-template-columns: 1fr; }
  .s2tl__yr { min-width: 58px; }
  .nav__links { gap: 1rem; }
  .nav__links li:nth-child(n+4) { display: none; }
}

/* Reduced motion: kill the ornamental keyframes even before JS classifies */
@media (prefers-reduced-motion: reduce) {
  .hero__cue::after { animation: none; }
  html { scroll-behavior: auto; }
}
