/* ============================================================
   Optilic landing — design system
   warm = in the room · cool = the record
   ============================================================ */

:root {
  /* The page is a deliberately light, paper-grounded design. Declaring
     "only light" stops Android's forced auto-darkening from half-inverting
     it into unreadable text; the browser chrome still follows the OS via
     the dark theme-color meta. */
  color-scheme: only light;
  --room-a: #E8853A;
  --room-b: #F2B441;
  --record-a: #1B2430;
  --record-b: #38506B;
  --record-mid: #58749B;
  --record-soft: #7FA8CC;
  --paper: #F7F4EF;
  --paper-lift: #FCFAF6;
  --boundary: #0C1116;      /* the line itself — used nowhere else */
  --signal: #4FD1C5;        /* reserved: signed / approved state only */
  --ink: #1B2430;
  --ink-dim: rgba(27, 36, 48, 0.55);
  --ink-faint: rgba(27, 36, 48, 0.24);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, 'Courier New', monospace;
}

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

html { scroll-behavior: auto; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.18;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

a { color: inherit; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

::selection { background: rgba(232, 133, 58, 0.25); }

/* ============ scroll rig ============ */

.pin-wrap { position: relative; }
.pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh; /* mobile: track the real visible viewport as toolbars collapse */
  overflow: hidden;
}

.scene { position: relative; }

.scene-title {
  text-transform: lowercase;
  color: var(--ink-dim);
  letter-spacing: 0.14em;
  margin-bottom: 1.6rem;
}

/* ============ 00 · preloader ============ */

#preloader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--paper);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.7s var(--ease);
}
#preloader.done { opacity: 0; pointer-events: none; }
#preloader-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.preloader-meta {
  position: absolute; bottom: 12vh; left: 0; right: 0;
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
}
#preloader-count { font-size: 0.9rem; color: var(--ink); }
.preloader-line { color: var(--ink-dim); }

/* ============ persistent UI ============ */

#wordmark {
  position: fixed; top: 1.6rem; left: 1.8rem; z-index: 90;
  font-size: 0.85rem; letter-spacing: 0.18em;
  color: var(--ink);
  mix-blend-mode: multiply;
  display: flex; align-items: center; gap: 0.6rem;
}
#wordmark svg {
  width: 15px; height: 15px; display: block;
  /* the mark's own seam reads as the boundary — never recolour its halves */
  flex: none;
}

#site-nav {
  position: fixed; top: 1.6rem; right: 2.4rem; z-index: 90;
  display: flex; gap: 1.4rem;
  mix-blend-mode: multiply;
}
#site-nav a {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em;
  color: var(--ink-dim); text-decoration: none;
  border-bottom: 1px solid transparent; padding-bottom: 2px;
  transition: color 0.25s, border-color 0.25s;
}
#site-nav a:hover, #site-nav a[aria-current="page"] {
  color: var(--ink); border-bottom-color: var(--ink-dim);
}
@media (max-width: 560px) { #site-nav { gap: 0.9rem; right: 1.2rem; } }

#progress-rail {
  position: fixed; top: 0; right: 0; bottom: 0; width: 2px;
  background: rgba(27, 36, 48, 0.08); z-index: 90;
}
#progress-fill {
  width: 100%; height: 0%;
  background: linear-gradient(var(--room-a), var(--room-b));
  transition: background 0.6s var(--ease);
}
#progress-fill.cool {
  background: linear-gradient(var(--record-a), var(--record-b));
}

#scene-nav {
  position: fixed; right: 1.4rem; top: 50%; transform: translateY(-50%);
  z-index: 90; display: flex; flex-direction: column; gap: 0.7rem;
}
#scene-nav a {
  display: block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--ink-faint);
  position: relative;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}
#scene-nav a.on { background: var(--ink); transform: scale(1.35); }
#scene-nav a .lbl {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.06em;
  color: var(--ink-dim); white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s var(--ease);
}
#scene-nav:hover a .lbl, #scene-nav a:focus-visible .lbl { opacity: 1; }
@media (max-width: 760px) { #scene-nav { display: none; } }

#motion-chip {
  position: fixed; left: 1.6rem; bottom: 1.4rem; z-index: 90;
  background: transparent; border: 1px solid var(--ink-faint);
  color: var(--ink-dim); border-radius: 999px;
  padding: 0.35rem 0.85rem; cursor: pointer;
  transition: color 0.3s, border-color 0.3s;
}
#motion-chip:hover { color: var(--ink); border-color: var(--ink-dim); }
#motion-chip[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); }

