/* Presencia — public landing page. "The observatory at first light."
   Palette follows the app (web/src/styles/tokens.css): midnight observatory, champagne gold
   only for the selected moment and the primary action, cyan for the horizon and what is
   measured, violet for interpretation. Everything is self-hosted; this page makes no
   external requests. Motion animates transform and opacity only. */

@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 300; font-display: swap; src: url("fonts/fraunces-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 300; font-display: swap; src: url("fonts/fraunces-latin-300-italic.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/fraunces-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/figtree-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/figtree-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/figtree-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }

:root {
  color-scheme: dark;

  --space: #040711;
  --space-2: #070c1b;
  --glass-solid: #0b1223;
  --glass-raised: #101a31;
  --edge: rgba(150, 178, 222, 0.14);
  --edge-strong: rgba(150, 178, 222, 0.26);
  --highlight: rgba(255, 255, 255, 0.045);

  --text: #eef3fc;
  --text-2: #afbed2;
  --text-3: #8492aa;

  --cyan: #64e8ff;
  --ice: #9fe9f5;
  --violet: #a88bff;
  --gold: #ebc88b;
  --gold-ink: #1b1408;
  --amber: #f0a868;
  --mint: #72f5cf;

  --display: "Fraunces", "Iowan Old Style", "Palatino", Georgia, serif;
  --body: "Figtree", -apple-system, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* type scale */
  --fs-xxl: clamp(3.25rem, 1.5rem + 7.2vw, 8.75rem);
  --fs-xl: clamp(2.5rem, 1.3rem + 4.8vw, 5.75rem);
  --fs-l: clamp(1.75rem, 1.2rem + 2.1vw, 2.9rem);
  --fs-m: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem);

  /* motion */
  --expo: cubic-bezier(0.16, 1, 0.3, 1);
  --press: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease: var(--expo);

  /* grid and rhythm (8 px baseline) */
  --gutter: clamp(20px, 5vw, 64px);
  --maxw: 1320px;
  --col-gap: 24px;
  --header-h: 68px;
  --pad-block: clamp(112px, 14vw, 200px);
  --to-content: 72px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
  overflow-x: clip;
  background: var(--space);
}

body {
  margin: 0;
  min-height: 100vh;
  background: transparent; /* the html background shows, so the fixed nebula can sit between them */
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
@media (max-width: 719px) {
  body { font-size: 1rem; line-height: 1.6; }
  :root { --to-content: 48px; }
}

h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 400; letter-spacing: -0.01em; text-wrap: balance; }
p { margin: 0; }
figure { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: var(--text); }
strong { font-weight: 600; color: var(--text); }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.mono { font-family: var(--mono); font-size: 0.86em; letter-spacing: 0; }
.faint { color: var(--text-3); }
.label, .kicker { font: 400 0.72rem/1.2 var(--mono); letter-spacing: 0.24em; text-transform: uppercase; }
.label { color: var(--text-3); }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 999px;
  background: var(--gold); color: var(--gold-ink); font-weight: 600; text-decoration: none;
  transition: transform 0.2s var(--expo);
}
.skip:focus { transform: translateY(72px); }

.wrap { max-width: var(--maxw); margin: 0 auto; }

/* ---------- Far plane: the nebula, and grain against banding ---------- */

.nebula {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(1100px 560px at 50% -12%, rgba(38, 72, 140, 0.2), transparent 70%),
    linear-gradient(180deg, #050915 0%, var(--space) 46%, #03050c 100%);
}
.neb { position: absolute; inset: 0; opacity: 0; transition: opacity 1.6s var(--expo); }
.n-ice { background: radial-gradient(85% 70% at 50% -10%, rgba(110, 145, 225, 0.55), transparent 70%), radial-gradient(60% 55% at 100% 100%, rgba(159, 233, 245, 0.2), transparent 70%); }
.n-cyan { background: radial-gradient(75% 70% at 100% 10%, rgba(50, 190, 235, 0.46), transparent 70%), radial-gradient(65% 60% at 0% 100%, rgba(40, 140, 170, 0.4), transparent 72%); }
.n-gold { background: radial-gradient(75% 70% at 80% 15%, rgba(225, 175, 105, 0.36), transparent 70%), radial-gradient(60% 60% at 0% 100%, rgba(168, 139, 255, 0.2), transparent 72%); }
.n-violet { background: radial-gradient(75% 70% at 0% 12%, rgba(140, 100, 255, 0.5), transparent 70%), radial-gradient(65% 60% at 100% 100%, rgba(90, 110, 255, 0.28), transparent 72%); }
.nebula[data-tint="ice"] .n-ice,
.nebula[data-tint="cyan"] .n-cyan,
.nebula[data-tint="gold"] .n-gold,
.nebula[data-tint="violet"] .n-violet { opacity: 0.55; }

.grain {
  position: fixed; inset: 0; z-index: 70; pointer-events: none;
  opacity: 0.035;
  background: url("grain.png") repeat;
  background-size: 64px 64px;
}

/* ---------- Buttons ---------- */

.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 24px;
  border-radius: 999px; border: 1px solid transparent;
  font: 500 1rem/1 var(--body); letter-spacing: 0.01em;
  text-decoration: none; white-space: nowrap;
  transition: transform 0.2s var(--press), background-color 0.3s, border-color 0.3s, color 0.3s;
}
.btn svg { flex: none; transition: transform 0.3s var(--expo); }
.btn:hover svg { transform: translate(2px, -2px); }
.btn:active { transform: scale(0.98); transition-duration: 0.12s; }

.btn-gold {
  color: var(--gold-ink);
  background: linear-gradient(180deg, #f5dfb2 0%, #e6bf80 100%);
  box-shadow: 0 0 0 1px rgba(235, 200, 139, 0.55), 0 12px 40px -12px rgba(235, 200, 139, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.btn-gold::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 250, 235, 0.75) 50%, transparent 80%);
  transform: translateX(-120%);
}
.btn-gold:hover { color: var(--gold-ink); transform: translateY(-1px); }
.btn-gold:active { transform: translateY(-1px) scale(0.98); }
@media (hover: hover) {
  .btn-gold:hover::after { transform: translateX(120%); transition: transform 0.7s var(--expo); }
}

