/* THE APPROACH — one world, one key: arctic light, one red, one gold.
   The page is the instrument; the film provides all drama. */

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../assets/fonts/IBMPlexMono-Regular.woff2') format('woff2');
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../assets/fonts/IBMPlexMono-Medium.woff2') format('woff2');
  font-weight: 500; font-display: swap;
}
@font-face {
  font-family: 'Cinzel';
  src: url('../assets/fonts/Cinzel-Var.woff2') format('woff2-variations');
  font-weight: 400 900; font-display: swap;
}

:root {
  --bg: #eef2f8;
  --ink: #464a52;
  --slate: #6a6f7d;
  --faint: rgba(70, 74, 82, 0.16);
  --gold: #a5741f;
  --gold-bright: #c9974a;
  --red: #e84a33;
  --night: #10141b;
  --night-ink: #dde5ee;
  --night-dim: #9aa6b8;
  --night-faint: rgba(221, 229, 238, 0.14);
  --pulse: 0;                 /* written per frame by the world */
  --rail: 44px;
  --seam: #a2a09f;            /* film final-frame colour — sampled by assembly */
  /* the house — bone paper and ink (the deck after the film; every subpage) */
  --paper: #f4f0e7;
  --paper-2: #ebe5d7;
  --ink2: #23252b;
  --slate2: #565a64;
  --rule: rgba(35, 37, 43, 0.16);
  --gold-deep: #8a5f15;
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, 'Times New Roman', serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 14px/1.75 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-x: hidden;
}
.mono, .eyebrow { font-family: 'IBM Plex Mono', ui-monospace, monospace; }
.eyebrow {
  font-size: 10.5px; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 26px;
}

/* ---------------- the door (scrub-driven — the first threshold IS the print) ---------------- */
#door {
  position: fixed; inset: 0; z-index: 80;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0;
  --dz: 0;
  text-align: center;
  padding: 24px;
}
#door::before {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(244, 241, 233, 0.88) 0%, rgba(244, 241, 233, 0.42) 30%, rgba(244, 241, 233, 0.06) 52%, rgba(244, 241, 233, 0.02) 78%, rgba(238, 242, 246, 0.45) 100%),
    url('../assets/door-hero.jpg') center 62% / cover no-repeat,
    linear-gradient(180deg, #f5f8fd, var(--bg) 60%, #dde2ee);
  opacity: calc(1 - var(--dz) * 1.5);
}
#door.ghost { pointer-events: none; }
#door.passed { visibility: hidden; }
.door-printwrap {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  transform: scale(calc(1 + var(--dz) * 1.7));
  opacity: calc(1 - var(--dz) * 1.1);
}
.door-print {
  width: min(78vmin, 640px); height: min(78vmin, 640px);
  color: var(--ink);
  opacity: 0.05;
  animation: printspin 90s linear infinite;
}
@keyframes printspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .door-print { animation: none; } }
.door-mark {
  font: 500 11px/1 'IBM Plex Mono', monospace;
  letter-spacing: 0.3em; color: var(--slate);
  position: relative;
  opacity: calc(1 - var(--dz, 0) * 2.2);
}
.door-title, .door-sub, .door-cue, #door-sound { position: relative; }
.door-mark span { color: var(--gold); }
.door-kicker {
  margin: clamp(26px, 5vh, 46px) 0 0;
  font: 500 11px/1 'IBM Plex Mono', monospace;
  letter-spacing: 0.34em; color: var(--slate);
  opacity: calc(0.9 - var(--dz, 0) * 1.6);
}
.door-title {
  margin: 26px 0 0;
  font-family: 'Cinzel', serif; font-weight: 800;
  font-size: clamp(30px, 5.4vw, 68px);
  line-height: 1.14; letter-spacing: calc(0.06em + var(--dz, 0) * 0.1em);
  color: var(--ink);
  opacity: calc(1 - var(--dz, 0) * 1.6);
  transform: translateY(calc(var(--dz, 0) * -34px));
}
/* the product sentence — the five-second answer, before any film */
.door-thesis {
  position: relative;
  margin: clamp(20px, 3.2vh, 34px) auto 0;
  max-width: 46em;
  font: 500 clamp(12px, 1.15vw, 14px)/1.9 'IBM Plex Mono', monospace;
  letter-spacing: 0.06em;
  color: var(--ink2);
  opacity: calc(1 - var(--dz, 0) * 2.2);
  text-shadow: 0 1px 14px rgba(246, 240, 224, 0.8);
}
.door-sub {
  margin-top: 22px;
  font: 500 11.5px/1 'IBM Plex Mono', monospace;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--slate);
  opacity: calc(1 - var(--dz, 0) * 2.2);
}
/* the second action — quiet, beneath the play ring */
.door-read {
  position: relative;
  margin-top: 20px;
  font: 500 10.5px/1 'IBM Plex Mono', monospace;
  letter-spacing: 0.24em;
  color: var(--slate);
  text-decoration: none;
  border-bottom: 1px solid var(--faint);
  padding-bottom: 6px;
  opacity: calc(1 - var(--dz, 0) * 3);
}
.door-read:hover, .door-read:focus-visible { color: var(--gold); border-color: var(--gold); outline: none; }
.door-cue {
  margin-top: clamp(40px, 8vh, 76px);
  font: 500 10.5px/1 'IBM Plex Mono', monospace;
  letter-spacing: 0.26em; color: var(--ink);
  animation: cue 2.6s ease-in-out infinite;
}
@keyframes cue {
  0%, 100% { opacity: calc((1 - var(--dz, 0) * 3) * 0.35); }
  50% { opacity: calc((1 - var(--dz, 0) * 3) * 0.95); }
}
/* the opt-in — the print ring becomes a play button, breathing on the pulse */
#door-play {
  position: relative;
  margin-top: clamp(26px, 4.2vh, 44px);
  display: inline-flex; align-items: center;
  border: 1px solid var(--gold); background: rgba(244, 241, 233, 0.55);
  padding: 16px 32px;
  cursor: pointer;
  color: var(--ink);
  backdrop-filter: blur(3px);
  opacity: calc(1 - var(--dz, 0) * 3);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.3s ease;
}
#door-play:hover { transform: translateY(-1px); box-shadow: 0 10px 30px rgba(165, 116, 31, 0.18); background: rgba(244, 241, 233, 0.75); }
#door-play .play-ring {
  width: 64px; height: 64px; flex: none;
  transform: scale(calc(1 + var(--pulse, 0) * 0.05));
  transition: color 0.3s ease;
}
#door-play .play-copy { text-align: center; }
#door-play .play-copy b {
  display: block;
  font: 500 12px/1 'IBM Plex Mono', monospace;
  letter-spacing: 0.26em;
  color: inherit;
}
#door-play .play-copy i {
  display: block; font-style: normal; margin-top: 8px;
  font: 500 8.5px/1 'IBM Plex Mono', monospace;
  letter-spacing: 0.22em; color: var(--slate);
}
#door-play:hover, #door-play:focus-visible { outline: none; }

/* ---------------- stage + the air ---------------- */
#stage { position: fixed; inset: 0; z-index: 0; }
#stage canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
/* the atmosphere rides ABOVE the carved lines — the air passes in front of the words */
#atmo { position: fixed; inset: 0; z-index: 26; width: 100%; height: 100%; pointer-events: none; }

