/* ============================================================
   DeepYield — main.css
   Brand layer: CRAFT.md · Canvas #04070D · Accent #1F8FFF
   ============================================================ */

/* ---------- Fonts (self-hosted) ---------- */
@font-face {
  font-family: 'General Sans';
  src: url('../assets/fonts/GeneralSans-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'General Sans';
  src: url('../assets/fonts/GeneralSans-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'General Sans';
  src: url('../assets/fonts/GeneralSans-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('../assets/fonts/InstrumentSerif-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Fragment Mono';
  src: url('../assets/fonts/FragmentMono-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #04070D;
  --bg-raised: #070C15;
  --surface: #0A1120;
  --surface-2: #0B1322;
  --ink: #EAF0F9;
  --ink-soft: #8FA0B8;
  --ink-faint: #55647D;
  --line: rgba(148, 171, 215, .11);
  --line-strong: rgba(148, 171, 215, .22);
  --accent: #1F8FFF;
  --accent-deep: #0B57E0;
  --accent-hi: #55B5FF;
  --pos: #2FD9A2;
  --warn: #E8B45A;
  --neg: #FF5D6E;

  --sans: 'General Sans', 'Helvetica Neue', Arial, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --mono: 'Fragment Mono', 'SF Mono', Menlo, monospace;

  --r-lg: 18px;
  --r-md: 12px;
  --r-sm: 8px;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, .05, .35, 1);
  --t-micro: 150ms;
  --t-reveal: 650ms;

  --nav-h: 72px;
  --pad-x: clamp(20px, 4.4vw, 48px);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
}

/* film grain — felt, not seen */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  opacity: .03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* single light source at the top */
.page-glow {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 120vh;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(720px 460px at 72% 8%, rgba(31, 143, 255, .13), transparent 65%),
    radial-gradient(1100px 640px at 40% -10%, rgba(31, 143, 255, .07), transparent 60%);
}

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

img, svg, canvas { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

::selection { background: rgba(31, 143, 255, .38); color: #F2F7FE; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #17233B; border-radius: 99px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #22375C; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent-hi);
  outline-offset: 3px;
  border-radius: 4px;
}

section { scroll-margin-top: calc(var(--nav-h) + 20px); }

/* ---------- Utilities ---------- */
.wrap {
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.mono { font-family: var(--mono); font-weight: 400; }
/* the headline pivot: same face, weight and size as the line above it.
   the turn is carried by colour and a single soft light, not by a second typeface */
.pivot { color: var(--accent-hi); text-shadow: 0 0 44px rgba(85, 181, 255, .28); }

.pos { color: var(--pos); }
.neg { color: var(--neg); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 3000;
  padding: 10px 16px;
  background: var(--accent);
  color: #041E3F;
  font-weight: 500;
  font-size: 14px;
  border-radius: var(--r-sm);
  transform: translateY(-64px);
  transition: transform var(--t-micro) var(--ease);
}
.skip-link:focus-visible { transform: translateY(0); outline-offset: 0; }


.h2 {
  font-size: clamp(2.1rem, 4.6vw, 3.35rem);
  font-weight: 600;
  letter-spacing: -.032em;
  line-height: 1.05;
  text-wrap: balance;
}

.section-sub {
  margin-top: 20px;
  max-width: 58ch;
  color: var(--ink-soft);
  font-size: 1.0625rem;
  text-wrap: pretty;
}

.live-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--pos);
  letter-spacing: .1em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -.01em;
  padding: 13px 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform var(--t-micro) var(--ease),
    box-shadow 250ms var(--ease),
    background-color 250ms var(--ease),
    border-color 250ms var(--ease),
    filter 250ms var(--ease);
}
.btn:active { transform: translateY(1px) scale(.995); }

.btn-primary {
  background: linear-gradient(180deg, #2F9BFF, #1673F2);
  color: #051D3F;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .28),
    0 10px 30px -10px rgba(31, 143, 255, .55);
}
.btn-primary:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .3),
    0 16px 38px -12px rgba(31, 143, 255, .7);
}
.btn-arrow { width: 15px; height: 15px; transition: transform var(--t-micro) var(--ease); }
.btn:hover .btn-arrow { transform: translateX(3px); }

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--ink);
  background: rgba(148, 171, 215, .04);
}
.btn-ghost:hover {
  border-color: rgba(148, 171, 215, .4);
  background: rgba(148, 171, 215, .08);
  transform: translateY(-1px);
}

.btn-sm { padding: 9px 16px; font-size: 13.5px; border-radius: 8px; }
.btn-lg { padding: 16px 30px; font-size: 16px; }

/* ---------- Reveal system ---------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity var(--t-reveal) var(--ease),
    transform var(--t-reveal) var(--ease);
  transition-delay: var(--d, 0s);
}
html.js [data-reveal].is-in { opacity: 1; transform: none; }
html.js .proof-card[data-reveal] {
  transform: translateY(76px) scale(.96);
  transition-duration: .95s;
}
html.js .proof-card[data-reveal].is-in { transform: none; }

/* hero entrance choreography */
html.js [data-hero] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
html.js .line-mask { display: block; overflow: hidden; }
html.js .line-mask .line { display: block; transform: translateY(112%); transition: transform .9s var(--ease); }
html.js [data-hero="1"], html.js [data-hero="2"] { opacity: 1; transform: none; }