#cursor {
  position: fixed; z-index: 300; width: 26px; height: 26px;
  border: 1px solid rgba(27, 36, 48, 0.5); border-radius: 50%;
  pointer-events: none; left: 0; top: 0;
  transform: translate(-50%, -50%);
  transition: width 0.25s var(--ease), height 0.25s var(--ease),
              border-color 0.25s, opacity 0.3s;
  opacity: 0;
}
#cursor.seen { opacity: 1; }
#cursor.hot { width: 44px; height: 44px; border-color: var(--ink); }
#cursor.grab { width: 52px; height: 52px; border-style: dashed; }
@media (hover: none), (pointer: coarse) { #cursor { display: none; } }

.link-btn {
  background: none; border: none; cursor: pointer;
  color: var(--ink-dim); text-decoration: underline;
  text-underline-offset: 3px; font-size: inherit;
}
.link-btn:hover { color: var(--ink); }

/* ============ 01 · hero ============ */

#s01 .pin { background: var(--paper); }
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-copy {
  position: absolute; left: 0; right: 0; bottom: 16vh;
  text-align: center; padding: 0 1.5rem;
}
.hero-copy h1 { font-size: clamp(1.5rem, 3.2vw, 2.4rem); }
.hero-copy h1 em { font-style: italic; color: var(--ink-dim); }
.hero-hint {
  margin-top: 2.2rem; color: var(--ink-faint);
  animation: hint-pulse 2.6s var(--ease) infinite;
}
@keyframes hint-pulse {
  0%, 100% { opacity: 0.35; transform: translateY(0); }
  50% { opacity: 0.9; transform: translateY(4px); }
}

/* ============ 02 · descent ============ */

.descent { background: linear-gradient(var(--paper), #EFE9E0); }
.descent-layer { position: absolute; inset: 0; will-change: transform; }
.frag {
  position: absolute; left: var(--x); top: var(--y);
  font-family: var(--font-display); font-style: italic;
  font-size: clamp(1rem, 2.2vw, 1.6rem);
  color: var(--ink); white-space: nowrap;
}
.descent-layer[data-rate="0.35"] .frag { opacity: 0.18; filter: blur(1.5px); font-size: 0.95rem; }
.descent-layer[data-rate="0.6"]  .frag { opacity: 0.3;  filter: blur(0.8px); }
.descent-layer[data-rate="0.95"] .frag { opacity: 0.5; }
.descent-layer[data-rate="1.35"] .frag { opacity: 0.72; }
.descent-layer[data-rate="1.8"]  .frag { opacity: 0.9; font-size: clamp(1.2rem, 2.6vw, 1.9rem); }
.descent-note {
  position: absolute; left: 0; right: 0; bottom: 12vh;
  text-align: center; color: var(--ink-dim);
  opacity: 0; transition: opacity 0.5s var(--ease);
  padding: 0 1.5rem;
}

/* ============ 03 · problem ============ */

#s03 { padding: 22vh 1.5rem; }
.stats { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 5.5rem; }
.stat-number { display: flex; align-items: baseline; }
.stat-value { font-size: clamp(3rem, 7vw, 4.6rem); font-weight: 500; letter-spacing: -0.02em; }
.stat-suffix { font-size: clamp(1.4rem, 3vw, 2rem); color: var(--ink-dim); }
.stat-bar {
  height: 2px; background: rgba(27, 36, 48, 0.08);
  margin: 0.9rem 0 1.1rem;
}
.stat-bar i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--room-a), var(--room-b));
}
.stat-copy { color: var(--ink); max-width: 52ch; }
.cite {
  font-family: var(--font-mono); font-size: 0.68rem;
  color: var(--ink-dim); text-decoration: underline dotted;
  text-underline-offset: 3px; margin-left: 0.4rem;
  vertical-align: super; white-space: nowrap;
}
.cite:hover { color: var(--ink); }

/* ============ 04 · thesis ============ */

