/* ──────────────────────────────────────────────────────────────────
   CXingularity · IGLOO-FORK edition
   Alternating dark/light chapters · ultra-thin sans · pinned scenes
   ────────────────────────────────────────────────────────────────── */

:root {
  /* Dark surfaces — deep violet-black (brand) */
  --d-bg:        #07061a;
  --d-bg-2:      #0d0a26;
  --d-ink:       #f5f3ff;
  --d-ink-2:     rgba(245, 243, 255, 0.62);
  --d-ink-3:     rgba(245, 243, 255, 0.38);
  --d-line:      rgba(245, 243, 255, 0.10);
  --d-line-2:    rgba(245, 243, 255, 0.22);

  /* Light surfaces — soft lavender ground */
  --l-bg:        #f1eff7;
  --l-bg-2:      #ffffff;
  --l-ink:       #0d0a26;
  --l-ink-2:     rgba(13, 10, 38, 0.64);
  --l-ink-3:     rgba(13, 10, 38, 0.40);
  --l-line:      rgba(13, 10, 38, 0.10);
  --l-line-2:    rgba(13, 10, 38, 0.22);

  /* Accent (brand) — purple · electric blue · pink */
  --accent:      #8b5cff;
  --accent-2:    #5b8eff;
  --pink:        #e89aa8;
  --accent-glow: rgba(139, 92, 255, 0.32);

  /* Default = dark */
  --bg:    var(--d-bg);
  --bg-2:  var(--d-bg-2);
  --ink:   var(--d-ink);
  --ink-2: var(--d-ink-2);
  --ink-3: var(--d-ink-3);
  --line:  var(--d-line);
  --line-2: var(--d-line-2);

  --maxw: 1480px;
  --pad: clamp(20px, 4.5vw, 64px);

  --font-display: "Space Grotesk", "Inter Tight", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-sans:    "Open Sans", "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, monospace;

  --parallax: 1;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--d-bg); }
body {
  background: var(--d-bg);
  color: var(--d-ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: none; }
::selection { background: var(--accent); color: var(--d-ink); }

/* Hide custom cursor on touch / coarse pointers */
@media (hover: none), (pointer: coarse) {
  html, body, a, button { cursor: auto; }
  .cursor-dot, .cursor-ring { display: none; }
}

/* Wrap long chapter eyebrows on small screens */
@media (max-width: 640px) {
  .chapter-eyebrow {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    top: 80px;
  }
  .chapter-eyebrow span { font-size: 9px; }
  .hero-eyebrow-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding-top: 88px;
  }
  .hero-eyebrow-row span { font-size: 9px; }
  .hero-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    bottom: 18px;
  }
  .hero-foot span { font-size: 9px; }
  .chapter-foot {
    bottom: 24px;
  }
}

/* Cap pin scroll length on mobile so chapters don't feel endless */
@media (max-width: 760px) {
  .chapter { height: 300vh !important; }
  .chapter-pin { padding: 0 4px; }
  .nav { padding: 16px 0; }
  .nav-logo { font-size: 20px; gap: 10px; }
  .nav-logo .nav-mark { height: 28px; }
  .nav-cta { padding: 9px 14px; font-size: 10px; letter-spacing: 0.16em; }
  .btn { padding: 14px 20px; font-size: 10px; letter-spacing: 0.16em; }
  .hero-content { padding-bottom: clamp(60px, 10vh, 100px); }
}

@media (max-height: 600px) {
  .chapter { height: 220vh; }
}

/* ──────────────────────────────────────────────────────────────────
   Mobile refinements — conservative, scoped (no global resets)
   ────────────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .hero { min-height: 560px; }
  .hero-content { grid-template-columns: 1fr; gap: 16px; }
  .hero-headline { font-size: clamp(38px, 11vw, 76px); line-height: 0.95; }
  .hero-sub { font-size: 14px; }

  .manifesto-line { font-size: clamp(34px, 9vw, 72px); line-height: 1.0; }

  .traction-grid { grid-template-columns: 1fr 1fr; gap: 32px 18px; }
  .stat .num { font-size: clamp(44px, 12vw, 88px); }

  .cta-headline { font-size: clamp(40px, 11vw, 80px); }
  .cta-contact { grid-template-columns: 1fr 1fr; }

  .footer-inner { font-size: 10px; gap: 14px; }
  .footer-links { flex-wrap: wrap; gap: 14px; }
}

@media (max-width: 460px) {
  .hero-headline { font-size: clamp(32px, 12vw, 56px); }
  .traction-grid { grid-template-columns: 1fr; gap: 28px; }
  .cta-contact { grid-template-columns: 1fr; }
  .head-block .h-l { font-size: clamp(28px, 9vw, 44px); }
}

/* ───── Section themes ───── */
.theme-dark {
  --bg: var(--d-bg);
  --bg-2: var(--d-bg-2);
  --ink: var(--d-ink);
  --ink-2: var(--d-ink-2);
  --ink-3: var(--d-ink-3);
  --line: var(--d-line);
  --line-2: var(--d-line-2);
  background: var(--bg);
  color: var(--ink);
}
.theme-light {
  --bg: var(--l-bg);
  --bg-2: var(--l-bg-2);
  --ink: var(--l-ink);
  --ink-2: var(--l-ink-2);
  --ink-3: var(--l-ink-3);
  --line: var(--l-line);
  --line-2: var(--l-line-2);
  background: var(--bg);
  color: var(--ink);
}

.shell {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
  position: relative;
}
.section { padding-block: clamp(80px, 14vh, 200px); position: relative; }

