/* ============================================================================
   AMEOT — Intelligence Designed To Evolve
   Black / white / grey with neon-glow white accents over one continuous
   full-bleed video background. Viewport 1 follows the landing spec exactly;
   the chapters below carry the same language through the whole scroll.
   ========================================================================== */

/* ------------------------------------------------------------- variables -- */
:root {
  --bg: #000000;
  --text: #ffffff;
  --muted: #8e8e8e;
  --nav-text: #2e2e2e;
  --pill-dark: #28282a;
  --sign-in-text: #c8c8c8;
  --nav-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
  --trust-bg: #28282a;
  --trust-border: rgba(255, 255, 255, 0.4);
  --trust-text: #c4c2c3;
  --font-sans: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-display: "BubbledotICG-FinePos", "Geist Pixel Circle", monospace;

  --trust-size: clamp(36px, 4.5vw, 42px);
  --glow-soft: 0 0 0 1px rgba(255, 255, 255, 0.15), 0 0 22px rgba(255, 255, 255, 0.32),
    0 0 44px rgba(255, 255, 255, 0.12);
  --glow-strong: 0 0 0 1px rgba(255, 255, 255, 0.25), 0 0 30px rgba(255, 255, 255, 0.5),
    0 0 70px rgba(255, 255, 255, 0.2);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

@font-face {
  font-family: "Geist Pixel Circle";
  src: url("fonts/GeistPixel-Circle.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ----------------------------------------------------------------- reset -- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
  /* the ambient orbs deliberately bleed past the chapters; clip here so the
     bleed never becomes a horizontal scrollbar */
  overflow-x: clip;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: rgba(255, 255, 255, 0.92);
  color: #000;
}

:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.85);
  outline-offset: 3px;
}

/* ================================================== CONTINUOUS BACKGROUND == */

.bg {
  position: fixed;
  inset: 0;
  background: #000;
  overflow: hidden;
  z-index: 0;
}

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  z-index: 0;
  /* black / white / grey mandate: the source video is colour, so it is graded
     to monochrome here instead of re-encoding the asset */
  filter: grayscale(1) contrast(1.08) brightness(0.82);
  /* nudged by the scroll loop for a slow depth push */
  transform: scale(var(--bg-scale, 1));
  will-change: transform;
}

.bg-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 46%, rgba(0, 0, 0, 0) 42%, rgba(0, 0, 0, 0.62) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 74%, rgba(0, 0, 0, 0.55) 100%);
}

/* faint scanlines — barely-there CRT texture, part of the retro display voice */
.bg-scan {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.016) 0px,
    rgba(255, 255, 255, 0.016) 1px,
    transparent 1px,
    transparent 4px
  );
  mix-blend-mode: overlay;
}

/* deep-scroll dim: chapters after the hero get a heavier ground so copy reads */
.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #000;
  opacity: var(--bg-dim, 0);
  transition: opacity 0.2s linear;
}

/* thin neon progress line, right edge */
.scroll-progress {
  position: fixed;
  top: 0;
  right: 0;
  width: 2px;
  height: 100%;
  z-index: 60;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.08);
}

.scroll-progress::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.95), 0 0 34px rgba(255, 255, 255, 0.4);
  transform: scaleY(var(--progress, 0));
  transform-origin: top;
}

/* =========================================================== OPENING SHOT == */

.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.intro__stage {
  position: relative;
  display: grid;
  justify-items: center;
  gap: clamp(18px, 3vh, 30px);
  padding: 0 6vw;
  perspective: 1000px;
  transform-style: preserve-3d;
}

/* wireframe floor plane behind the mark — the same spatial-frame motif that
   anchors the hero and returns behind the finale */
.intro__frame {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(62vw, 620px);
  aspect-ratio: 1;
  margin: calc(min(62vw, 620px) / -2) 0 0 calc(min(62vw, 620px) / -2);
  pointer-events: none;
  opacity: 0;
}

body.intro-run .intro__frame {
  animation: frameIn 1.6s var(--ease-out) 0.35s forwards;
}

@keyframes frameIn {
  from { opacity: 0; transform: scale(0.88); }
  to { opacity: 1; transform: scale(1); }
}

.intro__frame i {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.intro__frame i:nth-child(1) {
  transform: rotateX(58deg) rotateZ(14deg);
  animation: spatialDrift 50s linear infinite;
}

.intro__frame i:nth-child(2) {
  transform: scale(0.72) rotateX(58deg) rotateZ(-10deg);
  border-color: rgba(255, 255, 255, 0.055);
  animation: spatialDrift 68s linear infinite reverse;
}

/* the whole shot drifts toward camera for its full length — the cheapest
   thing that makes a static composition feel filmed */
body.intro-run .intro__stage {
  animation: introZoom 5s cubic-bezier(0.3, 0, 0.6, 1) both;
}

@keyframes introZoom {
  from { transform: scale(0.95); }
  to { transform: scale(1.045); }
}

/* film grain / scanlines over the shot */
.intro__grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02) 0px,
    rgba(255, 255, 255, 0.02) 1px,
    transparent 1px,
    transparent 4px
  );
  opacity: 0.7;
}

/* drifting dust motes — deterministic scatter, barely there */
.intro__dust {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.intro__dust i {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
  opacity: 0;
}

body.intro-run .intro__dust i {
  animation: dustDrift 9s cubic-bezier(0.3, 0, 0.6, 1) both;
}

.intro__dust i:nth-child(1) { left: 16%; top: 72%; animation-delay: 0.4s; }
.intro__dust i:nth-child(2) { left: 28%; top: 30%; animation-delay: 1.1s; }
.intro__dust i:nth-child(3) { left: 44%; top: 82%; animation-delay: 0.7s; }
.intro__dust i:nth-child(4) { left: 58%; top: 22%; animation-delay: 1.6s; }
.intro__dust i:nth-child(5) { left: 71%; top: 66%; animation-delay: 0.2s; }
.intro__dust i:nth-child(6) { left: 84%; top: 38%; animation-delay: 1.3s; }
.intro__dust i:nth-child(7) { left: 50%; top: 12%; animation-delay: 2s; }

@keyframes dustDrift {
  0% { opacity: 0; transform: translateY(14px); }
  12% { opacity: 0.7; }
  80% { opacity: 0.5; }
  100% { opacity: 0; transform: translateY(-46px); }
}

/* anamorphic flare: a hairline of light crosses the frame before the mark
   begins to draw — the "projector on" beat */
.intro__flare {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(78vw, 640px);
  height: 1px;
  margin-left: calc(min(78vw, 640px) / -2);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.7), 0 0 60px rgba(255, 255, 255, 0.3);
  transform: scaleX(0);
  opacity: 0;
  pointer-events: none;
}

body.intro-run .intro__flare {
  animation: flareIn 1.6s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

@keyframes flareIn {
  0% { transform: scaleX(0); opacity: 0; }
  30% { opacity: 1; }
  62% { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(1); opacity: 0; }
}

.intro__mark {
  width: min(70vw, 540px);
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.26));
}

/* stroke draw-on, glyph by glyph */
.intro__mark .g {
  stroke-dasharray: 260;
  stroke-dashoffset: 260;
  opacity: 0;
}

body.intro-run .intro__mark .g {
  animation: drawGlyph 1s var(--ease-out) forwards;
}

body.intro-run .g1 { animation-delay: 0.7s; }
body.intro-run .g2 { animation-delay: 0.88s; }
body.intro-run .g3 { animation-delay: 0.98s; }
body.intro-run .g4 { animation-delay: 1.18s; }
body.intro-run .g5 { animation-delay: 1.28s; }
body.intro-run .g6 { animation-delay: 1.38s; }
body.intro-run .g7 { animation-delay: 1.52s; }
body.intro-run .g8 { animation-delay: 1.72s; }
body.intro-run .g9 { animation-delay: 1.82s; }

@keyframes drawGlyph {
  0% { stroke-dashoffset: 260; opacity: 0; }
  12% { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 1; }
}

/* the mark arrives from depth across the whole draw, then blooms once */
body.intro-run .intro__mark {
  animation:
    markArrive 3.2s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both,
    markBloom 1.3s ease-out 2.55s both;
}

@keyframes markArrive {
  from { transform: translateZ(-140px) rotateX(9deg); }
  to { transform: translateZ(0) rotateX(0deg); }
}

@keyframes markBloom {
  0% { filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.26)); }
  35% { filter: drop-shadow(0 0 24px rgba(255, 255, 255, 0.7)) drop-shadow(0 0 60px rgba(255, 255, 255, 0.22)); }
  100% { filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.3)); }
}

.intro__tag {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(9.5px, 1.3vw, 12.5px);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.74);
  opacity: 0;
  white-space: nowrap;
}

body.intro-run .intro__tag {
  animation: tagIn 1s var(--ease-out) 2.85s forwards;
}

@keyframes tagIn {
  from { opacity: 0; letter-spacing: 0.6em; transform: translateY(8px); }
  to { opacity: 1; letter-spacing: 0.42em; transform: none; }
}