/* ---------------- the presence cursor ---------------- */
html.cursor-live, html.cursor-live * { cursor: none !important; }
#cursor {
  position: fixed; left: 0; top: 0; z-index: 90;
  width: 48px; height: 48px;
  pointer-events: none;
  color: var(--gold);
  opacity: 0;
  transition: opacity 0.5s ease;
  will-change: transform;
}
html.cursor-live #cursor { opacity: 0.9; }
body.on-dark #cursor { color: var(--gold-bright); }
#cursor svg { display: block; width: 100%; height: 100%; }
html.cursor-live body.presence-resting #cursor { opacity: 0.35; }
@media (pointer: coarse) { #cursor { display: none; } }

/* ---------------- runway + deck stacking ---------------- */
#runway { height: 1250vh; position: relative; z-index: 1; pointer-events: none; }
#deck { position: relative; z-index: 30; }

/* ---------------- HUD (the nav is always present; the instrument only in-film) */
#hud { position: fixed; inset: 0; z-index: 40; pointer-events: none; opacity: 0; transition: opacity 1s ease; }
body.infilm #hud, body.sealing #hud { opacity: 1; }
.hud-line, #hud-dial, #hud-sound { opacity: 0; transition: opacity 1s ease; }
body.infilm .hud-line { opacity: 0; }
body.infilm #hud-dial { opacity: 0; }
/* the instrument never shows through the door — wins over inline styles */
body:has(#door:not(.passed)) #hud-dial, body:has(#door:not(.passed)) .hud-line,
body:not(.infilm):not(.sealing) #hud-dial,
body:not(.infilm):not(.sealing) .hud-line { opacity: 0 !important; }
body.infilm #hud-sound { opacity: 0.7; }
body.infilm:not(.sealing) .hud-nav { opacity: 0; pointer-events: none; }
body.sealing .hud-nav { opacity: 1; pointer-events: auto; }
body.sealing #hud-skip { opacity: 0 !important; pointer-events: none; }
body.sealing #hud-sound { opacity: 0.7; }
.hud-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 85;
  display: flex; justify-content: space-between; align-items: center;
  padding: 26px var(--rail) 0;
}
.hud-mark { font: 500 11px/1 'IBM Plex Mono', monospace; letter-spacing: 0.3em; color: var(--ink); opacity: 0; transition: opacity 1s ease; }
body.infilm .hud-mark, body.pastfilm .hud-mark { opacity: 1; }
.hud-mark span { color: var(--gold); }
.hud-cat {
  display: block; margin-top: 7px;
  font: 500 8.5px/1 'IBM Plex Mono', monospace; font-style: normal;
  letter-spacing: 0.3em; color: var(--slate); opacity: 0.85;
}
body.on-dark .hud-cat { color: var(--night-ink); opacity: 0.7; }
.hud-nav { display: flex; gap: 30px; pointer-events: auto; }
.hud-nav a {
  font: 500 10.5px/1 'IBM Plex Mono', monospace; letter-spacing: 0.2em;
  color: var(--ink); text-decoration: none; padding: 8px 2px;
}
.hud-nav a:hover, .hud-nav a:focus-visible { color: var(--gold); outline: none; }
.hud-line { position: fixed; font: 500 10.5px/1.5 'IBM Plex Mono', monospace; letter-spacing: 0.2em; color: var(--ink); transition: color 0.9s ease, opacity 0.9s ease; }
.hud-dist { left: var(--rail); bottom: 34px; opacity: 0; pointer-events: none; }
.hud-dist span { font-variant-numeric: tabular-nums; }
.hud-dist > em { display: block; font-style: normal; margin-top: 8px; font-size: 9.5px; opacity: 0.7; }
.hud-presence { right: var(--rail); bottom: 34px; text-align: right; opacity: 0; pointer-events: none; }

/* the gauge — glyph slots roll like an instrument */
#hud-dist .o { position: relative; display: inline-block; width: 0.62em; height: 1.2em; overflow: hidden; vertical-align: bottom; }
#hud-dist .o em { position: absolute; inset: 0; font-style: normal; }
#hud-dist .o .oo { animation: o-out 0.26s ease forwards; }
#hud-dist .o .oi { animation: o-in 0.26s ease; }
@keyframes o-out { to { transform: translateY(-108%); opacity: 0; } }
@keyframes o-in { from { transform: translateY(108%); opacity: 0; } }
#hud-chapter .hl { font-style: normal; display: inline-block; animation: hl-in 0.5s ease backwards; }
@keyframes hl-in { from { opacity: 0; transform: translateY(7px); } }

/* the dial — the print, carried as the film's compass */
#hud-dial {
  position: fixed; right: calc(var(--rail) - 2px); bottom: 76px;
  width: 54px; height: 54px;
  color: var(--ink);
  opacity: 0; pointer-events: none;
  transition: color 0.9s ease, opacity 0.9s ease;
}
#hud-dial .dial-spin { transform-box: fill-box; transform-origin: center; }
#hud-dial .dial-prog { stroke: var(--gold); }
body.on-dark #hud-dial { color: var(--night-ink); }
body.on-dark #hud-dial .dial-prog { stroke: var(--gold-bright); }
#hud-sound {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 26px; pointer-events: auto;
  border: 0; background: none; padding: 10px 14px;
  font: 500 10px/1 'IBM Plex Mono', monospace; letter-spacing: 0.22em;
  color: var(--ink); cursor: pointer;
}
#hud-sound:hover, #hud-sound:focus-visible { opacity: 1 !important; color: var(--gold); outline: none; }
/* skip — a serious visitor is never trapped in a reel */
#hud-skip {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 62px; pointer-events: none;
  border: 0; background: none; padding: 10px 14px;
  font: 500 10px/1 'IBM Plex Mono', monospace; letter-spacing: 0.22em;
  color: var(--ink); cursor: pointer;
  opacity: 0; transition: opacity 0.8s ease, color 0.3s ease;
}
body.autoplaying #hud-skip { opacity: 0.7; pointer-events: auto; }
#hud-skip:hover, #hud-skip:focus-visible { opacity: 1; color: var(--gold); outline: none; }
body.on-dark .hud-line, body.on-dark .hud-mark, body.on-dark .hud-nav a, body.on-dark #hud-sound, body.on-dark #hud-skip { color: var(--night-ink); }
body.on-dark .hud-mark span { color: var(--gold-bright); }

/* ------------- the answer — carved annotation; the world's own type ------------- */
#answer {
  position: fixed; left: clamp(24px, 7vw, 120px); top: 30vh; z-index: 27;
  width: min(370px, 74vw);
  pointer-events: none;
  opacity: 0; transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
#answer.on { opacity: 1; transform: none; }
#answer::before {
  content: '';
  position: absolute; left: 0; top: -18px;
  height: 1px; width: 0; background: var(--gold);
  transition: width 0.7s ease 0.1s;
}
#answer.on::before { width: 72px; }
#ans-tag {
  display: block; font-style: normal;
  font: 500 9.5px/1 'IBM Plex Mono', monospace; letter-spacing: 0.26em;
  color: var(--gold-deep); margin-bottom: 14px;
  text-shadow: 0 1px 12px rgba(238, 243, 250, 0.8);
}
#ans-title {
  display: block;
  font-family: 'Cinzel', serif; font-weight: 700;
  font-size: clamp(19px, 2.3vw, 26px); letter-spacing: 0.1em; line-height: 1.4;
  color: var(--ink2); margin-bottom: 12px;
  text-shadow: 0 1px 18px rgba(238, 243, 250, 0.9);
}
#answer p {
  font-family: var(--serif);
  font-size: clamp(14px, 1.5vw, 16.5px); line-height: 1.7;
  color: var(--ink2); margin: 0 0 10px;
  text-shadow: 0 1px 14px rgba(238, 243, 250, 0.92), 0 0 6px rgba(238, 243, 250, 0.7);
}
body.on-dark #ans-tag { color: var(--gold-bright); text-shadow: none; }
body.on-dark #ans-title { color: var(--night-ink); text-shadow: 0 2px 18px rgba(5, 8, 12, 0.8); }
body.on-dark #answer p { color: var(--night-ink); text-shadow: 0 1px 14px rgba(5, 8, 12, 0.8); }
#ans-cue {
  position: fixed; left: 50%; top: 30vh; transform: translateX(-50%);
  z-index: 27; pointer-events: none;
  font: 500 9.5px/1 'IBM Plex Mono', monospace; letter-spacing: 0.3em;
  color: var(--ink2);
  opacity: 0; transition: opacity 0.6s ease;
}
/* the cursor asks — the ring warms and whispers over a living chapter */
#cursor .chint {
  position: absolute; left: 50%; top: calc(100% + 6px);
  transform: translateX(-50%);
  font: 500 8.5px/1 'IBM Plex Mono', monospace; letter-spacing: 0.3em;
  color: var(--gold-deep);
  opacity: 0; transition: opacity 0.35s ease;
  white-space: nowrap;
}
#cursor.asking .chint { opacity: 0.85; }
#cursor.asking { color: var(--gold-bright); }
body.on-dark #cursor .chint { color: var(--gold-bright); }
body.lens-open #cards .card, body.lens-open #soul { opacity: 0 !important; }
@media (prefers-reduced-motion: reduce) {
  #answer, #answer::before { transition: none; }
  #answer.on::before { width: 72px; }
}