/* ───── Type ───── */
.display {
  font-family: var(--font-display);
  font-weight: 200;
  letter-spacing: -0.04em;
  line-height: 0.92;
  text-wrap: balance;
  color: var(--ink);
  text-transform: uppercase;
}
.display em {
  font-style: normal;
  font-weight: 200;
  color: var(--accent);
}
.h-mega { font-size: clamp(56px, 11vw, 180px); }
.h-xxl  { font-size: clamp(48px, 8.5vw, 132px); }
.h-xl   { font-size: clamp(38px, 6vw, 96px); }
.h-l    { font-size: clamp(30px, 4.2vw, 64px); }
.h-m    { font-size: clamp(20px, 2.2vw, 28px); }
.lead {
  color: var(--ink-2);
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.55;
  max-width: 54ch;
  text-wrap: pretty;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ───── Loader ───── */
.loader {
  position: fixed; inset: 0;
  z-index: 9999;
  background: var(--d-bg);
  color: var(--d-ink);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  gap: 32px;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}
.loader.done { opacity: 0; visibility: hidden; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .loader-glyph span { transform: translateY(0) !important; animation: none !important; }
  .loader-bar i { width: 100% !important; animation: none !important; }
  .loader { transition: none; }
  .loader.done { display: none; }
}
.loader-glyph {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(40px, 12vw, 180px);
  line-height: 1;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  overflow: hidden;
  display: flex;
  gap: 0.04em;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 90vw;
}
.loader-glyph span {
  display: inline-block;
  transform: translateY(110%);
  animation: loaderUp 0.9s cubic-bezier(.2,.7,.2,1) forwards;
}
@keyframes loaderUp { to { transform: translateY(0); } }
.loader-glyph span:nth-child(1) { animation-delay: 0.05s; }
.loader-glyph span:nth-child(2) { animation-delay: 0.10s; }
.loader-glyph span:nth-child(3) { animation-delay: 0.15s; }
.loader-glyph span:nth-child(4) { animation-delay: 0.20s; }
.loader-glyph span:nth-child(5) { animation-delay: 0.25s; }
.loader-glyph span:nth-child(6) { animation-delay: 0.30s; }
.loader-glyph span:nth-child(7) { animation-delay: 0.35s; }
.loader-glyph span:nth-child(8) { animation-delay: 0.40s; }
.loader-glyph span:nth-child(9) { animation-delay: 0.45s; }
.loader-glyph span:nth-child(10) { animation-delay: 0.50s; }
.loader-glyph span:nth-child(11) { animation-delay: 0.55s; }
.loader-glyph span:nth-child(12) { animation-delay: 0.60s; }
.loader-bar {
  width: clamp(220px, 30vw, 400px);
  height: 1px;
  background: rgba(244,244,241,0.16);
  position: relative;
  overflow: hidden;
}
.loader-bar i {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0%;
  background: var(--d-ink);
  animation: loaderFill 2.4s cubic-bezier(.4,.0,.2,1) forwards;
  animation-delay: 0.4s;
}
@keyframes loaderFill { to { width: 100%; } }
.loader-pct {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--d-ink-3);
  text-transform: uppercase;
  display: flex; justify-content: space-between; width: clamp(220px, 30vw, 400px);
}

/* ───── Custom cursor ───── */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 99999;
  border-radius: 50%;
  transition: opacity 0.2s ease, transform 0.15s ease, width 0.2s ease, height 0.2s ease, background 0.2s ease;
  mix-blend-mode: difference;
  will-change: transform;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: #ffffff;
  transform: translate(-50%, -50%);
}
.cursor-ring {
  width: 32px; height: 32px;
  border: 1px solid #ffffff;
  transform: translate(-50%, -50%);
  transition: transform 0.18s cubic-bezier(.3,.7,.4,1), width 0.2s, height 0.2s;
}
body.cursor-hover .cursor-ring { width: 56px; height: 56px; }
body.cursor-hover .cursor-dot { opacity: 0; }

/* ───── Nav ───── */
.nav {
  position: fixed; inset: 0 0 auto 0;
  z-index: 100;
  padding: 26px 0;
  transition: background 0.4s, backdrop-filter 0.4s, border-color 0.4s;
}
.nav.solid {
  background: rgba(7, 6, 26, 0.72);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--d-line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav-logo {
  display: inline-flex; align-items: center; gap: 13px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 25px;
  letter-spacing: -0.01em;
  color: var(--d-ink);
}
.nav-logo .nav-mark {
  height: 36px; width: auto;
  filter: drop-shadow(0 2px 12px rgba(139, 92, 255, 0.5));
}
.wordmark { font-family: var(--font-display); font-weight: 400; letter-spacing: 0.005em; color: var(--d-ink); }
.wordmark .cx { font-weight: 700; color: var(--d-ink); }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.nav-links {
  display: flex;
  gap: 36px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--d-ink-2);
}
.nav-links a {
  position: relative;
  padding: 4px 0;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--d-ink); }
.nav-cta {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 13px 24px;
  border: 1px solid var(--d-line-2);
  color: var(--d-ink);
  border-radius: 999px;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.nav-cta:hover { background: var(--d-ink); color: var(--d-bg); border-color: var(--d-ink); }
@media (max-width: 760px) { .nav-links { display: none; } }

/* ───── Buttons ───── */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 24px;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.20em; text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s;
}
.btn .arrow { transition: transform 0.25s cubic-bezier(.3,.7,.4,1); }
.btn:hover .arrow { transform: translateX(5px); }
.btn-primary {
  background: var(--ink); color: var(--bg); border-color: var(--ink);
}
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: var(--d-bg); }
.btn-ghost {
  border-color: var(--line-2); color: var(--ink);
}
.btn-ghost:hover { border-color: var(--ink); background: rgba(244,244,241,0.06); }

/* ──────────────────────────────────────────────────────────────────
   HERO — full-bleed video/canvas + center manifesto
   ────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  background: var(--d-bg);
  color: var(--d-ink);
}
.hero-scene {
  position: absolute; inset: 0;
  z-index: 0;
}
.hero-scene canvas { display: block; width: 100% !important; height: 100% !important; }
.hero-vignette {
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(ellipse 80% 60% at 50% 50%, transparent 0%, transparent 50%, rgba(10,10,10,0.4) 100%),
    linear-gradient(to bottom, rgba(10,10,10,0.55) 0%, transparent 30%, transparent 60%, rgba(10,10,10,0.85) 100%);
  pointer-events: none;
}
.hero-content {
  position: relative; z-index: 2;
  width: 100%;
  padding: 0 var(--pad) clamp(80px, 12vh, 140px);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 32px;
}
@media (max-width: 760px) {
  .hero-content { grid-template-columns: 1fr; gap: 18px; }
  .hero-content > div:last-child { display: flex; flex-direction: column; align-items: flex-start; }
}
.hero-eyebrow-row {
  position: absolute; top: 0; left: var(--pad); right: var(--pad);
  padding-top: 100px;
  display: flex; justify-content: space-between; align-items: flex-start;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--d-ink-3);
}
.hero-eyebrow-row .l { color: var(--accent); }
.hero-headline {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(40px, 9vw, 144px);
  line-height: 0.92;
  letter-spacing: -0.045em;
  color: var(--d-ink);
  text-wrap: balance;
  text-transform: uppercase;
  max-width: 18ch;
}
.hero-headline em {
  font-style: normal;
  font-weight: 200;
  color: var(--accent);
}
.hero-sub {
  font-size: clamp(14px, 1vw, 16px);
  color: var(--d-ink-2);
  line-height: 1.55;
  max-width: 36ch;
}
.hero-cta-row {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-top: 16px;
}
.hero-foot {
  position: absolute; bottom: 28px; left: var(--pad); right: var(--pad);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--d-ink-3);
  z-index: 3;
}
.hero-foot .cue { display: inline-flex; align-items: center; gap: 10px; }
.hero-foot .cue .line {
  width: 28px; height: 1px;
  background: linear-gradient(to right, var(--accent), transparent);
  animation: scrollLine 2.2s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { transform: scaleX(0); transform-origin: left; }
  50% { transform: scaleX(1); transform-origin: left; }
  50.01% { transform-origin: right; }
  100% { transform: scaleX(0); transform-origin: right; }
}

/* ──────────────────────────────────────────────────────────────────
   PINNED CHAPTER (Igloo-grade)
   Each chapter is height: 400vh, pin contents over full viewport,
   scrub progress 0..1.
   ────────────────────────────────────────────────────────────────── */