/* horizontal light streak pass */
.intro__streak {
  position: absolute;
  top: 50%;
  left: -40%;
  width: 34%;
  height: 130%;
  transform: translate(-120%, -50%) skewX(-18deg);
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.05) 35%,
    rgba(255, 255, 255, 0.16) 50%,
    rgba(255, 255, 255, 0.05) 65%,
    transparent 100%
  );
  pointer-events: none;
  opacity: 0;
}

body.intro-run .intro__streak {
  animation: streak 1.1s cubic-bezier(0.22, 1, 0.36, 1) 3.3s forwards;
}

.intro__streak--2 {
  width: 22%;
  opacity: 0;
}

body.intro-run .intro__streak--2 {
  animation: streakBack 1s cubic-bezier(0.22, 1, 0.36, 1) 3.8s forwards;
}

@keyframes streakBack {
  0% { opacity: 0; transform: translate(560%, -50%) skewX(14deg); }
  15% { opacity: 0.6; }
  85% { opacity: 0.6; }
  100% { opacity: 0; transform: translate(-160%, -50%) skewX(14deg); }
}

@keyframes streak {
  0% { opacity: 0; transform: translate(-120%, -50%) skewX(-18deg); }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { opacity: 0; transform: translate(560%, -50%) skewX(-18deg); }
}

.intro__skip {
  position: absolute;
  bottom: clamp(20px, 4vh, 36px);
  right: clamp(20px, 4vw, 40px);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
  opacity: 0;
  transition: color 0.3s, border-color 0.3s;
}

body.intro-run .intro__skip {
  animation: skipIn 0.5s ease 0.9s forwards;
}

@keyframes skipIn {
  to { opacity: 1; }
}

.intro__skip:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}

/* lift */
.intro.is-done {
  animation: introLift 1s var(--ease-out) forwards;
  pointer-events: none;
}

@keyframes introLift {
  0% { opacity: 1; filter: brightness(1); }
  30% { filter: brightness(1.16); }
  100% { opacity: 0; filter: brightness(1.08); visibility: hidden; }
}

/* the camera pushes through the shot rather than the shot fading away */
.intro.is-done .intro__stage {
  animation: stageThrough 1s var(--ease-out) forwards;
}

@keyframes stageThrough {
  from { transform: scale(1.02); }
  to { transform: scale(1.26); }
}

body.no-intro .intro {
  display: none;
}

/* ============================================================ VIEWPORT 01 == */

.page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  padding: clamp(16px, 2.4vh, 28px) clamp(14px, 3vw, 32px);
}

/* --------------------------------------------------------------- header --- */

.site-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 2.8vw, 28px);
  width: 100%;
  max-width: 720px;
  z-index: 5;
}

.anim-header {
  animation: slideDown 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-play-state: paused;
}

body.ready .anim-header {
  animation-play-state: running;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-18px); }
  to { opacity: 1; transform: translateY(0); }
}

.logo-btn {
  width: clamp(40px, 4.4vw, 46px);
  height: clamp(40px, 4.4vw, 46px);
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--nav-shadow);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: transform 0.35s var(--ease-out);
}

.logo-btn img {
  width: 72%;
  height: 72%;
  object-fit: contain;
}

.logo-btn:hover {
  transform: scale(1.04);
}

.nav-pill {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex: 1;
  max-width: 430px;
  height: clamp(44px, 5.2vw, 48px);
  padding: 4px 8px;
  background: #fff;
  border-radius: 999px;
  box-shadow: var(--nav-shadow);
}

.nav-link {
  position: relative;
  font-weight: 500;
  font-size: clamp(13px, 1.4vw, 15px);
  letter-spacing: -0.01em;
  color: var(--nav-text);
  opacity: 0.5;
  padding: 8px 10px;
  transition: opacity 0.3s;
}

.nav-link:hover {
  opacity: 0.75;
}

.nav-link.is-active {
  opacity: 1;
}

.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 3px;
  height: 3px;
  margin-left: -1.5px;
  background: #000;
  box-shadow: -5px 0 0 #000, 5px 0 0 #000;
}

.sign-in {
  display: inline-flex;
  align-items: center;
  height: clamp(44px, 5.2vw, 48px);
  padding: 0 clamp(16px, 2vw, 22px);
  background: var(--pill-dark);
  color: var(--sign-in-text);
  font-weight: 500;
  font-size: clamp(13px, 1.4vw, 15px);
  letter-spacing: -0.01em;
  border-radius: 999px;
  box-shadow: var(--nav-shadow);
  flex-shrink: 0;
  transition: background 0.3s, color 0.3s, transform 0.3s;
}

.sign-in:hover {
  background: #323234;
  color: #fff;
  transform: translateY(-1px);
}

.burger {
  display: none;
}

/* ----------------------------------------------------------------- hero --- */

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  max-width: 900px;
}

/* editorial hero: copy column left, story photograph right */
.hero--story {
  position: relative;
  max-width: 1240px;
  align-items: flex-start;
  text-align: left;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 780px;
  position: relative;
  z-index: 2;
}

.hero-visual {
  position: absolute;
  right: 0;
  top: 50%;
  height: min(58vh, 46vw);
  aspect-ratio: 3 / 4;
  margin-top: calc(min(58vh, 46vw) / -2);
  z-index: 1;
  will-change: transform;
}

.hero-visual .story-img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

/* the hero image waits for the opening shot: reveal is gated on body.ready */
body:not(.ready) .hero-visual .story-img {
  opacity: 0 !important;
  clip-path: inset(0 100% 0 0) !important;
}

body.ready .hero-visual .story-img.in {
  animation: kenburns 26s ease-in-out 2.2s infinite alternate;
}

/* soft ground behind the copy so the photograph never fights the headline */
.hero-copy::before {
  content: "";
  position: absolute;
  inset: -12% -22% -12% -30%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    62% 60% at 40% 50%,
    rgba(0, 0, 0, 0.72) 0%,
    rgba(0, 0, 0, 0.42) 52%,
    rgba(0, 0, 0, 0) 80%
  );
}

/* trust row */
.trust {
  display: inline-flex;
  align-items: center;
  margin-bottom: clamp(16px, 2.5vh, 26px);
}

.trust__avatar {
  width: var(--trust-size);
  height: var(--trust-size);
  border-radius: 50%;
  background: var(--trust-bg);
  border: 1px solid var(--trust-border);
  padding: 5px;
  display: block;
  transition: transform 0.35s var(--ease-out);
}

.trust__disc {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
}

.trust__disc i {
  font-size: calc(var(--trust-size) * 0.34);
  color: #111;
}

.trust__avatar.a1 { z-index: 1; }
.trust__avatar.a2 { z-index: 2; margin-left: calc(var(--trust-size) * -0.42); }
.trust__avatar.a3 { z-index: 4; margin-left: calc(var(--trust-size) * -0.42); }

.trust__avatar.a1:hover { transform: translateY(-2px); }
.trust__avatar.a2:hover { transform: translateY(-4px); }
.trust__avatar.a3:hover { transform: translateY(-2px); }

.trust__pill {
  display: inline-flex;
  align-items: center;
  height: var(--trust-size);
  margin-left: calc(var(--trust-size) * -0.42);
  padding-left: calc(var(--trust-size) * 0.58);
  padding-right: 16px;
  background: var(--trust-bg);
  border: 1px solid var(--trust-border);
  border-radius: 999px;
  font-weight: 500;
  font-size: clamp(12px, 1.4vw, 13.5px);
  color: var(--trust-text);
  white-space: nowrap;
}

/* headline */
.headline {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(23px, 4.2vw, 57px);
  letter-spacing: -0.04em;
  line-height: 1.14;
  color: #fff;
  overflow: hidden;
  text-shadow: 0 0 22px rgba(255, 255, 255, 0.35), 0 0 60px rgba(255, 255, 255, 0.12);
}

.headline__line {
  display: block;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(14px);
}

body.ready .headline__line {
  animation: headlineFade 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

body.ready .headline__line.l1 { animation-delay: 0.12s; }
body.ready .headline__line.l2 { animation-delay: 0.3s; }
body.ready .headline__line.l3 { animation-delay: 0.48s; }

@keyframes headlineFade {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* subhead */
.subhead {
  max-width: min(560px, 92%);
  margin-top: clamp(14px, 2.2vh, 22px);
  font-size: clamp(calc(14.5px + 2pt), calc(1.65vw + 2pt), calc(18px + 2pt));
  font-weight: 400;
  line-height: 1.58;
  color: #e6e6e8;
  opacity: 0.96;
}

/* CTA */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: clamp(18px, 3vh, 28px);
  padding: clamp(11px, 1.6vh, 13px) clamp(22px, 3vw, 28px);
  background: #fff;
  color: #000;
  font-weight: 600;
  font-size: clamp(13.5px, 1.5vw, 14.5px);
  border-radius: 999px;
  box-shadow: var(--glow-soft);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}

.cta:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--glow-strong);
}

