/* ──────────────────────────────────────────────────────────────────
   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);
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.btn-primary:hover {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  border-color: transparent; color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 34px var(--accent-glow);
}
.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::before {
  content: "";
  position: absolute;
  left: -10%;
  bottom: -20%;
  width: 70%;
  height: 80%;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(closest-side, var(--accent-glow) 0%, rgba(91,142,255,0.12) 45%, transparent 75%);
  filter: blur(40px);
  opacity: 0.9;
  animation: heroAurora 12s ease-in-out infinite alternate;
}
@keyframes heroAurora {
  0%   { transform: translate(0, 0) scale(1); opacity: 0.7; }
  100% { transform: translate(8%, -6%) scale(1.18); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .hero::before { animation: none; }
}
.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:
    /* directional scrim: darken the bottom-left text zone, keep orb + particles glowing upper-right */
    linear-gradient(105deg, rgba(7,6,26,0.80) 0%, rgba(7,6,26,0.46) 26%, rgba(7,6,26,0.06) 50%, transparent 66%),
    linear-gradient(to bottom, rgba(7,6,26,0.45) 0%, transparent 24%, transparent 48%, rgba(7,6,26,0.78) 84%, rgba(7,6,26,0.94) 100%),
    radial-gradient(ellipse 85% 65% at 50% 50%, transparent 0%, transparent 54%, rgba(7,6,26,0.42) 100%);
  pointer-events: none;
}
/* subtle text-shadow as a second safety net for legibility over the scene */
.hero-headline, .hero-sub { text-shadow: 0 2px 24px rgba(7,6,26,0.6); }
.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);
  background: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 45%, #c9b6ff 70%, var(--accent) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 28px var(--accent-glow));
  animation: heroShimmer 7s ease-in-out infinite;
}
@keyframes heroShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-headline em { animation: none; }
}
.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);
}
/* Article header where the cover photo IS the banner */
.subhead.has-banner {
  position: relative;
  overflow: hidden;
  border-bottom: none;
  min-height: clamp(440px, 64vh, 680px);
  display: flex;
  align-items: flex-end;
  padding: clamp(120px, 16vh, 180px) 0 clamp(40px, 6vh, 64px);
}
.subhead.has-banner .art-banner {
  position: absolute;
  inset: 0;
  height: auto;
  margin: 0;
  border-radius: 0;
  z-index: 0;
}
.subhead.has-banner .subhead-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to top, var(--d-bg) 4%, rgba(7,6,26,0.55) 42%, rgba(7,6,26,0.28) 100%),
    linear-gradient(to right, rgba(7,6,26,0.78) 0%, rgba(7,6,26,0.18) 55%, transparent 100%);
}
.subhead.has-banner .shell {
  position: relative;
  z-index: 2;
  width: 100%;
}
.subhead.has-banner h1 { text-shadow: 0 2px 30px rgba(7,6,26,0.6); }

/* ──────────────────────────────────────────────────────────────────
   REGIONS — dotted world map with presence markers
   ────────────────────────────────────────────────────────────────── */