html.js.is-loaded [data-hero] { opacity: 1; transform: none; }
html.js.is-loaded .line-mask .line { transform: translateY(0); }
html.js.is-loaded [data-hero="1"] .line, html.js [data-hero="1"] .line { transition-delay: .06s; }
html.js.is-loaded [data-hero="2"] .line, html.js [data-hero="2"] .line { transition-delay: .18s; }
html.js.is-loaded [data-hero="3"] { transition-delay: .38s; }
html.js.is-loaded [data-hero="4"] { transition-delay: .5s; }

/* ============================================================
   NAV — floating pill (ported from the mini-navbar reference)
   ============================================================ */
.nav {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  max-width: calc(100vw - 32px);
}
.nav-pill {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.6vw, 34px);
  padding: 9px 11px 9px 20px;
  border: 1px solid var(--line-strong);
  background: rgba(6, 10, 18, .58);
  -webkit-backdrop-filter: blur(16px) saturate(1.35);
  backdrop-filter: blur(16px) saturate(1.35);
  border-radius: 999px;
  box-shadow: 0 18px 46px -22px rgba(2, 8, 22, .85);
  transition: border-radius .3s var(--ease);
  flex-wrap: wrap;
}
.nav.is-open .nav-pill { border-radius: 18px; }

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 25px; height: 25px; }
.brand-word {
  font-weight: 600;
  font-size: 16.5px;
  letter-spacing: -.02em;
}

.nav-links { display: flex; align-items: center; gap: clamp(16px, 2vw, 26px); }
.nav-link {
  --nl: 20px;
  display: inline-flex;
  /* the roll stack must size to its own two lines: stretching it to the link
     height would make the hover shift resolve to half a line */
  align-items: flex-start;
  overflow: hidden;
  height: var(--nl);
  font-size: 14px;
  font-weight: 500;
}
.nav-link .nl {
  display: flex;
  flex-direction: column;
  flex: none;
  transition: transform .4s var(--ease);
}
.nav-link .nl span { flex: none; height: var(--nl); line-height: var(--nl); color: var(--ink-soft); transition: color .2s; }
.nav-link .nl span + span { color: var(--ink); }
.nav-link:hover .nl { transform: translateY(calc(var(--nl) * -1)); }
.nav-link.is-active .nl span { color: var(--ink); }

.nav-cta { border-radius: 999px; }

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px; height: 38px;
  padding: 8px 9px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}
.nav-burger span {
  display: block;
  height: 1.5px;
  background: var(--ink);
  transition: transform .3s var(--ease);
}
.nav-burger[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

/* mobile expansion inside the pill */
.nav-drop {
  flex-basis: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  max-height: 0;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  transition: max-height .3s var(--ease), opacity .25s var(--ease), padding .3s var(--ease), visibility 0s .3s;
}
.nav.is-open .nav-drop {
  max-height: 360px;
  opacity: 1;
  visibility: visible;
  padding-top: 12px;
  transition: max-height .3s var(--ease), opacity .25s var(--ease) .05s, padding .3s var(--ease), visibility 0s;
}
.nav-drop a {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 11px 10px;
  border-radius: 10px;
  transition: color .2s, background-color .2s;
}
.nav-drop a:hover { color: var(--ink); background: rgba(148, 171, 215, .06); }
.nav-drop .btn { justify-content: center; margin-top: 8px; color: #051D3F; }
@media (min-width: 861px) { .nav-drop { display: none; } }

/* ============================================================
   HERO
   ============================================================ */
.hero-stage { height: 430svh; }
.hero {
  --hz: 0; /* 0→1: mask dissolve + zoom + copy exit */
  --hs: 0; /* 0→1: chart shifts left, right side clears for the cards */
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 640px;
  padding-top: calc(var(--nav-h) + clamp(48px, 9vh, 104px));
  padding-bottom: clamp(72px, 10vh, 120px);
  display: flex;
  align-items: flex-start;
  overflow: hidden;
}
.hero-inner { position: relative; z-index: 2; width: 100%; }
.hero-copy {
  max-width: 46rem;
  transform: translateY(calc(var(--hz, 0) * -80px));
  opacity: calc(1 - var(--hz, 0) * 1.45);
  will-change: transform, opacity;
}

/* --- the card stack that rides the scroll stage (desktop) --- */
html.stage-on .stage-cards {
  position: absolute;
  top: 50%;
  right: max(var(--pad-x), calc((100vw - 1240px) / 2 + var(--pad-x)));
  transform: translateY(-50%);
  z-index: 3;
  width: min(410px, 34vw);
}
html.stage-on .stage-cards-stack {
  position: relative;
  height: min(640px, 74svh);
}
html.stage-on .stage-cards .proof-card {
  position: absolute;
  top: 0; left: 0; right: 0;
  opacity: 0;
  transition: none !important;
  filter: drop-shadow(0 22px 26px rgba(2, 8, 22, .6));
  will-change: transform, opacity;
}

/* --- fallback: mobile + reduced motion render the cards as a normal grid --- */
html:not(.stage-on) .hero-stage { height: auto; }
html:not(.stage-on) .hero {
  position: relative;
  height: auto;
  min-height: clamp(680px, 100svh, 960px);
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
}
html:not(.stage-on) .stage-cards {
  margin-top: min(280px, 32svh);
  padding-inline: var(--pad-x);
  max-width: 1240px;
  margin-inline: auto;
  position: relative;
  z-index: 3;
  width: 100%;
}
html:not(.stage-on) .stage-cards-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding-bottom: 48px;
}
@media (max-width: 460px) {
  html:not(.stage-on) .stage-cards-stack { grid-template-columns: 1fr; }
}

.hero-title {
  font-size: clamp(2.8rem, 5.6vw, 4.8rem);
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: 1;
  margin: 0 0 30px;
}
.hero-sub {
  font-size: clamp(1.1rem, 1.5vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 44ch;
  text-wrap: pretty;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

/* --- hero background chart --- */
.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-canvas canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
/* a whisper on the left at rest; scrolling dissolves the mask and zooms the
   chart across the full screen (driven by --hp from the scroll stage) */
.hero-canvas {
  transform: translateX(calc(var(--hs, 0) * -34vw)) scale(calc(1 + var(--hz, 0) * .45));
  transform-origin: 80% 58%;
  will-change: transform;
}
/* rest: invisible left half, fades in past the middle.
   --hz dissolves the left; --hs re-fades the right for the card stack */
@media (min-width: 700px) {
  .hero-canvas canvas {
    -webkit-mask-image: linear-gradient(to right,
      rgba(0, 0, 0, calc(var(--hz, 0) * 1)) 0%,
      rgba(0, 0, 0, calc(var(--hz, 0) * 1)) 50%,
      rgba(0, 0, 0, calc(.45 + var(--hz, 0) * .55 - var(--hs, 0) * .4)) 64%,
      rgba(0, 0, 0, calc(1 - var(--hs, 0) * .6)) 78%,
      rgba(0, 0, 0, calc(1 - var(--hs, 0) * .85)) 100%);
    mask-image: linear-gradient(to right,
      rgba(0, 0, 0, calc(var(--hz, 0) * 1)) 0%,
      rgba(0, 0, 0, calc(var(--hz, 0) * 1)) 50%,
      rgba(0, 0, 0, calc(.45 + var(--hz, 0) * .55 - var(--hs, 0) * .4)) 64%,
      rgba(0, 0, 0, calc(1 - var(--hs, 0) * .6)) 78%,
      rgba(0, 0, 0, calc(1 - var(--hs, 0) * .85)) 100%);
  }
}
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: calc(1 - var(--hz, 0));
  background: linear-gradient(to bottom, rgba(4, 7, 13, .5), transparent 24%);
}
.hero-bottom {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 150px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to top, var(--bg), rgba(4, 7, 13, 0));
}

.chart-tip {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  background: rgba(5, 11, 23, .94);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  padding: 8px 11px;
  font-size: 10.5px;
  line-height: 1.65;
  color: var(--ink-soft);
  white-space: nowrap;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .6);
}
.chart-tip strong { color: var(--ink); font-weight: 400; }