/* ---------------- igloo plates — instrument card, open air, left of the subject ---------------- */
#cards { position: fixed; inset: 0; z-index: 28; pointer-events: none; }
.card {
  position: absolute;
  left: var(--rail);
  bottom: 18vh;
  top: auto;
  transform: none;
  width: min(320px, 78vw);
  text-align: left;
  padding: 16px 18px 14px;
  background: linear-gradient(168deg, rgba(246, 249, 253, 0.55), rgba(233, 238, 246, 0.32));
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-top: 1px solid rgba(201, 151, 74, 0.55);
  opacity: 0; visibility: hidden;
}
body.on-dark .card {
  background: linear-gradient(168deg, rgba(16, 20, 27, 0.72), rgba(16, 20, 27, 0.48));
  border-color: rgba(221, 229, 238, 0.18);
  border-top-color: rgba(201, 151, 74, 0.5);
}
.card::before { display: none; }
.card i {
  display: block; font-style: normal;
  font: 500 9.5px/1 'IBM Plex Mono', monospace;
  letter-spacing: 0.22em; color: var(--gold);
  margin-bottom: 8px;
  text-shadow: none;
}
.card b {
  font-family: 'Cinzel', serif; font-weight: 650;
  font-size: clamp(15px, 1.7vw, 19px);
  letter-spacing: 0.08em; line-height: 1.4;
  color: var(--ink);
  text-shadow: none;
}
body.on-dark .card b { color: var(--night-ink); text-shadow: none; }
body.on-dark .card i { color: var(--gold-bright); text-shadow: none; }
body.sealing #cards { opacity: 0 !important; }
/* the plain-speech line — one sentence a counsel can carry away */
.card em {
  display: block; font-style: normal;
  margin: 18px auto 0;
  max-width: 34em;
  font-family: var(--serif);
  font-size: clamp(14px, 1.55vw, 18px);
  line-height: 1.7;
  color: var(--ink2);
  text-shadow: 0 1px 18px rgba(238, 243, 250, 0.95), 0 0 8px rgba(238, 243, 250, 0.7);
  opacity: 0;
}
body.on-dark .card b { color: var(--night-ink); text-shadow: 0 2px 26px rgba(5, 8, 12, 0.8); }
body.on-dark .card em { color: var(--night-ink); text-shadow: 0 2px 20px rgba(5, 8, 12, 0.85); }
.card b .w { display: inline-block; will-change: transform, opacity, filter; }
.card i .tk { display: inline-block; opacity: 0.18; transform: translateY(2px); transition: opacity 0.18s ease, transform 0.18s ease; }
.card i .tk.on { opacity: 1; transform: none; }
.card i .lb { opacity: 0; }
body.on-dark .card b { color: var(--night-ink); text-shadow: 0 2px 26px rgba(5, 8, 12, 0.8); }
body.on-dark .card i { color: var(--gold-bright); text-shadow: none; }

/* ---------------- the close — after THIS IS THETWINS */
#close-type {
  position: fixed; left: var(--rail); bottom: 16vh; z-index: 28;
  text-align: left;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease;
}
#close-type.on { opacity: 1; visibility: visible; }
body.sealing #close-type { opacity: 0 !important; visibility: hidden; }
#close-type i {
  display: block; font-style: normal;
  font: 500 10.5px/1 'IBM Plex Mono', monospace;
  letter-spacing: 0.28em; color: var(--gold);
  margin-bottom: 18px;
}
#close-type b {
  display: flex; flex-direction: column; gap: 8px;
  font-family: 'Cinzel', serif; font-weight: 800;
  font-size: clamp(18px, 2.8vw, 28px);
  letter-spacing: 0.16em; line-height: 1.15;
  color: var(--ink);
}
#close-type span {
  display: block;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
#close-type span.on { opacity: 1; transform: none; }
body.on-dark #close-type b { color: var(--night-ink); text-shadow: 0 2px 22px rgba(5, 8, 12, 0.75); }
@media (prefers-reduced-motion: reduce) {
  #close-type, #close-type span { transition: none; }
}
@media (max-width: 640px) {
  #close-type { left: 20px; right: 20px; bottom: 22vh; width: auto; }
  #close-type b { font-size: clamp(16px, 5.4vw, 22px); letter-spacing: 0.12em; }
}

/* ---------------- the soul — one giant quiet word behind each chapter */
#soul {
  display: none;
  position: fixed; left: 50%; top: 46vh; z-index: 24;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  will-change: transform, opacity;
}
#soul span {
  font-family: 'Cinzel', serif; font-weight: 500;
  font-size: clamp(90px, 17vw, 250px);
  letter-spacing: 0.32em;
  color: var(--ink);
}
body.on-dark #soul span { color: var(--night-ink); }