.thesis {
  display: flex; align-items: center; justify-content: center;
  padding: 0 clamp(1.5rem, 8vw, 7rem);
  background: var(--paper);
}
.thesis-line {
  font-size: clamp(1.9rem, 4.6vw, 3.6rem);
  max-width: 22ch; text-align: center;
}
.thesis-line .w { display: inline-block; position: relative; }
.thesis-line .w .ghost { opacity: 0.1; }
.thesis-line .w .ink {
  position: absolute; left: 0; top: 0;
  clip-path: inset(0 100% 0 0);
}
.thesis-line .w.warm .ink {
  background: linear-gradient(100deg, var(--room-a), var(--room-b));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* ============ 05 · consultation ============ */

#s05 { padding: 20vh 1.5rem; }
.consult { max-width: 860px; margin: 0 auto; }
.consult-intro { max-width: 56ch; color: var(--ink); margin-bottom: 3rem; }
.consult-stage { position: relative; height: 300px; }
#consult-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#consult-frags { position: absolute; inset: 0; overflow: hidden; }
#consult-frags .cfrag {
  position: absolute; font-family: var(--font-display); font-style: italic;
  font-size: clamp(0.95rem, 1.8vw, 1.25rem); color: var(--ink);
  white-space: nowrap; will-change: transform, opacity;
}
.consult-timeline {
  display: flex; align-items: center; gap: 1rem; margin-top: 1.6rem;
}
.consult-timeline label { color: var(--ink-dim); }
#consult-scrub {
  flex: 1; appearance: none; height: 2px;
  background: rgba(27, 36, 48, 0.15); outline-offset: 6px; cursor: pointer;
}
#consult-scrub::-webkit-slider-thumb {
  appearance: none; width: 14px; height: 14px; border-radius: 50%;
  background: var(--room-a); border: none; cursor: grab;
}
#consult-scrub::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--room-a); border: none; cursor: grab;
}
#consult-time { color: var(--ink-dim); min-width: 3ch; }

.mic-block {
  margin-top: 4.5rem; border: 1px solid var(--ink-faint);
  border-radius: 6px; padding: 1.4rem 1.6rem;
}
#mic-btn {
  background: none; border: 1px solid var(--ink);
  border-radius: 999px; padding: 0.55rem 1.1rem;
  cursor: pointer; color: var(--ink); font-size: 0.8rem;
  transition: background 0.3s, color 0.3s;
}
#mic-btn:hover { background: var(--ink); color: var(--paper); }
.mic-sub { color: inherit; opacity: 0.65; }
#mic-indicator { margin-left: 1rem; color: var(--room-a); }
.mic-payoff {
  margin-top: 1.1rem; font-family: var(--font-display); font-style: italic;
  font-size: 1.15rem;
}
.mic-fineprint { margin-top: 0.9rem; font-size: 0.78rem; color: var(--ink-dim); max-width: 60ch; }

/* ============ 07 · the boundary ============ */

.boundary-stage { background: var(--paper); }
/* pan-y, not none: a full-viewport pinned canvas with touch-action none
   traps vertical scrolling on touch devices */
#boundary-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; }
.boundary-labels {
  position: absolute; top: 3.2rem; left: 0; right: 0;
  display: flex; justify-content: space-between;
  padding: 0 8vw; color: var(--ink-dim); letter-spacing: 0.22em;
}
.boundary-drag-hint {
  position: absolute; bottom: 3rem; left: 0; right: 0; text-align: center;
  color: var(--ink-faint); opacity: 0; transition: opacity 0.6s var(--ease);
}
.boundary-drag-hint.show { opacity: 1; }
.boundary-caption {
  position: absolute; top: 7rem; left: 0; right: 0; text-align: center;
  color: var(--record-a); letter-spacing: 0.08em;
}
.boundary-payoff {
  position: absolute; left: 0; right: 0; bottom: 14vh; text-align: center;
  font-size: clamp(1.5rem, 3.4vw, 2.6rem);
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  padding: 0 1.5rem;
}
.boundary-payoff.show { opacity: 1; transform: translateY(0); }
#s07.cold .boundary-stage { background: #E8EBEE; }
.boundary-static { display: none; }

/* ============ 08 · transcript river ============ */