.btn-outline { color: var(--gold); border-color: rgba(235, 200, 139, 0.45); background: rgba(235, 200, 139, 0.05); }
.btn-outline:hover { color: var(--gold-ink); background: var(--gold); border-color: var(--gold); }
.btn-ghost { color: var(--text); background: rgba(255, 255, 255, 0.035); border-color: var(--edge-strong); }
.btn-ghost:hover { color: var(--text); background: rgba(255, 255, 255, 0.07); }

.btn-sm { min-height: 40px; padding: 0 16px; font-size: 0.9rem; }
.btn-lg { min-height: 58px; padding: 0 32px; font-size: 1.06rem; }

.text-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 6px;
  color: var(--text-2); text-decoration: none; font-weight: 500;
}
.text-link svg { transition: transform 0.3s var(--expo); }
.text-link:hover { color: var(--text); }
.text-link:hover svg { transform: translateY(2px); }

/* ---------- Header ---------- */

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left));
  display: flex; align-items: center; gap: 28px;
  border-bottom: 1px solid transparent;
  transition: transform 0.32s var(--expo), background-color 0.45s var(--expo), border-color 0.45s var(--expo);
}
.site-header.is-scrolled {
  background: rgba(4, 7, 17, 0.8);
  border-bottom-color: var(--edge);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
}
.site-header.is-hidden { transform: translateY(-100%); }

.wordmark {
  display: inline-flex; align-items: center; gap: 12px;
  font: 400 1rem/1 var(--display); letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--text); text-decoration: none; white-space: nowrap;
}
.wordmark:hover { color: var(--text); }
.wordmark .mark { flex: none; }

.nav { position: relative; margin-left: auto; display: flex; gap: 30px; }
.nav a { color: var(--text-2); text-decoration: none; font-size: 0.92rem; letter-spacing: 0.01em; padding: 8px 0; transition: color 0.3s; }
.nav a:hover, .nav a[aria-current="true"] { color: var(--text); }
.spy {
  position: absolute; left: 0; bottom: -1px; width: 4px; height: 4px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 8px rgba(235, 200, 139, 0.8);
  opacity: 0; transition: transform 0.38s var(--expo), opacity 0.3s;
}
.spy.is-on { opacity: 1; }

.header-cta { flex: none; gap: 0.3em; }

@media (max-width: 880px) {
  .nav { display: none; }
  .header-cta { margin-left: auto; }
}
@media (max-width: 420px) {
  .hide-sm { display: none; }
  .wordmark { letter-spacing: 0.28em; font-size: 0.92rem; }
}

/* ---------- Hero: first light ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: clip;
  isolation: isolate;
  view-timeline: --hero block;
  background:
    radial-gradient(60% 50% at 50% 34%, rgba(46, 78, 160, 0.3), transparent 72%),
    radial-gradient(40% 40% at 82% 22%, rgba(130, 96, 230, 0.16), transparent 70%),
    radial-gradient(38% 36% at 14% 30%, rgba(40, 140, 170, 0.12), transparent 70%),
    linear-gradient(180deg, #03060f 0%, #050a1a 60%, #040711 100%);
}
.hero::after {
  content: "";
  position: absolute; inset: auto 0 0 0; height: 18%;
  z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(4, 7, 17, 0) 0%, rgba(4, 7, 17, 0.6) 65%, var(--space) 100%);
}

.sky, .sky-fallback { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.sky-fallback { display: block; }
.js .sky-fallback { display: none; }

.hero-inner {
  position: relative; z-index: 1;
  width: 100%; max-width: 1180px;
  padding: calc(var(--header-h) + 28px) var(--gutter) clamp(150px, 19vh, 190px);
  text-align: center;
}
.hero-inner::before {
  content: ""; position: absolute; inset: 14% 4% 22% 4%; z-index: -1; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, rgba(3, 6, 15, 0.5), transparent 75%);
}

.status {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px 7px 12px;
  border: 1px solid rgba(235, 200, 139, 0.28); border-radius: 999px;
  background: rgba(8, 12, 26, 0.72);
  font-size: 0.86rem; color: var(--text-2);
}
.status-dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); flex: none; }
.status-dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--amber);
  opacity: 0; animation: ping 3.2s var(--expo) 1.2s infinite;
}

.eyebrow { margin-top: 24px; font: 400 0.76rem/1 var(--mono); letter-spacing: 0.32em; text-transform: uppercase; color: var(--ice); opacity: 0.9; }

.hero-title {
  margin-top: 20px;
  font: 300 min(var(--fs-xxl), 12.6vw, 12.6vh)/0.92 var(--display);
  letter-spacing: -0.035em;
}
.line { display: block; }
.hero-title .line { overflow: clip; padding: 0.06em 0.1em 0.14em; margin: -0.06em -0.1em -0.14em; }
.line-in { display: inline-block; text-shadow: 0 2px 40px rgba(3, 6, 15, 0.8); }
.gold-words {
  position: relative; display: inline-block;
  font-style: italic; font-weight: 300;
  color: var(--gold);
  background: linear-gradient(100deg, #f7e2b8 10%, #ebc88b 45%, #d9a765 90%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-right: 0.06em;
  text-shadow: none;
}
.sheen {
  position: absolute; inset: 0; overflow: clip; pointer-events: none;
  transform: translateX(-101%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 42%, #000 58%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 42%, #000 58%, transparent 100%);
}
.sheen-in {
  position: absolute; left: 0; top: 0; white-space: nowrap;
  transform: translateX(101%);
  background: linear-gradient(100deg, #fff6e0 20%, #ebc88b 90%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lede {
  max-width: 30em; margin: 24px auto 0;
  font-size: clamp(1.05rem, 0.98rem + 0.25vw, 1.15rem); line-height: 1.6;
  color: var(--text-2); text-wrap: balance;
  text-shadow: 0 1px 20px rgba(3, 6, 15, 0.9);
}

.hero-actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: center; align-items: center; }
.hero-note { margin-top: 12px; font-size: 0.84rem; color: var(--text-3); }

.scroll-cue {
  position: absolute; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); z-index: 2;
  margin-left: -40px; width: 80px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: var(--text-3); text-decoration: none;
  font: 400 0.68rem/1 var(--mono); letter-spacing: 0.3em; text-transform: uppercase;
  transition: opacity 0.5s var(--expo);
}
.scroll-cue i { display: block; width: 1px; height: 38px; background: linear-gradient(180deg, rgba(235, 200, 139, 0), rgba(235, 200, 139, 0.8)); transform-origin: top; animation: drip 2.8s var(--expo) infinite; }
.scroll-cue:hover { color: var(--text); }
.past-top .scroll-cue { opacity: 0; pointer-events: none; }
.hero.is-off .status-dot::after, .hero.is-off .scroll-cue i { animation-play-state: paused; }

.rim-line { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 48px; z-index: 1; pointer-events: none; opacity: 0.55; }

@media (max-width: 719px) {
  .hero { min-height: max(100svh, 780px); place-items: start center; }
  .hero-inner { padding: calc(var(--header-h) + 32px) var(--gutter) 230px; }
  .eyebrow { margin-top: 24px; font-size: 0.7rem; letter-spacing: 0.26em; }
  .lede { margin-top: 22px; }
  .hero-actions { margin-top: 28px; flex-direction: column; gap: 6px; }
  .rim-line { height: 28px; }
}
@media (min-width: 720px) {
  .hero { place-items: start center; }
  .hero-inner { padding: calc(var(--header-h) + 46px) var(--gutter) 150px; }
}
@media (min-width: 720px) and (max-height: 820px) { .hero-note, .scroll-cue { display: none; } }
@media (max-width: 479px) { .hero-note { display: none; } }

/* arrival (time-based, once) */
.rise { animation: rise 0.9s var(--expo) backwards; }
.r-status { animation-delay: 0.2s; }
.r-eyebrow { animation-delay: 0.35s; }
.r-lede { animation-delay: 0.95s; }
.r-cta { animation-delay: 1.1s; }
.r-note { animation-delay: 1.25s; }
.r-cue { animation-delay: 2.2s; }
.r-l1 { animation: line-in 1.1s var(--expo) 0.5s backwards; }
.r-l2 { animation: line-in 1.1s var(--expo) 0.64s backwards; }
.sheen { animation: sheen-win 1.4s cubic-bezier(0.45, 0, 0.2, 1) 2.4s both; }
.sheen-in { animation: sheen-in 1.4s cubic-bezier(0.45, 0, 0.2, 1) 2.4s both; }