.regions-title {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(30px, 4.4vw, 60px); letter-spacing: -0.03em; line-height: 1.02;
  max-width: 18ch; margin-top: 14px;
}
.regions-title em { font-style: normal; color: var(--accent); }
.regions-sub { color: var(--d-ink-2); max-width: 46ch; margin-top: 18px; font-size: clamp(14px,1.1vw,16px); line-height: 1.6; }
.worldmap {
  position: relative;
  margin-top: clamp(28px, 5vw, 56px);
  width: 100%;
  aspect-ratio: 1000 / 520;
}
.worldmap canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.worldmap-markers { position: absolute; inset: 0; pointer-events: none; }
.wm-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 12px; height: 12px;
}
.wm-marker .wm-dot {
  position: absolute; inset: 0; margin: auto;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px 2px var(--accent-glow);
}
.wm-marker .wm-ring {
  position: absolute; inset: 0; margin: auto;
  width: 9px; height: 9px; border-radius: 50%;
  border: 1.5px solid var(--accent);
  animation: wmPulse 2.6s ease-out infinite;
}
.wm-marker.tier-hq .wm-dot { background: #fff; box-shadow: 0 0 14px 3px rgba(255,255,255,0.55), 0 0 22px 6px var(--accent-glow); }
.wm-marker.tier-hq .wm-ring { border-color: #fff; }
.wm-marker.tier-soon .wm-dot { background: rgba(91,142,255,0.18); border: 1.5px solid var(--accent-2); box-shadow: 0 0 8px 1px rgba(91,142,255,0.3); }
.wm-marker.tier-soon .wm-ring { border-color: var(--accent-2); border-style: dashed; animation-duration: 3.8s; opacity: 0.7; }
.wm-label {
  position: absolute; left: 50%; bottom: 150%;
  transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--d-ink); white-space: nowrap;
  padding: 3px 8px; border-radius: 6px;
  background: rgba(13,10,38,0.78); border: 1px solid var(--d-line-2);
  opacity: 0; transition: opacity 0.25s, transform 0.25s;
}
.wm-marker.is-anchored .wm-label { opacity: 1; }
@keyframes wmPulse {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(4.2); opacity: 0; }
}
.regions-legend {
  display: flex; flex-wrap: wrap; gap: 18px 28px;
  margin-top: clamp(24px, 3vw, 40px);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--d-ink-2);
}
.regions-legend .lg { display: inline-flex; align-items: center; gap: 9px; }
.regions-legend .sw { width: 9px; height: 9px; border-radius: 50%; }
.regions-legend .sw.live { background: #fff; box-shadow: 0 0 10px 2px var(--accent-glow); }
.regions-legend .sw.gcc { background: var(--accent); }
.regions-legend .sw.market { background: rgba(91,142,255,0.18); border: 1.5px solid var(--accent-2); }
@media (prefers-reduced-motion: reduce) {
  .wm-marker .wm-ring { animation: none; }
}

/* ── Lead-capture form ─────────────────────────────────────────── */
.lead-form {
  margin: clamp(28px, 4vw, 44px) auto 0;
  max-width: 720px;
  text-align: left;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--d-line-2);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(245,243,255,0.04), rgba(245,243,255,0.01));
  backdrop-filter: blur(6px);
}
.lead-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .lead-grid { grid-template-columns: 1fr; } }
.lead-field { display: flex; flex-direction: column; gap: 7px; }
.lead-field.lead-full { margin-top: 16px; }
.lead-field span {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--d-ink-3);
}
.lead-field input, .lead-field textarea {
  width: 100%; box-sizing: border-box;
  background: rgba(7,6,26,0.5);
  border: 1px solid var(--d-line-2);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--d-ink);
  font-family: var(--font-sans); font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.lead-field textarea { resize: vertical; }
.lead-field input::placeholder, .lead-field textarea::placeholder { color: var(--d-ink-3); }
.lead-field input:focus, .lead-field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.lead-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.lead-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 20px; }
.lead-note { font-size: 12px; color: var(--d-ink-3); }
.lead-status { margin-top: 14px; font-size: 14px; min-height: 1em; color: var(--d-ink-2); }
.lead-status.is-ok { color: #6fe6b0; }
#lead-submit[disabled] { opacity: 0.6; pointer-events: none; }
.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; }

/* ──────────────────────────────────────────────────────────────────
   STACK — interactive feature preview cards (from Feature Animations design)
   ────────────────────────────────────────────────────────────────── */
.stack-item { /* now a <button> — reset native chrome */
  appearance: none; -webkit-appearance: none; background: none; border: none;
  width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer;
}
.stack-item { transition: background 0.25s, border-color 0.25s; border-radius: 10px; }
.stack-item:hover { background: rgba(139,92,255,0.06); }
.stack-item.sel { background: rgba(139,92,255,0.10); }
.stack-item:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }

.stack-preview {
  margin-top: clamp(28px, 4vw, 48px);
  display: flex; justify-content: center;
  min-height: 360px;
}
.sfx-card {
  width: 100%; max-width: 720px;
  background: linear-gradient(180deg, rgba(245,243,255,0.04), rgba(245,243,255,0.015));
  border: 1px solid var(--d-line-2);
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 30px 80px -40px rgba(139,92,255,0.45);
}
.sfx-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 26px; border-bottom: 1px solid var(--d-line);
}
.sfx-lbl { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--d-ink-3); display: inline-flex; align-items: center; gap: 9px; }
.sfx-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.sfx-pulse { animation: sfxPulse 2s ease-in-out infinite; }
@keyframes sfxPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
.sfx-pill { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--d-line-2); color: var(--d-ink-2); }
.sfx-pill.pass { color: #4ade80; border-color: rgba(74,222,128,0.4); }
.sfx-pill.warn { color: #fbbf24; border-color: rgba(251,191,36,0.4); }
.sfx-pill.risk { color: #f87171; border-color: rgba(248,113,113,0.4); }
.sfx-pill.info { color: var(--accent-2); border-color: rgba(91,142,255,0.4); }
.sfx-pill.purple { color: var(--accent); border-color: rgba(139,92,255,0.4); }
.sfx-body { padding: 26px; }
.sfx-iris { background: linear-gradient(135deg, var(--accent-2) 0%, var(--accent) 55%, #c9b6ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sfx-display { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.03em; }
.sfx-gauge { height: 8px; border-radius: 999px; background: var(--d-line); overflow: hidden; }
.sfx-gauge > i { display: block; height: 100%; width: 0; border-radius: 999px; transition: width 1.6s cubic-bezier(.2,.7,.2,1); }
.sfx-row { display: flex; justify-content: space-between; align-items: center; padding: 16px 26px; border-top: 1px solid var(--d-line); }
.sfx-glyph { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 8px; background: rgba(139,92,255,0.12); border: 1px solid var(--d-line-2); font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--d-ink); }
.sfx-mono { font-family: var(--font-mono); }
/* reveal */
.sfx-reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(.2,.7,.2,1); }
.sfx-card.in .sfx-reveal { opacity: 1; transform: none; }
.sfx-card.in .sfx-reveal { transition-delay: calc(var(--i, 0) * 90ms); }
@media (prefers-reduced-motion: reduce) {
  .sfx-reveal { opacity: 1; transform: none; transition: none; }
  .sfx-gauge > i { transition: none; }
}

@media (max-width: 560px) {
  .stack-preview { margin-top: 28px; min-height: 0; }
  .sfx-head { padding: 14px 16px; }
  .sfx-body { padding: 18px 16px; }
  .sfx-row { padding: 14px 16px; }
  .sfx-glyph { width: 34px; height: 34px; font-size: 10px; }
  .sfx-pill { padding: 4px 8px; font-size: 9px; }
  /* spread table: tighten + let figures shrink */
  .sfx-card [style*="grid-template-columns:2fr 1fr 1fr 1fr"] { padding-left: 16px !important; padding-right: 16px !important; }
}
@media (max-width: 430px) {
  /* radar 2x2 → single column on very narrow */
  .sfx-card [style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
}

/* Interactive engine-demo tabs */
.stack-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: clamp(28px,4vw,44px) 0 0; }
.stack-tab {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em;
  color: var(--d-ink-2); background: rgba(245,243,255,0.04);
  border: 1px solid var(--d-line-2); border-radius: 999px;
  padding: 9px 16px; display: inline-flex; align-items: center; gap: 8px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.stack-tab .t-idx { font-size: 10px; color: var(--d-ink-3); }
.stack-tab:hover { color: var(--d-ink); border-color: var(--d-line-2); background: rgba(139,92,255,0.08); }
.stack-tab.sel { background: var(--accent); border-color: transparent; color: #fff; }
.stack-tab.sel .t-idx { color: rgba(255,255,255,0.7); }
.stack-tab:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
#engine-demo .stack-preview { justify-content: flex-start; }

/* Engine demo — editorial two-column feature frame (from design FeatureLayout) */
.sfx-topbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.sfx-feat { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; margin-top: clamp(32px, 5vw, 64px); }
.sfx-feat-left { display: flex; flex-direction: column; gap: 22px; }
.sfx-badge { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--d-ink-3); display: inline-flex; align-items: center; gap: 10px; }
.sfx-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; }
.sfx-name { font-family: var(--font-display); font-weight: 500; font-size: clamp(46px, 6.5vw, 104px); line-height: 0.94; letter-spacing: -0.03em; color: var(--d-ink); }
.sfx-name em { font-style: normal; background: linear-gradient(135deg, var(--accent-2), var(--accent), #c9b6ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sfx-tag { font-size: clamp(16px, 1.4vw, 22px); line-height: 1.45; color: var(--d-ink-2); max-width: 560px; }
.sfx-story { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-top: 6px; }
.sfx-story > div { border-top: 1px solid var(--d-line); padding-top: 14px; }
.sfx-story-l { display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--d-ink-3); margin-bottom: 8px; }
.sfx-story-v { font-size: 14px; font-weight: 500; color: var(--d-ink); }
.sfx-story-v.acc { background: linear-gradient(135deg, var(--accent-2), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sfx-feat-right { display: flex; align-items: center; justify-content: center; min-width: 0; }
.sfx-feat-left.in .sfx-reveal { opacity: 1; transform: none; }
.sfx-feat-left.in .sfx-reveal { transition-delay: calc(var(--i, 0) * 80ms); }
@media (max-width: 900px) {
  .sfx-feat { grid-template-columns: 1fr; gap: 30px; }
  .sfx-feat-right { order: -1; } /* card first on mobile, story below */
}
@media (max-width: 520px) {
  .sfx-story { grid-template-columns: 1fr; gap: 0; }
  .sfx-story > div { padding: 12px 0; }
}

/* Stack chapter — animated card in the left column under the headline */
.stack-left { display: flex; flex-direction: column; justify-content: center; gap: clamp(20px, 3vh, 34px); min-width: 0; }
.stack-left .stack-words { min-height: clamp(96px, 15vh, 160px); }
.stack-card { width: 100%; max-width: 560px; }
.stack-card .sfx-card { width: 100%; box-shadow: 0 30px 70px -40px rgba(139,92,255,0.5); }
@media (max-width: 860px) {
  .stack-left { gap: 24px; }
  .stack-card { max-width: 100%; }
}

/* Stack chapter — iridescent hue wash (from Feature Animations bg-gradient-2,
   tuned: glow sits lower-right so the headline + eyebrow stay legible). */
#stack {
  background:
    radial-gradient(ellipse 56% 56% at 84% 20%, rgba(91,142,255,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 66% 66% at 62% 74%, rgba(124,92,255,0.32) 0%, transparent 62%),
    radial-gradient(ellipse 46% 52% at 16% 62%, rgba(91,142,255,0.14) 0%, transparent 60%),
    linear-gradient(165deg, #08061c 0%, #110a2a 55%, #07061a 100%);
}
/* keep the pinned headline crisp over the glow */
#stack .stack-word { text-shadow: 0 2px 40px rgba(7,6,26,0.55); }

/* Products section — same iridescent wash, legibility-safe */
#products {
  background:
    radial-gradient(ellipse 58% 56% at 86% 24%, rgba(91,142,255,0.16) 0%, transparent 60%),
    radial-gradient(ellipse 70% 70% at 50% 88%, rgba(124,92,255,0.28) 0%, transparent 62%),
    radial-gradient(ellipse 46% 50% at 14% 30%, rgba(91,142,255,0.12) 0%, transparent 60%),
    linear-gradient(170deg, #07061a 0%, #100a28 60%, #07061a 100%);
}

/* CX Halal — bilingual EN ↔ AR crossfade in the card footer */
.sfx-flip { position: relative; padding: 18px 26px; min-height: 104px; border-top: 1px solid var(--d-line); }
.sfx-flip-en, .sfx-flip-ar { position: absolute; left: 26px; right: 26px; top: 18px; }
.sfx-flip-en { animation: sfxFlipEN 7s ease-in-out infinite; }
.sfx-flip-ar { animation: sfxFlipAR 7s ease-in-out infinite; }
@keyframes sfxFlipEN { 0%,40%{opacity:1} 50%,90%{opacity:0} 100%{opacity:1} }
@keyframes sfxFlipAR { 0%,40%{opacity:0} 50%,90%{opacity:1} 100%{opacity:0} }
@media (prefers-reduced-motion: reduce) { .sfx-flip-ar { display: none; } .sfx-flip-en { animation: none; } }

/* Islamic finance section — same iridescent wash (no pink) */
#islamic {
  background:
    radial-gradient(ellipse 58% 56% at 86% 22%, rgba(91,142,255,0.16) 0%, transparent 60%),
    radial-gradient(ellipse 70% 70% at 48% 92%, rgba(124,92,255,0.26) 0%, transparent 62%),
    linear-gradient(170deg, #07061a 0%, #100a28 60%, #07061a 100%);
}

/* ──────────────────────────────────────────────────────────────────
   2026-06-08 upgrade pass: hero v2 · partners · investors · calendly
   ────────────────────────────────────────────────────────────────── */

/* — Hero badges — */
.hero-badges {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 22px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px;
  border: 1px solid var(--d-line-2);
  border-radius: 999px;
  background: rgba(13,10,38,0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--d-ink-2);
}
.hero-badge.live i {
  width: 6px; height: 6px; border-radius: 50%;
  background: #6ee7a8;
  box-shadow: 0 0 10px rgba(110,231,168,0.9);
  animation: badgePulse 2.2s ease-in-out infinite;
}
@keyframes badgePulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(.8)} }
.hero-lang {
  cursor: pointer; color: var(--accent);
  border-color: rgba(139,92,255,0.4);
  background: rgba(139,92,255,0.10);
  transition: background 0.2s, border-color 0.2s;
  font-family: var(--font-mono);
}
.hero-lang:hover { background: rgba(139,92,255,0.22); border-color: var(--accent); }
.hero-lang .sep { opacity: 0.4; margin: 0 1px; }
.hero-lang [lang="ar"] { font-family: 'Noto Naskh Arabic', serif; font-size: 12px; }

/* — Hero language swap — */
.hero-headline, .hero-sub { transition: opacity 0.18s ease, filter 0.18s ease; }
.lang-swap { opacity: 0; filter: blur(6px); }
.hero-headline.is-ar {
  font-family: 'Noto Naskh Arabic', serif;
  text-transform: none; letter-spacing: 0;
  font-weight: 600; line-height: 1.18;
  font-size: clamp(36px, 7vw, 110px);
}
.hero-sub.is-ar { font-family: 'Noto Naskh Arabic', serif; font-size: clamp(15px, 1.1vw, 18px); line-height: 1.9; max-width: 44ch; }

/* — Hero stat band — */
.hero-stats {
  position: absolute; left: 0; right: 0; bottom: 0;
  z-index: 3;
  display: flex; flex-wrap: wrap;
  border-top: 1px solid var(--d-line);
  background: linear-gradient(to top, rgba(7,6,26,0.92), rgba(7,6,26,0.55) 70%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.hero-stats .hs {
  flex: 1 1 0; min-width: 130px;
  display: flex; flex-direction: column; gap: 3px;
  padding: 18px clamp(16px, 2.2vw, 36px) 20px;
  border-left: 1px solid var(--d-line);
}
.hero-stats .hs:first-child { border-left: none; }
.hero-stats .hs-num {
  font-family: var(--font-display);
  font-weight: 300; font-size: clamp(20px, 1.9vw, 30px);
  letter-spacing: -0.02em;
  background: linear-gradient(100deg, var(--d-ink) 30%, var(--accent) 80%, var(--accent-2) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-stats .hs-lbl {
  font-family: var(--font-mono); font-size: 9.5px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--d-ink-3);
}
@media (max-width: 860px) {
  .hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); }
  .hero-stats .hs { padding: 12px 14px 14px; min-width: 0; }
  .hero-stats .hs:nth-child(4), .hero-stats .hs:nth-child(5) { border-top: 1px solid var(--d-line); }
  .hero-stats .hs:nth-child(4) { border-left: none; }
  .hero { min-height: 720px; }
  .hero-content { padding-bottom: clamp(190px, 26vh, 250px); }
}
@media (min-width: 861px) {
  .hero-content { padding-bottom: clamp(110px, 14vh, 160px); }
  .hero-foot { bottom: 92px; }
}
@media (max-width: 860px) { .hero-foot { display: none; } }

/* — Partners section — */
#partners {
  position: relative;
  background:
    radial-gradient(ellipse 60% 50% at 85% 10%, rgba(91,142,255,0.10), transparent 70%),
    radial-gradient(ellipse 50% 60% at 10% 90%, rgba(139,92,255,0.12), transparent 70%),
    var(--d-bg);
}
.section-sub {
  margin-top: 14px; max-width: 60ch;
  color: var(--d-ink-2); font-size: clamp(14px, 1.05vw, 16px); line-height: 1.6;
}
.partner-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 18px; margin-top: 44px;
}
@media (max-width: 980px) { .partner-grid { grid-template-columns: 1fr; } }
.partner-card {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  padding: 28px 26px 24px;
  border: 1px solid var(--d-line-2); border-radius: 18px;
  background: linear-gradient(160deg, rgba(245,243,255,0.045), rgba(245,243,255,0.012));
  text-decoration: none; color: var(--d-ink);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1), border-color 0.3s, box-shadow 0.3s;
}
.partner-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 80% 60% at 50% -20%, rgba(139,92,255,0.16), transparent 60%);
  opacity: 0; transition: opacity 0.35s;
}
.partner-card:hover { transform: translateY(-5px); border-color: rgba(139,92,255,0.55); box-shadow: 0 24px 60px -24px rgba(139,92,255,0.35); }
.partner-card:hover::before { opacity: 1; }
.pc-tag {
  align-self: flex-start;
  font-family: var(--font-mono); font-size: 9.5px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent);
  padding: 5px 10px; border: 1px solid rgba(139,92,255,0.35); border-radius: 999px;
  background: rgba(139,92,255,0.08);
}
.pc-title {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(22px, 1.9vw, 28px); line-height: 1.12; letter-spacing: -0.02em;
  margin: 2px 0 0;
}
.pc-title em {
  font-style: normal;
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.pc-body { color: var(--d-ink-2); font-size: 14px; line-height: 1.62; margin: 0; flex: 1; }
.pc-cta {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--d-ink-2);
  transition: color 0.25s;
}
.pc-cta i { font-style: normal; transition: transform 0.25s; }
.partner-card:hover .pc-cta { color: var(--accent); }
.partner-card:hover .pc-cta i { transform: translateX(5px); }
.partner-quality {
  display: flex; align-items: center; gap: 18px;
  margin-top: 26px; padding: 20px 24px;
  border: 1px dashed var(--d-line-2); border-radius: 14px;
  background: rgba(13,10,38,0.35);
}
.partner-quality p { margin: 0; color: var(--d-ink-2); font-size: 14px; line-height: 1.6; }
.partner-quality strong { color: var(--d-ink); font-weight: 600; }
.pq-pulse { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(139,92,255,0.4); display: grid; place-items: center; }
.pq-pulse i {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 16px var(--accent-glow);
  animation: badgePulse 2s ease-in-out infinite;
}