.cta--ghost {
  background: rgba(40, 40, 42, 0.7);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.cta--ghost:hover {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5), 0 0 26px rgba(255, 255, 255, 0.18);
}

/* ---------------------------------------------------------------- stats --- */

.stats {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(10px, 2vw, 22px);
  width: 100%;
  max-width: 1240px;
  position: relative;
  padding-top: 18px;
  z-index: 2;
}

/* the rule draws in once the hero hands over, like the diagram lines */
.stats::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7) 12%, rgba(255, 255, 255, 0.7) 88%, transparent);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5), 0 0 30px rgba(255, 255, 255, 0.18);
  transform: scaleX(0);
  transform-origin: center;
}

body.ready .stats::before {
  animation: statsRule 1.2s var(--ease-film, cubic-bezier(0.22, 1, 0.36, 1)) 0.55s forwards;
}

@keyframes statsRule {
  to { transform: scaleX(1); }
}

.stat {
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
}

.stat__icon {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 33px);
  color: #fff;
  line-height: 1;
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.45);
}

.stat__value {
  font-family: var(--font-display);
  font-size: clamp(19px, 2.4vw, 30px);
  font-weight: 400;
  letter-spacing: -0.025em;
  color: #fff;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 16px rgba(255, 255, 255, 0.4), 0 0 44px rgba(255, 255, 255, 0.14);
}

.stat__label {
  font-size: clamp(12px, 1.3vw, 14px);
  color: #b4b4b6;
}

/* -------------------------------------------------- shared entrance anim -- */

.anim {
  opacity: 0;
  transform: translateY(22px) scale(0.98);
  filter: blur(6px);
}

body.ready .anim {
  animation: reveal 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--d, 0s);
}

@keyframes reveal {
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.anim-pulse {
  opacity: 0;
  transform: translateY(22px) scale(0.98);
  filter: blur(6px);
}

body.ready .anim-pulse {
  animation: revealPulse 1.1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--d, 0s);
}

/* post-entrance state: keeps the CTA visible once its animation is released
   so the magnetic transform can own the element */
.anim-pulse.settled {
  animation: none !important;
  opacity: 1;
  filter: none;
}

@keyframes revealPulse {
  0% { opacity: 0; transform: translateY(22px) scale(0.98); filter: blur(6px); }
  62% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); box-shadow: var(--glow-soft); }
  80% { box-shadow: var(--glow-strong); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); box-shadow: var(--glow-soft); }
}

/* ==================================================== CHAPTERS (scroll) ==== */

.chapter {
  position: relative;
  z-index: 1;
  padding: clamp(90px, 16vh, 160px) clamp(18px, 4vw, 48px);
}

.shell {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
}

.kicker {
  font-family: var(--font-sans);
  font-size: clamp(11.5px, 1.2vw, 13px);
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: #bcbcbe;
  margin-bottom: clamp(16px, 2.6vh, 26px);
}

.kicker {
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.25);
}

.kicker::before {
  content: "";
  display: inline-block;
  width: 26px;
  height: 1px;
  background: #fff;
  vertical-align: middle;
  margin-right: 12px;
  animation: kickerPulse 3s ease-in-out infinite alternate;
}

@keyframes kickerPulse {
  from { box-shadow: 0 0 8px rgba(255, 255, 255, 0.7), 0 0 20px rgba(255, 255, 255, 0.3); }
  to { box-shadow: 0 0 14px rgba(255, 255, 255, 1), 0 0 34px rgba(255, 255, 255, 0.55); }
}

.mega,
.title {
  font-family: var(--font-display);
  font-weight: 400;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -0.04em;
  /* neon sign: the dot-matrix face carries its own halo */
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.4), 0 0 52px rgba(255, 255, 255, 0.16);
}

.mega {
  font-size: clamp(30px, 6vw, 78px);
}

.title {
  font-size: clamp(27px, 5vw, 62px);
}

.mega--center {
  text-align: center;
  font-size: clamp(34px, 7.4vw, 96px);
}

.mega__line {
  display: block;
  white-space: nowrap;
}

.chapter__lede {
  max-width: 580px;
  margin-top: clamp(16px, 2.6vh, 24px);
  font-size: clamp(15.5px, 1.65vw, 19px);
  line-height: 1.62;
  color: #e6e6e8;
  opacity: 0.96;
}

.chapter__lede--center {
  margin-inline: auto;
  text-align: center;
}

.chapter__head {
  margin-bottom: clamp(40px, 7vh, 72px);
}

/* manifesto: full-height statement, now the parallax-floating stage */
.chapter--manifesto {
  min-height: 88vh;
  display: grid;
  align-items: center;
}

.chapter--float {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  padding-top: clamp(64px, 8vh, 100px);
  padding-bottom: clamp(64px, 8vh, 100px);
}

/* central focal content stays dominant over the floating layer */
.float-focus {
  position: relative;
  z-index: 5;
  text-align: center;
  justify-items: center;
  display: grid;
}

.float-focus .kicker::before {
  margin-right: 0;
}

.float-focus__actions {
  justify-content: center;
  margin-top: clamp(22px, 4vh, 36px);
}

/* a soft pool of dark behind the copy so it reads over any drifting image */
.float-focus::before {
  content: "";
  position: absolute;
  inset: -14% -18%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    56% 58% at 50% 50%,
    rgba(0, 0, 0, 0.78) 0%,
    rgba(0, 0, 0, 0.5) 48%,
    rgba(0, 0, 0, 0) 78%
  );
}

/* floating layer: outer element is driven by JS translate3d every frame,
   so it carries NO transitions; the inner image owns entrance + hover */
.float-el {
  position: absolute;
  z-index: 1;
  will-change: transform;
}

.float-img {
  display: block;
  height: auto;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(11, 13, 15, 0.7);
  cursor: pointer;
  box-shadow:
    0 0 22px rgba(255, 255, 255, 0.14),
    0 0 60px rgba(255, 255, 255, 0.05),
    0 18px 44px -20px rgba(0, 0, 0, 0.9);
  animation: floatGlow 4.2s ease-in-out infinite alternate;
  animation-delay: var(--fd, 0s);
  transition:
    opacity 0.8s var(--ease-out),
    transform 0.2s ease,
    border-color 0.3s,
    box-shadow 0.3s;
  transition-delay: var(--fd, 0s), 0s, 0s, 0s;
}

/* neon breathe — each float on its own phase via the entrance delay */
@keyframes floatGlow {
  from {
    box-shadow:
      0 0 18px rgba(255, 255, 255, 0.12),
      0 0 50px rgba(255, 255, 255, 0.04),
      0 18px 44px -20px rgba(0, 0, 0, 0.9);
  }
  to {
    box-shadow:
      0 0 30px rgba(255, 255, 255, 0.26),
      0 0 80px rgba(255, 255, 255, 0.1),
      0 18px 44px -20px rgba(0, 0, 0, 0.9);
  }
}

.float-img:hover {
  transform: scale(1.05);
  border-color: rgba(255, 255, 255, 0.6);
  animation-play-state: paused;
  box-shadow:
    0 0 36px rgba(255, 255, 255, 0.35),
    0 0 100px rgba(255, 255, 255, 0.14),
    0 18px 44px -20px rgba(0, 0, 0, 0.9);
}

/* the alpha wordmark floats bare — glow hugs the letterforms, not a box */
.float-img--plate {
  border: none;
  background: none;
  box-shadow: none;
  animation: wordmarkGlow 4.2s ease-in-out infinite alternate;
  animation-delay: var(--fd, 0s);
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.4));
}

@keyframes wordmarkGlow {
  from { filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3)); }
  to { filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.65)) drop-shadow(0 0 46px rgba(255, 255, 255, 0.2)); }
}

.float-img--plate:hover {
  border: none;
  box-shadow: none;
  filter: drop-shadow(0 0 24px rgba(255, 255, 255, 0.85)) drop-shadow(0 0 60px rgba(255, 255, 255, 0.3));
}

/* positions + sizes echo the reference demo's scatter; every image unique */
.f1  { top: 4%;  left: 3%;   width: clamp(120px, 16vw, 250px); }
.f9  { top: 2%;  left: 24%;  width: clamp(110px, 14vw, 210px); }
.f7  { top: 8%;  left: 44%;  width: clamp(130px, 16vw, 240px); }
.f2  { top: 3%;  left: 75%;  width: clamp(110px, 15vw, 230px); }
.f6  { top: 33%; left: 1%;   width: clamp(150px, 19vw, 300px); }
.f3  { top: 25%; left: 85%;  width: clamp(115px, 14vw, 220px); }
.f12 { top: 49%; left: 66%;  width: clamp(120px, 15vw, 230px); }
.f4  { top: 62%; left: 4%;   width: clamp(90px, 10vw, 150px); }
.f10 { top: 58%; left: 86%;  width: clamp(120px, 14vw, 220px); }
.f8  { top: 72%; left: 17%;  width: clamp(150px, 19vw, 300px); }
.f11 { top: 78%; left: 42%;  width: clamp(120px, 14vw, 220px); }
.f5  { top: 74%; left: 63%;  width: clamp(150px, 19vw, 300px); }