@keyframes rowIn {
  from { opacity: 0; transform: translateY(-7px); }
  to   { opacity: 1; transform: none; }
}

/* ============================================================
   PROOF BAND
   ============================================================ */
.proof { padding-block: clamp(54px, 7vw, 92px) clamp(40px, 5vw, 70px); }

.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.proof-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  padding: 0;
  transition: transform .35s var(--ease), border-color .35s var(--ease), filter .35s var(--ease);
  /* the waist pockets are subtracted from the card, so whatever sits behind
     (the 3D field, the hero chart) shows through instead of a painted fill */
  --cut-y: 50%;
  -webkit-mask-image: linear-gradient(#000, #000), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='64' viewBox='0 0 17 64'%3E%3Cpath d='M1 0 C1 11 16 13 16 26 L16 38 C16 51 1 53 1 64 L0 64 L0 0 Z' fill='%23fff'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='64' viewBox='0 0 17 64'%3E%3Cpath d='M16 0 C16 11 1 13 1 26 L1 38 C1 51 16 53 16 64 L17 64 L17 0 Z' fill='%23fff'/%3E%3C/svg%3E");
  mask-image: linear-gradient(#000, #000), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='64' viewBox='0 0 17 64'%3E%3Cpath d='M1 0 C1 11 16 13 16 26 L16 38 C16 51 1 53 1 64 L0 64 L0 0 Z' fill='%23fff'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='64' viewBox='0 0 17 64'%3E%3Cpath d='M16 0 C16 11 1 13 1 26 L1 38 C1 51 16 53 16 64 L17 64 L17 0 Z' fill='%23fff'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%, 17px 64px, 17px 64px;
  mask-size: 100% 100%, 17px 64px, 17px 64px;
  -webkit-mask-position: 0 0, left calc(var(--cut-y) - 32px), right calc(var(--cut-y) - 32px);
  mask-position: 0 0, left calc(var(--cut-y) - 32px), right calc(var(--cut-y) - 32px);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
.proof-card::before {
  content: '';
  position: absolute;
  top: 0; left: 12%; right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(234, 240, 249, .1), transparent);
}
.proof-card:hover {
  transform: translateY(-4px);
  border-color: rgba(31, 143, 255, .3);
  filter: drop-shadow(0 18px 26px rgba(2, 8, 22, .55)) drop-shadow(0 0 18px rgba(31, 143, 255, .22));
}
.proof-viz {
  position: relative;
  aspect-ratio: 1 / .93;
  margin: 12px 12px 0;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(180deg, #0F1728, #0A1120);
  box-shadow: inset 0 0 0 1px rgba(148, 171, 215, .05);
}
.proof-viz canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* the pinched waist between panel and text: an S-curved pocket carved into
   each edge — the card border segment is erased and redrawn as the curve */
.proof-cut { position: relative; height: 46px; }
.proof-cut::before,
.proof-cut::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 17px; height: 64px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='64' viewBox='0 0 17 64'%3E%3Cpath d='M1 0 C1 11 16 13 16 26 L16 38 C16 51 1 53 1 64' fill='none' stroke='rgba(148,171,215,0.13)' stroke-width='1'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 17px 64px;
}
.proof-cut::before { left: -1px; transform: translateY(-50%); }
.proof-cut::after { right: -1px; transform: translateY(-50%) scaleX(-1); }
.proof-card:hover .proof-cut::before,
.proof-card:hover .proof-cut::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='64' viewBox='0 0 17 64'%3E%3Cpath d='M1 0 C1 11 16 13 16 26 L16 38 C16 51 1 53 1 64' fill='none' stroke='rgba(31,143,255,0.3)' stroke-width='1'/%3E%3C/svg%3E");
}