/* — Investors section — */
.inv-section {
  position: relative;
  background:
    radial-gradient(ellipse 70% 60% at 50% 110%, rgba(139,92,255,0.16), transparent 65%),
    var(--d-bg-2);
  border-top: 1px solid var(--d-line);
  border-bottom: 1px solid var(--d-line);
}
.inv-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; margin-top: 44px;
  background: var(--d-line);
  border: 1px solid var(--d-line); border-radius: 16px;
  overflow: hidden;
}
@media (max-width: 860px) { .inv-grid { grid-template-columns: repeat(2, 1fr); } }
.inv-stat {
  display: flex; flex-direction: column; gap: 6px;
  padding: 26px 24px 24px;
  background: rgba(7,6,26,0.75);
}
.iv-num {
  font-family: var(--font-display); font-weight: 200;
  font-size: clamp(30px, 3vw, 46px); letter-spacing: -0.03em;
  background: linear-gradient(100deg, var(--d-ink) 20%, var(--accent) 75%, #c9b6ff 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.iv-lbl {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--d-ink-3); line-height: 1.6;
}
.inv-line {
  margin-top: 30px; max-width: 70ch;
  color: var(--d-ink-2); font-size: clamp(15px, 1.15vw, 18px); line-height: 1.65;
}

/* — Lead-form select (match inputs) — */
.lead-field select {
  width: 100%; box-sizing: border-box;
  background: rgba(7,6,26,0.5);
  border: 1px solid var(--d-line-2);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--d-ink);
  font-family: var(--font-sans); font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238b5cff' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.lead-field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(139,92,255,0.18); }
.lead-field select option { background: #0d0a26; color: #f5f3ff; }

/* — Calendly embed — */
.cal-wrap { margin-top: 56px; }
.cal-head { margin-bottom: 18px; }
.cal-title {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(22px, 2vw, 30px); letter-spacing: -0.02em;
  margin: 12px 0 0;
}
.calendly-inline-widget {
  min-width: 280px; height: 660px;
  border: 1px solid var(--d-line-2); border-radius: 18px;
  overflow: hidden;
  background: rgba(13,10,38,0.5);
}
@media (max-width: 760px) { .calendly-inline-widget { height: 980px; } }

/* ──────────────────────────────────────────────────────────────────
   Hero polish pass (2026-06-11): entrance · rotor · ticker · grain
   ────────────────────────────────────────────────────────────────── */

/* — Staggered entrance (triggered by body.hero-in after the loader) — */
.hero-badges, .hero-headline, .hero-sub, .hero-rotor-line, .hero-cta-row, .hero-stats .hs {
  opacity: 0; transform: translateY(26px);
  transition: opacity 0.9s cubic-bezier(.16,.84,.3,1), transform 0.9s cubic-bezier(.16,.84,.3,1);
}
body.hero-in .hero-badges    { opacity: 1; transform: none; transition-delay: 0.05s; }
body.hero-in .hero-headline  { opacity: 1; transform: none; transition-delay: 0.18s; }
body.hero-in .hero-sub       { opacity: 1; transform: none; transition-delay: 0.34s; }
body.hero-in .hero-rotor-line{ opacity: 1; transform: none; transition-delay: 0.46s; }
body.hero-in .hero-cta-row   { opacity: 1; transform: none; transition-delay: 0.56s; }
body.hero-in .hero-stats .hs { opacity: 1; transform: none; }
body.hero-in .hero-stats .hs:nth-child(1) { transition-delay: 0.65s; }
body.hero-in .hero-stats .hs:nth-child(2) { transition-delay: 0.73s; }
body.hero-in .hero-stats .hs:nth-child(3) { transition-delay: 0.81s; }
body.hero-in .hero-stats .hs:nth-child(4) { transition-delay: 0.89s; }
body.hero-in .hero-stats .hs:nth-child(5) { transition-delay: 0.97s; }
@media (prefers-reduced-motion: reduce) {
  .hero-badges, .hero-headline, .hero-sub, .hero-rotor-line, .hero-cta-row, .hero-stats .hs {
    opacity: 1; transform: none; transition: none;
  }
}
/* keep the language-swap transition working after entrance */
body.hero-in .hero-headline.lang-swap, body.hero-in .hero-sub.lang-swap { opacity: 0; }

/* — Rotating audience line — */
.hero-rotor-line {
  margin-top: 18px;
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--d-ink-3);
  display: flex; align-items: center; gap: 10px;
}
.hero-rotor {
  display: inline-block; position: relative;
  min-width: 13ch; height: 1.5em; overflow: hidden;
}
.hero-rotor > span {
  position: absolute; left: 0; top: 0; line-height: 1.5em;
  color: var(--accent);
  text-shadow: 0 0 18px var(--accent-glow);
  transition: transform 0.45s cubic-bezier(.6,0,.2,1), opacity 0.45s;
}
.hero-rotor > span.out { transform: translateY(-110%); opacity: 0; }
.hero-rotor > span.pre { transform: translateY(110%); opacity: 0; transition: none; }

/* — Live decision ticker — */
.hero-ticker {
  position: absolute; right: var(--pad); top: 104px; bottom: auto; z-index: 3;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 16px;
  border: 1px solid rgba(110,231,168,0.25);
  border-radius: 999px;
  background: rgba(7,6,26,0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(245,243,255,0.72);
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.8s ease 1.3s, transform 0.8s ease 1.3s;
}
body.hero-in .hero-ticker { opacity: 1; transform: none; }
.hero-ticker i {
  width: 6px; height: 6px; border-radius: 50%;
  background: #6ee7a8; box-shadow: 0 0 10px rgba(110,231,168,0.9);
  animation: badgePulse 1.8s ease-in-out infinite;
}
.hero-ticker span { transition: opacity 0.3s; }
.hero-ticker span.swap { opacity: 0; }
@media (max-width: 1000px) { .hero-ticker { display: none; } }

/* — Primary CTA shine sweep — */
.hero-cta-row .btn-primary { position: relative; overflow: hidden; }
.hero-cta-row .btn-primary::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%;
  left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
  pointer-events: none;
}
.hero-cta-row .btn-primary:hover::after { left: 130%; }

/* — Film grain — */
.hero-grain {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  opacity: 0.5; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.06'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ──────────────────────────────────────────────────────────────────
   Hero — mobile refinement pass (2026-06-13)
   Tightens CTAs, closes the dead gap, improves text legibility over scene
   ────────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  /* dim + push the 3D scene so text reads cleanly */
  .hero-scene { opacity: 0.45; }
  .hero-vignette {
    background:
      linear-gradient(to bottom, rgba(7,6,26,0.82) 0%, rgba(7,6,26,0.35) 34%, rgba(7,6,26,0.25) 55%, rgba(7,6,26,0.95) 100%);
  }

  /* tighter top padding so the headline sits higher */
  .hero-eyebrow-row { display: none; }
  .hero-content { padding: 96px var(--pad) 150px; gap: 14px; }

  /* badges: smaller, tighter, EN toggle no longer orphaned */
  .hero-badges { gap: 6px; margin-bottom: 14px; }
  .hero-badge { padding: 6px 10px; font-size: 9px; letter-spacing: 0.12em; }

  .hero-headline { font-size: clamp(40px, 14vw, 60px); line-height: 0.92; }
  .hero-sub { font-size: 15px; line-height: 1.55; max-width: 100%; }

  .hero-rotor-line { margin-top: 12px; font-size: 9.5px; letter-spacing: 0.18em; }

  /* CTAs: compact, not full-width blobs. Primary leads, ghosts share a row. */
  .hero-cta-row { gap: 10px; margin-top: 20px; width: 100%; }
  .hero-cta-row .btn { padding: 14px 22px; font-size: 11px; }
  .hero-cta-row .btn-primary { width: 100%; justify-content: center; }
  .hero-cta-row .btn-ghost {
    flex: 1 1 0; min-width: 0; justify-content: center;
    padding: 13px 12px; font-size: 10px;
  }

  /* stat band: flow it INTO the page (not absolute) so it never covers the CTAs */
  .hero { min-height: 0; height: auto; display: block; }
  .hero-content { padding-bottom: 36px; }
  .hero-stats {
    position: static; margin-top: 4px;
    grid-template-columns: repeat(2, 1fr) !important;
    background: rgba(7,6,26,0.85); backdrop-filter: none;
  }
  .hero-stats .hs { padding: 14px 16px; border-left: 1px solid var(--d-line); border-top: 1px solid var(--d-line); }
  .hero-stats .hs:nth-child(odd) { border-left: none; }
  .hero-stats .hs:nth-child(1), .hero-stats .hs:nth-child(2) { border-top: none; }
  .hero-stats .hs-num { font-size: 22px; }
}

/* keep the ghost buttons from looking identical to primary at very small widths */
@media (max-width: 380px) {
  .hero-cta-row .btn-ghost { font-size: 9.5px; letter-spacing: 0.1em; padding: 12px 8px; }
}

/* ──────────────────────────────────────────────────────────────────
   Aurora mesh palette (2026-06-13) — indigo→violet→blue→soft mauve
   Restrained, no bright pink. Applied to closing CTA + investors band.
   ────────────────────────────────────────────────────────────────── */
:root {
  --mesh-indigo: #1a1640;
  --mesh-violet: #5b46c4;
  --mesh-blue:   #5b8eff;
  --mesh-mauve:  rgba(150, 116, 178, 0.45); /* muted, not pink */
}

/* Closing contact section — full aurora-mesh backdrop */
.cta {
  background:
    radial-gradient(ellipse 70% 80% at 72% 78%, rgba(91,142,255,0.30), transparent 60%),
    radial-gradient(ellipse 60% 70% at 30% 88%, rgba(91,70,196,0.40), transparent 62%),
    radial-gradient(ellipse 50% 50% at 88% 60%, var(--mesh-mauve), transparent 65%),
    var(--d-bg) !important;
}
.cta-aura {
  background: radial-gradient(circle, rgba(123,92,214,0.42), rgba(91,142,255,0.14) 42%, transparent 60%) !important;
  filter: blur(80px) !important;
}

/* Investors band — deepen with the same mesh language */
.inv-section {
  background:
    radial-gradient(ellipse 60% 70% at 18% 0%, rgba(91,142,255,0.16), transparent 60%),
    radial-gradient(ellipse 70% 80% at 85% 110%, rgba(91,70,196,0.30), transparent 60%),
    radial-gradient(ellipse 40% 50% at 95% 30%, var(--mesh-mauve), transparent 70%),
    var(--d-bg-2) !important;
}

/* ──────────────────────────────────────────────────────────────────
   Hero meta strip (2026-06-13) — replaces the chunky badge pills with
   a single sleek inline status line + minimal language toggle.
   ────────────────────────────────────────────────────────────────── */
.hero-meta {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 0; margin-bottom: 26px;
}
.hero-meta .hm-item {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0 16px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--d-ink-2);
  border-left: 1px solid var(--d-line-2);
  line-height: 1.2;
}
.hero-meta .hm-item:first-child { padding-left: 0; border-left: none; }
.hero-meta .hm-live i {
  width: 6px; height: 6px; border-radius: 50%;
  background: #6ee7a8; box-shadow: 0 0 10px rgba(110,231,168,0.9);
  animation: badgePulse 2.2s ease-in-out infinite;
}
.hero-meta .hm-lang {
  margin-left: 18px;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid rgba(139,92,255,0.4);
  background: rgba(139,92,255,0.10);
  color: var(--accent);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  cursor: pointer; transition: background .2s, border-color .2s;
}
.hero-meta .hm-lang:hover { background: rgba(139,92,255,0.22); border-color: var(--accent); }
.hero-meta .hm-lang .s { opacity: 0.4; }
.hero-meta .hm-lang [lang="ar"] { font-family: 'Noto Naskh Arabic', serif; font-size: 13px; }