.float-el img {
  width: 100%;
}

@media (max-width: 720px) {
  /* fewer, smaller floats on phones — concept intact, clutter gone */
  .f3,
  .f6,
  .f7,
  .f8,
  .f10,
  .f12 {
    display: none;
  }

  .f1  { top: 4%;  left: 4%;  width: 124px; }
  .f9  { top: 6%;  left: 60%; width: 116px; }
  .f2  { top: 26%; left: 70%; width: 104px; }
  .f4  { top: 72%; left: 6%;  width: 88px; }
  .f11 { top: 84%; left: 38%; width: 116px; }
  .f5  { top: 70%; left: 58%; width: 152px; }
}

@media (prefers-reduced-motion: reduce) {
  .float-el {
    transform: none !important;
  }

  .float-img {
    opacity: 1 !important;
    animation: none !important;
  }
}

/* two-column practice prose (the in-practice and evaluation paragraphs) */
.practice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 40px);
  max-width: 980px;
}



.practice__p {
  font-size: clamp(15.5px, 1.65vw, 18.5px);
  line-height: 1.66;
  color: #e4e4e6;
  border-left: 1px solid rgba(255, 255, 255, 0.28);
  padding-left: clamp(14px, 1.8vw, 22px);
}

.chapter__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: clamp(26px, 4.5vh, 44px);
}

.chapter__actions .cta {
  margin-top: 0;
}

/* proof rows follow their chapter head */
.grid--proof {
  margin-top: clamp(10px, 2vh, 18px);
}

.grid--proof-3 {
  grid-template-columns: repeat(3, 1fr);
  margin-top: clamp(30px, 5vh, 50px);
}

.chapter--why .chapter__lede {
  margin-top: clamp(28px, 5vh, 46px);
}

/* four-up enterprise grid (doubled class outranks the services 3-col rule) */
.grid--services.grid--four {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1000px) {
  .grid--services.grid--four {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* insights band — a log entry in the system */
.chapter--insights {
  padding-top: clamp(80px, 12vh, 130px);
  padding-bottom: clamp(80px, 12vh, 130px);
}

.insights__row {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-top: clamp(24px, 4vh, 40px);
}

/* drawn top rule, ignited by the row's own reveals */
.insights__row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.08));
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.45), 0 0 28px rgba(255, 255, 255, 0.14);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.15s;
}

.insights__row:has(.fx.in)::before {
  transform: scaleX(1);
}

.insights__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.48);
  margin-bottom: clamp(14px, 2.4vh, 22px);
  min-width: min(520px, 100%);
}

/* the meta line draws between the log index and its source */
.insights__line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.1));
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.35);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1) 0.45s;
}

.insights__meta.in .insights__line {
  transform: scaleX(1);
}

.insights__post {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 64px);
  line-height: 1.12;
  letter-spacing: -0.04em;
  color: #fff;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.35);
  transition: text-shadow 0.5s;
}

.insights__main:hover .insights__post {
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.85), 0 0 80px rgba(255, 255, 255, 0.3);
}

/* read row: the cta arrow language, extending on hover */
.insights__read {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: clamp(16px, 2.6vh, 24px);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #d4d4d6;
  transition: color 0.35s, text-shadow 0.35s;
}

.insights__arrowline {
  display: block;
  width: 2rem;
  height: 1px;
  background: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.insights__main:hover .insights__read,
.insights__read:hover {
  color: #fff;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
}

.insights__main:hover .insights__arrowline,
.insights__read:hover .insights__arrowline {
  width: 3.6rem;
}

/* the finale headline is long-form copy, so it sits a size below the mega */
.mega--cta {
  font-size: clamp(24px, 4.8vw, 62px);
}

/* --------------------------------------------------------------- cards ---- */

/* every chapter shell is a 3D room; stages inside it rotate with the scroll */
.chapter > .shell,
.pin-stage > .shell {
  perspective: 1400px;
  position: relative;
  z-index: 1;
}

.tilt-stage {
  transform: rotateX(var(--rx, 0deg));
  transform-style: preserve-3d;
  will-change: transform;
}

.grid--services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 1.6vw, 18px);
}

.card {
  position: relative;
  overflow: hidden;
  padding: clamp(20px, 2.6vw, 30px);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(40, 40, 42, 0.62) 0%, rgba(16, 16, 18, 0.72) 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 24px 50px -28px rgba(0, 0, 0, 0.85);
  transition: border-color 0.45s, box-shadow 0.45s;
}

/* lit top edge */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  opacity: 0.5;
  transition: opacity 0.45s;
}

/* glow-follow spotlight, position fed by JS as --mx / --my */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    240px circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 255, 255, 0.16),
    transparent 62%
  );
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 0 30px rgba(255, 255, 255, 0.18),
    0 0 70px rgba(255, 255, 255, 0.07), 0 24px 50px -28px rgba(0, 0, 0, 0.85);
}

.card:hover::before {
  opacity: 1;
}

.card:hover::after {
  opacity: 1;
}

.card__glyph {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(24px, 2.8vw, 34px);
  color: #fff;
  line-height: 1;
  margin-bottom: clamp(14px, 2vh, 20px);
  animation: glyphPulse 3.4s ease-in-out infinite alternate;
}

@keyframes glyphPulse {
  from { text-shadow: 0 0 12px rgba(255, 255, 255, 0.4); }
  to { text-shadow: 0 0 24px rgba(255, 255, 255, 0.85), 0 0 52px rgba(255, 255, 255, 0.3); }
}

.card__title {
  font-family: var(--font-sans);
  font-size: clamp(15.5px, 1.5vw, 18px);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #fff;
  margin-bottom: 8px;
}

.card__body {
  font-size: clamp(13.5px, 1.25vw, 15px);
  line-height: 1.6;
  color: #c8c8ca;
}

/* --------------------------------------------------------------- steps ---- */

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 1.6vw, 18px);
  counter-reset: step;
}

.step {
  position: relative;
  padding: clamp(22px, 3vw, 32px);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(28, 28, 30, 0.55) 0%, rgba(10, 10, 12, 0.7) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: border-color 0.45s, box-shadow 0.45s;
}

.step:hover {
  border-color: rgba(255, 255, 255, 0.42);
  box-shadow: 0 0 26px rgba(255, 255, 255, 0.12), 0 0 60px rgba(255, 255, 255, 0.05);
}

.step::after {
  content: "";
  position: absolute;
  top: 50%;
  right: calc(-1 * clamp(12px, 1.6vw, 18px));
  width: clamp(12px, 1.6vw, 18px);
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.1));
  animation: connectorPulse 2.2s ease-in-out infinite;
}

@keyframes connectorPulse {
  0%, 100% { box-shadow: 0 0 6px rgba(255, 255, 255, 0.3); opacity: 0.7; }
  50% { box-shadow: 0 0 14px rgba(255, 255, 255, 0.9), 0 0 30px rgba(255, 255, 255, 0.4); opacity: 1; }
}

.step:last-child::after {
  display: none;
}

.step__num {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.2vw, 27px);
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.4);
}

.step__name {
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 12px 0 8px;
}

.step__body {
  font-size: clamp(13.5px, 1.25vw, 15px);
  line-height: 1.6;
  color: #c8c8ca;
}

/* --------------------------------------------------------------- proof ---- */

.grid--proof {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(14px, 2vw, 24px);
}

.proof {
  display: grid;
  gap: 6px;
  padding: clamp(18px, 2.4vw, 26px) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.proof__value {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.6vw, 46px);
  color: #fff;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.4), 0 0 54px rgba(255, 255, 255, 0.16);
  white-space: nowrap;
}

/* power-on flicker when the band lands */
.proof.in .proof__value {
  animation: powerOn 0.9s steps(1, end) both;
}

@keyframes powerOn {
  0% { opacity: 0; }
  8% { opacity: 1; }
  14% { opacity: 0.3; }
  22% { opacity: 1; }
  30% { opacity: 0.55; }
  38% { opacity: 1; }
  100% { opacity: 1; }
}

.proof {
  transition: border-color 0.5s, box-shadow 0.5s;
}

.proof.in {
  border-top-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 -10px 26px -14px rgba(255, 255, 255, 0.25);
}

.proof__label {
  font-size: clamp(12.5px, 1.25vw, 14.5px);
  color: #bcbcbe;
}

.footnote {
  margin-top: clamp(20px, 3vh, 30px);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #6f6f71;
}

/* -------------------------------------------------------------- contact --- */

.chapter--contact {
  min-height: 92vh;
  display: grid;
  align-items: center;
  text-align: center;
}

.contact__actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: clamp(8px, 1.6vh, 14px);
}

/* --------------------------------------------------------------- footer --- */

.site-footer {
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 24%, rgba(0, 0, 0, 0.88) 100%);
  padding: clamp(56px, 9vh, 84px) clamp(18px, 4vw, 48px) clamp(44px, 7vh, 68px);
}

