/* ============================================================
   CAST IRON — ExileCraft landing mock
   Every value below is the app's own token set, extracted from
   desktop/production-shell/ui-next-flow/forge/ (Cast Iron theme).
   One hue, five pressures. Hairlines, never drop shadows on
   surfaces; black-only depth reserved for the app frame.
   ============================================================ */

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../assets/fonts/cormorant-garamond.woff2') format('woff2');
}

:root {
  /* ground ladder */
  --void: #0A0908;
  --shell: #100E0D;
  --surf: #161412;
  --raise: #1E1B18;
  --raise-hi: #272320;

  /* hairlines */
  --line: #221F1C;
  --line-hi: #2E2A26;

  /* ink ladder */
  --ink: #EDE5D4;
  --ink-2: #D1C5A8;
  --ink-3: #A89F8F;
  --ink-4: #7E766B;
  --faint: #4A423A;

  /* the heat ladder — one hue, five pressures */
  --idle: #150A04;
  --wake: #6E2410;
  --armed: #A83415;
  --fire: #E2481A;
  --flash: #FF8A45;
  --core: #FFD9A8;
  --on-fire: #1A0B04;
  --gold: #D4AF37;

  /* heat-wave crest + settle (forge-motion.css) */
  --crest: #FFF6D8;
  --crest-glow: rgba(242, 209, 139, .80);
  --crest-glow-2: rgba(205, 150, 64, .45);
  --settle: #DDCDA8;

  /* type */
  --ui: "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: Consolas, "Cascadia Mono", "Courier New", monospace;
  --serif: "Cormorant Garamond", Constantia, Georgia, serif;

  /* motion */
  --t1: 120ms;
  --t2: 200ms;
  --t3: 320ms;
  --ease: cubic-bezier(.2, 0, 0, 1);
  --cast-ease: cubic-bezier(.16, 1, .3, 1);

  /* space — 4px base, one beat for sections */
  --beat: 96px;

  /* the page heat index, driven by scroll. 0 = IDLE, 1 = FLASH */
  --heat: 0;
}

/* ---------- base ---------- */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font: 400 16px/1.6 var(--ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--wake); color: var(--core); }

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: .18em;
}

.dim { color: var(--ink-4); }
.faint { color: var(--faint); }
.gold { color: var(--gold); }

/* focus — the armed edge, everywhere */
:focus-visible {
  outline: 1px solid var(--armed);
  outline-offset: 3px;
  border-radius: 2px;
}

/* skip link */
.skip {
  position: fixed;
  top: 8px; left: 8px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--raise);
  color: var(--ink-2);
  font-size: 10px;
  text-decoration: none;
  border: 1px solid var(--line-hi);
  border-radius: 3px;
  transform: translateY(-56px);
  transition: transform var(--t2) var(--ease);
}
.skip:focus-visible { transform: translateY(0); }

/* ---------- atmosphere layers ---------- */

#embers {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

/* room lighting: three stacked radials over the flat ground,
   warmth rising with the scroll heat index */
.roomlight {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 108%, rgba(226, 72, 26, calc(.04 + var(--heat) * .10)), transparent 62%),
    radial-gradient(90% 60% at 50% 118%, rgba(255, 138, 69, calc(.02 + var(--heat) * .07)), transparent 55%),
    radial-gradient(140% 120% at 50% -20%, rgba(10, 9, 8, .8), transparent 60%);
}

/* tiling noise, 3% — the forge's own grain, now living:
   the sheet is 108% of the viewport so the ±3% steps(1) jitter
   never shows an edge */
.grain {
  position: fixed;
  inset: -4%;
  z-index: 60;
  pointer-events: none;
  opacity: .03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-live .5s steps(1) infinite;
}
@keyframes grain-live {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-2%, 3%); }
  40%  { transform: translate(3%, -2%); }
  60%  { transform: translate(-3%, -3%); }
  80%  { transform: translate(2%, 2%); }
  100% { transform: translate(0, 0); }
}

/* the pulse layer: click stoke rings and gate embers paint here,
   above the ember field (2), below main content */
#pulse {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

/* pointer heat — a soft glow that trails the cursor and
   brightens over anything marked [data-hot] */
#pointer-heat {
  position: fixed;
  top: 0; left: 0;
  z-index: 3;
  width: 340px; height: 340px;
  margin: -170px 0 0 -170px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle, rgba(110, 36, 16, .28), rgba(110, 36, 16, .10) 42%, transparent 68%);
  transition: opacity var(--t3) var(--ease);
  will-change: transform;
}
#pointer-heat.is-live { opacity: 1; }
#pointer-heat.is-hot {
  background: radial-gradient(circle, rgba(226, 72, 26, .24), rgba(168, 52, 21, .10) 44%, transparent 68%);
}

/* ---------- chrome ---------- */