#s08 { padding: 22vh 1.5rem; background: linear-gradient(#EFE9E0 0%, var(--paper) 18%); }
.river { max-width: 720px; margin: 0 auto; }
.river-intro { max-width: 56ch; margin-bottom: 3.5rem; }
#river-lines { display: flex; flex-direction: column; gap: 1.15rem; }
.rline {
  font-size: 0.82rem; line-height: 1.75; color: var(--ink-dim);
  padding-left: 7.5ch; text-indent: -7.5ch;
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.rline.seen { opacity: 1; transform: none; }
.rline:hover { color: var(--ink); }
.rline .spk { color: var(--record-mid); user-select: none; }
.rline mark {
  background: none; color: inherit; border-bottom: 1px solid var(--record-mid);
  padding-bottom: 1px; cursor: help;
}
.rline mark.tooth {
  color: var(--record-a); font-weight: 500;
  background: rgba(56, 80, 107, 0.1); border-bottom-color: var(--record-a);
  padding: 0 3px; border-radius: 2px;
}
.rline:hover mark { color: var(--record-a); }
#river-tip {
  position: fixed; z-index: 120; pointer-events: none;
  background: var(--record-a); color: #E9EEF4;
  padding: 0.45rem 0.7rem; border-radius: 4px; font-size: 0.7rem;
  max-width: 300px;
}

/* ============ 09 · the note ============ */

.note-stage {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(1.5rem, 4vw, 4rem); padding: 0 1.5rem;
  background: var(--paper); flex-wrap: wrap;
}
.note-doc {
  width: min(560px, 92vw); background: var(--paper-lift);
  border: 1px solid rgba(27, 36, 48, 0.1); border-radius: 6px;
  padding: 2rem 2.2rem; position: relative;
  box-shadow: 0 18px 50px -28px rgba(12, 17, 22, 0.35);
}
.note-doc::after {
  content: "DRAFT"; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 4.5rem; letter-spacing: 0.35em;
  color: rgba(27, 36, 48, 0.045); transform: rotate(-18deg);
  pointer-events: none;
}
.note-head {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1.6rem;
}
.note-chip {
  border: 1px solid var(--record-mid); color: var(--record-mid);
  border-radius: 3px; padding: 0.12rem 0.5rem; font-size: 0.66rem;
  letter-spacing: 0.16em;
}
.note-meta { color: var(--ink-dim); font-size: 0.66rem; }
.note-sec { display: flex; gap: 1.2rem; margin-bottom: 1.3rem; border-radius: 4px; padding: 0.4rem 0.6rem; }
.note-sec h3 { color: var(--record-mid); font-size: 0.8rem; min-width: 1.2rem; }
.note-sec p { font-size: 0.88rem; }
.note-sec.lit { background: rgba(56, 80, 107, 0.09); }
.odonto-wrap { width: min(360px, 92vw); }
.odonto-title { color: var(--ink-dim); margin-bottom: 1rem; }
#odontogram { display: flex; flex-direction: column; gap: 0.9rem; }
.odonto-row { display: flex; gap: 4px; justify-content: center; }
.odonto-gap { width: 12px; }
.tooth-btn {
  font-family: var(--font-mono); font-size: 0.62rem;
  width: 30px; height: 38px;
  border: 1px solid rgba(27, 36, 48, 0.18); border-radius: 4px 4px 7px 7px;
  background: transparent; color: var(--ink-dim); cursor: pointer;
  transition: all 0.25s var(--ease);
}
.odonto-row.upper .tooth-btn { border-radius: 7px 7px 4px 4px; }
.tooth-btn.ref { border-color: var(--record-a); color: var(--record-a); font-weight: 500; }
.tooth-btn.lit, .tooth-btn:hover { background: rgba(56, 80, 107, 0.12); color: var(--record-a); }
#odonto-detail {
  margin-top: 1.2rem; font-size: 0.7rem; line-height: 1.8;
  color: var(--ink); border-left: 2px solid var(--record-mid);
  padding-left: 0.9rem;
}
#odonto-detail .k { color: var(--record-mid); }

/* ============ 10 · signature ============ */