.proof-body { padding: 0 24px 28px; }
.proof-title {
  font-size: clamp(1.45rem, 1.8vw, 1.65rem);
  font-weight: 600;
  letter-spacing: -.015em;
  line-height: 1.25;
}
.proof-title b, .proof-title b span { color: var(--ink); font-weight: 600; }
.proof-title > span { color: var(--ink-soft); font-weight: 400; }
.proof-body p {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* ============================================================
   ENGINE
   ============================================================ */
.engine {
  position: relative;
  padding-block: clamp(80px, 10vw, 140px) clamp(60px, 8vw, 110px);
  overflow: hidden;
}
.engine-fx {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 84%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 84%, transparent);
}
.engine-fx canvas { width: 100%; height: 100%; display: block; }
.engine > .wrap { position: relative; z-index: 1; }


/* the rail is full-bleed so the carousel can run off both edges */
.steps-rail {
  position: relative;
  z-index: 1;
  margin-top: clamp(40px, 5vw, 60px);
  padding-inline: var(--pad-x);
  max-width: 1240px;
  margin-inline: auto;
}
.steps-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.steps-grid .proof-card {
  display: flex;
  flex-direction: column;
  z-index: 1;
}
.steps-grid .proof-card .proof-viz { flex: none; }
/* every second card flips: text up top, panel below */
.steps-grid .proof-card.flip .proof-body { order: 1; padding: 26px 24px 2px; }
.steps-grid .proof-card.flip .proof-cut { order: 2; }
.steps-grid .proof-card.flip .proof-viz { order: 3; margin: 0 12px 12px; }

/* the pinned engine stage: scroll turns the four steps like a carousel */
html.stage-on .engine-stage {
  height: 320svh;
  scroll-margin-top: 0;
}
html.stage-on .engine {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 620px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(40px, 6vh, 72px) clamp(24px, 4vh, 48px);
}
/* under the pin the row stops being a grid and becomes a 3D carousel track:
   scroll turns one card into the centre at a time, then spins back to 01 */
html.stage-on .steps-rail {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  padding-inline: 0;
  overflow: hidden;
  perspective: 1500px;
  perspective-origin: 50% 46%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 13%, #000 87%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 13%, #000 87%, transparent);
}
/* the ring clones exist only to keep both ends of the carousel populated */
html.stage-on .steps-grid .proof-card[data-ring] { pointer-events: none; }
html.stage-on .steps-grid {
  display: flex;
  align-items: center;
  gap: 0;
  width: max-content;
  padding-block: 44px;
  transform-style: preserve-3d;
  will-change: transform;
}
html.stage-on .steps-grid .proof-card {
  flex: none;
  width: clamp(250px, 24vw, 320px);
  margin-inline: var(--card-gap, 24px);
  transition: none !important;
  backface-visibility: hidden;
}
/* the loop mark: sits in the seam where 04 hands back to 01, rides the track
   with the cards and turns as the carousel turns */
html.stage-on .step-loop {
  position: absolute;
  top: 50%; left: 0;
  width: 44px; height: 44px;
  margin: -22px 0 0 -22px;
  color: var(--accent-hi);
  pointer-events: none;
  will-change: transform, opacity;
}
html.stage-on .step-loop svg {
  display: block;
  width: 100%; height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 10px rgba(85, 181, 255, .45));
}
/* shorter panels under the pin so the whole carousel clears one screen */
html.stage-on .steps-grid .proof-card .proof-viz { aspect-ratio: 1 / .72; }
html.stage-on .steps-grid .proof-card .proof-body { padding-bottom: 24px; }
html.stage-on .steps-grid .proof-card .proof-body p { min-height: 3.1em; }

/* ============================================================
   BENCHMARK — pinned: reveal, draw, then pan one screen right
   ============================================================ */
.bench { padding-block: clamp(80px, 10vw, 140px); overflow: hidden; }
.bench-inner { text-align: center; width: 100%; }
.bench-inner .h2 { text-wrap: balance; }

.bench-figure { margin-top: clamp(30px, 4vw, 48px); }
/* no panel: just the three lines on the page */
.bench-chart {
  position: relative;
  aspect-ratio: 21 / 9;
  overflow: hidden;
}
.bench-chart canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }

/* the second screen: the line lands word by word */
.say {
  font-size: clamp(2.4rem, 6.6vw, 5.2rem);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.06;
  color: var(--ink);
  text-align: center;
  text-wrap: balance;
  max-width: 18ch;
  margin-inline: auto;
}
.say-a span { display: inline-block; }
.say-a span + span { margin-left: .34em; }