.chapter {
  position: relative;
  height: 380vh;
}
.chapter-pin {
  position: sticky; top: 0;
  height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.chapter-eyebrow {
  position: absolute;
  top: clamp(80px, 12vh, 140px);
  left: var(--pad); right: var(--pad);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-3);
  z-index: 3;
}
.chapter-eyebrow .roman { color: var(--accent); }
.chapter-foot {
  position: absolute;
  bottom: 36px;
  left: var(--pad); right: var(--pad);
  display: flex; align-items: center; gap: 16px;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  z-index: 3;
}
.chapter-foot .bar {
  flex: 1; height: 1px; background: var(--line-2);
  position: relative; overflow: hidden;
}
.chapter-foot .bar i {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: var(--p, 0%);
  background: var(--accent);
  transition: width 0.15s linear;
}

/* Manifesto: words crossfade through */
.manifesto-stage {
  position: relative;
  width: 100%; height: 100%;
  display: grid; place-items: center;
}
.manifesto-line {
  position: absolute;
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(48px, 10vw, 152px);
  line-height: 0.9;
  letter-spacing: -0.045em;
  text-align: center;
  text-transform: uppercase;
  text-wrap: balance;
  color: var(--ink);
  opacity: 0;
  transform: translateY(40px) scale(0.9);
  filter: blur(8px);
  transition: opacity 0.6s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1), filter 0.6s ease;
  max-width: 80%;
}
.manifesto-line.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}
.manifesto-line em { font-style: normal; font-weight: 200; color: var(--accent); }

/* Engine chapter: 3-column inputs / core / outputs that compose */
.engine-stage {
  width: min(1280px, 100% - var(--pad) * 2);
  display: grid;
  grid-template-columns: 1fr 280px 1fr;
  gap: 18px;
  align-items: center;
}
@media (max-width: 1080px) { .engine-stage { grid-template-columns: 1fr 240px 1fr; gap: 14px; } }
@media (max-width: 860px)  { .engine-stage { grid-template-columns: 1fr; gap: 28px; } .engine-core-wrap { min-height: 240px; } }
.engine-col { display: flex; flex-direction: column; gap: 10px; will-change: transform, opacity; }
.engine-row {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12px;
  color: var(--ink-2);
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-2);
  min-width: 0;
}
.engine-row strong { color: var(--ink); font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.engine-row .glyph {
  width: 22px; height: 22px;
  border: 1px solid var(--line-2);
  display: grid; place-items: center;
  flex-shrink: 0;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--accent);
  border-radius: 6px;
}
.engine-row .tag {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.engine-core-wrap {
  position: relative;
  display: grid; place-items: center;
  min-height: 320px;
  will-change: transform, opacity;
}
.engine-core-orb {
  width: 160px; aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 32%, rgba(255,255,255,0.45), rgba(139, 92, 255,0.5) 35%, rgba(91, 142, 255,0.4) 65%, rgba(0,0,0,0.6) 100%);
  box-shadow: 0 0 100px rgba(139, 92, 255,0.35), inset 0 0 50px rgba(0,0,0,0.4);
  position: relative;
}
.engine-core-orb::after, .engine-core-orb::before {
  content: ""; position: absolute; border-radius: 50%;
  inset: -8%; border: 1px solid var(--line-2);
  pointer-events: none;
}
.engine-core-orb::before { inset: -24%; border-style: dashed; border-color: rgba(139, 92, 255,0.20); }
.engine-core-label {
  position: absolute; bottom: -56px; left: 50%; transform: translateX(-50%);
  text-align: center; white-space: nowrap;
}
.engine-core-label .n {
  font-family: var(--font-display); font-weight: 500;
  font-size: 16px; letter-spacing: -0.02em;
  color: var(--ink); text-transform: uppercase;
  margin-bottom: 4px;
}
.engine-core-label .s {
  font-family: var(--font-mono); font-size: 9px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-3);
}

/* Stack chapter: word-cycling stack labels */
.stack-stage {
  width: min(1280px, 100% - var(--pad) * 2);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 860px) { .stack-stage { grid-template-columns: 1fr; gap: 32px; } }
.stack-words {
  position: relative;
  min-height: clamp(220px, 30vh, 320px);
}
.stack-word {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(30px, 3.8vw, 56px);
  line-height: 1.0;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.4s ease, transform 0.5s cubic-bezier(.3,.7,.4,1);
  text-wrap: balance;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}
.stack-word.active { opacity: 1; transform: translateX(0); }
.stack-word em { font-style: normal; font-weight: 200; color: var(--accent); }
.stack-list {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--line);
}
.stack-item {
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 60px 130px 1fr;
  gap: 18px;
  align-items: center;
  transition: padding-left 0.3s cubic-bezier(.3,.7,.4,1), background 0.3s;
  cursor: none;
}
@media (max-width: 540px) {
  .stack-item {
    grid-template-columns: 50px 1fr;
    grid-template-rows: auto auto;
    gap: 4px 14px;
    padding: 14px 4px;
  }
  .stack-item p { grid-column: 1 / -1; font-size: 12px; }
}
.stack-item .idx {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-3);
}
.stack-item .code {
  font-family: var(--font-display); font-weight: 500;
  font-size: 14px; letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}