/* ---------------- the slips — requests from the machine world, answered by the twin */
#slips { position: fixed; inset: 0; z-index: 25; pointer-events: none; }
.slip {
  position: absolute; left: 50%; top: 62vh;
  transform: translate(-50%, -50%);
  width: min(560px, 88vw);
  padding: 20px 26px 18px;
  border: 1px solid rgba(201, 151, 74, 0.38);
  border-radius: 14px;
  background: linear-gradient(170deg, rgba(16, 20, 27, 0.44), rgba(16, 20, 27, 0.26));
  text-align: left;
  opacity: 0; visibility: hidden;
}
.slip i {
  display: block; font-style: normal;
  font: 500 9.5px/1 'IBM Plex Mono', monospace;
  letter-spacing: 0.26em; color: var(--gold-bright);
  margin-bottom: 12px;
}
.slip b {
  display: block;
  font-family: 'Cinzel', serif; font-weight: 700;
  font-size: clamp(15px, 2vw, 20px); letter-spacing: 0.06em;
  color: #f2f5fb;
  margin-bottom: 14px;
}
.slip em {
  display: block; font-style: normal;
  font: 500 10.5px/1.6 'IBM Plex Mono', monospace;
  letter-spacing: 0.14em; color: #cfd8e4;
  border-top: 1px solid rgba(238, 243, 250, 0.14);
  padding-top: 12px;
}
.slip em strong { font-weight: 500; }
.slip .ok strong { color: var(--gold-bright); }
.slip .no strong { color: #b9c4d6; }
.slip.refused b { text-decoration: line-through; text-decoration-color: rgba(185, 196, 214, 0.7); text-decoration-thickness: 1px; }

/* ================= THE HOUSE — bone paper, ink, museum margins =================
   The film ends; the reading begins. Everything below the veil is opaque paper —
   no glass panels over the live canvas (the crash lesson stands), no dark rooms
   (the brand law stands: arctic light, one red, one gold). */

.veil {
  height: 18vh;
  background: linear-gradient(180deg,
    rgba(238, 242, 248, 0) 0%,
    rgba(238, 242, 248, 0.55) 55%,
    var(--bg) 100%);
}

.room {
  background: var(--bg);
  color: var(--ink);
  padding: clamp(110px, 15vh, 190px) clamp(24px, 7vw, 96px);
  text-align: center;
}
.room-tone { background: #e4e8f0; }
.room-inner { max-width: 1060px; margin: 0 auto; }
.room-inner.narrow { max-width: 720px; }
.room .eyebrow { color: var(--gold); }
.room-title {
  margin: 0 0 clamp(30px, 4.5vh, 48px);
  font-family: 'Cinzel', serif; font-weight: 800;
  font-size: clamp(28px, 4.6vw, 52px);
  letter-spacing: 0.14em; line-height: 1.25;
  color: var(--ink);
}
.room-intro {
  margin: 0 auto clamp(48px, 7vh, 84px);
  max-width: 36em;
  font-family: var(--serif);
  font-size: clamp(15px, 1.7vw, 18px); line-height: 1.75;
  color: var(--slate2);
}
.room-note { margin-top: clamp(40px, 6vh, 64px); }
.quietlink { color: inherit; text-decoration: none; }
.room-note .quietlink {
  font: 500 10.5px/1 'IBM Plex Mono', monospace; letter-spacing: 0.22em;
  color: var(--slate2); border-bottom: 1px solid var(--rule); padding-bottom: 6px;
}
.quietlink:hover, .quietlink:focus-visible { color: var(--gold); outline: none; }

/* ---------------- the capture — leave your name ---------------- */
/* THE SEAL — a plate on the living dawn. No page below the film. */
#seal {
  position: fixed; inset: 0; z-index: 36;
  display: flex; flex-direction: column;
  align-items: center; justify-content: space-between;
  text-align: center;
  color: var(--ink);
  opacity: 0; pointer-events: none;
  transition: opacity 0.7s ease;
  text-shadow: 0 1px 18px rgba(246, 240, 224, 0.85);
}
/* frost veils — the fog writes the page: sky band for the carve, snow-mist for the ask */
#seal::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 42vh;
  background: linear-gradient(180deg, rgba(243, 237, 224, 0.82), rgba(243, 237, 224, 0.46) 55%, rgba(243, 237, 224, 0));
}
#seal::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 46vh;
  background: linear-gradient(0deg, rgba(238, 242, 246, 0.88), rgba(238, 242, 246, 0.52) 52%, rgba(238, 242, 246, 0));
}
#seal > * { position: relative; z-index: 1; }
.seal-head { margin-top: 13vh; }
.seal-act { width: min(680px, 94vw); margin-bottom: 6.5vh; }
body.sealing #seal .seal-act { pointer-events: auto; }
/* the pair, named — small instrument tags with hairline leaders */
#seal .seal-world { position: absolute; inset: 0; pointer-events: none; }
.seal-tag { position: absolute; text-align: left; white-space: nowrap; }
.seal-tag i {
  display: block; font: 700 11px/1 'IBM Plex Mono', monospace;
  font-style: normal; letter-spacing: 0.26em; color: var(--ink);
}
.seal-tag b { display: block; margin-top: 7px; font: 500 9px/1.5 'IBM Plex Mono', monospace; letter-spacing: 0.18em; color: var(--slate); }
.seal-tag.tag-twin i { color: var(--gold); }
.seal-tag::after {
  content: ''; position: absolute; top: 5px; width: 26px; height: 1px;
  background: var(--slate); opacity: 0.55;
}
.seal-tag.lead-right::after { left: calc(100% + 8px); }
.seal-tag.lead-left::after { right: calc(100% + 8px); }
.seal-tag.tag-twin::after { background: var(--gold); opacity: 0.7; }
.seal-tag.tag-you { text-align: right; }
.seal-tag.tag-you.lead-left { text-align: left; }
/* the reveal, staggered — the truth, then the pair named, then the ask */
#seal .seal-head, #seal .seal-tag, #seal .seal-act {
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
#seal .seal-tag { transform: translateY(8px); }
body.sealing #seal .seal-head { opacity: 1; transform: none; transition-delay: 0.15s; }
body.sealing #seal .tag-you { opacity: 1; transform: none; transition-delay: 0.7s; }
body.sealing #seal .tag-twin { opacity: 1; transform: none; transition-delay: 0.95s; }
body.sealing #seal .seal-act { opacity: 1; transform: none; transition-delay: 1.3s; }
.seal-tagline { color: var(--gold); white-space: nowrap; }
body.sealing #seal { opacity: 1; }
.seal-kicker {
  margin: 0 0 10px;
  font: 500 10px/1 'IBM Plex Mono', monospace;
  letter-spacing: 0.26em; color: var(--gold);
}
.seal-count {
  margin: 0;
  font-family: 'Cinzel', serif; font-weight: 800;
  font-size: clamp(28px, 4.6vw, 52px);
  letter-spacing: 0.1em; line-height: 1.18;
}
.seal-count em { font-style: normal; color: var(--gold); }
.sr-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.seal-line {
  margin: 16px auto 26px; max-width: 30em;
  font: 400 12.5px/1.6 'IBM Plex Mono', monospace;
  color: var(--slate);
}
#seal .claim-form, #seal form { text-align: left; }
.seal-quiet {
  margin: 18px 0 0;
  font: 400 11.5px/1.6 'IBM Plex Mono', monospace;
  color: var(--slate);
}
.seal-quiet a { color: var(--gold); text-decoration: none; }
.seal-quiet a:hover, .seal-quiet a:focus-visible { border-bottom: 1px solid var(--gold); outline: none; }
.seal-legal {
  display: flex; gap: 18px; justify-content: center;
  margin-top: 16px;
}
.seal-legal a {
  font: 500 9.5px/1 'IBM Plex Mono', monospace;
  letter-spacing: 0.16em; color: var(--slate); text-decoration: none;
}
.seal-legal a:hover { color: var(--gold); }
.site-copyright {
  display: block; margin: 12px 0 0;
  font: 400 9px/1.5 'IBM Plex Mono', monospace;
  color: var(--slate); text-align: center;
}
@media (prefers-reduced-motion: reduce) {
  #seal { transition: none; }
  #seal .seal-head, #seal .seal-tag, #seal .seal-act { transition: none; transform: none; }
}
.claim-form {
  max-width: 420px; margin: 0 auto;
  text-align: left;
}
#seal label, .claim-form label, .claim-aud-label {
  display: block;
  font: 500 10px/1 'IBM Plex Mono', monospace;
  letter-spacing: 0.22em; color: var(--gold);
  margin: 22px 0 10px;
}
#seal input, .claim-form input {
  width: 100%;
  border: 0; border-bottom: 1px solid var(--faint);
  background: transparent;
  padding: 10px 0 12px;
  font: 500 18px/1.3 'Cinzel', serif;
  letter-spacing: 0.12em; color: var(--ink);
  outline: none;
}
#seal input:focus, .claim-form input:focus { border-bottom-color: var(--gold); }
.claim-aud {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.aud-opt {
  border: 1px solid var(--faint); background: none;
  padding: 10px 14px;
  font: 500 10px/1 'IBM Plex Mono', monospace;
  letter-spacing: 0.18em; color: var(--ink);
  cursor: pointer;
}
.aud-opt.on, .aud-opt[aria-checked="true"] {
  border-color: var(--gold); color: var(--gold);
}
.aud-opt:hover, .aud-opt:focus-visible { border-color: var(--gold-bright); outline: none; }
.claim-err {
  min-height: 1.4em; margin: 16px 0 0;
  font: 500 11px/1.5 'IBM Plex Mono', monospace;
  letter-spacing: 0.08em; color: var(--red);
}
#claim-seal {
  flex: 0 0 auto;
  background: none;
  border: 1px solid var(--gold);
  color: var(--ink); cursor: pointer;
  padding: 14px 30px;
  font: 500 11px/1 'IBM Plex Mono', monospace; letter-spacing: 0.22em;
  transition: background 0.3s ease, color 0.3s ease;
}
#claim-seal:hover, #claim-seal:focus-visible { background: var(--gold); border-color: var(--gold); color: #fdfbf6; outline: none; }
#claim-seal.sealed { background: none; color: var(--gold); border-color: var(--gold); }
#claim-seal:disabled { opacity: 0.7; cursor: wait; }
.claim-standing {
  margin-top: 18px;
  font: 500 12px/1.6 'IBM Plex Mono', monospace;
  letter-spacing: 0.12em; color: var(--gold);
  text-align: center;
}
.cta-vaults {
  margin-top: 22px;
  font: 500 11px/1 'IBM Plex Mono', monospace;
  letter-spacing: 0.2em; color: var(--slate);
}
.claim-quiet {
  margin-top: 36px;
  font: 400 13px/1.7 'IBM Plex Mono', monospace;
  color: var(--slate);
}
.claim-quiet a { color: var(--gold); text-decoration: none; }
.claim-quiet a:hover, .claim-quiet a:focus-visible { border-bottom: 1px solid var(--gold); outline: none; }
.lede {
  margin: 0 auto;
  max-width: 34em;
  font-family: var(--serif);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.8;
  color: var(--ink2);
  text-align: left;
}

/* the triad — proof, agency, continuance */
.triad {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: clamp(20px, 3vw, 40px);
  margin: clamp(56px, 8vh, 88px) auto 0;
  max-width: 880px;
}
.triad > div { border-top: 1px solid var(--gold); padding-top: 20px; text-align: left; }
.triad b {
  display: block;
  font-family: 'Cinzel', serif; font-weight: 700;
  font-size: 14px; letter-spacing: 0.24em; color: var(--ink2);
  margin-bottom: 10px;
}
.triad span { font-family: var(--serif); font-size: 15px; line-height: 1.7; color: var(--slate2); }

/* in practice — what Tuesday looks like */
.practice {
  margin: clamp(64px, 9vh, 104px) auto 0;
  max-width: 620px;
  padding: clamp(28px, 4vw, 44px) clamp(28px, 4.5vw, 52px);
  border: 1px solid var(--rule);
  background: #faf7f0;
  text-align: left;
}
.practice .eyebrow { margin-bottom: 20px; }
.practice p {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: clamp(14px, 1.55vw, 16.5px); line-height: 1.75;
  color: var(--ink2);
}
.practice p:last-child { margin-bottom: 0; }