/* the closing rule draws in from centre, like the stats rule opened the page */
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 6%;
  right: 6%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65) 14%, rgba(255, 255, 255, 0.65) 86%, transparent);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.5), 0 0 32px rgba(255, 255, 255, 0.16);
  transform: scaleX(clamp(0, var(--p, 0) / 0.45, 1));
  transform-origin: center;
}

/* the sequence's final marker */
.site-footer::after {
  content: "SEC. 09";
  position: absolute;
  right: clamp(18px, 4vw, 48px);
  bottom: clamp(14px, 2.6vh, 24px);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.34);
  border-right: 1px solid rgba(255, 255, 255, 0.22);
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  padding: 0 10px 8px 0;
  pointer-events: none;
}

.site-footer__row {
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
  transform: perspective(900px)
    rotateX(calc((1 - clamp(0, var(--p, 0) / 0.6, 1)) * 9deg))
    translateY(calc((1 - clamp(0, var(--p, 0) / 0.6, 1)) * 36px));
  transform-origin: 50% 0;
  opacity: calc(0.2 + clamp(0, var(--p, 0) / 0.55, 1) * 0.8);
}

.footer__mark {
  width: clamp(140px, 16vw, 200px);
  color: #fff;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.4));
  animation: markBreathe 4.5s ease-in-out infinite alternate;
}

/* the bookend: the mark draws stroke-by-stroke as the footer enters — the
   same gesture the opening shot began the experience with */
.footer__mark g > * {
  stroke-dasharray: 260;
  stroke-dashoffset: calc(260 - 260 * clamp(0, (var(--p, 0) - var(--fd, 0.1)) / 0.22, 1));
}

.footer__mark g > *:nth-child(1) { --fd: 0.08; }
.footer__mark g > *:nth-child(2) { --fd: 0.14; }
.footer__mark g > *:nth-child(3) { --fd: 0.18; }
.footer__mark g > *:nth-child(4) { --fd: 0.26; }
.footer__mark g > *:nth-child(5) { --fd: 0.3; }
.footer__mark g > *:nth-child(6) { --fd: 0.34; }
.footer__mark g > *:nth-child(7) { --fd: 0.4; }
.footer__mark g > *:nth-child(8) { --fd: 0.48; }
.footer__mark g > *:nth-child(9) { --fd: 0.52; }

@keyframes markBreathe {
  from { filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.25)); }
  to { filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.6)) drop-shadow(0 0 44px rgba(255, 255, 255, 0.2)); }
}

.footer__tag {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: #b8b8ba;
}

.footer__nav {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer__nav a {
  position: relative;
  font-size: 13.5px;
  font-weight: 500;
  color: #cacacc;
  padding-bottom: 3px;
  transition: color 0.3s;
}

/* micro underline, matching the nav language */
.footer__nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.footer__nav a:hover {
  color: #fff;
}

.footer__nav a:hover::after {
  transform: scaleX(1);
}

.footer__legal {
  font-size: 11.5px;
  color: #909092;
}

/* ===================================================== SCROLL FX (.fx) ===== */

.fx {
  opacity: 0;
  transition:
    opacity 0.9s var(--ease-out),
    transform 0.9s var(--ease-out),
    filter 0.9s var(--ease-out),
    clip-path 1.3s var(--ease-out);
  transition-delay: var(--fd, 0s);
  will-change: opacity, transform;
}

.fx[data-fx="rise"] {
  transform: translateY(34px);
  filter: blur(5px);
}

/* heading blocks: the parent only fades; each line flips up from a 3D hinge */
.fx[data-fx="lines"] {
  perspective: 900px;
}

.fx[data-fx="lines"] .mega__line {
  opacity: 0;
  transform: rotateX(58deg) translateY(44px) translateZ(-70px);
  transform-origin: 50% 100%;
  filter: blur(5px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out),
    filter 0.9s var(--ease-out);
}

.fx[data-fx="lines"] .mega__line:nth-child(2) { transition-delay: 0.14s; }
.fx[data-fx="lines"] .mega__line:nth-child(3) { transition-delay: 0.28s; }

.fx[data-fx="lines"].in .mega__line {
  opacity: 1;
  transform: none;
  filter: none;
}

/* neon settle: headline halo blooms once as the lines land */
.fx[data-fx="lines"].in {
  animation: neonSettle 1.4s ease-out 0.25s both;
}

@keyframes neonSettle {
  0% { text-shadow: 0 0 8px rgba(255, 255, 255, 0.2); }
  45% { text-shadow: 0 0 34px rgba(255, 255, 255, 0.85), 0 0 90px rgba(255, 255, 255, 0.35); }
  100% { text-shadow: 0 0 18px rgba(255, 255, 255, 0.4), 0 0 52px rgba(255, 255, 255, 0.16); }
}

/* cards fall in from depth, fanned by column (--ry set per nth-child) */
.fx[data-fx="tilt"] {
  transform: rotateX(28deg) rotateY(var(--ry, 0deg)) translateY(64px) translateZ(-110px)
    scale(0.94);
  transform-origin: 50% 100%;
}

.grid--services .fx[data-fx="tilt"]:nth-child(3n + 1) { --ry: 14deg; }
.grid--services .fx[data-fx="tilt"]:nth-child(3n) { --ry: -14deg; }
.steps .fx[data-fx="tilt"]:nth-child(1) { --ry: 16deg; }
.steps .fx[data-fx="tilt"]:nth-child(3) { --ry: -16deg; }

.fx.in {
  opacity: 1;
  transform: none;
  filter: none;
}

/* parallax depth layers get their offset from JS as --py */
.depth {
  transform: translate3d(0, var(--py, 0px), 0);
  will-change: transform;
}

/* ambient glow orbs — one drifting pool of light per chapter, pure gradient
   (no blur filter: soft falloff comes from the gradient itself) */
.chapter::before {
  content: "";
  position: absolute;
  width: clamp(340px, 52vw, 760px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.04) 34%,
    transparent 68%
  );
  pointer-events: none;
  z-index: 0;
  animation: orbDrift 16s ease-in-out infinite alternate;
}

@keyframes orbDrift {
  from { transform: translate3d(-4%, -3%, 0) scale(1); opacity: 0.75; }
  to { transform: translate3d(5%, 4%, 0) scale(1.14); opacity: 1; }
}

.chapter--manifesto::before { top: 4%; right: -12%; }
.chapter--platform::before { top: 12%; left: -16%; animation-delay: -5s; }
.chapter--protocol::before { top: 22%; right: -14%; animation-delay: -9s; }
.chapter--proof::before { bottom: -18%; left: 24%; animation-delay: -3s; }
.chapter--contact::before {
  top: 50%;
  left: 50%;
  margin: calc(clamp(340px, 52vw, 760px) / -2) 0 0 calc(clamp(340px, 52vw, 760px) / -2);
  animation: orbBreathe 5s ease-in-out infinite alternate;
}

@keyframes orbBreathe {
  from { transform: scale(0.92); opacity: 0.7; }
  to { transform: scale(1.12); opacity: 1; }
}

/* ================================================================ MOBILE === */

@media (max-width: 720px) {
  .nav-pill,
  .site-header .sign-in {
    display: none;
  }

  .site-header {
    justify-content: space-between;
    max-width: none;
  }

  .logo-btn {
    width: 48px;
    height: 48px;
  }

  .burger {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--pill-dark);
    border: none;
    cursor: pointer;
    box-shadow: var(--nav-shadow);
    transition: background 0.3s;
  }

  .burger__bar {
    grid-area: 1 / 1;
    width: 18px;
    height: 1.5px;
    background: #fff;
    transition: transform 0.35s var(--ease-out), opacity 0.25s, background 0.3s;
  }

  .burger__bar:nth-child(1) { transform: translateY(-6.5px); }
  .burger__bar:nth-child(3) { transform: translateY(6.5px); }

  body.menu-open .burger {
    background: #17171a;
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.35),
      0 0 18px rgba(255, 255, 255, 0.2);
  }

  body.menu-open .burger__bar {
    background: #fff;
  }

  body.menu-open .burger__bar:nth-child(1) { transform: translateY(0) rotate(45deg); }
  body.menu-open .burger__bar:nth-child(2) { opacity: 0; }
  body.menu-open .burger__bar:nth-child(3) { transform: translateY(0) rotate(-45deg); }

  .headline {
    letter-spacing: -0.08em;
    line-height: 1.05;
  }

  .hero-visual {
    display: none;
  }

  .hero--story {
    align-items: center;
    text-align: center;
  }

  .hero-copy {
    align-items: center;
    max-width: none;
  }

  .hero-copy::before {
    display: none;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 10px;
  }

  .grid--services,
  .grid--services.grid--four,
  .steps {
    grid-template-columns: 1fr;
  }

  .step::after {
    display: none;
  }

  .grid--proof {
    grid-template-columns: repeat(2, 1fr);
  }

  .practice {
    grid-template-columns: 1fr;
  }

  .grid--proof-3 {
    grid-template-columns: 1fr 1fr;
  }

  .insights__row {
    align-items: flex-start;
    flex-direction: column;
  }

  /* phones get the glow but not the deep 3D: entrances simplify to a rise */
  .fx[data-fx="tilt"] {
    transform: translateY(40px) scale(0.97);
  }

  .tilt-stage {
    transform: none;
  }

  .chapter::before {
    width: 78vw;
  }

  .mega__line,
  .headline__line {
    white-space: normal;
  }

  .mega--center {
    font-size: clamp(30px, 11vw, 54px);
  }
}