/* ---- pinned mode ---- */
html.stage-on .bench-stage { height: 460svh; }
html.stage-on .bench {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 620px;
  display: flex;
  align-items: center;
  padding-block: clamp(40px, 6vh, 80px);
}
html.stage-on .bench-track {
  display: flex;
  width: 200vw;
  transform: translateX(calc(var(--hx, 0) * -100vw));
  will-change: transform;
}
html.stage-on .bench-panel {
  width: 100vw;
  flex: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
html.stage-on .bench-say { position: relative; }
html.stage-on .bench-say .say {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
}
html.stage-on .bench [data-b] {
  opacity: 0;
  transform: translateY(26px);
  will-change: opacity, transform;
}
html.stage-on .say-a span { opacity: 0; }
html.stage-on .bench-chart {
  aspect-ratio: auto;
  height: clamp(200px, 38svh, 380px);
}
html.stage-on .bench-figure { margin-top: clamp(20px, 3vh, 36px); }

/* ---- fallback: everything visible, read as one sentence ---- */
html:not(.stage-on) .bench-say { margin-top: clamp(36px, 5vw, 60px); }
html:not(.stage-on) .say-b { margin-top: .2em; }

@media (max-width: 900px) {
  .bench-chart { aspect-ratio: auto; height: clamp(280px, 62vw, 360px); }
}

/* ============================================================
   THE EDGE — hairline grid, animated capability cards
   ============================================================ */
.edge { padding-block: clamp(80px, 10vw, 140px); }

/* shared hairline-grid shell, v7-style: cells divided by rules, no gaps */
.edge-grid, .edge-stats, .edge-compare {
  display: grid;
  border: 1px solid var(--line);
  background: var(--surface);
}
.edge-grid {
  grid-template-columns: repeat(4, 1fr);
  margin-top: clamp(40px, 5vw, 60px);
}
.edge-stats, .edge-compare { grid-template-columns: repeat(3, 1fr); border-top: none; }

.edge-card {
  display: flex;
  flex-direction: column;
  min-height: 340px;
  transition: background-color .4s var(--ease);
}
.edge-card + .edge-card,
.edge-stat + .edge-stat,
.edge-cmp + .edge-cmp { border-left: 1px solid var(--line); }
.edge-card:hover { background: rgba(31, 143, 255, .04); }

.edge-viz {
  position: relative;
  height: 178px;
  flex: none;
  overflow: hidden;
}
.edge-viz canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.edge-copy { padding: 0 24px 26px; margin-top: auto; }
.edge-copy h3 {
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -.015em;
  color: var(--ink);
  text-wrap: balance;
  min-height: 2.5em;      /* reserve two lines so every card's copy aligns */
}
.edge-copy p {
  margin-top: 10px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* big market numbers */
.edge-stat { padding: clamp(26px, 3vw, 40px) clamp(20px, 2.4vw, 32px); }
.es-num {
  display: block;
  font-family: var(--serif);
  font-style: normal;
  font-size: clamp(2.6rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: -.01em;
  color: var(--ink);
}
.es-lab {
  display: block;
  margin-top: 16px;
  font-size: 14px;
  color: var(--ink-soft);
  max-width: 30ch;
  text-wrap: pretty;
}

/* before / after against the alternative */
.edge-cmp { padding: clamp(24px, 2.8vw, 34px) clamp(20px, 2.4vw, 32px) clamp(18px, 2vw, 26px); }
.edge-cmp h3 {
  font-family: var(--serif);
  font-style: normal;
  font-weight: 400;
  font-size: clamp(1.45rem, 2.2vw, 1.9rem);
  letter-spacing: -.01em;
  color: var(--ink);
  margin-bottom: 8px;
}
.cmp-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.cmp-lab { font-size: 9.5px; letter-spacing: .14em; color: var(--ink-faint); flex: none; }
.cmp-was { font-weight: 400; font-size: 1.05rem; color: var(--ink-faint); text-align: right; }
.cmp-now { font-weight: 500; font-size: 1.05rem; color: var(--ink); text-align: right; }
.cmp-now.pos { color: var(--pos); }

@media (max-width: 1000px) {
  .edge-grid { grid-template-columns: 1fr 1fr; }
  .edge-card:nth-child(3) { border-left: none; }
  .edge-card:nth-child(n+3) { border-top: 1px solid var(--line); }
  .edge-stats, .edge-compare { grid-template-columns: 1fr; }
  .edge-stat + .edge-stat, .edge-cmp + .edge-cmp { border-left: none; border-top: 1px solid var(--line); }
}
@media (max-width: 620px) {
  .edge-grid { grid-template-columns: 1fr; }
  .edge-card + .edge-card { border-left: none; border-top: 1px solid var(--line); }
  .edge-card { min-height: 0; }
}

/* ============================================================
   CONTROL
   ============================================================ */
.control { padding-block: clamp(80px, 10vw, 140px); }


.gate {
  position: relative;
  margin-top: clamp(40px, 5vw, 60px);
}
.gate-fx {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}
.roles-table { position: relative; z-index: 1; width: 100%; border-collapse: collapse; }
/* the wall: nobody crosses it except the depositor, whose row leaves a door */
.roles-table th:nth-child(3),
.roles-table td:nth-child(3) {
  border-left: 1px solid var(--line-strong);
  padding-left: 26px;
  width: 34%;
}
.roles-table thead th:nth-child(3) { border-left-color: transparent; }
.roles-table tr[data-pass] td:nth-child(3) { border-left-color: transparent; }
.roles-table th:nth-child(2), .roles-table td:nth-child(2) { width: 40%; }
.roles-table th {
  font-size: 9.5px;
  letter-spacing: .13em;
  color: var(--ink-faint);
  text-align: left;
  font-weight: 400;
  padding: 0 14px 11px;
  border-bottom: 1px solid var(--line);
}
.roles-table td {
  /* the deep bottom padding is the traffic lane: the particles run there so
     they never cross the words */
  padding: 15px 14px 28px;
  border-bottom: 1px solid rgba(148, 171, 215, .07);
  font-size: 14px;
  color: var(--ink-soft);
  transition: background-color var(--t-micro);
}
.roles-table td:first-child { font-size: 11px; color: var(--ink); letter-spacing: .06em; }
.roles-table tbody tr:hover td { background: rgba(148, 171, 215, .025); }

/* ============================================================
   CTA
   ============================================================ */
.cta {
  position: relative;
  padding-block: clamp(110px, 14vw, 180px);
  text-align: center;
  overflow: hidden;
  border-top: 1px solid var(--line);
}
.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(640px 420px at 50% 112%, rgba(31, 143, 255, .16), transparent 68%);
  pointer-events: none;
}
/* the digit field: the whole panel is numbers, and the mark resolves out of
   them on scroll. The still mark is the no-WebGL fallback underneath. */
.cta-field {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-repeat: no-repeat;
  background-position: right -6% center;
  background-size: min(44vw, 540px) auto;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120' fill='none'%3E%3Ccircle cx='24' cy='32' r='12.5' fill='rgba(31,143,255,0.05)'/%3E%3Cpath d='M 24 88 H 66 A 28 28 0 0 0 66 32 H 54' stroke='rgba(31,143,255,0.05)' stroke-width='25' stroke-linecap='round'/%3E%3C/svg%3E");
}
.cta-field.is-live { background-image: none; }
.cta-field canvas { display: block; width: 100%; height: 100%; }
.cta-inner { position: relative; z-index: 1; }
.cta-title {
  font-size: clamp(2.7rem, 6.2vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -.036em;
  line-height: 1.03;
  margin: 26px 0 20px;
}
.cta-sub {
  color: var(--ink-soft);
  font-size: 1.1rem;
  max-width: 44ch;
  margin-inline: auto;
  text-wrap: pretty;
}
.cta-ctas { justify-content: center; margin-top: 38px; }
/* breathing glow on the closing CTA, from the deck's cta */
.cta .btn-primary { animation: ctaBreathe 2.6s ease-in-out infinite; }
@keyframes ctaBreathe {
  0%, 100% {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 10px 30px -10px rgba(31, 143, 255, .55);
  }
  50% {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3),
                0 14px 44px -10px rgba(31, 143, 255, .85),
                0 0 34px -4px rgba(31, 143, 255, .4);
  }
}

/* ============================================================
   FOOTER — giant outlined wordmark, legal bar
   ============================================================ */
.footer {
  border-top: 1px dashed var(--line-strong);
  padding-top: clamp(48px, 6vw, 76px);
  background: var(--bg);
  position: relative;
  z-index: 1;
  overflow: hidden;
}
.footer-wordmark {
  display: flex;
  justify-content: center;
  margin-top: clamp(10px, 2vw, 26px);
  pointer-events: none;
  user-select: none;
}
.footer-wordmark span {
  white-space: nowrap;
  font-weight: 600;
  font-size: clamp(96px, 18vw, 380px);
  line-height: .92;
  letter-spacing: -.03em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(148, 171, 215, .17);
  transform: translateY(.06em);
}
@supports not (-webkit-text-stroke: 1px #000) {
  .footer-wordmark span { color: rgba(148, 171, 215, .07); }
}

.footer-bar {
  margin-top: clamp(30px, 3.2vw, 56px); /* clears the wordmark descenders */
}
.footer-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 32px;
  padding-block: 20px;
  font-size: 12.5px;
  color: var(--ink-faint);
}
.footer-legal-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 26px;
}
.footer-legal-links a {
  position: relative;
  color: var(--ink-soft);
  transition: color var(--t-micro);
}
.footer-legal-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--accent-hi);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .3s var(--ease);
}
.footer-legal-links a:hover { color: var(--ink); }
.footer-legal-links a:hover::after { transform: scaleX(1); transform-origin: left; }