/* the three rooms */
.rooms-row {
  display: grid; gap: clamp(20px, 2.6vw, 34px);
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  max-width: 1120px; margin: 0 auto;
  text-align: left;
}
.roomcard {
  display: flex; flex-direction: column; gap: 14px;
  text-decoration: none; color: var(--ink2);
  padding: 0 0 26px;
  border: 1px solid var(--rule);
  background: #faf7f0;
  transition: border-color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
}
.roomcard:hover, .roomcard:focus-visible {
  border-color: var(--gold);
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(60, 52, 30, 0.10);
  outline: none;
}
.roomcard figure {
  margin: 0; height: clamp(170px, 22vw, 230px); overflow: hidden;
  border-bottom: 1px solid var(--rule);
  background: var(--paper-2);
}
.roomcard figure img { width: 100%; height: 100%; object-fit: cover; display: block; }
.roomcard i {
  font-style: normal; font: 500 10px/1 'IBM Plex Mono', monospace;
  letter-spacing: 0.24em; color: var(--gold-deep);
  padding: 12px 26px 0;
}
.roomcard b {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(17px, 1.9vw, 20px); line-height: 1.5;
  padding: 0 26px;
}
.roomcard ul { margin: 2px 0 0; padding: 0 26px; list-style: none; }
.roomcard li {
  font-family: var(--serif); font-size: 14.5px; line-height: 1.65;
  color: var(--slate2); margin-bottom: 8px;
  padding-left: 20px; position: relative;
}
.roomcard li::before { content: '—'; position: absolute; left: 0; color: var(--gold-deep); }
.roomcard em {
  margin: auto 26px 0; padding-top: 16px; font-style: normal;
  font: 500 10px/1 'IBM Plex Mono', monospace; letter-spacing: 0.2em;
  color: var(--ink2); border-top: 1px solid var(--rule);
}
.roomcard:hover em { color: var(--gold-deep); }

/* how it works — three numbered steps, one idea each */
.steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(26px, 4vw, 52px);
  max-width: 1060px; margin: 0 auto;
  text-align: left;
}
.step { border-top: 1px solid var(--gold); padding-top: 24px; }
.step i {
  display: block; font-style: normal;
  font-family: 'Cinzel', serif; font-weight: 800;
  font-size: clamp(26px, 3vw, 36px); color: var(--gold-deep);
  margin-bottom: 14px;
}
.step b {
  display: block;
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(17px, 1.9vw, 20px); line-height: 1.5;
  color: var(--ink2); margin-bottom: 10px;
}
.step span { font-family: var(--serif); font-size: 15.5px; line-height: 1.75; color: var(--slate2); }