#s10 {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 14vh 1.5rem; background: linear-gradient(var(--paper), #F1EDE6, var(--paper));
}
.sign-doc {
  width: min(680px, 94vw); background: var(--paper-lift);
  border: 1px solid rgba(27, 36, 48, 0.1); border-radius: 6px;
  padding: 2.4rem 2.6rem;
  transition: box-shadow 0.7s var(--ease), transform 0.7s var(--ease);
}
.sign-doc.signed {
  box-shadow: 0 30px 70px -30px rgba(12, 17, 22, 0.45);
  transform: scale(1.012);
}
.sign-copy { max-width: 54ch; margin-bottom: 2rem; }
.sign-pad-wrap { position: relative; }
#sign-pad {
  width: 100%; height: 180px; display: block;
  cursor: crosshair; touch-action: none;
}
.sign-line {
  position: absolute; left: 8%; right: 8%; bottom: 34px; height: 1px;
  background: var(--ink-dim);
}
#sign-ph {
  position: absolute; left: 0; right: 0; top: 42%;
  text-align: center; color: var(--ink-faint);
  pointer-events: none; letter-spacing: 0.1em;
}
.sign-x {
  position: absolute; left: 8%; bottom: 40px; color: var(--ink-dim);
  font-size: 0.9rem;
}
.sign-actions { display: flex; align-items: center; gap: 1.2rem; margin-top: 1.4rem; flex-wrap: wrap; }
.sign-chip {
  border: 1px solid var(--record-mid); color: var(--record-mid);
  border-radius: 3px; padding: 0.14rem 0.55rem; letter-spacing: 0.16em;
  transition: all 0.4s var(--ease);
}
.sign-chip.signed {
  border-color: var(--signal); color: var(--signal);
  box-shadow: 0 0 0 1px rgba(79, 209, 197, 0.25);
}
#sign-approve {
  background: none; border: 1px solid var(--ink); border-radius: 999px;
  padding: 0.5rem 1.1rem; cursor: pointer; color: var(--ink);
  transition: background 0.3s, color 0.3s;
}
#sign-approve:hover { background: var(--ink); color: var(--paper); }
.sign-hint { margin-top: 1.3rem; color: var(--ink-faint); }

/* ============ 11 · audit trail ============ */

#s11 { padding: 22vh 1.5rem; }
.audit { max-width: 620px; margin: 0 auto; }
.audit-intro { margin-bottom: 3rem; max-width: 50ch; }
.audit-list { list-style: none; border-left: 1px solid rgba(27, 36, 48, 0.18); }
.audit-list li { position: relative; padding: 0 0 1.9rem 1.8rem; }
.audit-list li::before {
  content: ""; position: absolute; left: -4px; top: 7px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--record-mid);
}
.audit-list li.sig::before { background: var(--signal); }
.audit-line { font-size: 0.76rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.audit-line .t { color: var(--ink-dim); }
.audit-line .actor { color: var(--record-mid); }
.audit-detail {
  max-height: 0; overflow: hidden; transition: max-height 0.45s var(--ease);
  font-size: 0.82rem; color: var(--ink-dim); max-width: 48ch;
}
.audit-list li:hover .audit-detail,
.audit-list li:focus-within .audit-detail { max-height: 120px; padding-top: 0.5rem; }
.audit-edit {
  background: none; border: none; cursor: not-allowed;
  font-family: var(--font-mono); font-size: 0.68rem;
  color: var(--ink-faint); text-decoration: underline dotted;
}
li.shake { animation: refuse 0.4s; }
@keyframes refuse {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  55% { transform: translateX(4px); }
  80% { transform: translateX(-2px); }
}
.audit-refusal { margin-top: 1rem; color: var(--record-a); letter-spacing: 0.14em; }

/* ============ 12 · residency ============ */

.residency {
  display: flex; align-items: center; justify-content: center;
  background: var(--paper);
}
.residency-inner {
  display: flex; align-items: center; gap: clamp(1.5rem, 4vw, 4rem);
  padding: 0 1.5rem; flex-wrap: wrap; justify-content: center;
}
#res-map { width: min(560px, 92vw); height: auto; }
#res-map .coast {
  fill: none; stroke: var(--record-mid); stroke-width: 1.2;
  opacity: 0.65;
}
#res-map .arc {
  fill: none; stroke: var(--record-soft); stroke-width: 1;
  stroke-dasharray: 4 5;
}
#res-map .arc-hit { fill: none; stroke: transparent; stroke-width: 22; cursor: help; }
#res-map .city { fill: var(--record-soft); }
#res-map .sydney { fill: var(--record-a); }
#res-map .sydney-halo {
  fill: none; stroke: var(--record-mid); stroke-width: 1; opacity: 0.5;
}
#res-map text {
  font-family: var(--font-mono); font-size: 11px;
  fill: var(--ink-dim); letter-spacing: 0.1em;
}
.res-copy { max-width: 34ch; }
.res-tip { margin-top: 1rem; color: var(--record-mid); min-height: 2.4em; display: block; }

/* ============ 13 · architecture ============ */