.footer-social {
  display: flex;
  align-items: center;
  gap: 20px;
}
.footer-social a {
  display: inline-flex;
  color: var(--ink-soft);
  padding: 3px;
  transition: color var(--t-micro), transform var(--t-micro) var(--ease);
}
.footer-social a:hover { color: var(--ink); transform: translateY(-1px); }
.footer-social svg { width: 17px; height: 17px; }
.footer-copy { margin-left: 8px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */


@media (max-width: 1024px) {
  .steps-grid { grid-template-columns: 1fr 1fr; }


  .proof-grid { grid-template-columns: 1fr 1fr; }

}

@media (max-width: 860px) {
  .nav { width: calc(100vw - 32px); }
  .nav-pill { justify-content: space-between; }
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: flex; }



}

@media (max-width: 640px) {
  body { font-size: 17.5px; }

  .hero { padding-top: calc(var(--nav-h) + 40px); }
  .hero-title { margin-top: 20px; }
  .hero-ctas .btn { flex: 1 1 auto; justify-content: center; }

  .hero-stage { height: auto; }
  .hero {
    position: relative;
    height: auto;
    min-height: clamp(680px, 100svh, 960px);
  }
  .hero-canvas { transform: none; }
  .hero-copy { transform: none; opacity: 1; }
  .hero-scrim {
    opacity: 1;
    background: linear-gradient(to bottom, rgba(4, 7, 13, .7) 0%, rgba(4, 7, 13, .5) 48%, transparent 72%);
  }


  .roles-table th:last-child, .roles-table td:last-child { display: none; }


}