.chrome {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 28px 26px;
  font-size: 10px;
  color: var(--ink-3);
  /* scrolled content passes under here — blur it, never let it argue with the nav */
  background: linear-gradient(180deg, rgba(10, 9, 8, .93) 62%, rgba(10, 9, 8, 0));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  -webkit-mask-image: linear-gradient(180deg, #000 68%, transparent);
  mask-image: linear-gradient(180deg, #000 68%, transparent);
}
.chrome-right { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }

/* the lamp dot — core center, fire mid, armed rim */
.lamp-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, var(--core), var(--fire) 58%, var(--armed));
  box-shadow: 0 0 10px rgba(226, 72, 26, .55);
}

/* ---------- layout zones ---------- */

main { position: relative; z-index: 4; }

.zone {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: var(--beat) 48px;
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.zone-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 64px;
  font-size: 10px;
  color: var(--ink-4);
}
.zone-head .idx { color: var(--fire); }
.zone-head .state { color: var(--ink-3); }
.headline-rule {
  flex: 1;
  height: 1px;
  background: var(--line);
  transform: translateY(-3px);
}

/* ---------- type tiers: giant serif, micro mono, one body ---------- */

.display {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(52px, 8.6vw, 124px);
  line-height: 1.02;
  letter-spacing: -.018em;
  color: var(--ink);
}
.display-line { display: block; }

.h2 {
  margin: 0 0 24px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(34px, 4.4vw, 60px);
  line-height: 1.08;
  letter-spacing: -.012em;
  color: var(--ink);
}

.body {
  margin: 0;
  max-width: 62ch;
  color: var(--ink-3);
  font-size: 16px;
  line-height: 1.6;
}

.eyebrow {
  margin: 0 0 28px;
  font-size: 10px;
  color: var(--ink-4);
}

/* offsets — the editorial tension: text never sits dead center */
.offset-left  { margin-left: clamp(0px, 8vw, 160px); margin-bottom: 56px; }
.offset-right { margin-left: clamp(0px, 30vw, 480px); margin-bottom: 56px; }

/* ---------- hero ---------- */

.zone-hero {
  min-height: 100vh;
  justify-content: flex-end;
  padding-bottom: 40px;
}
.hero-inner { margin-bottom: auto; margin-top: auto; }

.lede {
  margin: 32px 0 0;
  max-width: 54ch;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2);
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 48px;
  flex-wrap: wrap;
}

/* the ignite line: heat gradient ink, then the letter-heat wave */
.ignite {
  background: linear-gradient(92deg, var(--fire) 8%, var(--flash) 48%, var(--core) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* per-character heat wave — 3.1s period, crest at 7%, settle by 24% */
@keyframes letter-heat {
  0%, 100% { color: var(--flash); text-shadow: none; }
  7%       { color: var(--crest); text-shadow: 0 0 18px var(--crest-glow), 0 0 52px var(--crest-glow-2); }
  24%      { color: var(--settle); text-shadow: 0 0 18px rgba(242, 209, 139, .22); }
}
.ignite .ch {
  color: var(--flash); /* base under the wave — never the transparent parent ink */
  background: none;
  -webkit-text-fill-color: currentColor;
  animation: letter-heat 3.1s var(--ease) infinite;
}

/* ---------- buttons ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  font: 500 11px/1 var(--mono);
  letter-spacing: .2em;
  text-decoration: none;
  border-radius: 5px;
  border: 1px solid transparent;
  cursor: pointer;
  overflow: hidden;
  transition: background var(--t2) var(--ease), color var(--t2) var(--ease),
              border-color var(--t2) var(--ease), transform var(--t1) var(--ease);
}
.btn:active { transform: translateY(1px); }

/* heat rising from below — the forge's hover */
.btn::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 0;
  background: linear-gradient(0deg, var(--wake), transparent);
  opacity: .9;
  transition: height var(--t3) var(--ease);
  pointer-events: none;
}
.btn:hover::after, .btn:focus-visible::after { height: 100%; }

.btn-primary {
  background: var(--fire);
  color: var(--on-fire);
}
.btn-primary:hover, .btn-primary:focus-visible {
  background: var(--flash);
  box-shadow: 0 0 30px rgba(226, 72, 26, .5); /* planted CTA heat bloom - replaces magnetic drift (2026-08-28) */
}
.btn-primary::after { mix-blend-mode: soft-light; }

.btn-ghost {
  background: transparent;
  color: var(--ink-2);
  border-color: var(--line-hi);
}
.btn-ghost:hover { color: var(--core); border-color: var(--armed); }

/* ---------- hero seam + heat ladder ---------- */

.seam-wrap { margin-top: 72px; }

.stoke-hint {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  font-size: 9.5px;
  /* the instruction rides the heat: ink-3 (≥4.5:1 on void at IDLE) → flash at FLASH */
  color: color-mix(in srgb, var(--flash) calc(var(--heat) * 100%), var(--ink-3));
}
.stoke-tick {
  width: 1px; height: 18px;
  background: linear-gradient(180deg, var(--fire), transparent);
  animation: stoke 2.2s var(--ease) infinite;
}
@keyframes stoke {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 0; }
  30%  { opacity: 1; }
  60%  { transform: scaleY(1); transform-origin: top; }
  61%  { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

.ladder-track {
  position: relative;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--idle), var(--wake) 28%, var(--armed) 52%, var(--fire) 76%, var(--flash));
  /* the seam brightens as the page heats */
  filter: brightness(calc(.45 + var(--heat) * .75));
  box-shadow: 0 0 calc(4px + var(--heat) * 18px) rgba(226, 72, 26, calc(.18 + var(--heat) * .4));
  transition: filter var(--t3) var(--ease), box-shadow var(--t3) var(--ease);
}