/* mobile overlay + sheet */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: overlayIn 0.28s ease both;
}

@keyframes overlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.mobile-menu {
  position: fixed;
  top: 84px;
  left: 14px;
  right: 14px;
  z-index: 50;
  background: linear-gradient(180deg, rgba(13, 14, 16, 0.96) 0%, rgba(5, 6, 7, 0.97) 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  padding: 18px 18px 40px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 0 30px rgba(255, 255, 255, 0.07),
    0 24px 70px rgba(0, 0, 0, 0.6);
  perspective: 900px;
  transform-origin: 50% 0;
  animation: menuIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* the sheet drops in on the system's 3D hinge */
@keyframes menuIn {
  from { opacity: 0; transform: perspective(900px) rotateX(-9deg) translateY(-16px); }
  to { opacity: 1; transform: perspective(900px) rotateX(0deg) translateY(0); }
}

.mobile-menu__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  padding: 4px 2px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  margin-bottom: 6px;
}

.mobile-menu__marker {
  position: absolute;
  right: 14px;
  bottom: 12px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.3);
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0 8px 6px 0;
  pointer-events: none;
}

.mobile-menu nav {
  display: grid;
}

.mob-link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 15px 6px;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: #e8e8ea;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  opacity: 0;
  animation: linkIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.mob-link__num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.42);
}

.mob-link:nth-child(1) { animation-delay: 0.08s; }
.mob-link:nth-child(2) { animation-delay: 0.15s; }
.mob-link:nth-child(3) { animation-delay: 0.22s; }
.mob-link:nth-child(4) { animation-delay: 0.29s; }

@keyframes linkIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* active: a glowing tick instead of the old dots */
.mob-link.is-active {
  color: #fff;
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.4);
}

.mob-link.is-active::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 22px;
  height: 1px;
  background: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 26px rgba(255, 255, 255, 0.3);
}

.mob-signin {
  display: block;
  margin-top: 18px;
  padding: 14px;
  text-align: center;
  background: rgba(40, 40, 42, 0.6);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.08);
  opacity: 0;
  animation: linkIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.36s forwards;
}

/* ======================================================= SMALL BREAKPOINTS = */

@media (max-width: 420px) {
  :root {
    --trust-size: 34px;
  }

  .trust__pill {
    font-size: 12px;
  }

  .headline {
    letter-spacing: -0.09em;
    line-height: 1.04;
  }
}

@media (max-height: 700px) {
  .trust { margin-bottom: 12px; }
  .subhead { margin-top: 10px; }
  .cta { margin-top: 14px; }
}

/* ===================================================== REDUCED MOTION ====== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }

  .anim,
  .anim-pulse,
  .headline__line,
  .fx,
  .fx[data-fx="lines"] .mega__line,
  .tilt-stage {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  .chapter::before,
  .card__glyph,
  .kicker::before,
  .step::after,
  .footer__mark {
    animation: none !important;
  }

  .intro {
    display: none !important;
  }

  .bg-video {
    display: none;
  }
}


/* ====================================================== VISUAL STORYTELLING =
   Editorial B/W photography, per-section reveals, drawn diagrams and
   infographics. Imagery sits over the existing background — nothing here
   paints its own ground. */

/* --------------------------------------------------------- story imagery --- */

.story-el {
  position: absolute;
  z-index: 1;
  will-change: transform;
}

.story-img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    0 0 26px rgba(255, 255, 255, 0.1),
    0 0 70px rgba(255, 255, 255, 0.04),
    0 30px 60px -30px rgba(0, 0, 0, 0.95);
  transition:
    opacity 1.1s var(--ease-out),
    transform 1.3s var(--ease-out),
    clip-path 1.3s var(--ease-out),
    border-color 0.4s,
    box-shadow 0.4s;
  transition-delay: var(--fd, 0s);
}

.story-img:hover {
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow:
    0 0 36px rgba(255, 255, 255, 0.22),
    0 0 90px rgba(255, 255, 255, 0.08),
    0 30px 60px -30px rgba(0, 0, 0, 0.95);
}

/* reveal variants — each section keeps its own rhythm */
.fx[data-fx="clip-l"] {
  clip-path: inset(0 100% 0 0);
  transform: scale(1.06);
}

.fx[data-fx="clip-r"] {
  clip-path: inset(0 0 0 100%);
  transform: scale(1.06);
}

.fx[data-fx="mask"] {
  clip-path: inset(48% 0 48% 0);
  transform: scale(1.04);
}

.fx[data-fx="scalefade"] {
  transform: scale(1.12);
  transition-duration: 1.7s;
}

.fx[data-fx="drift"] {
  transform: translateX(46px);
}

.fx[data-fx="clip-l"].in,
.fx[data-fx="clip-r"].in,
.fx[data-fx="mask"].in {
  clip-path: inset(0 0 0 0);
}

/* slow cinematic drift after landing (governance facade) */
.story-img--drift.in {
  animation: storyDrift 26s ease-in-out 1.4s infinite alternate;
}

@keyframes storyDrift {
  from { transform: translateX(0); }
  to { transform: translateX(-3.5%); }
}

/* hero image: Ken Burns push after the clip reveal has landed */
.st-hero .story-img.in {
  animation: kenburns 26s ease-in-out 1.6s infinite alternate;
}

@keyframes kenburns {
  from { transform: scale(1); }
  to { transform: scale(1.055); }
}

/* in-flow wide plates (SOC, archive) */
.story-wide {
  margin: 0 0 clamp(36px, 6vh, 60px);
}

.story-wide .story-img {
  width: min(880px, 100%);
}

.story-wide--tall {
  margin-top: clamp(36px, 6vh, 60px);
}

/* ---------------------------------------------- per-section placements ----- */

/* s01 — hero image right, statement left */
.chapter--story1 .float-focus--left {
  text-align: left;
  justify-items: start;
  max-width: 640px;
  margin-inline: 0;
}

.chapter--story1 .float-focus--left .kicker::before {
  margin-right: 12px;
}

.chapter--story1 .float-focus--left::before {
  inset: -12% -30% -12% -40%;
  background: radial-gradient(
    64% 62% at 38% 50%,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0.5) 50%,
    rgba(0, 0, 0, 0) 80%
  );
}

.chapter--story1 .float-focus__actions {
  justify-content: flex-start;
}

.st-hero {
  top: 50%;
  right: -3%;
  width: clamp(460px, 46vw, 760px);
  transform: translateY(-50%);
}

/* the float engine writes translate3d inline; recentre via margin instead */
.st-hero {
  transform: none;
  top: auto;
  bottom: 12%;
}

/* s02 — vault right (depth +), pathways left (depth −, opposite motion) */
.chapter--story2,
.chapter--story4,
.chapter--story5 {
  position: relative;
}

.chapter--story4 {
  overflow: hidden;
}

.st-vault {
  top: 5%;
  right: 0;
  width: clamp(260px, 24vw, 380px);
}

.st-loom {
  bottom: -2%;
  right: 0;
  width: clamp(210px, 18vw, 300px);
  opacity: 0.95;
}

/* s04 — governance facade right (drift), switchyard behind left (deep) */
.st-gov {
  top: 8%;
  right: 0;
  width: clamp(250px, 24vw, 380px);
}

.st-grid {
  bottom: 4%;
  left: -3%;
  width: clamp(240px, 22vw, 360px);
  opacity: 0.9;
}

/* s05 — infrastructure left tall, operator right (different depths) */
.st-infra {
  top: 3%;
  right: 0;
  width: clamp(220px, 20vw, 330px);
}

.st-human {
  top: 20%;
  right: 20%;
  width: clamp(230px, 21vw, 340px);
}

/* keep copy above the absolute imagery */
.chapter--story2 > .shell,
.chapter--story4 > .shell,
.chapter--story5 > .shell,
.chapter--pin .pin-stage > .shell {
  position: relative;
  z-index: 2;
}

/* ------------------------------------------------------------- diagrams ---- */

.diagram {
  margin: clamp(44px, 7vh, 72px) 0 0;
}

.diagram svg {
  width: min(980px, 100%);
  height: auto;
  overflow: visible;
}

.diagram .dline,
.steps-connect .dline {
  stroke: rgba(255, 255, 255, 0.7);
  stroke-width: 2;
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6)) drop-shadow(0 0 26px rgba(255, 255, 255, 0.22));
}

.diagram.in .dline,
.steps--connected .fx.in ~ * .dline { /* no-op guard */ }