@media (max-width: 440px) {
  .proof-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   REDUCED MOTION — static, composed fallback
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001s !important;
  }
  html.js [data-reveal],
  html.js [data-hero],
  html.js.is-loaded [data-hero] { opacity: 1; transform: none; transition: none; }
  html.js .line-mask .line { transform: none; transition: none; }
  .hero-stage { height: auto; }
  .hero { position: relative; height: auto; min-height: clamp(680px, 100svh, 960px); }
  .hero-canvas { transform: none; }
  .hero-copy { transform: none; opacity: 1; }
  .hero-scrim { opacity: 1; }
}

/* test-page: engine not launched */
.btn.is-soon{opacity:.55;cursor:default;pointer-events:none;filter:grayscale(.2);}
.btn.is-soon .btn-arrow{display:none;}

/* ============================================================
   MOBILE ≤820 — full rebuild. Clean header, everything scaled
   down to fit the screen, single column, canvas animation kept,
   scroll-jack off (also gated in JS on touch). No overflow/judder.
   ============================================================ */
@media (max-width: 860px) {
  html { overscroll-behavior: none; }
  html, body { overflow-x: hidden !important; max-width: 100vw !important; overscroll-behavior-y: none !important; }
  body { font-size: 17.5px; }
  :root { --pad-x: 16px; --nav-h: 60px; }
  .page-glow { height: 110svh; }
  section { scroll-margin-top: calc(var(--nav-h) + 12px); }

  /* ---- HEADER: clean & compact (coming-soon page) ---- */
  .skip-link { display: none !important; }
  .nav { width: calc(100vw - 20px) !important; top: 10px; }
  .nav-pill { justify-content: space-between !important; gap: 10px; padding: 8px 8px 8px 14px; }
  .nav-links, .nav-burger, .nav-drop { display: none !important; }
  .nav-cta { display: inline-flex !important; }
  .brand-word { font-size: 16px; }
  .brand-mark { width: 22px; height: 22px; }

  /* ---- un-pin scroll stages -> static flow ---- */
  .engine-stage, .bench-stage, .hero-stage { height: auto !important; min-height: 0 !important; }
  html.stage-on .engine, html.stage-on .bench {
    position: relative !important; height: auto !important; min-height: 0 !important;
    top: auto !important; display: block !important;
  }

  /* ---- section rhythm: tighter ---- */
  .engine, .bench, .edge, .cta { padding-block: clamp(52px, 12vw, 84px) !important; }

  /* ---- type scale (proportional, fits the screen) ---- */
  .hero-title { font-size: clamp(2.5rem, 12vw, 3.4rem) !important; margin-bottom: 18px !important; }
  .h2 { font-size: clamp(1.9rem, 8.2vw, 2.45rem) !important; line-height: 1.08 !important; }
  .section-sub { font-size: 17px !important; margin-top: 14px !important; }
  .cta-title { font-size: clamp(1.7rem, 8vw, 2.3rem) !important; }
  .cta-sub { font-size: 17px !important; }

  /* ---- HERO: fits one screen, chart un-transformed ---- */
  .hero { position: relative !important; height: auto !important;
    min-height: clamp(560px, 92svh, 760px) !important;
    padding-top: calc(var(--nav-h) + 30px) !important;
    padding-bottom: 44px !important; }
  .hero-canvas { transform: none !important; }
  .hero-copy { transform: none !important; opacity: 1 !important; }
  .hero-ctas .btn { flex: 1 1 auto; justify-content: center; }

  /* ---- ENGINE steps: single column, banner visuals, smaller ---- */
  html.stage-on .steps-rail, .steps-rail {
    width: 100% !important; max-width: 440px !important;
    margin: 22px auto 0 !important; padding-inline: 16px !important;
    overflow: visible !important; perspective: none !important;
  }
  html.stage-on .steps-grid, .steps-grid {
    display: grid !important; grid-template-columns: 1fr !important;
    gap: 12px !important; width: auto !important; transform: none !important;
  }
  html.stage-on .steps-grid .proof-card, .steps-grid .proof-card {
    position: static !important; transform: none !important; opacity: 1 !important;
    width: auto !important; height: auto !important; inset: auto !important;
    z-index: auto !important; filter: none !important;
  }
  /* bulletproof: no horizontal drift / black stripe from carousel remnants */
  .engine, .steps-rail, .steps-grid { overflow-x: hidden !important; max-width: 100% !important; }
  html.stage-on .steps-grid .proof-card, .steps-grid .proof-card {
    left: auto !important; right: auto !important; top: auto !important; bottom: auto !important;
    margin-left: 0 !important; margin-right: 0 !important; max-width: 100% !important;
    perspective: none !important; backface-visibility: visible !important;
  }
  .steps-grid { transform: none !important; left: auto !important; }
  .steps-grid .proof-card.flip .proof-body,
  .steps-grid .proof-card.flip .proof-cut,
  .steps-grid .proof-card.flip .proof-viz { order: 0 !important; }
  html.stage-on .steps-grid .proof-card .proof-viz, .steps-grid .proof-viz {
    aspect-ratio: 24 / 9 !important; margin: 10px 10px 0 !important;
  }
  .proof-title { font-size: 1.5rem !important; }
  .proof-body { padding: 0 18px 20px !important; }
  .proof-body p { font-size: 16px !important; margin-top: 8px !important; }
  .proof-cut { height: 34px !important; }

  /* ---- BENCH: stack vertically, small chart ---- */
  html.stage-on .bench-track, .bench-track { width: 100% !important; transform: none !important; flex-direction: column !important; }
  html.stage-on .bench-panel, .bench-panel { width: 100% !important; flex: none !important; }
  html.stage-on .bench-say .say, .bench-say .say { position: relative !important; inset: auto !important; }
  .bench-chart { aspect-ratio: auto !important; height: clamp(150px, 38vw, 210px) !important; }

  /* ---- BENCH: chart stacked; decorative words small, centered, not overlapping ---- */
  .bench-say { position: static !important; margin-top: 26px !important; }
  .say { font-size: clamp(1.8rem, 9vw, 2.5rem) !important; max-width: 16ch !important; }
  .say-b { margin-top: .15em !important; }

  /* ---- EDGE: full-width single column, hairline stack, smaller visuals ---- */
  .proof-grid, .edge-grid, .edge-stats, .edge-compare { grid-template-columns: 1fr !important; max-width: 460px !important; margin-inline: auto !important; }
  .edge-card + .edge-card,
  .edge-stat + .edge-stat,
  .edge-cmp + .edge-cmp { border-left: none !important; border-top: 1px solid var(--line) !important; }
  .edge-card:nth-child(3) { border-left: none !important; }
  .edge-card { min-height: 0 !important; }
  .edge-viz { height: 128px !important; }
  .edge-copy { padding: 0 18px 20px !important; }
  .edge-copy h3 { min-height: 0 !important; font-size: 1.23rem !important; }
  .edge-copy p { font-size: 15.5px !important; }
  .edge-stat { padding: 22px 18px !important; }
  .es-num { font-size: clamp(2.2rem, 13vw, 3rem) !important; }
  .es-lab { font-size: 15.5px !important; margin-top: 10px !important; max-width: none !important; }
  .edge-cmp { padding: 20px 18px !important; }
  .edge-cmp h3 { font-size: 1.3rem !important; }
  .cmp-lab { font-size: 10px !important; }
  .cmp-was, .cmp-now { font-size: 1.15rem !important; }

  /* ---- ANIMATION AREAS (pre-Keeper): sized for phone, isolated from reflow ---- */
  /* hero chart: a bounded bottom band, not a full-bleed sheet */
  .hero-canvas { top: auto !important; bottom: 0 !important; height: 340px !important; contain: layout paint !important; }
  .hero-canvas canvas { height: 100% !important; }
  /* engine background field: stays inside the section, no paint bleed */
  .engine-fx { contain: paint !important; }
  /* card / chart viz boxes: fixed proportions from width only (URL-bar can't move them) */
  .steps-grid .proof-viz, .proof-viz { contain: layout paint !important; }
  .edge-viz { contain: layout paint !important; height: 120px !important; }
  .bench-chart { contain: layout paint !important; }

  /* ---- reveals: always visible on mobile (canvas animation still runs) ---- */
  html.js [data-reveal] { opacity: 1 !important; transform: none !important; }

  /* ---- KEEPER roles-table: keep all 3 cols (gate animation measures them), shrink to fit ---- */
  .control { padding-block: clamp(52px, 12vw, 84px) !important; }
  .roles-table th:last-child, .roles-table td:last-child { display: table-cell !important; }
  .roles-table td { padding: 12px 8px 22px !important; font-size: 13px !important; }
  .roles-table th { font-size: 9px !important; padding: 0 8px 8px !important; letter-spacing: .07em !important; }
  .roles-table td:first-child { font-size: 11px !important; }
  .roles-table th:nth-child(2), .roles-table td:nth-child(2) { width: 44% !important; }
  .roles-table th:nth-child(3), .roles-table td:nth-child(3) { width: 30% !important; padding-left: 8px !important; }

  /* ---- CTA + FOOTER ---- */
  .cta { padding-block: clamp(56px, 12vw, 92px) !important; }
  .cta-ctas { margin-top: 24px !important; }
  .footer-wordmark { overflow: hidden !important; max-width: 100vw !important; }
  .footer-wordmark span { font-size: clamp(44px, 15vw, 104px) !important; }
  .footer-bar-inner { flex-direction: column !important; gap: 14px !important; text-align: center; }

  /* ---- nothing overflows ---- */
  section, .wrap { max-width: 100vw !important; }
  canvas, img, svg, video { max-width: 100% !important; }
}

/* small phones ≤430 */
@media (max-width: 430px) {
  .hero-title { font-size: clamp(2rem, 11.5vw, 2.5rem) !important; }
  .h2 { font-size: clamp(1.45rem, 8vw, 1.85rem) !important; }
  .steps-rail, .proof-grid, .edge-grid { padding-inline: 14px !important; }
  .btn-lg { padding: 14px 22px !important; font-size: 15px !important; }
}