#s13 { padding: 20vh 1.5rem; }
.arch { max-width: 980px; margin: 0 auto; }
.arch-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.arch-toggle { display: flex; border: 1px solid var(--ink-faint); border-radius: 999px; overflow: hidden; }
.arch-toggle button {
  background: none; border: none; cursor: pointer;
  font-family: var(--font-mono); font-size: 0.7rem;
  padding: 0.4rem 0.9rem; color: var(--ink-dim);
}
.arch-toggle button.on { background: var(--ink); color: var(--paper); }
.arch-diagram {
  display: flex; align-items: stretch; gap: 0; margin-top: 3rem;
  overflow-x: auto; padding-bottom: 0.8rem;
}
.arch-node {
  flex: 1; min-width: 120px;
  border: 1px solid rgba(27, 36, 48, 0.18); border-radius: 6px;
  background: none; cursor: pointer; padding: 1rem 0.8rem;
  font-family: var(--font-mono); font-size: 0.7rem; line-height: 1.5;
  color: var(--ink); text-align: left;
  transition: all 0.3s var(--ease);
}
.arch-node .nk { display: block; color: var(--ink-dim); font-size: 0.6rem; margin-bottom: 0.4rem; }
.arch-node.warm-side { border-color: rgba(232, 133, 58, 0.55); }
.arch-node.warm-side .nk { color: var(--room-a); }
.arch-node:hover, .arch-node.open { background: rgba(27, 36, 48, 0.05); }
.arch-arrow {
  align-self: center; padding: 0 0.5rem; color: var(--ink-faint);
  font-family: var(--font-mono); user-select: none;
}
.arch-sep {
  width: 2px; background: var(--boundary); margin: -0.4rem 0.7rem;
  position: relative; flex: none;
}
.arch-panel {
  margin-top: 1.6rem; border-left: 2px solid var(--record-mid);
  padding: 0.4rem 0 0.4rem 1.2rem; max-width: 60ch;
}
.arch-panel h3 { font-family: var(--font-mono); font-size: 0.75rem; margin-bottom: 0.4rem; }
.arch-panel p { font-size: 0.9rem; }

/* ============ 14 · close ============ */

.close-stage { background: var(--paper); }
#close-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.close-copy {
  position: absolute; left: 0; right: 0; top: 24vh;
  text-align: center; padding: 0 1.5rem;
}
.close-name { letter-spacing: 0.24em; color: var(--ink-dim); margin-bottom: 1.6rem; }
.close-line { font-size: clamp(1.3rem, 2.8vw, 2rem); max-width: 30ch; margin: 0 auto 2.4rem; }
.close-cta { max-width: 44ch; margin: 0 auto; color: var(--ink); }
.close-cta a { text-underline-offset: 4px; }
.close-footer {
  position: absolute; left: 0; right: 0; bottom: 2rem;
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  font-size: 0.62rem; color: var(--ink-faint); text-align: center;
  padding: 0 1.5rem;
}
.close-footer a { color: inherit; }

/* ============ typed section labels ============ */

[data-typed] .cursor-block { opacity: 0.6; }

/* ============================================================
   STATIC MODE — reduced motion. A composed page, not a broken one.
   ============================================================ */

body.static .pin-wrap { height: auto !important; }
body.static .pin { position: static; height: auto; min-height: 0; overflow: visible; }

body.static #preloader { display: none; }
body.static #cursor { display: none; }
body.static .hero-hint { animation: none; opacity: 0.5; }

body.static #s01 .pin { height: 92vh; position: relative; }
body.static #s02 .pin { padding: 18vh 0; }
body.static .descent-layer { position: relative; inset: auto; }
body.static .frag { position: static; display: inline-block; margin: 0.4rem 1.2rem; filter: none; }
body.static .descent-note { position: static; opacity: 1; margin-top: 3rem; }

body.static .stat-bar i { width: 100% !important; }

body.static .thesis { padding-top: 22vh; padding-bottom: 22vh; }
body.static .thesis-line .w .ghost { opacity: 1; }
body.static .thesis-line .w .ink { display: none; }
body.static .thesis-line .w.warm .ghost {
  background: linear-gradient(100deg, var(--room-a), var(--room-b));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: 1;
}

body.static .consult-stage, body.static .consult-timeline { display: none; }
body.static .mic-block { display: none; }