.ladder-marker {
  position: absolute;
  top: -4px; left: 0;
  width: 2px; height: 10px;
  background: var(--core);
  border-radius: 1px;
  box-shadow: 0 0 8px var(--crest-glow);
  transform: translateX(calc(var(--heat) * 100 * 1%)) translateX(-1px);
  transition: transform var(--t2) var(--ease);
}
/* translateX % is relative to the marker's own 2px width — use left instead */
.ladder-marker { transform: none; left: calc(var(--heat) * 100% - var(--heat) * 2px); }

.ladder-stops {
  display: flex;
  margin-top: 14px;
}
.stop {
  flex: 1;
  position: relative;
  padding: 10px 0 2px;
  background: none;
  border: 0;
  border-radius: 2px;
  font-size: 9.5px;
  letter-spacing: .2em;
  color: var(--ink-4);
  cursor: pointer;
  text-align: left;
  transition: color var(--t2) var(--ease);
}
.stop + .stop { margin-left: 8px; }
.stop::before {
  content: "";
  position: absolute;
  left: 0; right: 8px; bottom: 100%;
  height: 0;
  background: linear-gradient(0deg, var(--wake), transparent);
  opacity: 0;
  transition: height var(--t3) var(--ease), opacity var(--t3) var(--ease);
  pointer-events: none;
}
.stop:hover, .stop:focus-visible { color: var(--flash); }
.stop:hover::before, .stop:focus-visible::before { height: 34px; opacity: 1; }
.stop.is-lit { color: var(--core); }

/* ---------- artifacts (code-drawn mocks) ---------- */

.artifact {
  position: relative;
  margin: 0;
  max-width: 720px;
  background: var(--surf);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.offset-left + .artifact { margin-left: clamp(0px, 16vw, 280px); }
.offset-right + .artifact,
.offset-right + .calls { margin-left: clamp(0px, 8vw, 120px); }

.artifact-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  font-size: 9.5px;
  color: var(--ink-4);
  border-bottom: 1px solid var(--line);
  background: var(--shell);
}

.item-paste {
  margin: 0;
  padding: 22px 24px 26px;
  font-size: 12.5px;
  line-height: 1.75;
  letter-spacing: .04em;
  color: var(--ink-2);
  white-space: pre-wrap;
}
.heat-line { color: var(--fire); }

/* the read sweep — one bright line, top to bottom, on cast-in */
.scanline {
  position: absolute;
  left: 0; right: 0; top: 38px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--core) 30%, var(--flash) 60%, transparent);
  box-shadow: 0 0 14px var(--crest-glow);
  opacity: 0;
  pointer-events: none;
}
.in .scanline { animation: scan 900ms var(--ease) 240ms 1; }
@keyframes scan {
  0%   { top: 38px; opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { top: calc(100% - 2px); opacity: 0; }
}

/* ---------- the six calls ---------- */

.calls {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 860px;
  border-top: 1px solid var(--line);
}
.call {
  position: relative;
  display: grid;
  grid-template-columns: 48px 190px 1fr;
  align-items: baseline;
  gap: 20px;
  padding: 22px 12px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  transition: background var(--t2) var(--ease);
}
.call::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 0;
  background: linear-gradient(0deg, color-mix(in srgb, var(--call) 26%, transparent), transparent);
  transition: height var(--t3) var(--ease);
  pointer-events: none;
}
.call:hover::after, .call:focus-within::after { height: 100%; }
.call:hover { background: var(--shell); }

.call-idx { font-size: 10px; color: var(--faint); }
.call-word {
  font-size: 12px;
  letter-spacing: .22em;
  color: var(--call);
  text-shadow: 0 0 14px color-mix(in srgb, var(--call) 30%, transparent);
}
.call-note {
  font-size: 14px;
  color: var(--ink-3);
}

/* ---------- the proof ---------- */

.dist-mock { max-width: 780px; }

.dist-svg { display: block; width: 100%; height: auto; padding: 8px 12px 0; }
.dist-tick line { stroke: var(--t); stroke-width: 1; stroke-dasharray: 2 3; opacity: .8; }
.dist-tick text {
  fill: var(--t);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-anchor: middle;
  font-variant-numeric: tabular-nums;
}
.dist-mid line { stroke-dasharray: none; }

.routes { border-top: 1px solid var(--line); }
.route {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 15px 18px;
  font-size: 10.5px;
  letter-spacing: .1em;
  color: var(--ink-3);
  border-bottom: 1px solid var(--line);
  transition: background var(--t2) var(--ease), color var(--t2) var(--ease);
}
.route:hover { background: var(--raise); color: var(--ink-2); }
.route-nums { color: var(--ink-2); white-space: nowrap; }
.route:hover .route-nums { color: var(--flash); }

.artifact-foot {
  padding: 12px 18px;
  margin: 0;
  font-size: 9px;
  background: var(--shell);
}