@media (max-width: 600px) {
  .hero-meta { gap: 8px 0; }
  .hero-meta .hm-item { font-size: 9.5px; letter-spacing: 0.1em; padding: 0 11px; }
  /* wrap the language toggle to its own clean position */
  .hero-meta .hm-lang { margin-left: 11px; padding: 5px 10px; font-size: 10px; }
}

/* ──────────────────────────────────────────────────────────────────
   Arabic / RTL mode (2026-06-13) — applied when body.ar-mode + html[dir=rtl]
   ────────────────────────────────────────────────────────────────── */
body.ar-mode {
  font-family: 'Noto Naskh Arabic', 'Open Sans', sans-serif;
}
body.ar-mode .hero-headline,
body.ar-mode .display,
body.ar-mode .cta-headline,
body.ar-mode .pc-title,
body.ar-mode .hero-sub,
body.ar-mode .section-sub,
body.ar-mode .cta-sub,
body.ar-mode .inv-line {
  font-family: 'Noto Naskh Arabic', serif;
  letter-spacing: 0;
  text-transform: none;
}
/* Arabic headlines: drop the all-caps + ultra-tight tracking that suits Latin only */
body.ar-mode .hero-headline { font-weight: 600; line-height: 1.25; }
body.ar-mode .display, body.ar-mode .cta-headline { line-height: 1.3; }