body.static #boundary-canvas,
body.static .boundary-drag-hint { display: none; }
body.static .boundary-stage { padding: 16vh 1.5rem; }
body.static .boundary-labels { position: static; padding: 0 0 2.5rem; max-width: 900px; margin: 0 auto; }
body.static .boundary-payoff {
  position: static; opacity: 1; transform: none; margin-top: 3.5rem;
}
body.static .boundary-static {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem; max-width: 900px; margin: 0 auto;
}
body.static .bs-panel h3 { color: var(--ink-dim); margin-bottom: 0.7rem; }
body.static .bs-panel p { font-size: 0.9rem; }
body.static .bs-line { border-left: 2px solid var(--boundary); padding-left: 1.5rem; }

body.static .rline { opacity: 1; transform: none; }

body.static .note-stage { padding: 14vh 1.5rem; }
body.static .sign-hint { display: none; }

body.static .residency { padding: 14vh 0; }
body.static #res-map .arc { display: none; }

body.static #close-canvas { display: none; }
body.static .close-stage { height: 90vh; position: relative; }

@media (max-width: 700px) {
  .note-stage { padding-top: 10vh; padding-bottom: 10vh; }
  .boundary-labels { padding: 0 5vw; font-size: 0.62rem; }
  #wordmark { left: 1.2rem; }
  /* 17 tooth cells must fit a phone width */
  .tooth-btn { width: clamp(14px, 4.6vw, 30px); height: 30px; font-size: 0.5rem; padding: 0; }
  .odonto-row { gap: 2px; }
  .odonto-gap { width: 6px; }
  .consult-stage { height: 220px; }
  .boundary-payoff { bottom: 18vh; }
}

/* ============================================================
   Subpages (about / security / contact / 404) — no JS required
   ============================================================ */

.pg-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.6rem clamp(1.5rem, 5vw, 3rem);
  flex-wrap: wrap; gap: 1rem;
}
.pg-brand {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.18em;
  color: var(--ink); text-decoration: none;
}
.pg-brand svg { width: 15px; height: 15px; flex: none; }
.pg-nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.pg-nav a {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em;
  color: var(--ink-dim); text-decoration: none;
  border-bottom: 1px solid transparent; padding-bottom: 2px;
  transition: color 0.25s, border-color 0.25s;
}
.pg-nav a:hover, .pg-nav a[aria-current="page"] {
  color: var(--ink); border-bottom-color: var(--ink-dim);
}

.pg-main {
  max-width: 640px; margin: 0 auto;
  padding: clamp(3rem, 9vh, 7rem) 1.5rem 6rem;
}
.pg-main h1 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.9rem, 4.2vw, 2.9rem); letter-spacing: -0.015em;
  line-height: 1.15; margin-bottom: 2.2rem;
}
.pg-main h2 {
  font-family: var(--font-mono); font-weight: 500; font-size: 0.78rem;
  letter-spacing: 0.14em; text-transform: lowercase; color: var(--ink-dim);
  margin: 3rem 0 1rem;
}
.pg-main p { margin-bottom: 1.1rem; max-width: 58ch; }
.pg-main ul { margin: 0 0 1.1rem 1.2rem; }
.pg-main li { margin-bottom: 0.55rem; max-width: 56ch; }
.pg-main a { text-underline-offset: 3px; }
.pg-lede { font-size: 1.08rem; color: var(--ink); }
.pg-note {
  border-left: 2px solid var(--record-mid); padding: 0.4rem 0 0.4rem 1.2rem;
  color: var(--ink-dim); font-size: 0.92rem; margin: 2rem 0;
}
.pg-cta {
  display: inline-block; margin-top: 1rem;
  font-family: var(--font-mono); font-size: 0.8rem;
  border: 1px solid var(--ink); border-radius: 999px;
  padding: 0.6rem 1.3rem; color: var(--ink); text-decoration: none;
  transition: background 0.3s, color 0.3s;
}
.pg-cta:hover { background: var(--ink); color: var(--paper); }

.pg-footer {
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  padding: 2.5rem 1.5rem 2rem; text-align: center;
  font-family: var(--font-mono); font-size: 0.62rem; color: var(--ink-faint);
}
.pg-footer svg { width: 14px; height: 14px; color: var(--ink-faint); }
.pg-footer a { color: inherit; }
.pg-footer-links { display: flex; gap: 1.1rem; flex-wrap: wrap; justify-content: center; }

.pg-404 {
  min-height: 70vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 0 1.5rem; position: relative;
}
.pg-404-line {
  width: 1px; height: 120px; background: var(--boundary); margin: 2rem 0;
}