/* ---------- the gate ---------- */

.zone-gate { align-items: flex-start; }
.gate-stage { max-width: 760px; }
.gate-title { margin-bottom: 24px; }
.gate-copy { margin-bottom: 48px; }

.btn-gate {
  padding: 20px 44px 22px;
  background: var(--raise);
  color: var(--ink);
  border: 1px solid var(--line-hi);
  border-radius: 5px;
  font-size: 13px;
}
.btn-gate::after { height: 0; }
.btn-gate:hover, .btn-gate:focus-visible {
  border-color: var(--fire); color: var(--core);
  box-shadow: 0 0 34px rgba(226, 72, 26, .45); /* planted CTA heat bloom - replaces magnetic drift (2026-08-28) */
}
.btn-gate:hover::after { height: 100%; }

.btn-gate-seam {
  position: absolute;
  left: 10px; right: 10px; bottom: 8px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--wake), var(--fire));
  background-size: 220% 100%;
  animation: bank 7s linear infinite;
}
@keyframes bank {
  from { background-position: 0% 0; }
  to   { background-position: 220% 0; }
}

/* igniting — the busy sweep, 900ms, then the frame casts in */
.btn-gate.is-igniting {
  pointer-events: none;
  color: var(--on-fire);
  background: var(--fire);
}
.btn-gate.is-igniting .btn-gate-seam {
  background: linear-gradient(90deg, transparent, var(--core), transparent);
  background-size: 40% 100%;
  animation: sweep 900ms cubic-bezier(.4, 0, .4, 1) infinite;
}
@keyframes sweep {
  from { background-position: -40% 0; }
  to   { background-position: 140% 0; }
}
.btn-gate.is-open {
  pointer-events: none;
  background: var(--surf);
  color: var(--ink-4);
  border-color: var(--line);
}
.btn-gate.is-open .btn-gate-seam {
  background: linear-gradient(90deg, var(--fire), var(--flash), var(--core));
  animation: none;
}

.gate-note { margin-top: 18px; font-size: 9px; }

/* the flash wash when the gate opens */
.flashwash {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(80% 60% at 50% 62%, rgba(255, 217, 168, .55), rgba(226, 72, 26, .22) 48%, transparent 76%);
}
.flashwash.is-live { animation: flashwash 900ms var(--ease) 1; }
@keyframes flashwash {
  0% { opacity: 0; }
  28% { opacity: 1; }
  100% { opacity: 0; }
}

/* ---------- the mock app frame ---------- */

.app-frame {
  margin-top: 72px;
  max-width: 980px;
  background: var(--shell);
  border: 1px solid var(--line-hi);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
  visibility: hidden;
  opacity: 0;
  transform: translateY(10px);
  filter: blur(2px);
}
.app-frame.is-in {
  visibility: visible;
  /* the app's own arrival: 520ms cast */
  animation: cast 520ms var(--cast-ease) forwards;
}
@keyframes cast {
  from { opacity: 0; transform: translateY(10px); filter: blur(2px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}

.af-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--shell);
  border-bottom: 1px solid var(--line);
  font-size: 10px;
}
.af-title { color: var(--ink-2); }
.af-mode { margin-left: auto; }
.af-tag {
  padding: 3px 7px;
  font-size: 8.5px;
  color: var(--flash);
  border: 1px solid var(--armed);
  border-radius: 2px;
}
.af-close {
  padding: 4px 8px;
  font-size: 9px;
  letter-spacing: .18em;
  color: var(--ink-4);
  background: none;
  border: 1px solid var(--line);
  border-radius: 3px;
  cursor: pointer;
  transition: color var(--t2) var(--ease), border-color var(--t2) var(--ease);
}
.af-close:hover { color: var(--core); border-color: var(--armed); }

.af-body { display: flex; min-height: 380px; }

.af-rail {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 18px 0;
  width: 132px;
  border-right: 1px solid var(--line);
  font-size: 9px;
}
.af-room {
  position: relative;
  padding: 8px 16px;
  color: var(--ink-4);
}
.af-room.is-here { color: var(--core); }
.af-room.is-here::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 2px; height: 14px;
  transform: translateY(-50%);
  border-radius: 1px;
  background: radial-gradient(circle at 50% 38%, var(--core), var(--fire) 58%, var(--armed));
}

.af-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 40px 32px;
  background:
    radial-gradient(90% 70% at 50% 110%, rgba(226, 72, 26, .06), transparent 60%),
    var(--void);
}
.af-heading {
  margin: 0;
  font: 500 30px/1.05 var(--serif);
  letter-spacing: .004em;
  color: var(--ink);
}
.af-sub { margin: 0; font-size: 9.5px; }

.af-field {
  width: min(460px, 100%);
  padding: 16px 18px;
  margin-top: 8px;
  background: var(--surf);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .5);
  cursor: text;
  transition: border-color var(--t2) var(--ease);
}
.af-field:hover, .af-field:focus-visible { border-color: var(--armed); }
.af-placeholder { font-size: 9.5px; }

