/* Night craft theme (IB-CRAFT-1). Only linked from / and 404.html, so inner paper pages are untouched. */
:root {
  --night: #0b0a0b; --night-2: #141113; --rule: #2a2426;
  --platinum: #e5e4e2; --platinum-dim: #b9b6b3; --muted: #8f8487;
  --burgundy: #722f37; --burgundy-lit: #b04d58; --sodium: #c9a46a;
  --serif: "Instrument Serif", Georgia, serif; --sans: Inter, system-ui, sans-serif;
  /* Fluid scale: three steps only. See TYPE_SPEC.md. */
  --t-line: clamp(44px, 8vw, 128px);
  --t-head: clamp(34px, 4.6vw, 64px);
  --t-body: clamp(16px, 0.35vw + 15px, 19px);
  /* Cinema-slow: long, heavy ease-out. Nothing snaps. */
  --slow: 1.4s; --ease: cubic-bezier(.16, 1, .3, 1);
}
* { box-sizing: border-box; margin: 0; }
html { background: var(--night); color: var(--platinum); }
body { font: 400 var(--t-body)/1.6 var(--sans); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
body::after { /* Atlanta night texture: asphalt grain, faint sodium pools, rain streaks. No text. */
  content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .06; z-index: 40;
  background: url("/textures/atlanta-night.webp") center / cover no-repeat;
}
::selection { background: var(--burgundy); color: var(--platinum); }
:focus-visible { outline: 1px solid var(--platinum); outline-offset: 4px; border-radius: 0; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 max(24px, env(safe-area-inset-left)) env(safe-area-inset-bottom) max(24px, env(safe-area-inset-right)); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: fixed; left: 16px; top: -60px; z-index: 60; background: var(--night-2); padding: 8px 12px; font-size: 14px; }
.skip:focus { top: 16px; }

/* Link language: hairline drawn left to right, offset below the baseline. */
.u { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; padding-bottom: 3px; transition: background-size .9s var(--ease), color .6s; }
.u:hover, .u:focus-visible { background-size: 100% 1px; color: var(--platinum); }
.u.big { font: 400 var(--t-head)/1.1 var(--serif); background-size: 100% 1px; background-color: transparent; }
.u.big:hover { background-image: linear-gradient(var(--burgundy-lit), var(--burgundy-lit)); }

/* Progress: one platinum hairline. */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 1px; z-index: 50; }
.progress i { display: block; height: 100%; background: var(--platinum); transform-origin: 0 50%; transform: scaleX(0); opacity: .7; }

/* Chrome fades in only after the sentence finishes. */
.chrome { position: fixed; top: 0; left: 0; right: 0; z-index: 30; display: flex; justify-content: space-between; align-items: baseline;
  padding: max(20px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) 20px max(24px, env(safe-area-inset-left)); opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease); }
.chrome.on { opacity: 1; transform: none; pointer-events: auto; background: linear-gradient(var(--night), transparent); }
.mark { font: 400 22px var(--serif); }
nav a { font-size: 14px; margin-left: 26px; color: var(--muted); display: inline-flex; align-items: center; min-height: 44px; }

/* THE mechanic. Sticky sentence; scroll = edit progress. The first screen shows only this line. */
.stage { height: 360vh; position: relative; }
.stick { position: sticky; top: 0; height: 100vh; display: grid; align-content: center; }
.line { font: 400 var(--t-line)/1.02 var(--serif); letter-spacing: -.018em; }
.w { display: inline-block; position: relative; transition: color var(--slow) var(--ease), opacity var(--slow) var(--ease), transform var(--slow) var(--ease), filter var(--slow) var(--ease); }
.w.old::after { content: ""; position: absolute; left: -2%; top: 56%; height: .055em; width: calc(104% * var(--cut, 0)); background: var(--burgundy-lit); }
.w.old.gone { opacity: .24; }
.w.new { opacity: 0; transform: translateY(.3em); filter: blur(6px); }
.w.new.in { opacity: 1; transform: none; filter: none; }
.w.opinion { color: var(--burgundy-lit); font-style: italic; }
.w.fact.in { text-decoration: underline 1px; text-underline-offset: .14em; text-decoration-color: rgba(229,228,226,.45); }

/* Below-fold reveals: heavier, slower than V2. */
.reveal { opacity: 0; transform: translateY(48px); transition: opacity 1.8s var(--ease), transform 1.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

.after { padding: 22vh 0 14vh; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; border-top: 1px solid var(--rule); }
.after h2 { font: 400 var(--t-head)/1.05 var(--serif); }
.after em, .belief em { color: var(--burgundy-lit); }
.after p { max-width: 34em; color: var(--platinum-dim); }
.after p + p { margin-top: 1.4em; }
.key { display: flex; gap: 28px; font-size: 14px; color: var(--muted) !important; }
.key i { display: inline-block; width: 10px; height: 10px; margin-right: 8px; }
.key .f i { border: 1px solid var(--platinum); }
.key .o i { background: var(--burgundy); }

/* Belief callout: hairline left, serif, no box, no quotes clip-art. */
.belief { margin: 8vh 0 16vh; padding-left: clamp(20px, 4vw, 56px); border-left: 1px solid var(--burgundy); }
.belief blockquote { font: 400 var(--t-head)/1.12 var(--serif); max-width: 18em; }
.belief figcaption { margin-top: 24px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.next { padding: 0 0 18vh; }
.next p:first-child { color: var(--platinum-dim); margin-bottom: 18px; }

footer { padding: 28px 0 40px; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }

/* Cursor: platinum dot, grows on links. Only on fine pointers; touch keeps native behavior. */
.dot { position: fixed; left: 0; top: 0; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--platinum);
  pointer-events: none; z-index: 70; opacity: 0; mix-blend-mode: difference; transition: width .5s var(--ease), height .5s var(--ease), margin .5s var(--ease), opacity .4s; }
.dot.big { width: 40px; height: 40px; margin: -20px 0 0 -20px; }
@media (hover: hover) and (pointer: fine) {
  html.has-dot, html.has-dot a, html.has-dot button { cursor: none; }
  html.has-dot .dot { opacity: 1; }
}

@media (max-width: 720px) {
  .after { grid-template-columns: 1fr; gap: 24px; }
  .stage { height: 300vh; }
}

/* Reduced motion: no scrub, no reveals, no custom cursor. Finished sentence as a plain page. */
@media (prefers-reduced-motion: reduce) {
  .stage { height: auto; padding: 24vh 0; }
  .stick { position: static; height: auto; }
  .w, .reveal, .chrome, .u, .dot { transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .chrome { opacity: 1; transform: none; pointer-events: auto; position: absolute; }
  .dot { display: none; }
  html.has-dot, html.has-dot a { cursor: auto; }
}

/* Background strip: owner-approved line, below the fold only. */
.strip { padding: 0 0 14vh; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.strip a { color: var(--platinum-dim); }

/* 404 room: quiet, one way out. */
.room { min-height: 100vh; display: grid; align-content: center; gap: 36px; }
.room h1 { font: 400 var(--t-head)/1.1 var(--serif); max-width: 16em; }
.room h1 em { color: var(--burgundy-lit); }
.room p { color: var(--muted); font-size: 14px; }

/* IB-SEO-7 aesthetic pass (local): balanced headings, easier body measure, small text a touch brighter. */
h1, h2, h3, .line { text-wrap: balance; }
p { text-wrap: pretty; }
.after p { line-height: 1.7; max-width: 32em; }
nav a, .key { color: var(--platinum-dim) !important; }

/* Page transitions: 200ms fade between pages (Chromium only). Off for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-group(root) { animation-duration: 200ms; }
}