.stack-item p {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.5;
}
.stack-item.active {
  padding-left: 20px;
  background: linear-gradient(to right, rgba(139, 92, 255,0.06), transparent);
}
.stack-item.active .code { color: var(--accent); }

/* ──────────────────────────────────────────────────────────────────
   STANDARD CONTENT SECTIONS
   ────────────────────────────────────────────────────────────────── */
.head-block { margin-bottom: 70px; max-width: 820px; }
.head-block .eyebrow { margin-bottom: 20px; display: inline-block; }

/* OS capability layers (the BaaS / Lending OS stack) */
.os-layers {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 0;
  margin-bottom: 48px;
}
.os-layer {
  background: var(--bg-2);
  padding: 22px 20px;
  display: flex; flex-direction: column; gap: 8px;
  transition: background 0.3s;
}
.os-layer:hover { background: rgba(139, 92, 255, 0.06); }
.os-layer .n {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent);
}
.os-layer strong {
  font-family: var(--font-display); font-weight: 500;
  font-size: 15px; letter-spacing: -0.01em;
  line-height: 1.2; color: var(--ink);
}
.os-layer span:last-child { font-size: 12px; color: var(--ink-2); line-height: 1.4; }
@media (max-width: 960px) { .os-layers { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .os-layers { grid-template-columns: 1fr; } }

.portals-caption { margin-bottom: 18px; display: inline-block; }

/* Portals (3-column dark) */
.portals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 960px) { .portals-grid { grid-template-columns: 1fr; } }
.portal {
  padding: 32px 28px;
  border: 1px solid var(--line);
  border-radius: 0;
  display: flex; flex-direction: column;
  gap: 16px;
  background: var(--bg-2);
  transition: border-color 0.4s, transform 0.4s cubic-bezier(.3,.7,.4,1);
}
.portal:hover { border-color: var(--accent); transform: translateY(-4px); }
.portal-eyebrow {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent);
}
.portal-title {
  font-family: var(--font-display); font-weight: 200;
  font-size: clamp(24px, 2.2vw, 32px);
  line-height: 1.05; letter-spacing: -0.025em;
  text-transform: uppercase;
}
.portal-title em { font-style: normal; color: var(--accent); }
.portal-sub { color: var(--ink-2); font-size: 13px; line-height: 1.55; }
.portal ul {
  list-style: none; margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.portal ul li {
  font-size: 12px; color: var(--ink-2); line-height: 1.5;
}
.portal ul li strong { color: var(--ink); font-weight: 500; }

/* Products list (light) */
.products-list { border-top: 1px solid var(--line); }
.product {
  display: grid;
  grid-template-columns: 80px 1.2fr 2fr 140px;
  gap: 28px;
  padding: 28px 4px;
  border-bottom: 1px solid var(--line);
  align-items: center;
  position: relative;
  transition: padding-left 0.3s cubic-bezier(.3,.7,.4,1);
}
.product::before {
  content: ""; position: absolute;
  left: 0; right: 100%; top: 0; bottom: 0;
  background: linear-gradient(to right, rgba(139, 92, 255,0.10), transparent);
  transition: right 0.5s cubic-bezier(.3,.7,.4,1);
  pointer-events: none;
}
.product:hover { padding-left: 20px; }
.product:hover::before { right: 0; }
.product .num {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-3);
}
.product .name {
  font-family: var(--font-display); font-weight: 200;
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.1; letter-spacing: -0.025em;
  text-transform: uppercase;
}
.product .name em { font-style: normal; color: var(--accent); }
.product .desc {
  color: var(--ink-2); font-size: 13px; line-height: 1.55;
}
.product .limit {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent);
  text-align: right;
}
@media (max-width: 860px) {
  .product { grid-template-columns: 50px 1fr; gap: 8px 16px; }
  .product .desc, .product .limit { grid-column: 1 / -1; }
  .product .limit { text-align: left; }
}

/* Buyers grid */
.buyer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (max-width: 960px) { .buyer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .buyer-grid { grid-template-columns: 1fr; } }
.buyer {
  background: var(--bg);
  padding: 24px 22px;
  display: flex; flex-direction: column; gap: 10px;
  min-height: 200px;
  transition: background 0.3s;
}
.buyer:hover { background: var(--bg-2); }
.buyer .code {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-3);
}
.buyer .label {
  font-family: var(--font-display); font-weight: 200;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.15; letter-spacing: -0.02em;
  text-transform: uppercase;
}
.buyer .body { color: var(--ink-2); font-size: 12px; line-height: 1.5; margin-top: auto; }
.buyer .ref {
  font-family: var(--font-mono); font-size: 9px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent);
}

/* Traction */
.traction-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 60px 48px;
}
@media (max-width: 760px) { .traction-grid { grid-template-columns: 1fr; gap: 48px; } }
.stat .label {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.20em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 14px;
}
.stat .num {
  font-family: var(--font-display); font-weight: 200;
  font-size: clamp(56px, 8vw, 116px);
  line-height: 0.9; letter-spacing: -0.04em;
  display: flex; align-items: baseline; gap: 4px;
  text-transform: uppercase;
}
.stat .num .unit { font-size: 0.4em; color: var(--ink-2); }
.stat .body {
  color: var(--ink-2); font-size: 13px;
  max-width: 32ch; line-height: 1.5;
  margin-top: 12px;
}