/* right-align the content blocks in RTL */
html[dir="rtl"] .hero-content,
html[dir="rtl"] .head-block,
html[dir="rtl"] .shell { text-align: right; }
html[dir="rtl"] .hero-meta,
html[dir="rtl"] .hero-cta-row,
html[dir="rtl"] .nav-links { flex-direction: row-reverse; }
html[dir="rtl"] .hero-meta .hm-item { border-left: none; border-right: 1px solid var(--d-line-2); }
html[dir="rtl"] .hero-meta .hm-item:first-child { border-right: none; }
html[dir="rtl"] .hero-meta .hm-lang { margin-left: 0; margin-right: 18px; }

/* keep mono/Latin tokens (stats, code labels, brand) LTR even inside RTL */
body.ar-mode .hero-stats .hs-num,
body.ar-mode .stat .num,
body.ar-mode .wordmark,
body.ar-mode .nav-logo,
body.ar-mode .iv-num,
body.ar-mode .hs-num { direction: ltr; unicode-bidi: isolate; }

@media (max-width: 600px) {
  html[dir="rtl"] .hero-meta, html[dir="rtl"] .hero-cta-row { flex-direction: row; }
}

/* Scene — 6 output labels at beam tips (finale) */
.scrub-out-label {
  position: absolute; transform: translateY(-50%);
  font-family: var(--font-mono); font-size: 12.5px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: #e6ddff; white-space: nowrap; pointer-events: none; z-index: 4; max-width: 42vw;
  text-shadow: 0 1px 14px rgba(7,6,26,0.95), 0 0 22px rgba(139,92,255,0.55);
  transition: opacity 0.2s linear;
}
@media (max-width: 600px) { .scrub-out-label { font-size: 10px; letter-spacing: 0.06em; max-width: 44vw; } }