.af-seam {
  width: min(460px, 100%);
  height: 2px;
  margin-top: 6px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--wake), var(--fire));
  background-size: 220% 100%;
  animation: bank 7s linear infinite;
}
.af-foot { margin: 0; font-size: 8.5px; }

/* ---------- colophon ---------- */

.colophon { position: relative; z-index: 4; margin-top: 48px; }
.colophon-ramp {
  height: 2px;
  background: linear-gradient(90deg, var(--idle), var(--wake) 28%, var(--armed) 52%, var(--fire) 76%, var(--flash));
  filter: brightness(.8);
}
.colophon-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 26px 48px 34px;
  font-size: 9px;
  color: var(--ink-4);
  background: var(--shell);
}

/* ---------- split-character entrance: masked char rises ---------- */
/* word > ch-mask > ch. Each char rides inside its own overflow:clip mask
   and rises 112% -> 0, stagger 14ms per char, 500ms on the locked entrance
   curve with the token's 2px blur. The mask owns the hidden state, so
   opacity never dips — a char is either masked or landed. Once the whole
   line lands, .settled lifts the masks so the letter-heat glow can bloom
   past the char boxes. */

/* words wrap whole; chars animate inside the word */
.split .word, .display-line .word { display: inline-block; white-space: nowrap; }

.ch-mask {
  display: inline-block;
  overflow: clip;
  /* descender channel: padding opens the clip box below the baseline while
     the matching negative margin keeps the line box metric-identical;
     the rise starts at 112%, so 0.122em of travel still hides the char */
  padding-bottom: .10em;
  margin-bottom: -.10em;
}

.split .ch, .display-line .ch {
  display: inline-block;
  opacity: 1;                    /* the mask hides; opacity stays whole */
  transform: translateY(112%);
  filter: blur(2px);
}
.split.in .ch, .display-line.in .ch {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
  transition: transform 500ms var(--cast-ease), filter 500ms var(--cast-ease);
  transition-delay: var(--d, 0ms);
}
.split.settled .ch-mask, .display-line.settled .ch-mask { overflow: visible; }

/* once revealed, the wave takes over the ignite line's color */
.display-line.ignite.in .ch { animation: letter-heat 3.1s var(--ease) infinite; animation-delay: var(--w, 0ms); }

[data-cast] {
  opacity: 0;
  transform: translateY(10px);
  filter: blur(2px);
}
[data-cast].in {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
  transition: opacity 520ms var(--cast-ease), transform 520ms var(--cast-ease), filter 520ms var(--cast-ease);
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .zone { padding: calc(var(--beat) * .75) 32px; min-height: auto; }
  .zone-hero { min-height: 100vh; }
  .offset-left, .offset-right { margin-left: 0; }
  .offset-left + .artifact, .offset-right + .artifact, .offset-right + .calls { margin-left: 0; }
  .call { grid-template-columns: 34px 150px 1fr; gap: 14px; padding: 18px 8px; }
  /* two-row chrome ≈124px tall: deepen the solid field and the mask
     so scrolled content never prints through the nav rows */
  .chrome {
    padding: 14px 20px 36px;
    background: linear-gradient(180deg, rgba(10, 9, 8, .93) 74%, rgba(10, 9, 8, 0));
    -webkit-mask-image: linear-gradient(180deg, #000 78%, transparent);
    mask-image: linear-gradient(180deg, #000 78%, transparent);
  }
}

@media (max-width: 560px) {
  body { font-size: 15px; }
  .zone { padding: 64px 20px; }
  /* two-row chrome measures 161px with five nav links (DISPATCHES added) -
     heroes must start below it, not under it */
  .zone-hero, .page-hero { padding-top: 188px; }
  .zone-head { margin-bottom: 40px; gap: 12px; }
  .display { font-size: clamp(44px, 13.5vw, 64px); }
  .lede { font-size: 16px; }
  .hero-cta { gap: 12px; }
  .btn { padding: 13px 18px; font-size: 10px; }
  .call { grid-template-columns: 1fr; gap: 6px; }
  .call-idx { display: none; }
  .route { flex-direction: column; gap: 4px; }
  .af-rail { display: none; }
  .chrome-left { max-width: 60vw; }
  .colophon-row { padding: 22px 20px 28px; }
  .stop { letter-spacing: .08em; font-size: 8.5px; }
}

/* ---------- reduced motion: every moving thing answers ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .split .ch, .display-line .ch, [data-cast] {
    opacity: 1;
    transform: none;
    filter: none;
  }
  .ch-mask { overflow: visible; }
  .grain { animation: none; }
  .ignite .ch { animation: none; color: var(--flash); }
  .stoke-tick { animation: none; opacity: 1; }
  #pointer-heat { display: none; }
  .btn-gate-seam, .af-seam { animation: none; }
}

/* ============================================================
   INNER PAGES — shared chrome nav, page heroes, specimens.
   Same tokens, same heat, same discipline.
   ============================================================ */

/* ---------- chrome nav ---------- */

.chrome-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 26px;
}
.chrome-nav a {
  position: relative;
  font-size: 9.5px;
  letter-spacing: .2em;
  color: var(--ink-4);
  text-decoration: none;
  padding: 4px 2px;
  transition: color var(--t2) var(--ease);
}
.chrome-nav a:hover { color: var(--core); }
.chrome-nav a.is-here { color: var(--ink-2); }
.chrome-nav a.is-here::before {
  content: "";
  position: absolute;
  left: 50%; top: -9px;
  width: 5px; height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, var(--core), var(--fire) 58%, var(--armed));
}
.chrome a.wordmark { color: var(--ink-2); text-decoration: none; }
.chrome a.wordmark:hover { color: var(--core); }