/* Moat */
.moat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 60px 80px;
}
@media (max-width: 760px) { .moat-grid { grid-template-columns: 1fr; gap: 48px; } }
.moat-item { display: grid; grid-template-columns: 80px 1fr; gap: 20px; align-items: start; }
.moat-item .n {
  font-family: var(--font-display); font-weight: 200;
  font-size: 48px; line-height: 1;
  color: var(--accent);
}
.moat-item h4 {
  font-family: var(--font-display); font-weight: 200;
  font-size: clamp(20px, 1.6vw, 24px);
  line-height: 1.15; letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.moat-item p { color: var(--ink-2); font-size: 13px; line-height: 1.55; }

/* Founders */
.founders-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
@media (max-width: 760px) { .founders-grid { grid-template-columns: 1fr; } }
.founder {
  padding: 24px;
  border: 1px solid var(--line);
  display: grid; grid-template-columns: 180px 1fr; gap: 28px;
  align-items: stretch;
  min-height: 300px;
  background: var(--bg-2);
}
@media (max-width: 520px) { .founder { grid-template-columns: 1fr; } }
.founder-portrait {
  position: relative; border-radius: 14px; overflow: hidden;
  min-height: 240px;
  background: linear-gradient(160deg, #2a2550 0%, #141030 100%);
  border: 1px solid var(--line);
}
.founder-portrait img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.founder-meta { display: flex; flex-direction: column; gap: 14px; justify-content: center; min-width: 0; }
.founder .role {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent);
}
.founder .name {
  font-family: var(--font-display); font-weight: 200;
  font-size: clamp(28px, 2.4vw, 36px);
  line-height: 1.05; letter-spacing: -0.025em;
  text-transform: uppercase;
}
.founder p { color: var(--ink-2); font-size: 13px; line-height: 1.55; }
.founder .loc {
  margin-top: auto;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-3);
}

/* CTA */
.cta {
  position: relative;
  overflow: hidden;
  padding-block: 200px 160px;
  text-align: center;
  border-top: 1px solid var(--d-line);
  background: var(--d-bg);
  color: var(--d-ink);
}
.cta-aura {
  position: absolute; left: 50%; top: 50%;
  width: 1400px; height: 1400px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow), transparent 55%);
  filter: blur(60px);
  z-index: 0; pointer-events: none;
  will-change: transform;
}
.cta-headline {
  font-family: var(--font-display); font-weight: 200;
  font-size: clamp(48px, 9vw, 144px);
  line-height: 0.9; letter-spacing: -0.05em;
  text-transform: uppercase;
  text-wrap: balance;
  margin-bottom: 28px; position: relative; z-index: 1;
}
.cta-headline em { font-style: normal; font-weight: 200; color: var(--accent); }
.cta-sub {
  color: var(--d-ink-2); font-size: 16px;
  max-width: 52ch; margin: 0 auto 36px; line-height: 1.55;
  position: relative; z-index: 1;
}
.cta-row {
  display: flex; gap: 12px;
  justify-content: center; flex-wrap: wrap;
  position: relative; z-index: 1;
}
.cta-contact {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 70px;
  position: relative; z-index: 1;
  text-align: left;
}
@media (max-width: 860px) { .cta-contact { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .cta-contact { grid-template-columns: 1fr; } }
.cta-card {
  padding: 18px 20px;
  border: 1px solid var(--d-line-2);
  transition: border-color 0.3s, background 0.3s;
}
.cta-card:hover { border-color: var(--accent); background: rgba(139, 92, 255,0.06); }
.cta-card .lbl {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--d-ink-3); margin-bottom: 8px;
}
.cta-card .v {
  font-family: var(--font-display); font-weight: 200;
  font-size: clamp(14px, 1.2vw, 17px);
  letter-spacing: -0.01em; text-transform: uppercase;
  color: var(--d-ink);
}

/* Footer */
.footer {
  padding-block: 60px 40px;
  border-top: 1px solid var(--d-line);
  font-size: 11px;
  color: var(--d-ink-3);
  background: var(--d-bg);
  position: relative; z-index: 1;
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px; flex-wrap: wrap;
  font-family: var(--font-mono);
  letter-spacing: 0.12em; text-transform: uppercase;
}
.footer-inner a:hover { color: var(--d-ink); }
.footer-links { display: flex; gap: 24px; }