/* the laws — a single statute, engraved on a pale glacial plate */
.plate {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(36px, 5vw, 64px) clamp(28px, 5vw, 72px);
  border: 1px solid var(--rule);
  background: linear-gradient(175deg, #f4f6fb, #e6ebf4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 24px 60px rgba(60, 52, 30, 0.08);
  text-align: left;
}
.statute { display: flex; gap: clamp(18px, 3vw, 34px); padding: clamp(20px, 3vh, 30px) 0; }
.statute + .statute { border-top: 1px solid var(--rule); }
.statute i {
  font-style: normal; flex: none; width: 2em;
  font-family: 'Cinzel', serif; font-weight: 800;
  font-size: clamp(20px, 2.4vw, 27px); color: var(--gold-deep);
  line-height: 1.2;
}
.statute b {
  display: block;
  font-family: 'Cinzel', serif; font-weight: 700;
  font-size: clamp(14px, 1.7vw, 17.5px); letter-spacing: 0.14em;
  color: var(--ink2); margin-bottom: 8px;
}
.statute span {
  font-family: var(--serif); font-size: clamp(14px, 1.6vw, 16.5px);
  line-height: 1.7; color: var(--slate2);
}

/* the founder — the house speaking */
.founder-line {
  margin: 0 auto clamp(48px, 7vh, 76px);
  max-width: 21em;
  font-family: 'Cinzel', serif; font-weight: 700;
  font-size: clamp(21px, 3vw, 34px);
  letter-spacing: 0.06em; line-height: 1.55;
  color: var(--ink2);
}
.letter {
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(32px, 5vw, 54px);
  border: 1px solid var(--rule);
  background: #f4f6fb;
  text-align: left;
}
.letter-pull {
  font-family: 'Cinzel', serif; font-weight: 700;
  font-size: clamp(16px, 2vw, 21px);
  letter-spacing: 0.04em; line-height: 1.6;
  color: var(--gold-deep);
  margin: 0 0 26px;
}
.letter p {
  font-family: var(--serif);
  font-size: clamp(14.5px, 1.6vw, 16.5px); line-height: 1.85;
  color: var(--ink2); margin: 0 0 16px;
}
.letter p.letter-pull { margin: 0 0 26px; }
.sig-row { display: flex; align-items: center; gap: 20px; margin-top: 36px; }
.sig-seal {
  width: 54px; height: 54px; flex: none;
  color: var(--gold-deep); opacity: 0.9;
  animation: printspin 70s linear infinite reverse;
}
@media (prefers-reduced-motion: reduce) { .sig-seal { animation: none; } }
.letter .sig {
  font-family: 'Cinzel', serif; font-weight: 800; font-size: 20px;
  letter-spacing: 0.24em; color: var(--ink2);
}
.letter .role { margin-top: 9px; font: 500 9.5px/1 'IBM Plex Mono', monospace; letter-spacing: 0.22em; color: var(--slate2); }

/* the close — a private reading */
.close-actions {
  display: flex; justify-content: center; align-items: center;
  gap: clamp(18px, 3vw, 34px); flex-wrap: wrap;
  margin-top: clamp(44px, 6vh, 64px);
}
.act-primary {
  font: 500 11px/1 'IBM Plex Mono', monospace; letter-spacing: 0.22em;
  color: var(--paper); background: var(--ink2);
  text-decoration: none; padding: 18px 34px;
  border: 1px solid var(--ink2);
  transition: background 0.3s ease, color 0.3s ease;
}
.act-primary:hover, .act-primary:focus-visible { background: var(--gold-deep); border-color: var(--gold-deep); color: #fdfbf6; outline: none; }
.act-secondary {
  font: 500 11px/1 'IBM Plex Mono', monospace; letter-spacing: 0.22em;
  color: var(--ink2); text-decoration: none;
  padding: 18px 6px; border-bottom: 1px solid var(--rule);
}
.act-secondary:hover, .act-secondary:focus-visible { color: var(--gold-deep); border-color: var(--gold-deep); outline: none; }
.close-quiet {
  margin-top: 30px;
  font: 500 10px/1.8 'IBM Plex Mono', monospace; letter-spacing: 0.2em;
  color: var(--slate2);
}
/* the thresholds — the audiences, kept quietly */
.thresholds {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  max-width: 880px;
  margin: clamp(64px, 9vh, 96px) auto 0;
  text-align: left;
}
.threshold {
  text-decoration: none;
  border-top: 1px solid var(--rule);
  padding-top: 16px;
  transition: border-color 0.3s ease;
}
.threshold:hover, .threshold:focus-visible { border-color: var(--gold); outline: none; }
.threshold i {
  display: block; font-style: normal;
  font: 500 10px/1 'IBM Plex Mono', monospace; letter-spacing: 0.22em;
  color: var(--ink2); margin-bottom: 8px;
}
.threshold span { font-family: var(--serif); font-size: 13.5px; line-height: 1.65; color: var(--slate2); }
.threshold:hover i { color: var(--gold-deep); }

/* ---------------- the curtain — the house mark, then the footer ---------------- */
#curtain {
  background: linear-gradient(180deg, #e4e8f0, var(--bg) 40%, #dfe4ee 100%);
  text-align: center;
  padding: clamp(48px, 8vh, 88px) clamp(22px, 6vw, 80px) clamp(36px, 6vh, 56px);
  overflow: hidden;
}
.curtain-vow {
  font: 500 11.5px/1 'IBM Plex Mono', monospace;
  letter-spacing: 0.34em; color: var(--slate2);
  margin-bottom: 40px;
}
.curtain-name {
  font-family: 'Cinzel', serif; font-weight: 850;
  font-size: clamp(36px, 8vw, 92px);
  letter-spacing: 0.1em; line-height: 1;
  background: linear-gradient(180deg, #e8cf95 4%, #c9974a 32%, #a5741f 56%, #6e5a22 82%, #55491f 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 22px rgba(90, 78, 30, 0.28));
}
.curtain-name .star {
  display: inline-block; margin-left: 0.08em;
  background: none; color: var(--gold);
  -webkit-background-clip: initial; background-clip: initial;
  font-size: 0.32em; vertical-align: 0.9em;
  opacity: calc(0.45 + var(--pulse) * 0.55);
}
.house-foot { margin-top: clamp(28px, 5vh, 48px); }
.hf-name { font: 500 11px/1 'IBM Plex Mono', monospace; letter-spacing: 0.3em; color: var(--ink2); }
.hf-line { margin-top: 14px; font: 400 10px/1 'IBM Plex Mono', monospace; letter-spacing: 0.2em; color: var(--slate2); }
.hf-nav { margin-top: 16px; display: flex; justify-content: center; gap: clamp(18px, 3vw, 30px); flex-wrap: wrap; }
.hf-nav a, .hf-nav span {
  font: 500 10px/1 'IBM Plex Mono', monospace; letter-spacing: 0.18em;
  color: var(--slate2); text-decoration: none;
}
.hf-nav a:hover, .hf-nav a:focus-visible { color: var(--gold-deep); outline: none; }
.hf-legal { margin-top: 20px; }

/* ---------------- reveals + presence ---------------- */
.rise { opacity: 0; transform: translateY(16px); transition: opacity 0.9s ease, transform 0.9s ease; }
.rise.on { opacity: 1; transform: none; }
body.presence-resting .hud-presence { opacity: 1; }
body.presence-resting .hud-dist, body.presence-resting .hud-mark { opacity: 0.45; }

.noscript { padding: 40vh 10vw; text-align: center; letter-spacing: 0.12em; }

/* the manifesto's closing thought */
.creed-close {
  margin: 0 auto clamp(44px, 6vh, 64px);
  max-width: 24em;
  font-family: 'Cinzel', serif; font-weight: 700;
  font-size: clamp(19px, 2.6vw, 30px);
  letter-spacing: 0.06em; line-height: 1.6;
  color: var(--ink2);
}
.creed-close em {
  display: block; font-style: normal;
  font: 500 11px/1 'IBM Plex Mono', monospace;
  letter-spacing: 0.26em; color: var(--slate2);
  margin-bottom: 20px;
}
.page-foot {
  background: var(--paper-2);
  border-top: 1px solid var(--rule);
  text-align: center;
  padding: clamp(48px, 7vh, 80px) 24px;
}
.page-foot .house-foot { margin-top: 0; }
.lede p { margin: 0 0 18px; }
.lede p:last-child { margin-bottom: 0; }

/* ---------------- the subpages — same house, still rooms ----------------
   body.page: no film, no fixed chrome games; paper from the first pixel. */
body.page { background: var(--paper); color: var(--ink2); }
body.page .hud-top { position: absolute; }
body.page .hud-mark { opacity: 1; }
body.page .hud-mark, body.page .hud-nav a { color: var(--ink2); }
body.page .hud-nav a:hover, body.page .hud-nav a:focus-visible { color: var(--gold-deep); }
body.page .hud-nav a[aria-current="page"] { color: var(--gold-deep); }
body.page main { padding-top: clamp(90px, 12vh, 140px); }
body.page .room:first-of-type { padding-top: clamp(60px, 8vh, 100px); }
.page-hero {
  margin: 0 auto clamp(40px, 6vh, 72px);
  max-width: 1060px;
  border: 1px solid var(--rule);
  background: var(--paper-2);
  overflow: hidden;
}
.page-hero img { display: block; width: 100%; height: clamp(200px, 32vh, 340px); object-fit: cover; }
.willnot {
  margin: clamp(28px, 4vh, 44px) auto 0;
  max-width: 34em;
  border-top: 1px solid var(--rule);
  padding-top: 22px;
  text-align: left;
}
.willnot i {
  display: block; font-style: normal;
  font: 500 10px/1 'IBM Plex Mono', monospace; letter-spacing: 0.22em;
  color: var(--slate2); margin-bottom: 10px;
}
.willnot p { font-family: var(--serif); font-size: 15px; line-height: 1.75; color: var(--slate2); margin: 0; }
.doorroom { margin: 0 auto clamp(90px, 13vh, 150px); max-width: 720px; text-align: center; }
.doorroom:last-of-type { margin-bottom: 0; }
.doorroom figure { margin: 0 0 34px; border: 1px solid var(--rule); overflow: hidden; background: var(--paper-2); }
.doorroom figure img { display: block; width: 100%; height: clamp(220px, 34vh, 360px); object-fit: cover; }
.doorroom h2 {
  margin: 0 0 18px;
  font-family: 'Cinzel', serif; font-weight: 800;
  font-size: clamp(24px, 3.6vw, 40px); letter-spacing: 0.16em; color: var(--ink2);
}
.doorroom .promise { font-family: var(--serif); font-size: clamp(16px, 1.9vw, 20px); line-height: 1.7; color: var(--ink2); margin: 0 auto 26px; max-width: 28em; }
.doorroom ul { margin: 0 auto; padding: 0; list-style: none; max-width: 30em; text-align: left; }
.doorroom li {
  font-family: var(--serif); font-size: 15.5px; line-height: 1.7; color: var(--slate2);
  padding: 12px 0 12px 26px; position: relative;
  border-top: 1px solid var(--rule);
}
.doorroom li::before { content: '—'; position: absolute; left: 0; color: var(--gold-deep); }

/* the letter form — a private letter, not a marketing form */
.letterform { max-width: 560px; margin: clamp(44px, 6vh, 68px) auto 0; text-align: left; }
.letterform label {
  display: block; margin: 26px 0 8px;
  font: 500 10px/1 'IBM Plex Mono', monospace; letter-spacing: 0.22em;
  color: var(--slate2);
}
.letterform input, .letterform select, .letterform textarea {
  width: 100%; padding: 14px 14px;
  border: 1px solid var(--rule); border-radius: 0;
  background: #faf7f0; color: var(--ink2);
  font-family: var(--serif); font-size: 16px; line-height: 1.6;
}
.letterform input:focus-visible, .letterform select:focus-visible, .letterform textarea:focus-visible {
  outline: none; border-color: var(--gold-deep);
}
.letterform textarea { min-height: 200px; resize: vertical; }
.letterform select { appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--slate2) 50%), linear-gradient(135deg, var(--slate2) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px; background-repeat: no-repeat; }
.letterform button {
  margin-top: 34px; cursor: pointer;
  font: 500 11px/1 'IBM Plex Mono', monospace; letter-spacing: 0.22em;
  color: var(--paper); background: var(--ink2);
  padding: 18px 44px; border: 1px solid var(--ink2);
  transition: background 0.3s ease, border-color 0.3s ease;
}
.letterform button:hover, .letterform button:focus-visible { background: var(--gold-deep); border-color: var(--gold-deep); outline: none; }
.letterform button[disabled] { opacity: 0.55; cursor: default; }
.form-note { margin-top: 18px; font: 400 10px/1.8 'IBM Plex Mono', monospace; letter-spacing: 0.14em; color: var(--slate2); }
.received {
  display: none;
  margin: clamp(44px, 6vh, 68px) auto 0; max-width: 560px;
  border: 1px solid var(--gold); background: #faf7f0;
  padding: 44px 34px; text-align: center;
}
.received b { display: block; font-family: 'Cinzel', serif; font-weight: 800; font-size: 22px; letter-spacing: 0.18em; color: var(--ink2); margin-bottom: 12px; }
.received span { font-family: var(--serif); font-size: 15px; color: var(--slate2); }
.letterform.sent, .letterform.sent + .form-note { display: none; }
.letterform.sent ~ .received { display: block; }

@media (max-width: 640px) {
  :root { --rail: 22px; }
  .hud-nav { gap: 14px; }
  .hud-nav a { letter-spacing: 0.12em; font-size: 9.5px; white-space: nowrap; }
  .hud-nav a[href^="#"] { display: none; }  /* on small screens the nav keeps only the pages */
  .card { left: 18px; right: 18px; width: auto; bottom: 16vh; }
  .card b { font-size: 21px; }
  .card em { font-size: 14px; }
  .door-thesis { font-size: 15px; }
  .room { padding-left: 22px; padding-right: 22px; }
  .statute { flex-direction: column; gap: 8px; }
  .close-actions { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .door-cue { animation: none; opacity: 0.8; }
  .rise, .card, .roomcard, .threshold, .act-primary, .act-secondary { transition: none; }
  .rise { opacity: 1; transform: none; }
  .card em { opacity: 1; }
}

/* the seal, unpaneled — one field on the dawn, demos for institutions only */
#claim-form { display: flex; gap: 12px; justify-content: center; align-items: stretch; flex-wrap: wrap; }
#seal input#claim-email {
  flex: 1 1 260px; max-width: 340px;
  background: rgba(255, 255, 255, 0.34);
  border: 0; border-bottom: 1px solid rgba(70, 74, 82, 0.4);
  padding: 14px 14px; text-align: center;
  font: 500 16px/1.3 'IBM Plex Mono', monospace; letter-spacing: 0.04em;
  color: var(--ink);
}
#seal input#claim-email::placeholder { color: rgba(70, 74, 82, 0.45); }
#seal input#claim-email:focus { outline: none; border-bottom-color: var(--gold); background: rgba(255, 255, 255, 0.5); }
#claim-err { flex-basis: 100%; }
.claim-standing { flex-basis: 100%; }
.cta-vaults {
  margin: 20px 0 0;
  font: 500 11px/1 'IBM Plex Mono', monospace; letter-spacing: 0.22em;
  color: var(--ink);
}
.cta-vaults #vault-count { color: var(--gold); font-weight: 700; }
.seal-demo {
  margin: 26px 0 0;
  font: 500 10px/1.8 'IBM Plex Mono', monospace; letter-spacing: 0.18em;
  color: var(--slate);
}
.seal-demo a { color: var(--gold); text-decoration: none; border-bottom: 1px solid rgba(165, 116, 31, 0.4); padding-bottom: 2px; }
.seal-demo a:hover, .seal-demo a:focus-visible { border-color: var(--gold); outline: none; }
@media (max-width: 640px) {
  .seal-head { margin-top: 11vh; }
  .seal-act { margin-bottom: 5vh; }
  .seal-tag b { display: none; }
  #claim-form { flex-direction: column; align-items: stretch; }
  /* column axis: kill the 260px flex-basis or the field grows 260px TALL */
  #seal input#claim-email { flex: 0 0 auto; max-width: none; }
  .seal-demo { margin-top: 20px; }
}

/* ---------------- the door v5 (2026-09-11) — the jury cut: two acts, one pulse ---------------- */
#door { padding-bottom: 20vh; }

/* act one — the veil quiets the world while the threat speaks alone */
.door-veil {
  position: absolute; inset: 0; pointer-events: none;
  background: rgba(244, 241, 233, 0.6);
  backdrop-filter: saturate(0.55);
  -webkit-backdrop-filter: saturate(0.55);
  animation: door-veil 3.6s ease forwards;
}
@keyframes door-veil { 0%, 78% { opacity: 1; } 100% { opacity: 0; } }
body.infilm .door-veil, body.autoplaying .door-veil, #door.ghost .door-veil { opacity: 0 !important; }

/* zone 1 — the mark */
.door-mast {
  position: absolute; top: 4.5vh; left: 50%; transform: translateX(-50%);
  font-family: 'Cinzel', serif; font-weight: 700;
  font-size: clamp(14px, 1.1vw, 17px); letter-spacing: 0.42em; text-indent: 0.42em;
  color: var(--ink);
  opacity: calc(1 - var(--dz, 0) * 2.2);
  animation: door-rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.15s backwards;
}
.door-mast span {
  display: inline-block; color: var(--gold);
  font-size: 0.5em; letter-spacing: 0.05em; line-height: 1;
  padding: 2px 2px 1px 3px; margin-left: 4px;
  border: 1px solid var(--gold); border-radius: 1px;
  vertical-align: 0.9em;
}
.hud-mark span {
  display: inline-block; color: var(--gold);
  font-size: 0.72em; letter-spacing: 0.05em; line-height: 1;
  padding: 1px 1px 1px 2px; margin-left: 3px;
  border: 1px solid var(--gold); border-radius: 1px;
  vertical-align: 0.34em;
}

/* zone 2 — the threat types alone, the pending act holds the frame open */
.door-threat {
  position: relative; margin: 0 0 clamp(10px, 1.6vh, 16px);
  font-size: min(clamp(13px, 1.15vw, 18px), calc(var(--corridor, 700px) / 44));
  font-family: 'IBM Plex Mono', monospace; font-weight: 600; line-height: 1;
  letter-spacing: 0.3em; color: var(--ink);
  opacity: calc(1 - var(--dz, 0) * 2.2);
}
.door-threat span {
  display: inline-block; overflow: hidden; white-space: nowrap;
  vertical-align: bottom; max-width: 100%;
  animation: door-type 2s steps(44, end) 0.45s backwards;
}
.door-threat::after {
  content: ''; display: inline-block; width: 10px; height: 1em;
  margin-left: 4px; vertical-align: bottom;
  background: var(--gold);
  animation: door-caret 0.85s step-end 0.45s 4 backwards;
  opacity: 0;
}
@keyframes door-type { from { max-width: 0; } to { max-width: 100%; } }
@keyframes door-caret { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes door-dots { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
/* the docket — a frost-glass slip in the film's own card grammar, light world */
.door-slip {
  position: absolute; left: 50%; top: var(--slipy, 64%);
  transform: translate(-50%, -50%) translateY(10px);
  width: min(480px, 86vw);
  padding: 18px 24px 16px;
  border: 1px solid rgba(165, 116, 31, 0.5);
  border-radius: 12px;
  background: linear-gradient(170deg, rgba(250, 247, 240, 0.6), rgba(244, 241, 233, 0.42));
  backdrop-filter: blur(7px) saturate(1.15);
  -webkit-backdrop-filter: blur(7px) saturate(1.15);
  box-shadow: inset 0 1px 0 rgba(255, 253, 246, 0.8), 0 8px 40px rgba(120, 100, 60, 0.12);
  text-align: left;
  opacity: 0; visibility: hidden;
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.door-slip.in { opacity: calc(1 - var(--dz, 0) * 2.2); visibility: visible; transform: translate(-50%, -50%); }
.door-slip i {
  display: block; font-style: normal;
  font: 600 9.5px/1 'IBM Plex Mono', monospace;
  letter-spacing: 0.26em; color: var(--gold);
  margin-bottom: 10px;
}
.door-slip b {
  display: block;
  font-family: 'Cinzel', serif; font-weight: 700;
  font-size: clamp(14px, 1.35vw, 19px); letter-spacing: 0.05em;
  color: var(--ink);
  margin-bottom: 12px;
}
.door-slip.refused b { text-decoration: line-through; text-decoration-color: rgba(122, 134, 154, 0.75); text-decoration-thickness: 1px; }
.door-slip em {
  display: block; font-style: normal;
  font: 600 10.5px/1.5 'IBM Plex Mono', monospace;
  letter-spacing: 0.18em; color: var(--slate);
  border-top: 1px solid rgba(60, 55, 45, 0.14);
  padding-top: 10px; min-height: 16px;
}
.door-slip em span { opacity: 0; display: inline-block; transform: translateY(4px); transition: opacity 0.3s ease, transform 0.3s ease; }
.door-slip.verdict em span { opacity: 1; transform: none; }
.door-slip.sealed em span { color: var(--gold); }
.door-slip.refused em span { color: #7a8698; }
/* while the pulse approves, the world answers louder */
#door.approving .life-print { animation: door-print-big 1.9s ease-in-out infinite; }
@keyframes door-print-big { 0%, 45%, 100% { opacity: 0.4; } 66% { opacity: 0.95; } }

/* act two — the vow rises once the threat has weight */
.door-vow {
  position: relative; margin: 0;
  font-family: 'Cinzel', serif; font-weight: 800;
  color: var(--ink);
  text-shadow: 0 2px 26px rgba(246, 240, 224, 0.85);
  opacity: calc(1 - var(--dz, 0) * 1.6);
  transform: translateY(calc(var(--dz, 0) * -34px));
  animation: door-rise 1s cubic-bezier(0.16, 1, 0.3, 1) 3.5s backwards;
}
.door-vow .vow-l1 {
  display: block;
  font-size: min(clamp(18px, 1.7vw, 27px), calc(var(--corridor, 650px) / 24));
  letter-spacing: calc(0.14em + var(--dz, 0) * 0.08em);
  color: var(--ink2, var(--ink));
}
.door-vow .vow-beat {
  display: block; margin-top: 6px;
  font-size: min(clamp(30px, 3.6vw, 58px), calc(var(--corridor, 650px) / 11.5));
  letter-spacing: calc(0.03em + var(--dz, 0) * 0.08em);
  line-height: 1.12;
}
.door-vow .vow-beat b {
  font-weight: 800;
  color: #a8321e;
  text-shadow: 0 0 26px rgba(255, 96, 58, 0.35), 0 2px 26px rgba(246, 240, 224, 0.85);
  animation: vow-beat-glow 1.9s ease-out infinite;
}
@keyframes vow-beat-glow {
  0%, 42%, 100% { text-shadow: 0 0 22px rgba(255, 96, 58, 0.28), 0 2px 26px rgba(246, 240, 224, 0.85); }
  8%, 26% { text-shadow: 0 0 40px rgba(255, 96, 58, 0.6), 0 2px 26px rgba(246, 240, 224, 0.85); }
}
.door-vow em { display: block; margin-top: 16px; font-style: normal; font-size: min(clamp(13px, 1.25vw, 20px), calc(var(--corridor, 650px) / 33)); letter-spacing: 0.18em; color: var(--gold); }
@keyframes door-rise { from { opacity: 0; transform: translateY(16px); } }

/* zone 3 — the pair named from the margins; the twin answers late */
.door-tag {
  position: absolute; white-space: nowrap;
  opacity: calc(1 - var(--dz, 0) * 2.2);
}
.door-tag.tag-you { left: 4%; top: calc(var(--chy, 16.5vh) - 52px); text-align: left; animation: door-fade 1.1s ease-out 3.8s backwards; }
.door-tag.tag-twin { right: 4%; top: calc(var(--ghy, 14.5vh) - 52px); text-align: right; animation: door-fade 1.1s ease-out 5.8s backwards; }
@keyframes door-fade { from { opacity: 0; } }
.door-tag i {
  display: block; font: 700 12px/1 'IBM Plex Mono', monospace;
  font-style: normal; letter-spacing: 0.26em; color: var(--ink);
}
.door-tag b { display: block; margin-top: 7px; font: 500 9.5px/1.4 'IBM Plex Mono', monospace; letter-spacing: 0.18em; color: var(--slate); }
.door-tag.tag-twin i { color: var(--gold); }
.door-tag::after {
  content: ''; position: absolute; top: 5px; width: 34px; height: 1px;
  background: var(--slate); opacity: 0.55;
}
.door-tag.lead-left::after { right: calc(100% + 10px); }
.door-tag.lead-right::after { left: calc(100% + 10px); }
.door-tag.tag-twin::after { background: var(--gold); opacity: 0.7; }

/* zone 4 — the act on the snow */
.door-act {
  position: absolute; left: 50%; bottom: 5.5vh; transform: translateX(-50%);
  width: min(640px, 92vw); text-align: center;
  animation: door-rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) 4.1s backwards;
}
#door .door-act .door-thesis { position: relative; margin: 0 auto 16px; max-width: min(46em, calc(var(--corridor, 640px) + 120px)); }
.door-act .door-sub {
  display: block; margin-top: 13px;
  font: 500 11px/1 'IBM Plex Mono', monospace;
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--slate);
}
#door .door-act #door-play {
  position: relative; border: 1px solid var(--gold);
  background: rgba(252, 248, 238, 0.88);
  animation: door-beckon 1.9s ease-in-out 1.25s infinite;
}
#door .door-act #door-play::before {
  content: ''; position: absolute; left: 14px; top: 50%; margin-top: -3px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold);
  animation: door-dots 1.9s ease-out 1.25s infinite;
}
@keyframes door-beckon {
  0%, 55%, 100% { box-shadow: 0 0 0 rgba(165, 116, 31, 0); }
  70% { box-shadow: 0 6px 30px rgba(165, 116, 31, 0.28); }
}
.door-scrollcue {
  margin-top: 14px;
  font: 500 10px/1 'IBM Plex Mono', monospace;
  letter-spacing: 0.32em; color: var(--slate);
  animation: door-dots 1.9s ease-in-out 4.6s infinite backwards;
}

/* the chain of command — heart commands, the seam carries, the print obeys */
.door-life {
  position: absolute; pointer-events: none; mix-blend-mode: screen;
  opacity: calc(1 - var(--dz, 0) * 2.2);
}
.life-heart {
  left: calc(var(--hx, 22.9vw) - 85px); top: calc(var(--hy, 28vh) - 85px); width: 170px; height: 170px;
  background: radial-gradient(circle, rgba(255, 96, 58, 0.55), rgba(255, 96, 58, 0) 62%);
  animation: door-heart 1.9s ease-out infinite;
}
@keyframes door-heart {
  0%, 42%, 100% { transform: scale(1); opacity: 0.45; }
  5%  { transform: scale(1.3); opacity: 1; }
  14% { transform: scale(1.05); opacity: 0.6; }
  23% { transform: scale(1.36); opacity: 0.9; }
}
/* the binding — a drawn thread of light from the heart to the twin's chest */
.door-thread {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none;
  opacity: calc(1 - var(--dz, 0) * 2.2);
}
.door-thread path {
  fill: none; stroke: rgba(150, 100, 26, 0.75); stroke-width: 1.8;
  filter: drop-shadow(0 0 6px rgba(232, 176, 64, 0.8));
  stroke-dashoffset: 0;
  animation: thread-draw 1.6s cubic-bezier(0.4, 0, 0.2, 1) 3.9s backwards;
}
@keyframes thread-draw { from { stroke-dashoffset: var(--tlen, 900); } }
.door-bead {
  position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 220, 140, 0.95), rgba(232, 176, 64, 0.5) 45%, rgba(232, 176, 64, 0) 70%);
  offset-rotate: 0deg;
  animation: bead-run 1.9s cubic-bezier(0.45, 0, 0.55, 1) 5.6s infinite backwards;
  opacity: 0;
}
@keyframes bead-run {
  0%, 7% { offset-distance: 0%; opacity: 0; transform: scale(1); }
  12% { opacity: 1; }
  55% { offset-distance: 100%; opacity: 0.9; transform: scale(1); }
  62% { offset-distance: 100%; opacity: 0; transform: scale(2.2); }
  100% { offset-distance: 100%; opacity: 0; }
}
#door.approving .door-bead { animation-duration: 1.4s; }
/* the sun breathes with the heart */
.door-sunlife {
  left: calc(var(--sunx, 50vw) - min(24vw, 420px)); top: calc(var(--suny, 60vh) - min(18vw, 320px));
  width: min(48vw, 840px); height: min(36vw, 640px);
  background: radial-gradient(ellipse 50% 44% at 50% 52%, rgba(255, 214, 120, 0.34), rgba(255, 214, 120, 0) 68%);
  animation: sun-breathe 1.9s ease-in-out infinite;
}
@keyframes sun-breathe { 0%, 45%, 100% { opacity: 0.5; } 12%, 24% { opacity: 0.95; } }
/* living snow — slow motes drifting through the light */
.door-snow {
  position: absolute; left: 8%; top: -4%; width: 3px; height: 3px;
  border-radius: 50%; pointer-events: none; mix-blend-mode: screen;
  background: transparent;
  box-shadow:
    12vw 14vh 0 0 rgba(255,252,244,0.75), 31vw 32vh 1px 0 rgba(255,250,238,0.55),
    54vw 11vh 0 0 rgba(255,252,244,0.6), 72vw 41vh 1px 0 rgba(255,250,238,0.5),
    22vw 61vh 0 0 rgba(255,252,244,0.55), 44vw 76vh 1px 0 rgba(255,250,238,0.45),
    64vw 66vh 0 1px rgba(255,252,244,0.6), 84vw 23vh 0 0 rgba(255,250,238,0.5),
    6vw 44vh 1px 0 rgba(255,252,244,0.5), 90vw 72vh 0 0 rgba(255,250,238,0.55);
  animation: snow-drift 34s linear infinite;
  opacity: calc(0.9 - var(--dz, 0) * 2.2);
}
.door-snow.snow-b {
  left: 3%;
  box-shadow:
    17vw 24vh 1px 0 rgba(255,252,244,0.5), 38vw 8vh 0 0 rgba(255,250,238,0.45),
    58vw 30vh 1px 0 rgba(255,252,244,0.5), 78vw 56vh 0 0 rgba(255,250,238,0.4),
    27vw 84vh 0 0 rgba(255,252,244,0.45), 49vw 51vh 0 1px rgba(255,250,238,0.5),
    69vw 87vh 1px 0 rgba(255,252,244,0.4), 88vw 12vh 0 0 rgba(255,250,238,0.45);
  animation-duration: 46s; animation-delay: -18s;
}
@keyframes snow-drift {
  from { transform: translate3d(0, -6vh, 0); }
  to { transform: translate3d(2.5vw, 106vh, 0); }
}
.life-print {
  left: calc(var(--px, 78vw) - min(13vw, 240px)); top: calc(var(--py, 85vh) - min(4.5vw, 85px));
  width: min(26vw, 480px); height: min(9vw, 170px);
  background: radial-gradient(ellipse 50% 46% at 50% 50%, rgba(232, 176, 64, 0.45), rgba(232, 176, 64, 0) 68%);
  animation: door-print 1.9s ease-in-out infinite;
}
@keyframes door-print { 0%, 50%, 100% { opacity: 0.28; } 68% { opacity: 0.7; } }

@media (max-width: 720px) {
  .door-tag, .door-life, .door-thread, .door-bead, .door-snow { display: none; }
  .door-threat span, .door-pending span { white-space: normal; animation: none; max-width: none; }
  .door-threat::after { display: none; }
  #door { padding-bottom: 26vh; }
}
@media (prefers-reduced-motion: reduce) {
  .door-veil, .door-bead, .door-snow { display: none; }
  .door-mast, .door-threat span, .door-threat::after,
  .door-vow, .door-vow .vow-beat b, .door-act, #door .door-act #door-play, #door .door-act #door-play::before,
  .door-scrollcue, .door-tag, .door-life, .door-thread path { animation: none; }
  .door-threat span { max-width: none; }
  .life-heart { opacity: 0.4; }
  .life-print { opacity: 0.35; }
  .door-sunlife { opacity: 0.4; }
}