.diagram.in .dline {
  animation: dlineDraw 1.1s var(--ease-out) var(--dd, 0s) forwards;
}

@keyframes dlineDraw {
  to { stroke-dashoffset: 0; }
}

.diagram .dnode,
.steps-connect .dnode {
  fill: #fff;
  opacity: 0;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 26px rgba(255, 255, 255, 0.35));
}

.diagram.in .dnode {
  animation:
    dnodeIn 0.5s ease var(--dd, 0s) forwards,
    dnodePulse 3s ease-in-out calc(var(--dd, 0s) + 0.7s) infinite alternate;
}

@keyframes dnodePulse {
  from { filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.6)); }
  to { filter: drop-shadow(0 0 14px rgba(255, 255, 255, 1)) drop-shadow(0 0 34px rgba(255, 255, 255, 0.45)); }
}

@keyframes dnodeIn {
  from { opacity: 0; transform: scale(0.4); transform-origin: center; transform-box: fill-box; }
  to { opacity: 1; transform: scale(1); transform-origin: center; transform-box: fill-box; }
}

.diagram .dbox {
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 2;
  fill: rgba(255, 255, 255, 0.06);
  opacity: 0;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.45)) drop-shadow(0 0 34px rgba(255, 255, 255, 0.16));
}

.diagram.in .dbox {
  animation:
    dnodeIn 0.6s ease var(--dd, 0s) forwards,
    dnodePulse 3.4s ease-in-out calc(var(--dd, 0s) + 0.8s) infinite alternate;
}

.diagram .dlabel {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  fill: #dcdcde;
  opacity: 0;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.25));
}

.diagram .dlabel--strong {
  fill: #fff;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.6)) drop-shadow(0 0 26px rgba(255, 255, 255, 0.25));
}

.diagram.in .dlabel {
  animation: dlabelIn 0.6s ease var(--dd, 0s) forwards;
}

@keyframes dlabelIn {
  to { opacity: 1; }
}

/* directional flow along the drawn path */
.diagram .dflow {
  stroke: #fff;
  stroke-width: 2.25;
  stroke-dasharray: 3 14;
  opacity: 0;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.95)) drop-shadow(0 0 22px rgba(255, 255, 255, 0.4));
}

.diagram.in .dflow {
  opacity: 0.75;
  animation: dflowMove 1.6s linear 1.8s infinite;
}

@keyframes dflowMove {
  from { stroke-dashoffset: 34; }
  to { stroke-dashoffset: 0; }
}

/* connector over the steps / capability cards */
.steps--connected,
.grid--connected {
  position: relative;
  padding-top: 26px;
}

.steps-connect {
  position: absolute;
  top: 0;
  left: 2%;
  width: 96%;
  height: 8px;
}

.steps--connected .step.in ~ .steps-connect .dline { /* unused guard */ }

/* the connector draws once its first sibling card lands */
.steps--connected:has(.fx.in) .dline,
.grid--connected:has(.fx.in) .dline {
  animation: dlineDraw 1.1s var(--ease-out) var(--dd, 0s) forwards;
}

.steps--connected:has(.fx.in) .dnode,
.grid--connected:has(.fx.in) .dnode {
  animation:
    dnodeIn 0.5s ease var(--dd, 0s) forwards,
    dnodePulse 3s ease-in-out calc(var(--dd, 0s) + 0.7s) infinite alternate;
}

/* --------------------------------------------------------- 72% arc ---------- */

.proof--arc {
  align-content: start;
}

.arc {
  position: relative;
  display: block;
  width: clamp(120px, 11vw, 168px);
}

.arc svg {
  width: 100%;
  height: auto;
  transform: rotate(-90deg);
}

.arc-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 6;
}

.arc-fill {
  fill: none;
  stroke: #fff;
  stroke-width: 6;
  stroke-linecap: butt;
  stroke-dasharray: 326.7;
  stroke-dashoffset: 326.7;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8)) drop-shadow(0 0 26px rgba(255, 255, 255, 0.3));
  transition: stroke-dashoffset 1.6s var(--ease-out) 0.5s;
}

.proof--arc.in .arc-fill {
  animation: arcPulse 3.2s ease-in-out 2.4s infinite alternate;
}

@keyframes arcPulse {
  from { filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6)); }
  to { filter: drop-shadow(0 0 16px rgba(255, 255, 255, 1)) drop-shadow(0 0 40px rgba(255, 255, 255, 0.4)); }
}

.proof--arc.in .arc-fill {
  stroke-dashoffset: 91.5; /* 72% of the circumference lit */
}

.arc__value {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(18px, 2vw, 26px) !important;
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.4);
}

/* ------------------------------------------------------------- responsive -- */

@media (max-width: 1100px) {
  .st-vault { width: clamp(200px, 20vw, 260px); }
  .st-gov { width: clamp(210px, 21vw, 280px); }
  .st-infra { width: clamp(190px, 18vw, 250px); }
  .st-human { width: clamp(210px, 21vw, 280px); }
  .st-hero { width: clamp(380px, 44vw, 560px); }
}