/* Trust marquee */
.trust {
  padding-block: 56px;
  border-block: 1px solid var(--line);
  background: var(--bg);
  position: relative; z-index: 1;
}
.trust-eyebrow {
  text-align: center; margin-bottom: 24px;
  display: flex; justify-content: center;
}
.marquee {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.marquee-track {
  display: flex; gap: 64px; align-items: center;
  animation: marquee 48s linear infinite;
  width: max-content;
}
.marquee-track img {
  height: 30px; width: auto; max-width: 160px;
  object-fit: contain;
  opacity: 0.72;
  filter: brightness(1.08);
  transition: opacity 0.25s ease;
}
.marquee-track img:hover { opacity: 1; }
@keyframes marquee { to { transform: translateX(-50%); } }

@media (max-width: 540px) {
  .marquee-track img { height: 24px; }
  .marquee-track { gap: 44px; }
}

/* ──────────────────────────────────────────────────────────────────
   SCROLL-SCRUBBED CANVAS SCENE
   ────────────────────────────────────────────────────────────────── */
.scrub {
  position: relative;
  height: 600vh;
  background: #06060a;
}
.scrub-pin {
  position: sticky; top: 0;
  height: 100vh;
  overflow: hidden;
  background: #06060a;
  color: #f4f4f1;
}
.scrub-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.scrub-caption {
  position: absolute;
  left: var(--pad);
  bottom: clamp(120px, 18vh, 200px);
  z-index: 4;
  display: flex; flex-direction: column;
  gap: 16px;
  max-width: 38ch;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.scrub-caption .scrub-eb {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
}
.scrub-caption .scrub-t {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(28px, 4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  color: #f4f4f1;
  text-wrap: balance;
}
@media (max-width: 640px) {
  .scrub-caption { bottom: clamp(100px, 16vh, 160px); max-width: 80vw; }
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s cubic-bezier(.2,.6,.2,1), transform 1s cubic-bezier(.2,.6,.2,1);
}
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }

.sec-num {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ──────────────────────────────────────────────────────────────────
   AMBIENT ANIMATED BACKGROUND
   Fixed brand-colored aurora + drifting particles behind the content.
   Dark sections are translucent so the animation glows through; light
   sections stay opaque.
   ────────────────────────────────────────────────────────────────── */
#ambient {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
}
/* Lift real content above the ambient canvas */
main, .footer { position: relative; z-index: 1; }

/* Let the ambient glow bleed through the dark scroll sections */
.section.theme-dark { background: rgba(7, 6, 26, 0.74); }
.chapter.theme-dark { background: rgba(7, 6, 26, 0.64); }
.cta { background: rgba(7, 6, 26, 0.74); }
.footer { background: rgba(7, 6, 26, 0.88); }

/* ──────────────────────────────────────────────────────────────────
   ENGINE — animated data-flow pipeline (ported from the deck)
   ────────────────────────────────────────────────────────────────── */
.engine-head {
  max-width: none;
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 60px; flex-wrap: wrap; margin-bottom: 52px;
}
.engine-head .lead { margin-bottom: 8px; }
@media (max-width: 760px) { .engine-head { flex-direction: column; align-items: flex-start; gap: 22px; } }

.pipeline-stage {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 64px 1.05fr 64px 1fr;
  align-items: stretch;
}
.pipeline-flow {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 2;
}
.pipe-gap { pointer-events: none; }

.pipe-col {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: 20px;
  background: rgba(245, 243, 255, 0.02);
  overflow: hidden;
}
.pipe-engine {
  position: relative; overflow: visible;
  background: linear-gradient(160deg, rgba(139,92,255,0.18) 0%, rgba(91,142,255,0.10) 100%);
  border-color: rgba(139,92,255,0.35);
}
.pipe-cap {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-3); padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  letter-spacing: 0.14em; text-transform: uppercase;
  position: relative; z-index: 3;
}
.pipe-cap-engine { color: var(--accent); }
.pipe-cap-out { color: #48d9c4; }
.pipe-body {
  padding: 26px 24px; display: flex; flex-direction: column;
  gap: 18px; flex: 1; justify-content: center;
}
.pipe-body-engine { text-align: center; align-items: center; position: relative; z-index: 3; }
.pipe-item {
  font-family: var(--font-sans); font-size: 14px; color: var(--ink);
  position: relative; line-height: 1.3; transition: color 0.4s ease;
  display: flex; align-items: center; gap: 14px;
}
.pipe-item .ico {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px;
  background: rgba(139,92,255,0.15); border: 1px solid rgba(139,92,255,0.4);
  display: flex; align-items: center; justify-content: center;
  color: #c4adff; transition: all 0.4s ease;
}
.pipe-item .ico svg { width: 20px; height: 20px; }
.pipe-item .ico-out { background: rgba(72,217,196,0.15); border-color: rgba(72,217,196,0.45); color: #6fe5d2; }
.pipe-item.flash { color: #fff; }
.pipe-item.flash .ico { background: rgba(139,92,255,0.5); box-shadow: 0 0 18px 3px rgba(139,92,255,0.7); color: #fff; transform: scale(1.08); }
.pipe-item.out.flash .ico { background: rgba(72,217,196,0.5); box-shadow: 0 0 18px 3px rgba(72,217,196,0.7); color: #fff; transform: scale(1.08); }

.engine-orb { position: relative; width: 176px; height: 176px; }
.orb-ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.orb-ring-1 { animation: spin 32s linear infinite; }
.orb-ring-2 { animation: spinR 50s linear infinite; }
.engine-core {
  position: absolute; left: 50%; top: 50%; width: 84px; height: 84px;
  transform: translate(-50%, -50%); border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(232,154,168,0.95), transparent 55%),
    radial-gradient(circle at 70% 70%, rgba(91,142,255,1), transparent 60%),
    radial-gradient(circle, rgba(139,92,255,1) 0%, rgba(91,142,255,0.6) 100%);
  box-shadow: 0 0 60px 8px rgba(139,92,255,0.6), inset 0 0 30px rgba(255,255,255,0.4);
  animation: pulse-core 5s ease-in-out infinite;
  transition: transform 0.22s ease;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spinR { to { transform: rotate(-360deg); } }
@keyframes pulse-core {
  0%, 100% { box-shadow: 0 0 60px 8px rgba(139,92,255,0.6), inset 0 0 30px rgba(255,255,255,0.4); }
  50% { box-shadow: 0 0 90px 16px rgba(139,92,255,0.9), inset 0 0 40px rgba(255,255,255,0.5); }
}
.engine-title { font-size: 32px; line-height: 1.05; margin-top: 22px; color: var(--ink); }
.engine-sub { font-family: var(--font-sans); font-size: 14px; color: var(--ink-2); margin-top: 14px; }
.engine-chips { margin-top: 20px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.chip {
  font-family: var(--font-mono); font-size: 10px;
  padding: 6px 12px; border: 1px solid rgba(245,243,255,0.2); border-radius: 999px;
  color: var(--ink-2); letter-spacing: 0.1em; text-transform: uppercase;
}

@media (max-width: 900px) {
  .pipeline-stage { grid-template-columns: 1fr; gap: 18px; }
  .pipe-gap { display: none; }
  .pipeline-flow { display: none; }
  .pipe-body-engine { padding-block: 36px; }
}

/* ──────────────────────────────────────────────────────────────────
   RESPONSIVE PASS v2 — phone + tablet polish & smoothness
   ────────────────────────────────────────────────────────────────── */

/* Nav: the CTA must never wrap */
.nav-cta { white-space: nowrap; }

/* ───── Tablet (≤ 1024px) ───── */
@media (max-width: 1024px) {
  .scrub { height: 420vh; }
  .engine-head { gap: 32px; }
}

/* ───── Phone / small tablet (≤ 760px) ───── */
@media (max-width: 760px) {
  /* Nav fits on one line */
  .nav-logo { font-size: 18px; gap: 8px; }
  .nav-logo .nav-mark { height: 26px; }
  .nav-cta { padding: 8px 14px; font-size: 10px; letter-spacing: 0.14em; }

  /* Shorter pinned scenes so they don't feel endless, and scroll stays smooth */
  .scrub { height: 300vh; }

  /* Engine pipeline: comfortable stacked spacing */
  .pipeline-stage { gap: 16px; }
  .pipe-body { padding: 22px 20px; gap: 16px; }
  .pipe-item { font-size: 13px; }
  .engine-title { font-size: 28px; }

  /* Portals OS-layer strip + caption breathing room */
  .os-layers { margin-bottom: 36px; }
  .portal { min-height: 0; }
}

/* ───── Phone (≤ 600px) — make pinned chapters fit the viewport ───── */
@media (max-width: 600px) {
  /* Drop the ambient canvas on phones (3 live canvases = jank); the violet
     ground already shows through the translucent dark sections. */
  #ambient { display: none; }

  .nav { padding: 13px 0; }
  .nav-logo { font-size: 16px; }
  .nav-logo .nav-mark { height: 22px; }

  /* Stack chapter was overflowing (835px > 812px viewport) → shrink to fit */
  .stack-stage { gap: 18px; }
  .stack-words { min-height: 96px; }
  .stack-word { font-size: clamp(26px, 7.5vw, 38px); line-height: 1.0; }
  .stack-item { padding: 11px 4px; }
  .stack-item .code { font-size: 13px; }
  .stack-item p { font-size: 11.5px; line-height: 1.45; }

  /* Manifesto a touch smaller so long lines never clip */
  .manifesto-line { font-size: clamp(30px, 8.5vw, 60px); }

  /* Scrub: shortest on phones */
  .scrub { height: 240vh; }

  /* Tighten section vertical rhythm so the page isn't endless */
  .section { padding-block: clamp(56px, 10vh, 110px); }
  .head-block { margin-bottom: 44px; }
}

/* ───── Very small phones (≤ 400px) ───── */
@media (max-width: 400px) {
  .nav-logo { font-size: 15px; }
  .stack-word { font-size: clamp(22px, 7vw, 32px); }
  .engine-title { font-size: 24px; }
}

/* Smoother momentum scrolling on touch + fewer repaint artifacts */
@media (hover: none), (pointer: coarse) {
  html { -webkit-text-size-adjust: 100%; }
  .hero-scene canvas, #scrub-canvas { image-rendering: auto; }
}

/* Tablet nav: hide the inline links earlier so logo + CTA never crowd/wrap */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-logo { font-size: 21px; }
  .nav-cta { padding: 10px 18px; font-size: 11px; letter-spacing: 0.16em; }
}
/* Tablet: portals read better as 2-up than a single tall column */
@media (min-width: 620px) and (max-width: 960px) {
  .portals-grid { grid-template-columns: 1fr 1fr; }
}

/* ──────────────────────────────────────────────────────────────────
   USE CASES — tabbed category filter
   ────────────────────────────────────────────────────────────────── */
.uc-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 40px; }
.uc-tab {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 10px 18px; border: 1px solid var(--line-2); border-radius: 999px;
  color: var(--ink-2); background: transparent;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.uc-tab:hover { color: var(--ink); border-color: var(--ink-3); }
.uc-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.uc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 960px) { .uc-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .uc-grid { grid-template-columns: 1fr; } }

.uc-card {
  border: 1px solid var(--line); border-radius: 14px;
  padding: 24px 22px; background: var(--bg-2);
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color 0.3s, transform 0.3s cubic-bezier(.3,.7,.4,1);
}
.uc-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.uc-card .uc-cat {
  font-family: var(--font-mono); font-size: 9px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent);
}
.uc-card h3 {
  font-family: var(--font-display); font-weight: 500;
  font-size: 19px; letter-spacing: -0.01em; line-height: 1.15; color: var(--ink);
}
.uc-card p { font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.uc-card[hidden] { display: none; }

/* ──────────────────────────────────────────────────────────────────
   SUB-PAGES (legal · blog · use-cases) — shared
   ────────────────────────────────────────────────────────────────── */
.subpage { background: var(--d-bg); color: var(--d-ink); min-height: 100vh; }
.subhead {
  padding: clamp(120px, 18vh, 200px) 0 clamp(40px, 6vh, 72px);
  border-bottom: 1px solid var(--d-line);
}
.subhead .eyebrow { display: inline-block; margin-bottom: 18px; }
.subhead h1 {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(36px, 6vw, 76px); letter-spacing: -0.03em; line-height: 1.0;
  color: var(--d-ink);
}
.subhead h1 em { font-style: normal; color: var(--accent); }
.subhead .lead { margin-top: 20px; }
.subhead .breadcrumb {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--d-ink-3); margin-bottom: 22px;
}
.subhead .breadcrumb a { color: var(--accent); }

/* Legal / prose document */
.doc { padding-block: clamp(48px, 8vh, 96px); }
.doc-body { max-width: 760px; }
.doc-body h2 {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(20px, 2.4vw, 28px); letter-spacing: -0.01em;
  color: var(--d-ink); margin: 40px 0 14px;
}
.doc-body h2:first-child { margin-top: 0; }
.doc-body p, .doc-body li { color: var(--d-ink-2); font-size: 15px; line-height: 1.7; }
.doc-body p { margin-bottom: 14px; }
.doc-body ul { margin: 0 0 16px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.doc-body strong { color: var(--d-ink); font-weight: 600; }
.doc-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.doc-updated { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--d-ink-3); margin-bottom: 36px; }

/* Blog grid */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding-block: clamp(40px, 6vh, 72px); }
@media (max-width: 960px) { .blog-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .blog-grid { grid-template-columns: 1fr; } }
.blog-card {
  display: flex; flex-direction: column; gap: 14px;
  padding: 26px 24px; border: 1px solid var(--d-line); border-radius: 16px;
  background: var(--d-bg-2);
  transition: border-color 0.3s, transform 0.3s cubic-bezier(.3,.7,.4,1);
}
.blog-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.blog-card .b-cat {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent);
}
.blog-card h3 {
  font-family: var(--font-display); font-weight: 500;
  font-size: 19px; line-height: 1.25; letter-spacing: -0.01em; color: var(--d-ink);
}
.blog-card .b-excerpt { font-size: 13px; color: var(--d-ink-2); line-height: 1.55; flex: 1; }
.blog-card .b-meta {
  display: flex; gap: 10px; align-items: center; margin-top: auto;
  padding-top: 14px; border-top: 1px solid var(--d-line);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--d-ink-3);
}
.blog-card .b-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--d-ink-3); }