/* ---------- page hero (inner pages) ---------- */

.page-hero {
  padding-top: calc(var(--beat) * 1.9);
  min-height: 62vh;
  justify-content: flex-end;
}
.page-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(44px, 6.4vw, 96px);
  line-height: 1.02;
  letter-spacing: -.016em;
  color: var(--ink);
}
.page-lede {
  margin: 28px 0 0;
  max-width: 56ch;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2);
}

/* inner zones are shorter than the landing's full-screen movements */
.zone.zone-tight { min-height: 0; padding-top: 64px; padding-bottom: 64px; }
.zone-tight .zone-head { margin-bottom: 40px; }

/* ---------- house rules (method) ---------- */

.rules {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 860px;
  border-top: 1px solid var(--line);
}
.rule {
  position: relative;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding: 24px 12px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.rule::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 0;
  background: linear-gradient(0deg, var(--wake), transparent);
  opacity: .55;
  transition: height var(--t3) var(--ease);
  pointer-events: none;
}
.rule:hover::after { height: 100%; }
.rule-name {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.15;
  color: var(--ink);
}
.rule-note { font-size: 14.5px; line-height: 1.6; color: var(--ink-3); max-width: 58ch; }

/* ---------- room rows (rooms page) ---------- */

.rooms { border-top: 1px solid var(--line); }
.room {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 34px 12px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.room::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 0;
  background: linear-gradient(0deg, rgba(110, 36, 16, .5), transparent);
  transition: height var(--t3) var(--ease);
  pointer-events: none;
}
.room:hover::after, .room:focus-within::after { height: 100%; }
.room-idx { font-size: 10px; color: var(--faint); align-self: start; padding-top: 10px; }
.room-name {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 30px;
  line-height: 1.1;
  color: var(--ink);
  transition: color var(--t2) var(--ease);
}
.room:hover .room-name { color: var(--core); }
.room-quote {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 16.5px;
  line-height: 1.35;
  color: var(--ink-2);
}
.room-quote::before { content: "\201C"; color: var(--fire); }
.room-quote::after { content: "\201D"; color: var(--fire); }
.room-purpose { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--ink-3); max-width: 52ch; }

/* specimens: small code-drawn evidence, one per room */
.specimen {
  justify-self: end;
  width: 100%;
  max-width: 340px;
  background: var(--surf);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 14px 16px;
  font-size: 9px;
  color: var(--ink-4);
}
.specimen .spec-tag { display: block; margin-bottom: 10px; letter-spacing: .18em; }
.spec-seam { height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--wake), var(--fire)); background-size: 220% 100%; animation: bank 7s linear infinite; }
.spec-row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.spec-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; }
.spec-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.spec-chip {
  padding: 4px 8px;
  border: 1px solid var(--line-hi);
  border-radius: 2px;
  letter-spacing: .16em;
  color: var(--ink-3);
}
.spec-bar { height: 8px; border-radius: 1px; background: var(--raise); position: relative; overflow: hidden; margin: 5px 0; }
.spec-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 1px; background: linear-gradient(90deg, var(--armed), var(--fire)); }