@media (max-width: 720px) {
  /* stack the strongest six in flow; hide the secondary layers */
  .st-loom,
  .st-grid,
  .st-human {
    display: none;
  }

  .story-el {
    position: static;
    width: 100% !important;
    margin: 26px 0 0;
  }

  .st-hero {
    bottom: auto;
    margin-top: 34px;
  }

  .chapter--story1 .float-focus--left {
    max-width: none;
  }

  .steps-connect {
    display: none;
  }

  .steps--connected,
  .grid--connected {
    padding-top: 0;
  }

  .diagram svg {
    width: 100%;
  }

  .diagram .dlabel {
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .story-el {
    transform: none !important;
  }

  .story-img,
  .story-img--drift.in,
  .st-hero .story-img.in,
  body:not(.ready) .hero-visual .story-img {
    opacity: 1 !important;
    clip-path: none !important;
    transform: none !important;
    animation: none !important;
  }

  .stats::before {
    transform: scaleX(1);
    animation: none !important;
  }

  .diagram .dline,
  .steps-connect .dline {
    stroke-dashoffset: 0;
  }

  .diagram .dnode,
  .steps-connect .dnode,
  .diagram .dlabel,
  .diagram .dbox,
  .proof--arc.in .arc-fill {
    opacity: 1;
    animation: none !important;
  }

  .diagram .dflow {
    display: none;
  }

  .arc-fill {
    stroke-dashoffset: 91.5;
  }
}


/* ============================================================ SPATIAL FRAME =
   Minimal architectural 3D object behind the hero: three nested wireframe
   planes in a very slow drift, cursor-responsive via the float engine. */

.spatial {
  position: absolute;
  right: 4%;
  top: 50%;
  width: min(34vw, 520px);
  aspect-ratio: 1;
  margin-top: calc(min(30vw, 440px) / -2);
  perspective: 900px;
  z-index: 0;
  pointer-events: none;
}

.spatial i {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  transform-style: preserve-3d;
}

.spatial i:nth-child(1) {
  transform: scale(0.68) rotateX(58deg) rotateZ(12deg);
  animation: spatialDrift 46s linear infinite;
}

.spatial i:nth-child(2) {
  transform: scale(0.85) rotateX(58deg) rotateZ(-8deg);
  animation: spatialDrift 62s linear infinite reverse;
  border-color: rgba(255, 255, 255, 0.09);
}

.spatial i:nth-child(3) {
  transform: rotateX(58deg) rotateZ(30deg);
  animation: spatialDrift 80s linear infinite;
  border-color: rgba(255, 255, 255, 0.06);
}

@keyframes spatialDrift {
  from { rotate: 58deg 0 1 0deg; }
  to { rotate: 58deg 0 1 360deg; }
}

/* corner nodes on the innermost plane */
.spatial i:nth-child(1)::before,
.spatial i:nth-child(1)::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.spatial i:nth-child(1)::before { top: -3px; left: -3px; }
.spatial i:nth-child(1)::after { bottom: -3px; right: -3px; }

@media (max-width: 720px) {
  .spatial {
    display: none;
  }
}

/* ============================================================ META CHIPS ===
   Tiny technical labels that surface on image hover. */

.story-el,
.story-wide,
.hero-visual {
  position: relative;
}

.story-el { position: absolute; }

.chip {
  position: absolute;
  left: 10px;
  bottom: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: #e6e6e8;
  background: rgba(0, 0, 0, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 5px 9px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
  white-space: nowrap;
}

.story-el:hover .chip,
.story-wide:hover .chip,
.hero-visual:hover .chip {
  opacity: 1;
  transform: none;
}

.story-wide .chip {
  left: 14px;
  bottom: 14px;
}

@media (max-width: 720px) {
  .chip {
    opacity: 1;
    transform: none;
  }
}

/* ======================================================== SECTION MARKERS ==
   Micro-graphics: a SEC index in each chapter's corner and a fine bracket on
   every chapter head — the designed-not-generated details. */

.chapter[data-sec]::after {
  content: "SEC. " attr(data-sec);
  position: absolute;
  right: clamp(18px, 4vw, 48px);
  bottom: clamp(16px, 3vh, 30px);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.34);
  border-right: 1px solid rgba(255, 255, 255, 0.22);
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  padding: 0 10px 8px 0;
  pointer-events: none;
  z-index: 3;
}

.chapter__head {
  position: relative;
}

.chapter__head::before {
  content: "";
  position: absolute;
  top: -14px;
  left: -18px;
  width: 22px;
  height: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  border-left: 1px solid rgba(255, 255, 255, 0.3);
  pointer-events: none;
}

@media (max-width: 720px) {
  .chapter__head::before {
    left: -6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .spatial i {
    animation: none !important;
  }

  .chip {
    opacity: 1;
    transform: none;
  }
}


/* ========================================================== SCROLL SCENES ==
   One damped 0..1 progress per [data-scrub] section, written by the rAF loop
   as --p. Everything below derives from it with CSS math — no per-frame JS
   styling beyond the single variable. */

/* ------------------------------------------------------------- pin layout -- */

.chapter--pin {
  height: 300vh;
  padding-top: 0;
  padding-bottom: 0;
}

.chapter--pin .pin-stage {
  position: sticky;
  top: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: clamp(70px, 9vh, 110px) 0;
}

.chapter--pin .pin-stage > .shell {
  width: 100%;
}

/* the SEC marker rides the pinned stage, not the tall scroll runway */
.chapter--pin[data-sec]::after {
  position: sticky;
  display: block;
  top: calc(100vh - 46px);
  float: right;
  margin-right: clamp(18px, 4vw, 48px);
  bottom: auto;
  right: auto;
}

/* ---------------------------------------- ch02: containment draws itself ---
   p 0.00-0.30  copy settles (IO reveals as the pin catches)
   p 0.18-0.56  trunk + branches draw
   p 0.30-0.66  nodes land
   p 0.55-0.75  UNKNOWN path resolves into the containment cell
   p 0.80-1.00  directional flow runs on the trusted path                     */

.chapter--pin .diagram .dline {
  animation: none !important;
  stroke-dashoffset: calc(900 - 900 * clamp(0, (var(--p, 0) - 0.18) / 0.38, 1));
}

.chapter--pin .diagram.in .dnode {
  animation: dnodePulse 3s ease-in-out infinite alternate;
  opacity: clamp(0, (var(--p, 0) - 0.3) / 0.14, 1);
}

.chapter--pin .diagram .dnode:nth-of-type(2) {
  opacity: clamp(0, (var(--p, 0) - 0.44) / 0.14, 1);
}

.chapter--pin .diagram .dnode:nth-of-type(3) {
  opacity: clamp(0, (var(--p, 0) - 0.56) / 0.14, 1);
}

.chapter--pin .diagram.in .dbox {
  animation: dnodePulse 3.4s ease-in-out infinite alternate;
  opacity: clamp(0, (var(--p, 0) - 0.58) / 0.14, 1);
}

.chapter--pin .diagram .dlabel {
  animation: none !important;
  opacity: clamp(0, (var(--p, 0) - 0.34) / 0.16, 1);
}

.chapter--pin .diagram .dlabel--strong {
  opacity: clamp(0, (var(--p, 0) - 0.66) / 0.14, 1);
}

.chapter--pin .diagram.in .dflow {
  opacity: calc(0.75 * clamp(0, (var(--p, 0) - 0.8) / 0.12, 1));
  animation: dflowMove 1.6s linear infinite;
}

/* the diagram rises off a floor plane as it draws */
.chapter--pin .diagram svg {
  transform: perspective(1100px)
    rotateX(calc((1 - clamp(0, var(--p, 0) / 0.55, 1)) * 24deg))
    translateY(calc((1 - clamp(0, var(--p, 0) / 0.5, 1)) * 46px));
  transform-origin: 50% 100%;
  transition: none;
}

/* ------------------------------------- ch05: lateral capability track ------
   The four capability cards ride a horizontal track; scroll drives the
   traverse while the connector line draws beneath the cursor of travel.     */

.chapter--pin-lateral .grid--services.grid--four {
  display: flex;
  flex-wrap: nowrap;
  gap: clamp(14px, 1.8vw, 22px);
  width: max-content;
  transform: translate3d(calc(clamp(0, (var(--p, 0) - 0.12) / 0.76, 1) * -42%), 0, 0)
    rotateY(calc(5deg - clamp(0, (var(--p, 0) - 0.12) / 0.76, 1) * 10deg));
  transform-style: preserve-3d;
  will-change: transform;
}

.chapter--pin-lateral .grid--services.grid--four .card {
  flex: 0 0 clamp(300px, 30vw, 430px);
}

.chapter--pin-lateral .steps-connect {
  left: 0;
  width: 100%;
}

.chapter--pin-lateral .steps-connect .dline {
  animation: none !important;
  stroke-dashoffset: calc(900 - 900 * clamp(0, (var(--p, 0) - 0.1) / 0.7, 1));
}

.chapter--pin-lateral .steps-connect .dnode {
  animation: dnodePulse 3s ease-in-out infinite alternate;
  opacity: clamp(0, (var(--p, 0) - 0.2) / 0.1, 1);
}

.chapter--pin-lateral .steps-connect .dnode:nth-of-type(2) {
  opacity: clamp(0, (var(--p, 0) - 0.4) / 0.1, 1);
}

.chapter--pin-lateral .steps-connect .dnode:nth-of-type(3) {
  opacity: clamp(0, (var(--p, 0) - 0.58) / 0.1, 1);
}

.chapter--pin-lateral .steps-connect .dnode:nth-of-type(4) {
  opacity: clamp(0, (var(--p, 0) - 0.76) / 0.1, 1);
}

/* ----------------------------------------------- ch01: hero camera exit ----
   Scrolling away pushes past the scene: copy sinks and fades, the spatial
   frame grows toward camera, the stats trail slightly behind.               */

body.ready .page[data-scrub] .hero-copy {
  opacity: calc(1 - clamp(0, var(--p, 0), 1) * 1.2);
  transform: perspective(1000px) translateY(calc(clamp(0, var(--p, 0), 1) * -54px))
    rotateX(calc(clamp(0, var(--p, 0), 1) * 7deg));
  transform-origin: 50% 0;
}

body.ready .page[data-scrub] .spatial {
  transform: scale(calc(1 + clamp(0, var(--p, 0), 1) * 0.55));
  opacity: calc(1 - clamp(0, var(--p, 0), 1) * 1.35);
}

body.ready .page[data-scrub] .stats {
  opacity: calc(1 - clamp(0, (var(--p, 0) - 0.25) / 0.5, 1));
}

/* -------------------------------------------- ch07: resolved arrival -------
   The finale settles from slightly small and low into full presence; the
   depth-parallax transform is recomposed so both effects coexist.           */

.chapter--contact .shell.depth {
  transform: translate3d(0, var(--py, 0px), 0)
    scale(calc(0.94 + clamp(0, var(--p, 0) / 0.6, 1) * 0.06));
}

/* ------------------------------------------------------------- responsive -- */

@media (max-width: 900px) {
  .chapter--pin {
    height: auto;
    padding-top: clamp(90px, 16vh, 160px);
    padding-bottom: clamp(90px, 16vh, 160px);
  }

  .chapter--pin .pin-stage {
    position: static;
    min-height: 0;
    padding: 0;
    display: block;
  }

  .chapter--pin[data-sec]::after {
    position: absolute;
    float: none;
    top: auto;
    bottom: clamp(16px, 3vh, 30px);
    right: clamp(18px, 4vw, 48px);
    margin-right: 0;
  }

  .chapter--pin-lateral .grid--services.grid--four {
    display: grid;
    width: auto;
    transform: none;
  }

  .chapter--pin-lateral .grid--services.grid--four .card {
    flex: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-scrub] {
    --p: 1;
  }

  .chapter--pin {
    height: auto;
  }

  .chapter--pin .pin-stage {
    position: static;
    min-height: 0;
  }

  .chapter--pin-lateral .grid--services.grid--four {
    display: grid;
    width: auto;
    transform: none;
  }

  body.ready .page[data-scrub] .hero-copy,
  body.ready .page[data-scrub] .spatial,
  body.ready .page[data-scrub] .stats {
    opacity: 1;
    transform: none;
  }
}


/* finale bookend: the hero's spatial frame returns behind the CTA */
.spatial--contact {
  left: 50%;
  right: auto;
  top: 52%;
  width: min(46vw, 660px);
  margin: calc(min(46vw, 660px) / -2) 0 0 calc(min(46vw, 660px) / -2);
  opacity: 0.55;
}

@media (max-width: 720px) {
  .spatial--contact {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chapter--pin .diagram svg {
    transform: none;
  }
}


@media (prefers-reduced-motion: reduce) {
  .site-footer__row {
    transform: none;
    opacity: 1;
  }

  .site-footer::before {
    transform: scaleX(1);
  }

  .footer__mark g > * {
    stroke-dashoffset: 0;
  }
}