/* Case studies */
.cs-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; padding-block: clamp(32px, 5vh, 56px); }
@media (max-width: 760px) { .cs-grid { grid-template-columns: 1fr; } }
.cs-card {
  display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: start;
  padding: 30px 28px; border: 1px solid var(--d-line); border-radius: 18px;
  background: linear-gradient(160deg, rgba(139,92,255,0.08) 0%, rgba(255,255,255,0.01) 100%);
  transition: border-color 0.3s, transform 0.3s cubic-bezier(.3,.7,.4,1);
}
.cs-card:hover { border-color: var(--accent); transform: translateY(-3px); }
@media (max-width: 480px) { .cs-card { grid-template-columns: 1fr; gap: 14px; } }
.cs-metric {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(34px, 4vw, 48px); line-height: 0.95; letter-spacing: -0.03em;
  color: var(--accent); white-space: nowrap;
}
.cs-card .cs-client { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--d-ink-3); margin-bottom: 8px; }
.cs-card h3 { font-family: var(--font-display); font-weight: 500; font-size: 19px; line-height: 1.25; color: var(--d-ink); margin-bottom: 8px; }
.cs-card p { font-size: 13px; color: var(--d-ink-2); line-height: 1.55; }

/* Sub-page section heading */
.sub-section { padding-block: clamp(48px, 8vh, 90px); }
.sub-section > .sec-eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); display: block; margin-bottom: 14px; }
.sub-section > h2.display { font-size: clamp(28px, 4vw, 52px); margin-bottom: 28px; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s cubic-bezier(.2,.6,.2,1), transform .8s cubic-bezier(.2,.6,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* Sub-pages have no custom cursor — restore pointer on interactive els */
.subpage .uc-tab, .uc-tab { cursor: pointer; }

/* ──────────────────────────────────────────────────────────────────
   BLOG ARTICLE (individual post)
   ────────────────────────────────────────────────────────────────── */
.article { padding-block: clamp(40px, 7vh, 80px); }
.article-body { max-width: 760px; }
.article-body .a-meta {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--d-ink-3); margin: 22px 0 36px;
}
.article-body .a-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--d-ink-3); }
.article-body .a-meta .a-cat { color: var(--accent); }
.article-body .dek { font-size: 19px; line-height: 1.55; color: var(--d-ink-2); margin-bottom: 8px; }
.article-body h2 {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -0.015em;
  color: var(--d-ink); margin: 44px 0 14px;
}
.article-body h3 {
  font-family: var(--font-display); font-weight: 500; font-size: 19px;
  color: var(--d-ink); margin: 28px 0 10px;
}
.article-body p, .article-body li { color: var(--d-ink-2); font-size: 15.5px; line-height: 1.7; }
.article-body p { margin-bottom: 16px; }
.article-body ul { margin: 0 0 18px; padding-left: 20px; display: flex; flex-direction: column; gap: 7px; }
.article-body strong { color: var(--d-ink); font-weight: 600; }
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.article-body blockquote {
  margin: 22px 0; padding: 18px 24px; border-left: 3px solid var(--accent);
  background: linear-gradient(160deg, rgba(139,92,255,0.08), transparent);
  border-radius: 0 12px 12px 0; color: var(--d-ink); font-size: 17px; line-height: 1.5;
}
.a-table-wrap { overflow-x: auto; margin: 8px 0 24px; }
.a-table { width: 100%; border-collapse: collapse; min-width: 480px; }
.a-table th, .a-table td {
  text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--d-line);
  font-size: 14px; color: var(--d-ink-2);
}
.a-table th { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--d-ink-3); }
.a-table td:first-child { color: var(--d-ink); font-weight: 500; }
.a-table .pos { color: #6fe5d2; font-weight: 600; }
.a-callout {
  margin: 28px 0; padding: 26px 28px; border: 1px solid rgba(139,92,255,0.3);
  border-radius: 16px; background: linear-gradient(160deg, rgba(139,92,255,0.12), rgba(91,142,255,0.04));
}
.a-callout .big { font-family: var(--font-display); font-weight: 600; font-size: clamp(32px,5vw,52px); letter-spacing: -0.03em; color: var(--accent); line-height: 1; }
.a-callout .lbl { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--d-ink-3); margin-bottom: 8px; }
.article-back { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }

.blog-card a { color: inherit; text-decoration: none; }
.blog-card a:hover { color: var(--accent); }

/* ──────────────────────────────────────────────────────────────────
   BLOG / ARTICLE COVER ART — on-brand iridescent gradients + mark
   ────────────────────────────────────────────────────────────────── */
.cover-art { position: relative; overflow: hidden; }
.cover-art::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 28% 16%, rgba(255,255,255,0.22), transparent 55%);
}
.cover-art::after {
  content: ""; position: absolute; right: -16px; bottom: -26px;
  width: 140px; height: 140px;
  background: url(assets/logo.png) center/contain no-repeat;
  opacity: 0.55; transform: rotate(-8deg);
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.45));
}
.grad-ai       { background: linear-gradient(135deg, #8b5cff 0%, #5b8eff 100%); }
.grad-product  { background: linear-gradient(135deg, #5b8eff 0%, #8b5cff 100%); }
.grad-industry { background: linear-gradient(135deg, #7c4cff 0%, #e89aa8 100%); }
.grad-success  { background: linear-gradient(135deg, #48d9c4 0%, #5b8eff 60%, #8b5cff 100%); }
.grad-legal    { background: linear-gradient(135deg, #8b5cff 0%, #e89aa8 100%); }

/* Blog card cover (full-bleed top of card) */
.b-cover { height: 150px; margin: -26px -24px 18px; border-radius: 16px 16px 0 0; }

/* Article hero banner */
.art-banner { height: clamp(180px, 26vw, 280px); border-radius: 18px; margin-top: 30px; }

/* ──────────────────────────────────────────────────────────────────
   WATCH / MEDIA — responsive YouTube embeds
   ────────────────────────────────────────────────────────────────── */
.watch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .watch-grid { grid-template-columns: 1fr; } }
.video-embed {
  position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line); background: var(--bg-2);
}
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Founder LinkedIn link */
.founder .li-link {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent);
  display: inline-flex; gap: 6px; align-items: center; margin-top: 10px;
}
.founder .li-link:hover { color: var(--ink); }

/* Article glossary — plain-language definitions */
.a-gloss { margin: 30px 0; padding: 24px 26px; border: 1px solid rgba(139,92,255,0.28); border-radius: 16px; background: linear-gradient(160deg, rgba(139,92,255,0.08), rgba(255,255,255,0.01)); }
.a-gloss .lbl { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.a-gloss dl { margin: 0; }
.a-gloss dt { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--d-ink); margin-top: 12px; }
.a-gloss dt:first-child { margin-top: 0; }
.a-gloss dd { margin: 3px 0 0; font-size: 14px; line-height: 1.55; color: var(--d-ink-2); }

/* Real cover photos on cards + article hero */
.b-cover, .art-banner { overflow: hidden; }
.b-cover img, .art-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.b-cover { background: var(--d-bg-2); }

/* In-article images */
.article-body figure { margin: 30px 0; border: 1px solid var(--d-line); border-radius: 14px; overflow: hidden; background: var(--d-bg-2); }
.article-body figure img { width: 100%; height: auto; display: block; }