/* strictness ramp: seven stops from soft to uber-plus */
.spec-ramp { display: flex; height: 10px; border-radius: 2px; overflow: hidden; }
.spec-ramp b { flex: 1; }
.spec-ramp b:nth-child(1) { background: #272320; }
.spec-ramp b:nth-child(2) { background: #3A2210; }
.spec-ramp b:nth-child(3) { background: #6E2410; }
.spec-ramp b:nth-child(4) { background: #8A2C12; }
.spec-ramp b:nth-child(5) { background: #A83415; }
.spec-ramp b:nth-child(6) { background: #E2481A; }
.spec-ramp b:nth-child(7) { background: #FF8A45; }

/* killfloor loot inks — the game's own filter palette */
.spec-loot { display: flex; gap: 7px; align-items: center; }
.spec-loot .spec-dot:nth-child(1) { background: #FF4B4B; }
.spec-loot .spec-dot:nth-child(2) { background: #5BE26B; }
.spec-loot .spec-dot:nth-child(3) { background: #5B8CFF; }
.spec-loot .spec-dot:nth-child(4) { background: #B0774A; }
.spec-loot .spec-dot:nth-child(5) { background: #FFF4E2; }
.spec-loot .spec-dot:nth-child(6) { background: #FFD84B; }
.spec-loot .spec-dot:nth-child(7) { background: #4BE0E8; }
.spec-loot .spec-dot:nth-child(8) { background: #B6B2AA; }
.spec-loot .spec-dot:nth-child(9) { background: #FF8A3D; }
.spec-loot .spec-dot:nth-child(10) { background: #FF7BC8; }
.spec-loot .spec-dot:nth-child(11) { background: #B478FF; }

/* ---------- proof page: the interactive distribution ---------- */

.dist-live { cursor: crosshair; }
.dist-live .dist-cursor { opacity: 0; transition: opacity var(--t2) var(--ease); }
.dist-live:hover .dist-cursor, .dist-live.is-touched .dist-cursor { opacity: 1; }
.dist-cursor line { stroke: var(--core); stroke-width: 1; }
.dist-cursor circle { fill: var(--core); }
.dist-readout {
  display: flex;
  gap: 40px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  font-size: 10.5px;
  letter-spacing: .12em;
  color: var(--ink-3);
}
.dist-readout b { color: var(--flash); font-weight: 500; }

/* outcome split bars */
.split-bars { border-top: 1px solid var(--line); }
.split-row {
  display: grid;
  grid-template-columns: 170px 1fr 74px;
  gap: 18px;
  align-items: center;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 10.5px;
  letter-spacing: .12em;
  color: var(--ink-3);
}
.split-row .spec-bar { margin: 0; }
.split-row b { color: var(--ink-2); font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- mock frame self-demo ---------- */

.af-field .af-caret {
  display: inline-block;
  width: 7px; height: 12px;
  margin-left: 2px;
  vertical-align: -2px;
  background: var(--flash);
  animation: caret 1s steps(2) infinite;
}
@keyframes caret { 50% { opacity: 0; } }
.af-verdict {
  display: none;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border: 1px solid var(--line-hi);
  border-radius: 3px;
  background: var(--raise);
}
.af-verdict.is-shown { display: inline-flex; animation: cast 520ms var(--cast-ease); }
.af-verdict .vword { font-size: 11px; letter-spacing: .22em; color: var(--call, #6FC2B2); }
.af-verdict .vgloss { font-size: 9px; letter-spacing: .14em; color: var(--ink-4); }

/* seam memory: the track remembers the highest heat reached */
.ladder-track { position: relative; }
.ladder-memory {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--heat) * 100%);
  border-radius: 2px;
  background: linear-gradient(90deg, var(--wake), var(--armed) 55%, var(--fire));
  opacity: .5;
  pointer-events: none;
}

/* ---------- inner-page responsive ---------- */

@media (max-width: 900px) {
  .chrome-nav { position: static; transform: none; gap: 16px; order: 3; flex-basis: 100%; justify-content: flex-start; padding-top: 10px; }
  .chrome { flex-wrap: wrap; }
  .room { grid-template-columns: 34px 1fr; }
  .room .specimen { grid-column: 2; justify-self: start; }
  .rule { grid-template-columns: 1fr; gap: 8px; }
  .split-row { grid-template-columns: 120px 1fr 60px; }
  .dist-readout { gap: 20px; flex-wrap: wrap; }
}

@media (max-width: 560px) {
  .page-hero { min-height: 0; padding-bottom: 56px; }
  .split-row { grid-template-columns: 1fr; gap: 6px; }
  .split-row b { text-align: left; }
}

/* colophon nav links */
.colophon-nav { color: var(--ink-4); }
.colophon-nav a {
  color: var(--ink-4);
  text-decoration: none;
  transition: color var(--t2) var(--ease);
}
.colophon-nav a:hover { color: var(--core); }

/* mobile chrome: the active-page lamp sits beside the link, not above it;
   the descriptor drops so the bar stays one clean row */
@media (max-width: 900px) {
  .chrome-nav a.is-here::before {
    position: static;
    display: inline-block;
    width: 5px; height: 5px;
    margin: 0 7px 1px 0;
    vertical-align: middle;
  }
}
@media (max-width: 560px) {
  .chrome-sep, .chrome-left .wordmark + .chrome-sep { display: none; }
  .chrome-left { font-size: 9px; max-width: none; }
  .chrome-left { visibility: hidden; }
  .chrome-left .wordmark { visibility: visible; }
}

/* ============================================================
   MERGED FROM THE SWARM'S PROVEN VARIANTS (round 3).
   Magnetic buttons + FLASH peak + gate furniture (seam),
   hero metadata strip + back-to-top (gallery), stoke-hint
   legibility (gate), and the cross-cutting fixes the critics
   found. No token is redefined.
   ============================================================ */

/* ---------- magnetic .btn-primary / .btn-gate ----------
   --mag is pointer proximity 0..1 inside a 140px radius measured from the
   button's EDGE, written by JS every frame; transform is fully JS-owned
   (lerp .2 pull, spring 120/14 release), so the stylesheet drops transform
   from its transitions and lets color answer the approach. data-magnetic
   is only set when (hover:hover) and (pointer:fine) and motion is full. */
[data-magnetic] {
  --mag: 0;
  transition: background var(--t2) var(--ease), color var(--t2) var(--ease),
              border-color var(--t2) var(--ease), box-shadow var(--t2) var(--ease);
}

.btn-primary[data-magnetic] {
  background: color-mix(in srgb, var(--fire), var(--flash) calc(var(--mag) * 100%));
  box-shadow: 0 0 calc(var(--mag) * 30px) rgba(226, 72, 26, calc(var(--mag) * .5));
}

.btn-gate { transition: background var(--t2) var(--ease), color var(--t2) var(--ease),
              border-color var(--t2) var(--ease), transform var(--t1) var(--ease),
              box-shadow var(--t3) var(--ease); }

/* CRITICAL: every gate-magnetic rule is scoped :not(.is-igniting):not(.is-open)
   so the ignite fire background lands untouched */
.btn-gate[data-magnetic]:not(.is-igniting):not(.is-open) {
  background: color-mix(in srgb, var(--raise), var(--wake) calc(var(--mag) * 55%));
  border-color: color-mix(in srgb, var(--line-hi), var(--fire) calc(var(--mag) * 100%));
  box-shadow: 0 0 calc(var(--mag) * 34px) rgba(226, 72, 26, calc(var(--mag) * .45));
}
.btn-gate[data-magnetic]:not(.is-igniting):not(.is-open):hover {
  border-color: color-mix(in srgb, var(--fire), var(--flash) calc(var(--mag) * 60%));
}
/* the gate's seam quickens its bank as the pointer closes in */
.btn-gate[data-magnetic]:not(.is-igniting):not(.is-open) .btn-gate-seam {
  filter: brightness(calc(1 + var(--mag) * .8));
}

/* while igniting or open the magnet lets go — the door owns itself */
.btn-gate.is-igniting, .btn-gate.is-open { transform: none !important; box-shadow: none; }

/* the FLASH zone at rest (page heat ≥ 0.78, hysteresis 0.70): the gate runs
   at wake-45% pressure with an armed border and glow before it's touched.
   --mag falls back to 0 so the peak state shows on coarse pointers too */
.zone-gate.is-peak .btn-gate:not(.is-igniting):not(.is-open) {
  background: color-mix(in srgb, var(--raise), var(--wake) calc(45% + var(--mag, 0) * 55%));
  border-color: color-mix(in srgb, var(--armed), var(--fire) calc(var(--mag, 0) * 100%));
  box-shadow: 0 0 calc(14px + var(--mag, 0) * 34px) rgba(226, 72, 26, calc(.24 + var(--mag, 0) * .4));
}

/* mono furniture strip near the gate */
.gate-meta {
  margin: 26px 0 0;
  font-size: 9.5px;
}

/* ---------- hero metadata strip (index) ---------- */
/* mono 9.5px hairline row under the hero CTAs; honest values only */
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  margin: 40px 0 0;
  padding: 0;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 9.5px;
  color: var(--ink-4);
}
.hero-meta span {
  flex: 1 1 auto;
  padding: 12px 20px;
  background: var(--void);
}
.hero-meta b {
  margin-left: 12px;
  font-weight: 500;
  color: var(--ink-2);
}
@media (max-width: 900px) {
  .hero-meta span { padding: 11px 14px; }
}

/* ---------- back to top (all four pages) ---------- */
.to-top {
  position: relative;
  padding: 9px 14px;
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1;
  letter-spacing: .18em;
  color: var(--ink-3);
  background: none;
  border: 1px solid var(--line-hi);
  border-radius: 3px;
  cursor: pointer;
  overflow: hidden;
  transition: color var(--t2) var(--ease), border-color var(--t2) var(--ease);
}
.to-top::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 0;
  background: linear-gradient(0deg, var(--wake), transparent);
  opacity: .9;
  transition: height var(--t3) var(--ease);
  pointer-events: none;
}
.to-top:hover, .to-top:focus-visible { color: var(--core); border-color: var(--armed); }
.to-top:hover::after, .to-top:focus-visible::after { height: 100%; }

/* ---------- cross-cutting fixes ---------- */

/* the caret's [hidden] must beat the base display rule */
.af-field .af-caret[hidden] { display: none; }

/* anchor jumps and the gate-open scroll park clear of the fixed chrome */
.zone { scroll-margin-top: 96px; }
.app-frame { scroll-margin-top: 96px; }
@media (max-width: 900px) {
  .zone { scroll-margin-top: 200px; }
  .app-frame { scroll-margin-top: 200px; }
}


/* ============================================================
   DISPATCHES (blog index) — extends the zone system, no new hue
   ============================================================ */
.dispatch { border-top: 1px solid var(--line); }
.dispatch:last-child { border-bottom: 1px solid var(--line); }
.dispatch-link {
  display: block;
  padding: 34px 0 38px;
  text-decoration: none;
  color: inherit;
}
.dispatch-meta { font-size: 11px; letter-spacing: .14em; color: var(--ink-4); }
.dispatch-title { margin: 12px 0 14px; transition: color var(--t2) var(--ease); }
.dispatch-link:hover .dispatch-title,
.dispatch-link:focus-visible .dispatch-title { color: var(--core); }
.dispatch-standfirst { max-width: 62ch; }
.dispatch-status { font-size: 11px; letter-spacing: .12em; }
.dispatch-link[aria-disabled="true"] { cursor: default; }
@media (prefers-reduced-motion: reduce) {
  .dispatch-title { transition: none; }
}