@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes line-in { from { transform: translateY(105%); } to { transform: none; } }
@keyframes sheen-win { from { transform: translateX(-101%); } to { transform: translateX(101%); } }
@keyframes sheen-in { from { transform: translateX(101%); } to { transform: translateX(-101%); } }
@keyframes ping { 0% { transform: scale(1); opacity: 0.5; } 70%, 100% { transform: scale(2.4); opacity: 0; } }
@keyframes drip { 0% { transform: scaleY(0); opacity: 0; } 30% { opacity: 1; } 70% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- Sections ---------- */

.section { position: relative; padding: var(--pad-block) var(--gutter); }

.section-head { max-width: none; }
.kicker { display: inline-flex; align-items: center; gap: 12px; color: var(--gold); }
.kicker::before { content: ""; width: 28px; height: 1px; background: linear-gradient(90deg, rgba(235, 200, 139, 0), var(--gold)); }
.statement {
  margin-top: 20px;
  font: 300 var(--fs-xl)/1 var(--display);
  letter-spacing: -0.028em;
  text-wrap: pretty;
}
.statement .soft { color: var(--text-2); }
.intro { margin-top: 28px; max-width: 34em; font-size: clamp(1.02rem, 0.96rem + 0.3vw, 1.16rem); color: var(--text-2); }

/* ---------- What it is: chapters ---------- */

.chapters { margin-top: var(--to-content); }
.chapter { --tint: var(--text); position: relative; }
.t-ice { --tint: #eef3fc; }
.t-cyan { --tint: var(--cyan); }
.t-gold { --tint: var(--gold); }
.t-violet { --tint: var(--violet); }

.ch-num { font: 300 italic var(--fs-l)/1 var(--display); color: var(--tint); opacity: 0.5; letter-spacing: -0.01em; }
.ch-title { margin-top: 14px; font: 300 var(--fs-l)/1.08 var(--display); letter-spacing: -0.02em; }
.ch-title span { color: var(--text-2); }
.ch-line { margin-top: 14px; font: 300 italic var(--fs-m)/1.35 var(--display); color: var(--tint); }
.ch-body { margin-top: 18px; max-width: 34em; color: var(--text-2); }
.ch-status { margin-top: 22px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 0.86rem; color: var(--text-3); }
.ch-status .dot, .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 10px rgba(114, 245, 207, 0.7); flex: none; }
.ch-status a { color: var(--gold); }

.ch-crop { margin-top: 40px; max-width: 460px; perspective: 1600px; }
.crop-frame {
  position: relative; overflow: clip;
  border-radius: 18px; padding: 6px;
  background: #060a14;
  border: 1px solid var(--edge-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 40px 90px -40px rgba(0, 0, 0, 0.9), 0 0 70px -30px color-mix(in srgb, var(--tint, #8aa4ff) 40%, transparent);
}
.crop-frame img { border-radius: 12px; width: 100%; }
.ch-crop figcaption, .stage-cap { margin-top: 14px; font-size: 0.88rem; color: var(--text-2); }
.ch-crop figcaption { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }

.chapter-stage { display: none; }

@media (max-width: 1099px) {
  .chapter + .chapter { margin-top: 112px; }
}
@media (min-width: 1100px) {
  .chapters { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }
  .chapter-list { grid-column: 1 / span 5; }
  .chapter { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; padding: 40px 0; }
  .ch-crop { display: none; }
  .chapter-stage {
    display: flex; flex-direction: column; justify-content: center;
    grid-column: 6 / span 7; position: sticky; top: 0; height: 100vh; align-self: start;
    padding: calc(var(--header-h) + 12px) 0 24px 24px;
  }
  .no-sd .chapter { opacity: 0.4; transition: opacity 0.6s var(--expo); }
  .no-sd .chapter.is-active { opacity: 1; }
}

/* ---------- Devices ---------- */

.device-wrap { perspective: 1600px; }
.mac { position: relative; transform-style: flat; transition: rotate 0.6s var(--expo); }
.mac-bezel {
  position: relative; z-index: 1;
  padding: 10px; border-radius: 14px;
  background: #060a14;
  border: 1px solid var(--edge-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 60px 120px -40px #000;
}
.mac-screen { position: relative; aspect-ratio: 16 / 10; border-radius: 6px; overflow: clip; background: var(--glass-solid); contain: layout paint; }
.mac-screen > picture, .mac-screen > picture img, .cam > picture, .cam > picture img { position: absolute; inset: 0; width: 100%; height: 100%; }
.mac-screen img { object-fit: cover; }
.mac-reflect { position: absolute; inset: 0; z-index: 3; pointer-events: none; background: linear-gradient(160deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 35%); }
.mac-base {
  position: relative; z-index: 1;
  width: 104%; height: 8px; margin-left: -2%;
  border-radius: 0 0 12px 12px;
  background: linear-gradient(180deg, #1a2236, #0b1020);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.mac-shadow {
  position: absolute; left: 6%; right: 6%; bottom: -22px; height: 44px; z-index: 0;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.95), transparent);
  opacity: 0.6; transition: opacity 0.6s var(--expo);
}
.mac-glow { position: absolute; inset: -12% -8%; z-index: 0; pointer-events: none; }
.mac-glow i { position: absolute; inset: 0; opacity: 0; transition: opacity 0.9s var(--expo); }
.g-ice { background: radial-gradient(50% 50% at 50% 55%, rgba(170, 196, 240, 0.2), transparent 70%); }
.g-cyan { background: radial-gradient(50% 50% at 50% 55%, rgba(100, 232, 255, 0.2), transparent 70%); }
.g-gold { background: radial-gradient(50% 50% at 50% 55%, rgba(235, 200, 139, 0.2), transparent 70%); }
.g-violet { background: radial-gradient(50% 50% at 50% 55%, rgba(168, 139, 255, 0.22), transparent 70%); }
[data-active="0"] .g-ice, [data-active="1"] .g-cyan, [data-active="2"] .g-gold, [data-active="3"] .g-violet, .words-stage .g-ice { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .mac:hover .mac-shadow { opacity: 0.85; }
}

/* chapter screens: class toggles, crossfade */
.screen { display: none; opacity: 0; transform: scale(1.015); transition: opacity 0.6s var(--expo), transform 0.6s var(--expo); }
.screen.is-near { display: block; }
.screen.is-active { opacity: 1; transform: none; }
.screen.is-prev { opacity: 0; transform: scale(0.985); }

.stage-cap { display: flex; align-items: flex-start; gap: 10px; margin-top: 30px; }
.phones-cap { position: relative; z-index: 1; justify-content: center; flex-wrap: wrap; text-align: center; margin-top: 8px; }
.chapter-stage .stage-cap { justify-content: center; }
.caps { display: grid; }
.cap { grid-area: 1 / 1; opacity: 0; transition: opacity 0.5s var(--expo); }
.cap.is-active { opacity: 1; }

.synthetic {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  padding: 2px 10px 2px 8px;
  border: 1px dashed rgba(240, 168, 104, 0.6); border-radius: 999px;
  background: rgba(4, 7, 17, 0.72);
  font: 500 0.74rem/1.6 var(--body); letter-spacing: 0.02em; color: var(--amber);
  white-space: nowrap;
}
.synthetic::before { content: ""; width: 6px; height: 6px; border: 1px solid var(--amber); transform: rotate(45deg); }

/* ---------- The continuity horizon ---------- */

.horizon { margin-top: clamp(96px, 12vw, 176px); view-timeline: --horizon block; }
.h-track { position: relative; margin-top: 28px; }
.h-arc { display: block; width: 100%; height: 48px; }
.h-track > .h-arc, .h-win { position: absolute; left: 0; right: 0; top: 0; }
.h-win { overflow: clip; height: 48px; }
.h-line { display: none; }
.h-steps {
  position: relative; list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(9, minmax(0, 1fr));
}
.h-steps li { --f: 0.47; position: relative; padding-top: calc(var(--f) * 48px + 22px); text-align: center; }
.h-steps li:nth-child(1), .h-steps li:nth-child(9) { --f: 0.861; }
.h-steps li:nth-child(2), .h-steps li:nth-child(8) { --f: 0.689; }
.h-steps li:nth-child(3), .h-steps li:nth-child(7) { --f: 0.565; }
.h-steps li:nth-child(4), .h-steps li:nth-child(6) { --f: 0.491; }
.h-steps li:nth-child(5) { --f: 0.467; }
.node {
  position: absolute; left: 50%; top: calc(var(--f) * 48px); width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px;
  border-radius: 50%; background: var(--gold); box-shadow: 0 0 12px rgba(235, 200, 139, 0.7);
}
.h-name { display: block; padding: 0 4px; font: 300 1.08rem/1.25 var(--display); color: var(--text); }
.h-last .node { background: var(--space); border: 1px solid var(--gold); box-shadow: none; }
.h-last .h-name { font-style: italic; color: var(--text-2); }
.journey-note { margin-top: 44px; max-width: 34em; color: var(--text-2); }

@media (max-width: 899px) {
  .h-track > .h-arc, .h-win { display: none; }
  .h-line { display: block; position: absolute; left: 4px; top: 8px; bottom: 8px; width: 1px; background: rgba(150, 178, 222, 0.28); }
  .h-line i { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(235, 200, 139, 0.5), var(--gold)); transform-origin: top; }
  .h-steps { grid-template-columns: 1fr; gap: 0; }
  .h-steps li { padding: 9px 0 9px 32px; text-align: left; }
  .node { left: 4px; top: 50%; }
  .h-name { padding: 0; }
}

/* ---------- Your words ---------- */

.words-split { margin-top: var(--to-content); }
.principles { list-style: none; margin: 0; padding: 0; display: grid; gap: 64px; }
.principle { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 20px; }
.p-mark {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  font: 300 italic 1.05rem/1 var(--display); color: var(--gold);
  border: 1px solid rgba(235, 200, 139, 0.35);
  background: radial-gradient(circle at 50% 30%, rgba(235, 200, 139, 0.12), transparent 70%);
}
.principle h3 { font: 300 var(--fs-l)/1.08 var(--display); letter-spacing: -0.02em; }
.principle p { margin-top: 16px; max-width: 34em; color: var(--text-2); }

.origins { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.origins li {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--edge); background: rgba(255, 255, 255, 0.025);
  font-size: 0.84rem; color: var(--text-2);
  transition: border-color 0.3s, color 0.3s;
}
.o-shape { position: relative; display: inline-grid; place-items: center; transition: transform 0.35s var(--expo); }
.o-shape::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; background: radial-gradient(closest-side, rgba(238, 243, 252, 0.45), transparent); opacity: 0; transition: opacity 0.35s var(--expo); }
.origins li:hover { border-color: var(--edge-strong); color: var(--text); }
.origins li:hover .o-shape { transform: scale(1.25); }
.origins li:hover .o-shape::after { opacity: 1; }

.p-crop { margin-top: 28px; max-width: 440px; perspective: 1600px; }
.p-crop .crop-frame { padding: 4px; border-radius: 14px; }
.p-crop .crop-frame img { border-radius: 10px; }
.words-stage { display: none; }

@media (min-width: 1100px) {
  .words-split { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }
  .principles { grid-column: 1 / span 5; gap: 0; }
  .principle { min-height: 60vh; align-content: center; padding: 32px 0; }
  .p-crop { display: none; }
  .words-stage {
    display: flex; flex-direction: column; justify-content: center;
    grid-column: 6 / span 7; position: sticky; top: 0; height: 100vh; align-self: start;
    padding: calc(var(--header-h) + 12px) 0 24px 24px;
  }
  .no-sd .principle { opacity: 0.4; transition: opacity 0.6s var(--expo); }
  .no-sd .principle.is-active { opacity: 1; }
}

.cam { position: absolute; left: 0; top: 0; width: 200%; height: 200%; transform: translate(-50%, 0); transition: transform 0.9s var(--expo); }
.focus {
  position: absolute; z-index: 2;
  left: var(--fx, 72.2%); top: var(--fy, 7.2%); width: var(--fw, 22.4%); height: var(--fh, 5.6%);
  border: 1.5px solid var(--gold); border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(235, 200, 139, 0.2), 0 0 26px 2px rgba(235, 200, 139, 0.38), 0 0 0 4000px rgba(3, 6, 14, 0.3);
  transform-origin: 0 0;
  transition: transform 0.7s var(--expo);
  pointer-events: none;
}

/* ---------- Screens: the phone stage ---------- */

.phone-stage { position: relative; margin: calc(var(--to-content) + 24px) calc(-1 * var(--gutter)) 0; padding: 0 var(--gutter); view-timeline: --stage block; }
.stage-grid { display: grid; gap: 48px; align-items: center; }
.stage-copy h3 { margin-top: 20px; font: 300 var(--fs-l)/1.08 var(--display); letter-spacing: -0.02em; }
.stage-copy p:last-child { margin-top: 18px; max-width: 30em; color: var(--text-2); }

.phones-area { position: relative; perspective: 1600px; }
.phones { position: relative; z-index: 1; display: flex; justify-content: center; align-items: flex-start; padding: 6vh 0 4vh; transform-style: preserve-3d; }
.iphone { width: clamp(150px, 44vw, 330px); container-type: inline-size; position: relative; z-index: 1; }
.ip-left { rotate: -5deg; margin-right: -4%; }
.ip-right { rotate: 4deg; margin-left: -4%; margin-top: 10%; }
.ip-frame {
  position: relative;
  padding: 3.33cqi; border-radius: 14.67cqi;
  border: 1.5px solid transparent;
  background: linear-gradient(#05080f, #05080f) padding-box, linear-gradient(160deg, #3a4358, #161b28 50%, #3a4358) border-box;
  box-shadow: 0 50px 100px -40px #000, 0 0 80px -30px rgba(120, 140, 255, 0.35);
}
.ip-screen { position: relative; overflow: clip; border-radius: 11.33cqi; aspect-ratio: 430 / 984; background: #03050c; }
.ip-bar { display: block; height: 5.3%; background: #070b16; }
.ip-screen picture, .ip-screen img { display: block; width: 100%; }
.ip-island { position: absolute; top: 5.4cqi; left: 50%; width: 26%; height: 7.6cqi; margin-left: -13%; border-radius: 999px; background: #000; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04); }
.iphone figcaption { margin-top: 18px; display: flex; justify-content: center; }
.floor-glow {
  position: absolute; left: 50%; bottom: 24px; width: min(760px, 110%); height: 140px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(120, 140, 255, 0.28), rgba(100, 232, 255, 0.08) 55%, transparent);
  pointer-events: none;
}

@media (min-width: 900px) {
  .phone-stage { min-height: 120vh; display: grid; align-items: center; }
  .stage-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }
  .stage-copy { grid-column: 1 / span 4; }
  .phones-area { grid-column: 5 / span 8; }
}
@media (max-width: 519px) {
  .iphone figcaption .synthetic { font-size: 0.66rem; padding: 2px 8px 2px 7px; }
}

/* ---------- Screens: filmstrip and lightbox ---------- */

.film-head { margin-top: 48px; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.film-note { font-size: 0.86rem; color: var(--text-3); }
.filmstrip { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.filmstrip li { min-width: 0; }
.thumb {
  position: relative; display: block; width: 100%; padding: 0; overflow: clip;
  aspect-ratio: 16 / 10; border-radius: 12px;
  border: 1px solid var(--edge-strong); background: var(--glass-solid);
  cursor: zoom-in; color: inherit;
  transition: transform 0.4s var(--expo), border-color 0.3s;
}
.thumb picture, .thumb img { display: block; width: 100%; height: 100%; }
.thumb img { object-fit: cover; object-position: 50% 0; }
.thumb .synthetic { position: absolute; left: 8px; bottom: 8px; font-size: 0.66rem; padding: 1px 8px 1px 7px; }
.thumb:hover { transform: translateY(-3px); border-color: rgba(235, 200, 139, 0.5); }
.thumb:focus-visible { outline-offset: 4px; border-radius: 12px; }
.t-cap { display: block; margin-top: 10px; font-size: 0.84rem; color: var(--text-2); }

@media (max-width: 899px) {
  .filmstrip {
    display: flex; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; gap: 12px;
    margin-inline: calc(-1 * var(--gutter)); padding: 4px var(--gutter) 12px; scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .filmstrip::-webkit-scrollbar { display: none; }
  .filmstrip li { flex: 0 0 min(72vw, 300px); scroll-snap-align: start; }
}

.lightbox {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0;
  padding: 64px 20px 20px; border: 0; background: transparent; color: var(--text);
  overflow: auto;
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(2, 4, 10, 0.9); }
html:has(.lightbox[open]) { overflow: hidden; }
.lightbox[open]::backdrop { animation: fade-in 0.4s var(--expo) both; }
.lightbox.is-closing::backdrop { opacity: 0; transition: opacity 0.4s var(--expo); }
.lb-fig { width: min(1480px, 100%); display: grid; justify-items: center; }
/* the picture spans the figure so the image's percentage width resolves against it (not
   against the srcset "sizes" width), and the image centres inside it */
.lb-pic { display: block; width: 100%; }
.lb-img {
  margin-inline: auto;
  width: min(1480px, 100%, (100dvh - 150px) * 1.6); height: auto; aspect-ratio: 16 / 10;
  border-radius: 14px; border: 1px solid var(--edge-strong); background: var(--glass-solid);
  box-shadow: 0 60px 140px -40px #000;
  transform-origin: 0 0;
}
.lightbox.is-phone .lb-img { width: min(430px, 100%, (100dvh - 150px) * 0.4614); aspect-ratio: 430 / 932; border-radius: 28px; }
.lb-cap { margin-top: 16px; max-width: 60em; display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; color: var(--text-2); transition: opacity 0.3s; }
.lb-close {
  position: fixed; top: 14px; right: 14px; z-index: 2;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--text); background: rgba(4, 7, 17, 0.8); border: 1px solid var(--edge-strong);
  cursor: pointer; transition: opacity 0.3s, border-color 0.3s, color 0.3s;
}
.lb-close:hover { border-color: var(--gold); color: var(--gold); }
.lightbox.is-flying .lb-cap, .lightbox.is-flying .lb-close { opacity: 0; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Today: the ladder ---------- */

.ladder-wrap { position: relative; margin-top: var(--to-content); view-timeline: --ladder block; }
.ladder { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); position: relative; }
.ladder-base, .ladder-track { position: absolute; left: 0; right: 0; top: 11px; height: 1px; }
.ladder-base { background: linear-gradient(90deg, rgba(150, 178, 222, 0.05), rgba(150, 178, 222, 0.2) 12%, rgba(150, 178, 222, 0.14)); }
.ladder-track {
  height: 2px; top: 10.5px;
  background: linear-gradient(90deg, rgba(100, 232, 255, 0) 0%, rgba(100, 232, 255, 0.85) 12%, rgba(235, 200, 139, 1) 41.7%, rgba(235, 200, 139, 1) 100%);
  transform-origin: 0 50%; transform: scaleX(0.4167);
}
.ladder li { position: relative; padding-top: 40px; text-align: center; font-size: 0.92rem; color: var(--text-3); }
.ladder .rung {
  position: absolute; left: 50%; top: 4px; width: 15px; height: 15px; margin-left: -7.5px;
  border-radius: 50%; border: 1px solid var(--edge-strong); background: var(--space);
}
.rung-fill { position: absolute; inset: -1px; border-radius: 50%; background: rgba(100, 232, 255, 0.3); border: 1px solid rgba(100, 232, 255, 0.75); }
.ladder .is-past { color: var(--text-2); }
.ladder .is-here { color: var(--text); font-weight: 500; }
.ladder .is-here .rung { width: 23px; height: 23px; top: 0; margin-left: -11.5px; border-color: var(--gold); background: rgba(235, 200, 139, 0.12); }
.rung-core { position: absolute; inset: 6px; border-radius: 50%; background: var(--gold); }
.rung-glow { position: absolute; inset: -10px; border-radius: 50%; background: radial-gradient(closest-side, rgba(235, 200, 139, 0.7), transparent); }
.l-name { display: block; }
.here-tag {
  display: inline-block; margin-top: 12px; white-space: nowrap;
  padding: 3px 10px; border-radius: 999px;
  font: 400 0.76rem/1.5 var(--mono); color: var(--gold-ink); background: var(--gold);
}

@media (max-width: 719px) {
  .ladder { grid-template-columns: 1fr; }
  .ladder-base, .ladder-track { left: 11px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; }
  .ladder-base { background: linear-gradient(180deg, rgba(150, 178, 222, 0.2), rgba(150, 178, 222, 0.1)); }
  .ladder-track { width: 2px; left: 10.5px; top: 0; background: linear-gradient(180deg, rgba(100, 232, 255, 0.85) 0%, rgba(235, 200, 139, 1) 41.7%, rgba(235, 200, 139, 1) 100%); transform-origin: 50% 0; transform: scaleY(0.4167); }
  .ladder li { height: 56px; padding: 0 0 0 44px; display: flex; align-items: center; gap: 12px; text-align: left; }
  .ladder .rung { left: 11px; top: 50%; margin-top: -7.5px; }
  .ladder .is-here .rung { top: 50%; margin-top: -11.5px; }
  .here-tag { margin-top: 0; }
  .l-name { display: inline; }
}

.status-grid { margin-top: var(--to-content); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--col-gap); }
.status-col {
  padding: clamp(26px, 3vw, 40px);
  border-radius: 24px; border: 1px solid var(--edge);
  background: linear-gradient(180deg, rgba(16, 26, 49, 0.62), rgba(8, 13, 27, 0.62));
  box-shadow: inset 0 1px 0 var(--highlight);
}
.col-now { border-color: rgba(114, 245, 207, 0.22); background: radial-gradient(80% 60% at 0% 0%, rgba(114, 245, 207, 0.07), transparent 70%), linear-gradient(180deg, rgba(16, 26, 49, 0.66), rgba(8, 13, 27, 0.66)); }
.col-next { border-style: dashed; }
.status-col h3 { font: 300 1.7rem/1.2 var(--display); letter-spacing: -0.01em; }
.col-sub { margin-top: 6px; font-size: 0.9rem; color: var(--text-3); }
.status-list { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 22px; }
.status-list li { display: grid; grid-template-columns: 84px 1fr; gap: 14px; align-items: start; }
.status-list strong { font-weight: 500; }
.status-list p { margin-top: 4px; font-size: 0.95rem; color: var(--text-2); }
.slice {
  display: inline-flex; align-items: center; gap: 6px;
  justify-self: start; margin-top: 2px;
  padding: 3px 9px; border-radius: 999px;
  font: 400 0.72rem/1.5 var(--mono); white-space: nowrap;
  color: var(--mint); border: 1px solid rgba(114, 245, 207, 0.4); background: rgba(114, 245, 207, 0.06);
}
.col-now .slice::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 8px rgba(114, 245, 207, 0.8); }
.slice-next { color: var(--text-3); border: 1px dashed var(--edge-strong); background: transparent; }
.col-foot { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--edge); font-size: 0.9rem; color: var(--text-3); }

@media (max-width: 860px) { .status-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .status-list li { grid-template-columns: 1fr; gap: 8px; } }

/* ---------- Closing: the mark, reprised ---------- */

.cta { min-height: 90vh; display: grid; place-items: center; overflow: clip; text-align: center; --r: calc(0.36 * min(100vw, 900px)); }
.cta-inner { position: relative; z-index: 1; width: 100%; max-width: 980px; display: grid; justify-items: center; }
.cta-title-wrap { position: relative; width: 100%; min-height: calc(var(--r) * 2 + 40px); display: grid; place-items: center; }
.cta-head { position: relative; display: grid; justify-items: center; }
.cta-head .statement { margin-top: 20px; }
.cta-mark { position: absolute; left: 50%; top: 50%; width: calc(var(--r) * 3.3684); height: calc(var(--r) * 3.3684); margin: calc(var(--r) * -1.6842) 0 0 calc(var(--r) * -1.6842); pointer-events: none; }
.cta-mark-svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.5; overflow: visible; }
.cta-orbit { position: absolute; left: 50%; top: 50%; width: calc(var(--r) * 2); height: calc(var(--r) * 2); margin: calc(var(--r) * -1) 0 0 calc(var(--r) * -1); animation: orbit 24s linear infinite; animation-play-state: paused; }
.cta.is-live .cta-orbit { animation-play-state: running; }
.glint { position: absolute; left: 50%; top: 0; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: #fff3d6; box-shadow: 0 0 10px 2px rgba(235, 200, 139, 0.9), 0 0 30px 6px rgba(235, 200, 139, 0.35); }
.cta .intro { margin: 40px auto 0; max-width: 32em; text-align: center; }
.cta-points { list-style: none; margin: 32px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.cta-points li {
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--edge-strong); background: rgba(7, 12, 27, 0.92);
  font-size: 0.9rem; color: var(--text);
}
.cta-actions { margin-top: 40px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.cta-domain { color: var(--text-3); }
@keyframes orbit { to { transform: rotate(360deg); } }

@media (max-width: 719px) {
  .cta { --r: calc(0.36 * 100vw); }
  .cta-title-wrap { min-height: 0; padding-top: calc(var(--r) * 2 + 56px); }
  .cta-mark { top: calc(var(--r) + 16px); }
  .cta-mark-svg { opacity: 0.7; }
}

/* ---------- Footer ---------- */

.site-footer { padding: 56px var(--gutter) max(56px, env(safe-area-inset-bottom)); border-top: 1px solid var(--edge); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 32px; }
.footer-brand p { margin-top: 14px; color: var(--text-2); }
.footer-brand p.mono { margin-top: 6px; }
.footer-notes { display: grid; gap: 8px; font-size: 0.9rem; color: var(--text-2); align-content: start; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Reveal fallback (no scroll-driven animations): IntersectionObserver classes ---------- */

.reveal-on [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 0.9s var(--expo), transform 0.9s var(--expo); }
.reveal-on [data-reveal].is-in { opacity: 1; transform: none; }
.reveal-on .ladder-wrap .ladder-track { transform: scaleX(0); transition: transform 1.6s var(--expo) 0.2s; }
.reveal-on .ladder-wrap.is-in .ladder-track { transform: scaleX(0.4167); }
@media (max-width: 719px) {
  .reveal-on .ladder-wrap .ladder-track { transform: scaleY(0); }
  .reveal-on .ladder-wrap.is-in .ladder-track { transform: scaleY(0.4167); }
}

/* time-based staggers (both paths, motion allowed) */
.stagger-on .col-now .status-list li { opacity: 0; transform: translateY(14px); transition: opacity 0.9s var(--expo), transform 0.9s var(--expo); }
.stagger-on .col-now .slice::before { transform: scale(0.6); transition: transform 0.6s var(--expo); }
.stagger-on .col-now.is-in .status-list li { opacity: 1; transform: none; }
.stagger-on .col-now.is-in .slice::before { transform: none; }
.stagger-on .col-now .status-list li:nth-child(2), .stagger-on .col-now .status-list li:nth-child(2) .slice::before { transition-delay: 70ms; }
.stagger-on .col-now .status-list li:nth-child(3), .stagger-on .col-now .status-list li:nth-child(3) .slice::before { transition-delay: 140ms; }
.stagger-on .col-now .status-list li:nth-child(4), .stagger-on .col-now .status-list li:nth-child(4) .slice::before { transition-delay: 210ms; }
.stagger-on .col-next { opacity: 0; transition: opacity 1.1s var(--expo) 0.2s; }
.stagger-on .col-next.is-in { opacity: 1; }

/* ---------- Scroll-driven choreography (compositor timelines) ---------- */

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    /* hero exit: the text lifts away, the horizon rises toward the viewer */
    .hero-inner { animation: hero-exit linear both; animation-timeline: --hero; animation-range: exit 0% exit 60%; }
    .sky { animation: sky-exit linear both; animation-timeline: --hero; animation-range: exit 0% exit 60%; }
    .rim-line { animation: rim-in linear both; animation-timeline: --hero; animation-range: exit 0% exit 35%; }

    [data-reveal] { animation: sd-rise linear both; animation-timeline: view(); animation-range: entry 5% entry 75%; }

    /* statements brighten */
    .what-title .soft { animation: brighten-35 linear both; animation-timeline: view(); animation-range: cover 20% cover 40%; }
    .clauses { view-timeline: --clauses block; }
    .clauses .line { animation: brighten-30 linear both; animation-timeline: --clauses; }
    .clauses .c1 { animation-range: cover 15% cover 30%; }
    .clauses .c2 { animation-range: cover 30% cover 45%; }
    .clauses .c3 { animation-range: cover 45% cover 60%; }

    /* devices: tilt up into place, then drift */
    .dev-in { animation: dev-in linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
    .iphone { animation: dev-in linear both, var(--par) linear both; animation-timeline: view(), --stage; animation-range: entry 0% entry 55%, cover 0% cover 100%; }
    .ip-left { --par: par-left; }
    .ip-right { --par: par-right; }
    .crop-frame { animation: dev-in linear both, dev-par linear both; animation-timeline: view(), view(); animation-range: entry 0% entry 55%, cover 0% cover 100%; }

    @media (min-width: 1100px) {
      .chapter, .principle { animation: dim linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
    }

    /* the continuity horizon */
    .h-win { animation: win-open linear both; animation-timeline: --horizon; animation-range: cover 25% cover 60%; }
    .h-win-in { animation: win-hold linear both; animation-timeline: --horizon; animation-range: cover 25% cover 60%; }
    .h-line i { animation: grow-y linear both; animation-timeline: --horizon; animation-range: cover 20% cover 60%; }
    .h-steps .node, .h-steps .h-name { animation: light linear both; animation-timeline: --horizon; }
    .h-steps li:nth-child(1) > * { animation-range: cover 25% cover 29%; }
    .h-steps li:nth-child(2) > * { animation-range: cover 29% cover 33%; }
    .h-steps li:nth-child(3) > * { animation-range: cover 33% cover 37%; }
    .h-steps li:nth-child(4) > * { animation-range: cover 37% cover 41%; }
    .h-steps li:nth-child(5) > * { animation-range: cover 41% cover 45%; }
    .h-steps li:nth-child(6) > * { animation-range: cover 45% cover 49%; }
    .h-steps li:nth-child(7) > * { animation-range: cover 49% cover 53%; }
    .h-steps li:nth-child(8) > * { animation-range: cover 53% cover 57%; }
    .h-steps li:nth-child(9) > * { animation-range: cover 56% cover 60%; }

    /* the ladder draws only as far as the evidence goes */
    .ladder-track { animation: track-x linear both; animation-timeline: --ladder; animation-range: cover 20% cover 45%; }
    .is-past .rung-fill { animation: fade-in linear both; animation-timeline: --ladder; }
    .is-past:nth-child(1) .rung-fill { animation-range: cover 23% cover 27%; }
    .is-past:nth-child(2) .rung-fill { animation-range: cover 33% cover 37%; }
    .is-here .rung { animation: ring-in linear both; animation-timeline: --ladder; animation-range: cover 41% cover 47%; }
    .is-here .rung-glow { animation: fade-in linear both; animation-timeline: --ladder; animation-range: cover 42% cover 48%; }
    .here-tag { animation: tag-rise linear both; animation-timeline: --ladder; animation-range: cover 44% cover 50%; }

    /* the mark returns */
    .cta-mark { animation: mark-in linear both; animation-timeline: view(); animation-range: entry 10% entry 60%; }

    @media (max-width: 719px) {
      .ladder-track { animation-name: track-y; }
    }
  }
}

@keyframes hero-exit { to { opacity: 0; transform: translateY(-9vh) scale(0.985); } }
@keyframes sky-exit { to { transform: translateY(-14vh); } }
@keyframes rim-in { from { opacity: 0; } to { opacity: 0.8; } }
@keyframes sd-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes brighten-35 { from { opacity: 0.35; } to { opacity: 1; } }
@keyframes brighten-30 { from { opacity: 0.3; } to { opacity: 1; } }
@keyframes dev-in { from { opacity: 0; transform: rotateX(10deg) translateY(60px); } to { opacity: 1; transform: none; } }
@keyframes dev-par { from { translate: 0 6vh; } to { translate: 0 -6vh; } }
@keyframes par-left { from { translate: 0 10vh; rotate: -5deg; } to { translate: 0 -10vh; rotate: -2deg; } }
@keyframes par-right { from { translate: 0 18vh; rotate: 4deg; } to { translate: 0 -18vh; rotate: 1.5deg; } }
@keyframes dim { 0% { opacity: 0.4; } 38%, 62% { opacity: 1; } 100% { opacity: 0.4; } }
@keyframes win-open { from { transform: translateX(-100%); } to { transform: none; } }
@keyframes win-hold { from { transform: translateX(100%); } to { transform: none; } }
@keyframes grow-y { from { transform: scaleY(0); } to { transform: none; } }
@keyframes light { from { opacity: 0.3; } to { opacity: 1; } }
@keyframes track-x { from { transform: scaleX(0); } to { transform: scaleX(0.4167); } }
@keyframes track-y { from { transform: scaleY(0); } to { transform: scaleY(0.4167); } }
@keyframes ring-in { from { transform: scale(0.6); } to { transform: none; } }
@keyframes tag-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes mark-in { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }

/* ---------- Reduced motion: a composed still ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise, .line-in, .sheen, .sheen-in, .status-dot::after, .scroll-cue i, .cta-orbit { animation: none !important; }
  .sheen { display: none; }
  .rim-line { opacity: 0.8; }
  .screen, .cap, .cam, .focus, .mac, .neb, .mac-glow i, .site-header, .thumb, .btn, .btn-gold::after { transition: none !important; }
  .btn-gold::after { display: none; }
  .ip-left { rotate: -3deg; }
  .ip-right { rotate: 2.5deg; }
}

/* ---------- 404 ---------- */

.lost { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 120px var(--gutter) 80px; }
.lost-mark { display: block; margin: 0 auto 28px; width: 120px; height: 120px; }
.lost h1 { margin-top: 32px; font: 300 clamp(2.4rem, 6vw, 4.4rem)/1.05 var(--display); letter-spacing: -0.025em; }
.lost p { margin: 18px auto 0; max-width: 32em; color: var(--text-2); }
.lost .hero-actions { margin-top: 34px; }
