/* =========================================================================
   APPALANCHE — Fortune-500 grade build
   Design system: tokens → primitives → components → choreography.
   Layers: liquid-glass material, particle network, custom cursor,
   magnetic CTAs, animated SVG illustrations, bento charts, scroll cinema.
   All on top of the Emil correctness layer (custom easing, press feedback,
   hover-gate, motion-safe, exact-property transitions).
   ========================================================================= */

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

:root {
  /* ─── Easing tokens ─────────────────────────────────────────── */
  --ease-out:    cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  /* ─── Duration tokens ───────────────────────────────────────── */
  --d-press:    140ms;
  --d-popover:  220ms;
  --d-section:  360ms;
  --d-cinema:   600ms;

  /* ─── Color system ─────────────────────────────────────────── */
  --bg:         #04060d;
  --bg-1:       #08101f;
  --bg-2:       #0e1830;
  --bg-3:       #14213d;
  --line:       rgba(255, 255, 255, 0.06);
  --line-2:     rgba(255, 255, 255, 0.10);
  --line-hi:    rgba(34, 211, 238, 0.22);

  --ink:        #f1f5f9;
  --ink-2:      #cbd5e0;
  --ink-3:      #94a3b8;
  --ink-4:      #64748b;
  --ink-5:      #475569;

  --cyan:       #22d3ee;
  --cyan-deep:  #0891b2;
  --teal:       #2dd4bf;
  --teal-deep:  #14b8a6;
  --gold:       #fbbf24;
  --gold-deep:  #f59e0b;
  --green:      #4ade80;
  --green-deep: #22c55e;
  --rose:       #fb7185;
  --violet:     #a78bfa;

  /* ─── Layout tokens ─────────────────────────────────────────── */
  --max:    1180px;
  --max-wide: 1280px;
  --gutter: clamp(20px, 4vw, 40px);

  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-2xl: 36px;

  /* ─── Typography ─────────────────────────────────────────────── */
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-mono: 'JetBrains Mono', monospace;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink-2);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
  /* Hide native cursor on desktop to make room for custom cursor */
}
body.has-custom-cursor { cursor: none; }
body.has-custom-cursor a, body.has-custom-cursor button { cursor: none; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* Scrollbar styling — premium look */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 100px;
  border: 3px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(34, 211, 238, 0.25); background-clip: padding-box; border: 3px solid transparent; }

/* =========================================================================
   AMBIENT LIGHT LAYER 1 — Aurora ribbon (slow ambient drift)
   ========================================================================= */
.aurora {
  position: fixed;
  inset: -20% -10%;
  z-index: -3;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 35% at 22% 18%, rgba(34, 211, 238, 0.22), transparent 55%),
    radial-gradient(ellipse 40% 30% at 78% 26%, rgba(45, 212, 191, 0.18), transparent 55%),
    radial-gradient(ellipse 55% 40% at 48% 78%, rgba(8, 145, 178, 0.14), transparent 60%),
    radial-gradient(ellipse 30% 25% at 75% 88%, rgba(251, 191, 36, 0.06), transparent 60%),
    radial-gradient(ellipse 35% 30% at 12% 60%, rgba(167, 139, 250, 0.05), transparent 55%);
  filter: blur(80px) saturate(1.25);
  animation: aurora-drift 32s var(--ease-in-out) infinite alternate;
  transform: translate3d(0, calc(var(--gscroll, 0) * -120px), 0)
             rotate(calc(var(--gscroll, 0) * 6deg));
  transition: transform 80ms linear;
}
@keyframes aurora-drift {
  0%   { background-position: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%; }
  100% { background-position: 6% -4%, -5% 6%, 4% 5%, -3% -2%, 5% -3%; }
}

/* AMBIENT LIGHT LAYER 2 — Static noise texture */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* =========================================================================
   PARTICLE CANVAS (hero) — drawn from JS, sits behind hero content
   ========================================================================= */
.particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.65;
}

/* =========================================================================
   PAGE PROGRESS BAR (top)
   ========================================================================= */
.page-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 200;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.04);
}
.page-progress::after {
  content: '';
  display: block;
  height: 100%;
  width: calc(var(--gscroll, 0) * 100%);
  background: linear-gradient(90deg, var(--cyan), var(--teal), var(--gold));
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.6);
  transition: width 80ms linear;
}

/* =========================================================================
   CUSTOM CURSOR — small dot follows pointer, ring expands on interactives
   ========================================================================= */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9000;
  transform: translate3d(-50%, -50%, 0);
  will-change: transform;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.6);
  transition: opacity 200ms ease, transform 60ms linear;
  opacity: 0;
}
.cursor-ring {
  width: 32px; height: 32px;
  border: 1px solid rgba(34, 211, 238, 0.5);
  border-radius: 50%;
  transition: width 240ms var(--ease-out), height 240ms var(--ease-out), border-color 240ms var(--ease-out), opacity 240ms ease;
  opacity: 0;
}
.cursor-dot.visible, .cursor-ring.visible { opacity: 1; }

/* When over interactive: expand ring, hide dot */
.cursor-ring.hovering {
  width: 56px; height: 56px;
  border-color: var(--cyan);
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.3);
  background: rgba(34, 211, 238, 0.05);
}
.cursor-ring.pressing {
  width: 24px; height: 24px;
  border-color: var(--cyan);
  background: rgba(34, 211, 238, 0.15);
}
@media (max-width: 900px), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* =========================================================================
   LIQUID GLASS — iOS-26 frosted material primitive
   Use class .glass on any panel that needs the material.
   ========================================================================= */
.glass {
  position: relative;
  background: rgba(14, 24, 48, 0.42);
  backdrop-filter: blur(32px) saturate(1.6);
  -webkit-backdrop-filter: blur(32px) saturate(1.6);
  border: 1px solid var(--line-2);
  isolation: isolate;
  border-radius: var(--r-lg);
}
.glass::before,
.glass::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  border-radius: inherit;
}
.glass::before {
  /* Inner top highlight — gives glass its volumetric edge */
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, transparent 25%),
    linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0%, transparent 30%);
  z-index: 1;
}
.glass::after {
  /* Subtle color refraction at top-right */
  background: radial-gradient(ellipse 70% 50% at 80% 0%, rgba(34, 211, 238, 0.06), transparent 50%);
  z-index: 0;
}
.glass > * { position: relative; z-index: 2; }

/* =========================================================================
   BUTTONS — pressable + magnetic + shimmer
   ========================================================================= */
.btn {
  --bg-c: var(--cyan);
  --fg-c: #04080f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 600 14px/1 var(--font-sans);
  letter-spacing: -0.01em;
  padding: 14px 22px;
  background: var(--bg-c);
  color: var(--fg-c);
  border: none;
  border-radius: var(--r-md);
  cursor: pointer;
  transition:
    transform var(--d-press) var(--ease-out),
    box-shadow var(--d-popover) var(--ease-out),
    background-color var(--d-popover) var(--ease-out);
  position: relative;
  overflow: hidden;
  will-change: transform;
  /* Magnetic offset driven from JS */
  --mx: 0;
  --my: 0;
}
.btn:not(.no-magnet) { transform: translate3d(var(--mx, 0), var(--my, 0), 0); }
.btn:active { transform: translate3d(var(--mx, 0), var(--my, 0), 0) scale(0.97); }
.btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }

@media (hover: hover) and (pointer: fine) {
  .btn:hover { box-shadow: 0 8px 32px rgba(34, 211, 238, 0.36); }
}

.btn-ghost {
  --bg-c: transparent;
  --fg-c: var(--ink);
  border: 1px solid var(--line-2);
}
@media (hover: hover) and (pointer: fine) {
  .btn-ghost:hover { border-color: var(--line-hi); background: rgba(34, 211, 238, 0.04); box-shadow: none; }
}

.btn-glass {
  --bg-c: rgba(14, 24, 48, 0.6);
  --fg-c: var(--ink);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--line-2);
}
@media (hover: hover) and (pointer: fine) {
  .btn-glass:hover { border-color: var(--line-hi); }
}

.btn-shimmer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg,
    transparent 30%,
    rgba(255, 255, 255, 0.32) 50%,
    transparent 70%);
  transform: translateX(-110%);
  transition: transform 800ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .btn-shimmer:hover::before { transform: translateX(110%); }
}
.btn-shimmer > * { position: relative; z-index: 1; }

.btn-sm { padding: 9px 16px; font-size: 13px; }
.btn-lg { padding: 18px 28px; font-size: 15px; }

/* =========================================================================
   NAV — liquid glass, scroll-state aware
   ========================================================================= */
.nav {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 150;
  width: calc(100% - 32px);
  max-width: 1020px;
  padding: 0 6px;
  border-radius: 100px;
  transition:
    box-shadow var(--d-popover) var(--ease-out),
    transform var(--d-popover) var(--ease-out),
    background-color var(--d-popover) var(--ease-out);
}
.nav.scrolled {
  background: rgba(8, 12, 24, 0.62);
  backdrop-filter: blur(28px) saturate(1.6);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
  border: 1px solid var(--line);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 14px;
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.nav-brand .mark {
  position: relative;
  width: 22px; height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.40);
}
.nav-brand .mark::after {
  /* Subtle inner glow on logo mark */
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), transparent 50%);
  pointer-events: none;
}
.nav-links {
  display: flex; gap: 2px; list-style: none; align-items: center;
}
.nav-links a {
  font: 500 13px/1 var(--font-sans);
  color: var(--ink-3);
  padding: 8px 14px;
  border-radius: 100px;
  transition: color var(--d-popover) ease-out, background-color var(--d-popover) ease-out;
}
@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.04); }
}
.nav-links a:active { transform: scale(0.97); }

@media (max-width: 700px) {
  .nav-links { display: none; }
}

/* =========================================================================
   HERO
   ========================================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 120px var(--gutter) 80px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

/* God rays — diagonal beams from top-right */
.god-rays {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    repeating-linear-gradient(118deg,
      rgba(34, 211, 238, 0.05) 0 1px,
      transparent 1px 70px),
    repeating-linear-gradient(118deg,
      rgba(255, 255, 255, 0.03) 0 1px,
      transparent 1px 32px);
  mask-image: radial-gradient(ellipse 70% 100% at 100% 0%, #000 0%, transparent 65%);
  -webkit-mask-image: radial-gradient(ellipse 70% 100% at 100% 0%, #000 0%, transparent 65%);
  transform: translateX(calc(var(--hero-p, 0) * -40px));
  opacity: 0.85;
}

/* Static perspective grid behind particles */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 65% 55% at 50% 50%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 65% 55% at 50% 50%, #000 0%, transparent 70%);
  pointer-events: none;
  transform: perspective(1000px) rotateX(35deg) translateZ(-100px) scale(1.4);
  transform-origin: center top;
  opacity: 0.5;
  z-index: 0;
}

/* Scroll-driven sweep beam */
.hero-beam {
  position: absolute;
  top: -10%; bottom: -10%;
  width: 30%;
  left: -30%;
  pointer-events: none;
  background: linear-gradient(75deg,
    transparent 0%,
    rgba(34, 211, 238, 0.05) 30%,
    rgba(255, 255, 255, 0.10) 50%,
    rgba(34, 211, 238, 0.05) 70%,
    transparent 100%);
  filter: blur(40px);
  transform: translateX(calc(var(--hero-p, 0) * 460%));
  mix-blend-mode: screen;
  z-index: 2;
}

.hero-inner {
  position: relative;
  z-index: 3;
  max-width: var(--max);
  width: 100%;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px 5px 9px;
  font: 500 12px/1 var(--font-sans);
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.06);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 100px;
  letter-spacing: 0.01em;
  margin-bottom: 28px;
  opacity: 0;
  transform: translateY(10px);
  animation: hero-in 700ms var(--ease-out) 0.1s forwards;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.5);
  animation: pulse 2.4s var(--ease-in-out) infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.45); }
  50%      { box-shadow: 0 0 0 6px rgba(34, 211, 238, 0); }
}

.hero h1 {
  font: 800 clamp(48px, 6.4vw, 86px)/1.0 var(--font-sans);
  letter-spacing: -0.045em;
  color: var(--ink);
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(20px);
  animation: hero-in 800ms var(--ease-out) 0.2s forwards;
}
.hero h1 .accent {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  background: linear-gradient(110deg, var(--cyan) 0%, var(--teal) 60%, var(--gold) 120%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
}
.hero-sub {
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--ink-3);
  line-height: 1.65;
  max-width: 500px;
  margin-bottom: 36px;
  opacity: 0;
  transform: translateY(14px);
  animation: hero-in 800ms var(--ease-out) 0.35s forwards;
}
.hero-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(14px);
  animation: hero-in 800ms var(--ease-out) 0.5s forwards;
}
.hero-fine {
  font-size: 12px;
  color: var(--ink-4);
  margin-top: 16px;
  letter-spacing: 0.01em;
  opacity: 0;
  animation: hero-in 800ms var(--ease-out) 0.65s forwards;
}

@keyframes hero-in {
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================================
   PHONE — frame holds a real screenshot
   ========================================================================= */
.phone {
  position: relative;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 9 / 19.5;
  border-radius: 38px;
  background: linear-gradient(165deg, #1a2540, #0d1426);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow:
    0 50px 120px rgba(0, 0, 0, 0.72),
    0 0 80px rgba(34, 211, 238, 0.10),
    0 0 0 1px rgba(34, 211, 238, 0.10) inset,
    0 1px 0 rgba(255, 255, 255, 0.12) inset;
  transform-style: preserve-3d;
  overflow: hidden;
}
.phone-screenshot {
  position: absolute;
  inset: 6px;
  border-radius: 32px;
  overflow: hidden;
  background: var(--bg);
}
.phone-screenshot img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: top;
  display: block;
}
.phone-specular {
  position: absolute;
  inset: 0;
  border-radius: 38px;
  pointer-events: none;
  background: linear-gradient(115deg,
    transparent 30%,
    rgba(255, 255, 255, 0.10) 47%,
    rgba(255, 255, 255, 0.04) 53%,
    transparent 70%);
  mix-blend-mode: overlay;
  transform: translate3d(calc(var(--ryn, 0) * -32px), calc(var(--rxn, 0) * 16px), 0);
  transition: transform 280ms var(--ease-out);
}
.phone-glint {
  position: absolute;
  inset: 0;
  border-radius: 38px;
  pointer-events: none;
  overflow: hidden;
}
.phone-glint::after {
  content: '';
  position: absolute;
  top: -50%; bottom: -50%;
  left: -100%;
  width: 50%;
  background: linear-gradient(75deg,
    transparent,
    rgba(255, 255, 255, 0.18) 35%,
    rgba(34, 211, 238, 0.30) 50%,
    rgba(255, 255, 255, 0.18) 65%,
    transparent);
  filter: blur(8px);
  opacity: 0;
  animation: glint-sweep 1.8s var(--ease-out) 1.1s forwards;
}
@keyframes glint-sweep {
  0%   { opacity: 0; left: -100%; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { opacity: 0; left: 220%; }
}

.hero-phone-wrap {
  position: relative;
  perspective: 1400px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-phone {
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translate3d(var(--mxp, 0), var(--myp, 0), 0);
  transition: transform 280ms var(--ease-out);
  opacity: 0;
  animation: phone-in 1.2s var(--ease-out) 0.4s forwards;
}
@keyframes phone-in {
  from { opacity: 0; transform: rotateX(8deg) rotateY(-12deg) translateY(40px) scale(0.92); }
  to   { opacity: 1; }
}

/* Floating pills */
.float-pill {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: rgba(8, 16, 31, 0.92);
  border: 1px solid var(--line);
  border-radius: 100px;
  font: 600 11.5px/1 var(--font-sans);
  color: var(--ink-2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(8px) scale(0.95);
  animation: pill-enter 480ms var(--ease-out) forwards;
  z-index: 3;
}
@keyframes pill-enter { to { opacity: 1; transform: translateY(0) scale(1); } }
.float-pill .pip { width: 6px; height: 6px; border-radius: 50%; }
.float-pill.tr { top: 8%; right: -16px; animation-delay: 1.4s; }
.float-pill.bl { bottom: 14%; left: -22px; animation-delay: 1.6s; }
.pip-green { background: var(--green); box-shadow: 0 0 8px rgba(74, 222, 128, 0.6); }
.pip-gold  { background: var(--gold); box-shadow: 0 0 8px rgba(251, 191, 36, 0.6); }

/* Scroll cue */
.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font: 500 11px/1 var(--font-mono);
  color: var(--ink-4);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0;
  animation: hero-in 1s var(--ease-out) 1.4s forwards;
  z-index: 3;
}
.scroll-cue::after {
  content: '';
  width: 1px;
  height: 28px;
  background: linear-gradient(180deg, var(--ink-4), transparent);
  animation: scroll-bob 1.8s var(--ease-in-out) infinite;
}
@keyframes scroll-bob {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(8px); opacity: 0.4; }
}

/* =========================================================================
   TRUST MARQUEE — slow infinite scroll of capability tags
   Earns its constant motion: very slow (40s+), low contrast, peripheral.
   ========================================================================= */
.marquee {
  position: relative;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background: rgba(8, 12, 24, 0.4);
}
.marquee::before, .marquee::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 12%;
  z-index: 2;
  pointer-events: none;
}
.marquee::before { left: 0;  background: linear-gradient(90deg, var(--bg) 0%, transparent 100%); }
.marquee::after  { right: 0; background: linear-gradient(270deg, var(--bg) 0%, transparent 100%); }
.marquee-track {
  display: flex;
  gap: 40px;
  width: max-content;
  animation: marquee-scroll 50s linear infinite;
}
@keyframes marquee-scroll {
  to { transform: translateX(-50%); }
}
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 600 13px/1 var(--font-sans);
  color: var(--ink-3);
  letter-spacing: 0.02em;
  white-space: nowrap;
  padding: 4px 8px;
}
.marquee-item .marquee-pip {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.6);
}
.marquee-item.gold .marquee-pip { background: var(--gold); box-shadow: 0 0 8px rgba(251, 191, 36, 0.6); }
.marquee-item.teal .marquee-pip { background: var(--teal); box-shadow: 0 0 8px rgba(45, 212, 191, 0.6); }
.marquee-item.green .marquee-pip { background: var(--green); box-shadow: 0 0 8px rgba(74, 222, 128, 0.6); }

/* =========================================================================
   STORY — pinned 6-state phone with real screenshots
   ========================================================================= */
.story {
  position: relative;
  height: 600vh;
}
.story-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 56px;
  padding: 0 var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
  overflow: hidden;
}

.story-rail {
  position: absolute;
  left: var(--gutter);
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 360px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.story-rail::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--cyan), var(--teal));
  transform-origin: top;
  transform: scaleY(var(--p, 0));
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.4);
}
.story-rail-dots {
  position: absolute;
  left: calc(var(--gutter) + 14px);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 360px;
}
.story-rail-dot {
  font: 500 11px/1 var(--font-mono);
  color: var(--ink-4);
  letter-spacing: 0.05em;
  transition: color var(--d-popover) var(--ease-out);
}
.story-rail-dot.on { color: var(--cyan); }

.story-phone-side {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1400px;
}
.story-phone {
  max-width: 320px;
  transform: rotateY(calc((var(--p, 0) - 0.5) * -10deg)) rotateX(calc((var(--p, 0) - 0.5) * 4deg));
  box-shadow:
    0 50px 120px rgba(0, 0, 0, 0.72),
    0 0 calc(60px + var(--p, 0) * 80px) rgba(34, 211, 238, calc(0.06 + var(--p, 0) * 0.18)),
    0 0 0 1px rgba(34, 211, 238, 0.10) inset,
    0 1px 0 rgba(255, 255, 255, 0.12) inset;
}
.story-state {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 380ms var(--ease-out), filter 380ms var(--ease-out), transform 480ms var(--ease-out);
  filter: blur(12px);
  transform: scale(1.03);
  pointer-events: none;
}
.story-state.active {
  opacity: 1;
  filter: blur(0);
  transform: scale(1);
}
.story-state img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}
.story-state.active::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(34, 211, 238, 0.25), transparent 65%);
  pointer-events: none;
  animation: state-flash 700ms var(--ease-out);
  opacity: 0;
}
@keyframes state-flash {
  0%   { opacity: 0; }
  30%  { opacity: 1; }
  100% { opacity: 0; }
}

.story-text-side { position: relative; }
.story-eyebrow {
  font: 600 11px/1 var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 14px;
}
.story-text {
  position: absolute;
  top: 0; left: 0; right: 0;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 380ms var(--ease-out), transform 380ms var(--ease-out);
}
.story-text.active { opacity: 1; transform: translateY(0); }
.story-text h2 {
  font: 700 clamp(34px, 4.4vw, 56px)/1.05 var(--font-sans);
  letter-spacing: -0.035em;
  color: var(--ink);
  margin-bottom: 18px;
}
.story-text h2 .accent {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  background: linear-gradient(110deg, var(--cyan), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.story-text p {
  font-size: 17px;
  color: var(--ink-3);
  line-height: 1.65;
  max-width: 460px;
}
.story-text .step-num {
  display: inline-block;
  font: 600 11px/1 var(--font-mono);
  color: var(--ink-4);
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

/* =========================================================================
   PINNED HEADLINE REVEAL — word-by-word
   ========================================================================= */
.headline-scene { position: relative; height: 220vh; }
.headline-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  place-items: center;
  padding: 0 var(--gutter);
}
.headline-pin::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 50%, rgba(34, 211, 238, calc(var(--p, 0) * 0.18)), transparent 60%);
  pointer-events: none;
}
.headline-text {
  position: relative;
  max-width: 1100px;
  font: 400 clamp(40px, 7vw, 96px)/1.06 var(--font-serif);
  letter-spacing: -0.02em;
  color: var(--ink);
  text-align: center;
  font-style: italic;
}
.headline-text .word {
  display: inline-block;
  opacity: clamp(0, calc((var(--p, 0) - var(--ws, 0)) / 0.06), 1);
  transform: translateY(calc((1 - clamp(0, calc((var(--p, 0) - var(--ws, 0)) / 0.06), 1)) * 14px));
  transition: opacity 50ms linear, transform 50ms linear;
  margin-right: 0.18em;
  filter: blur(calc((1 - clamp(0, calc((var(--p, 0) - var(--ws, 0)) / 0.06), 1)) * 6px));
}
.headline-text .word.glow {
  background: linear-gradient(110deg, var(--cyan), var(--teal), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-style: normal;
  font-family: var(--font-sans);
  font-weight: 800;
  text-shadow: 0 0 40px rgba(34, 211, 238, calc(var(--p, 0) * 0.5));
}

/* =========================================================================
   SECTIONS
   ========================================================================= */
.section {
  padding: 120px var(--gutter);
  position: relative;
}
.section-inner { max-width: var(--max); margin: 0 auto; }
.section-inner.wide { max-width: var(--max-wide); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 600 11px/1 var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 16px;
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 24px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan));
}
.section h2 {
  font: 800 clamp(34px, 4.4vw, 60px)/1.06 var(--font-sans);
  letter-spacing: -0.038em;
  color: var(--ink);
  margin-bottom: 16px;
}
.section h2 .accent {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}
.section-lede {
  font-size: 17px;
  color: var(--ink-3);
  max-width: 600px;
  line-height: 1.65;
  margin-bottom: 56px;
}

/* =========================================================================
   SVG ILLUSTRATION SCENE — animated path reveal "Evidence Flow"
   ========================================================================= */
.flow-scene {
  position: relative;
  padding: 120px var(--gutter);
  text-align: center;
}
.flow-svg-wrap {
  position: relative;
  max-width: 900px;
  margin: 40px auto 0;
}
.flow-svg {
  width: 100%;
  height: auto;
  display: block;
}
.flow-svg .flow-line {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  transition: stroke-dashoffset 1.4s var(--ease-out);
}
.flow-scene.in .flow-svg .flow-line { stroke-dashoffset: 0; }
.flow-svg .flow-node {
  opacity: 0;
  transform-origin: center;
  transform: scale(0.7);
  transition: opacity 500ms var(--ease-out), transform 600ms var(--ease-spring);
}
.flow-scene.in .flow-svg .flow-node {
  opacity: 1;
  transform: scale(1);
}
.flow-scene.in .flow-svg .flow-node:nth-child(2) { transition-delay: 200ms; }
.flow-scene.in .flow-svg .flow-node:nth-child(3) { transition-delay: 500ms; }
.flow-scene.in .flow-svg .flow-node:nth-child(4) { transition-delay: 800ms; }
.flow-scene.in .flow-svg .flow-node:nth-child(5) { transition-delay: 1100ms; }
.flow-scene.in .flow-svg .flow-node:nth-child(6) { transition-delay: 1400ms; }

.flow-svg .flow-pulse {
  animation: flow-pulse 3s var(--ease-in-out) infinite;
}
@keyframes flow-pulse {
  0%, 100% { opacity: 0.4; r: 4; }
  50%      { opacity: 1; r: 7; }
}

/* =========================================================================
   BENTO STATS — Mixed-media tile grid (Apple/Linear style)
   ========================================================================= */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(160px, auto);
  gap: 16px;
}
.bento-tile {
  position: relative;
  padding: 28px;
  background: linear-gradient(160deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color var(--d-popover) var(--ease-out), transform var(--d-popover) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .bento-tile:hover { border-color: var(--line-hi); transform: translateY(-2px); }
}
.bento-tile.span-2 { grid-column: span 2; }
.bento-tile.span-3 { grid-column: span 3; }
.bento-tile.span-4 { grid-column: span 4; }
.bento-tile.row-2  { grid-row: span 2; }
.bento-tile .bento-eyebrow {
  font: 600 10px/1 var(--font-mono);
  color: var(--cyan);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.bento-tile .bento-val {
  font: 800 clamp(36px, 4vw, 52px)/1 var(--font-sans);
  letter-spacing: -0.038em;
  color: var(--ink);
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}
.bento-tile .bento-val.gold { background: linear-gradient(110deg, var(--gold), var(--gold-deep)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.bento-tile .bento-val.teal { background: linear-gradient(110deg, var(--teal), var(--teal-deep)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.bento-tile .bento-val.cyan { background: linear-gradient(110deg, var(--cyan), var(--cyan-deep)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.bento-tile .bento-val.green { background: linear-gradient(110deg, var(--green), var(--green-deep)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.bento-tile .bento-label {
  font-size: 13px;
  color: var(--ink-4);
  letter-spacing: 0.02em;
}
.bento-tile .bento-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top right, var(--glow, transparent), transparent 60%);
  opacity: 0.5;
  pointer-events: none;
}

/* Mini bar chart inside a bento */
.minichart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 60px;
  margin-top: 16px;
}
.minichart .bar {
  flex: 1;
  background: linear-gradient(180deg, var(--cyan), var(--cyan-deep));
  border-radius: 3px 3px 0 0;
  height: var(--h, 40%);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 400ms var(--ease-out), transform 600ms var(--ease-out);
}
.bento-tile.in .minichart .bar { opacity: 1; transform: translateY(0); }
.bento-tile.in .minichart .bar:nth-child(1) { transition-delay: 60ms; }
.bento-tile.in .minichart .bar:nth-child(2) { transition-delay: 120ms; }
.bento-tile.in .minichart .bar:nth-child(3) { transition-delay: 180ms; }
.bento-tile.in .minichart .bar:nth-child(4) { transition-delay: 240ms; }
.bento-tile.in .minichart .bar:nth-child(5) { transition-delay: 300ms; }
.bento-tile.in .minichart .bar:nth-child(6) { transition-delay: 360ms; }
.bento-tile.in .minichart .bar:nth-child(7) { transition-delay: 420ms; }
.bento-tile.in .minichart .bar:nth-child(8) { transition-delay: 480ms; }
.bento-tile.in .minichart .bar:nth-child(9) { transition-delay: 540ms; }
.bento-tile.in .minichart .bar:nth-child(10) { transition-delay: 600ms; }
.bento-tile.in .minichart .bar:nth-child(11) { transition-delay: 660ms; }
.bento-tile.in .minichart .bar:nth-child(12) { transition-delay: 720ms; }

/* Mini network graph (SVG) inside a bento */
.mini-network { width: 100%; height: 120px; margin-top: 14px; }
.mini-network circle {
  opacity: 0;
  transform-origin: center;
  transform: scale(0);
  transition: opacity 400ms var(--ease-out), transform 500ms var(--ease-spring);
}
.mini-network line {
  opacity: 0;
  transition: opacity 400ms var(--ease-out);
}
.bento-tile.in .mini-network circle { opacity: 1; transform: scale(1); }
.bento-tile.in .mini-network line { opacity: 1; }
.bento-tile.in .mini-network circle:nth-child(1) { transition-delay: 100ms; }
.bento-tile.in .mini-network circle:nth-child(2) { transition-delay: 200ms; }
.bento-tile.in .mini-network circle:nth-child(3) { transition-delay: 300ms; }
.bento-tile.in .mini-network circle:nth-child(4) { transition-delay: 400ms; }
.bento-tile.in .mini-network circle:nth-child(5) { transition-delay: 500ms; }

/* Sparkline inside a bento */
.spark {
  width: 100%;
  height: 50px;
  margin-top: 14px;
}
.spark path {
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  transition: stroke-dashoffset 1.6s var(--ease-out) 200ms;
}
.bento-tile.in .spark path { stroke-dashoffset: 0; }

/* Status indicator for "Live" tile */
.live-pulse {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 600 12px/1 var(--font-mono);
  letter-spacing: 0.1em;
  color: var(--green);
  margin-top: 16px;
  padding: 6px 10px;
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.2);
  border-radius: 100px;
}
.live-pulse::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
  animation: pulse-green 2s var(--ease-in-out) infinite;
}
@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5); }
  50%      { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
}

/* =========================================================================
   ECOSYSTEM CARDS
   ========================================================================= */
.eco-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  perspective: 1400px;
}
.eco-card {
  position: relative;
  padding: 44px;
  background: linear-gradient(160deg, var(--bg-2) 0%, var(--bg-1) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  transform-style: preserve-3d;
  cursor: pointer;
  transition:
    transform 280ms var(--ease-out),
    border-color 280ms var(--ease-out),
    box-shadow 320ms var(--ease-out);
  overflow: hidden;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
}
.eco-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(circle 320px at var(--mx, 50%) var(--my, 50%), rgba(34, 211, 238, 0.14), transparent 60%);
  opacity: 0;
  transition: opacity 240ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .eco-card:hover {
    border-color: var(--line-hi);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.55);
  }
  .eco-card:hover::before { opacity: 1; }
}
.eco-card:active { transform: scale(0.99); }
.eco-card > * { transform: translateZ(20px); }

.eco-icon {
  width: 52px; height: 52px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 20px;
  position: relative;
}
.eco-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.10), transparent 60%);
  pointer-events: none;
}
.eco-icon.teal { background: rgba(45, 212, 191, 0.12); color: var(--teal); }
.eco-icon.gold { background: rgba(251, 191, 36, 0.12); color: var(--gold); }

.eco-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 600 10px/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 100px;
  margin-bottom: 14px;
}
.eco-tag.teal { background: rgba(45, 212, 191, 0.10); color: var(--teal); }
.eco-tag.gold { background: rgba(251, 191, 36, 0.10); color: var(--gold); }
.eco-tag::before {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%;
  background: currentColor;
}
.eco-card h3 {
  font: 800 26px/1.2 var(--font-sans);
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 12px;
}
.eco-card p {
  font-size: 15px;
  color: var(--ink-3);
  line-height: 1.65;
}
.eco-card .arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  font: 700 13px/1 var(--font-sans);
  transition: gap 200ms var(--ease-out);
}
.eco-card .arrow.teal { color: var(--teal); }
.eco-card .arrow.gold { color: var(--gold); }
@media (hover: hover) and (pointer: fine) { .eco-card:hover .arrow { gap: 10px; } }

/* =========================================================================
   IQ ENGINE 3D pinned scene
   ========================================================================= */
.iq-scene { position: relative; height: 220vh; }
.iq-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  place-items: center;
  padding: 0 var(--gutter);
  perspective: 1600px;
}
.iq-pin::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 40% 30% at calc(30% + var(--p, 0) * 40%) 30%, rgba(34, 211, 238, 0.10), transparent 60%),
    radial-gradient(ellipse 30% 25% at calc(70% - var(--p, 0) * 30%) 70%, rgba(251, 191, 36, 0.08), transparent 60%);
  filter: blur(40px);
  pointer-events: none;
  transition: background 200ms linear;
}
.iq-stage {
  position: relative;
  width: 100%;
  max-width: 1000px;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  align-items: center;
  gap: 60px;
}
.iq-text-side h2 {
  font: 800 clamp(34px, 4.5vw, 60px)/1.05 var(--font-sans);
  letter-spacing: -0.04em;
  color: var(--ink);
  margin-bottom: 16px;
}
.iq-text-side h2 .accent {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  background: linear-gradient(110deg, var(--cyan), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.iq-text-side p {
  font-size: 16px;
  color: var(--ink-3);
  line-height: 1.65;
  max-width: 480px;
}
.iq-tile-list {
  margin-top: 32px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.iq-tile-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--ink-2);
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color 220ms var(--ease-out), background-color 220ms var(--ease-out);
}
.iq-tile-list li.on {
  border-color: var(--line-hi);
  background: rgba(34, 211, 238, 0.05);
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.14);
}
.iq-tile-list li .num {
  font: 600 11px/1 var(--font-mono);
  color: var(--cyan);
  width: 30px;
  flex-shrink: 0;
}

.iq-stack-side {
  position: relative;
  height: 80%;
  transform-style: preserve-3d;
  display: flex;
  align-items: center;
  justify-content: center;
}
.iq-card {
  position: absolute;
  width: 300px;
  padding: 24px;
  background: linear-gradient(165deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  transform: translate3d(var(--tx, 0), var(--ty, 0), var(--tz, 0)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 80ms linear, opacity 80ms linear;
  transform-style: preserve-3d;
  overflow: hidden;
}
.iq-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.07), transparent 50%);
  pointer-events: none;
  border-radius: inherit;
}
.iq-card .iq-num {
  font: 600 11px/1 var(--font-mono);
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  position: relative;
}
.iq-card.c1 .iq-num { color: var(--cyan); }
.iq-card.c2 .iq-num { color: var(--teal); }
.iq-card.c3 .iq-num { color: var(--gold); }
.iq-card h4 {
  font: 700 19px/1.25 var(--font-sans);
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  position: relative;
}
.iq-card p {
  font-size: 13px;
  color: var(--ink-4);
  line-height: 1.55;
  position: relative;
}
.iq-card .iq-bar {
  margin-top: 16px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
  position: relative;
}
.iq-card .iq-bar::before {
  content: '';
  display: block;
  height: 100%;
  width: 60%;
  background: linear-gradient(90deg, var(--cyan), var(--teal));
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.5);
}
.iq-card.c2 .iq-bar::before { width: 75%; background: linear-gradient(90deg, var(--teal), var(--green)); box-shadow: 0 0 12px rgba(45, 212, 191, 0.5); }
.iq-card.c3 .iq-bar::before { width: 90%; background: linear-gradient(90deg, var(--gold), var(--rose)); box-shadow: 0 0 12px rgba(251, 191, 36, 0.5); }

/* =========================================================================
   PATENTS — wave-reveal grid with shimmer
   ========================================================================= */
.patents {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}
.patent {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.018);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font: 500 13.5px/1.4 var(--font-sans);
  color: var(--ink-2);
  transition: border-color 220ms var(--ease-out), background-color 220ms var(--ease-out), transform 220ms var(--ease-out);
  opacity: 0;
  clip-path: inset(0 100% 0 0);
  -webkit-clip-path: inset(0 100% 0 0);
  overflow: hidden;
}
.patent.in {
  opacity: 1;
  clip-path: inset(0 0 0 0);
  -webkit-clip-path: inset(0 0 0 0);
  transition:
    clip-path 600ms var(--ease-out),
    opacity 400ms ease-out,
    border-color 220ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 60ms);
}
.patent.in::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.25), transparent);
  transform: translateX(-100%);
  animation: patent-shimmer 900ms var(--ease-out) forwards;
  animation-delay: calc(var(--i, 0) * 60ms + 350ms);
  pointer-events: none;
}
@keyframes patent-shimmer { to { transform: translateX(120%); } }
@media (hover: hover) and (pointer: fine) {
  .patent:hover { border-color: var(--line-hi); background: rgba(34, 211, 238, 0.04); transform: translateY(-2px); }
}
.patent-pip {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
  flex-shrink: 0;
}

/* =========================================================================
   PHILOSOPHY QUOTE — big serif moment
   ========================================================================= */
.quote-section {
  padding: 160px var(--gutter);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.quote-section::before {
  content: '"';
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  font: 400 280px/1 var(--font-serif);
  color: rgba(34, 211, 238, 0.06);
  pointer-events: none;
  font-style: italic;
}
.quote-text {
  position: relative;
  font: 400 clamp(32px, 4.5vw, 56px)/1.18 var(--font-serif);
  font-style: italic;
  color: var(--ink);
  max-width: 880px;
  margin: 0 auto 32px;
  letter-spacing: -0.015em;
}
.quote-text .accent {
  background: linear-gradient(110deg, var(--cyan), var(--teal), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-style: normal;
  font-family: var(--font-sans);
  font-weight: 800;
}
.quote-attribution {
  font: 600 12px/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-4);
}

/* =========================================================================
   TEAM
   ========================================================================= */
.team {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.tcard {
  padding: 40px;
  background: linear-gradient(160deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  transition: border-color 220ms var(--ease-out), transform 220ms var(--ease-out);
  position: relative;
  overflow: hidden;
}
.tcard::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 40%);
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .tcard:hover { border-color: var(--line-hi); transform: translateY(-3px); }
}
.tcard-row { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; position: relative; }
.tav {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 800 22px/1 var(--font-sans);
  color: #04080f;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.22);
  position: relative;
}
.tav::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), transparent 50%);
  pointer-events: none;
}
.tav.gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  box-shadow: 0 0 28px rgba(251, 191, 36, 0.22);
}
.tcard h4 { font: 700 20px/1.2 var(--font-sans); color: var(--ink); letter-spacing: -0.02em; }
.trole { font-size: 12px; color: var(--cyan); font-weight: 600; }
.trole.gold { color: var(--gold); }
.tcard p { font-size: 14.5px; color: var(--ink-3); line-height: 1.65; position: relative; }

/* =========================================================================
   INVESTOR — Liquid glass panel with mesh background
   ========================================================================= */
.investor-wrap {
  position: relative;
  padding: 64px;
  border-radius: var(--r-2xl);
  overflow: hidden;
  text-align: center;
  background: rgba(14, 24, 48, 0.42);
  backdrop-filter: blur(32px) saturate(1.6);
  -webkit-backdrop-filter: blur(32px) saturate(1.6);
  border: 1px solid var(--line-2);
}
.investor-wrap::before {
  content: '';
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(ellipse 40% 30% at 30% 10%, rgba(34, 211, 238, 0.22), transparent 60%),
    radial-gradient(ellipse 40% 30% at 80% 80%, rgba(251, 191, 36, 0.12), transparent 60%);
  filter: blur(40px);
  z-index: -1;
}
.investor-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, transparent 25%);
  pointer-events: none;
  border-radius: inherit;
}
.investor-wrap > * { position: relative; }
.investor-wrap h2 {
  font: 800 clamp(30px, 3.8vw, 48px)/1.08 var(--font-sans);
  letter-spacing: -0.038em;
  color: var(--ink);
  margin-bottom: 14px;
}
.investor-wrap p {
  font-size: 17px;
  color: var(--ink-3);
  max-width: 560px;
  margin: 0 auto 28px;
  line-height: 1.65;
}

/* =========================================================================
   CTA
   ========================================================================= */
.cta {
  text-align: center;
  padding: 120px var(--gutter);
  position: relative;
}
.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 40% at 50% 50%, rgba(34, 211, 238, 0.10), transparent 60%);
  pointer-events: none;
}
.cta > * { position: relative; }
.cta h2 { font: 800 clamp(34px, 4.8vw, 60px)/1.08 var(--font-sans); letter-spacing: -0.038em; color: var(--ink); margin-bottom: 16px; }
.cta p { font-size: 17px; color: var(--ink-3); margin-bottom: 36px; }
.cta-row { display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* =========================================================================
   MEGA FOOTER
   ========================================================================= */
.footer {
  border-top: 1px solid var(--line);
  padding: 80px var(--gutter) 32px;
  background: linear-gradient(180deg, transparent, rgba(8, 12, 24, 0.4));
}
.footer-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.footer-brand-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.footer-brand-row .mark {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.35);
  position: relative;
}
.footer-brand-row .mark::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.3), transparent 50%);
}
.footer-tag {
  font-size: 13px;
  color: var(--ink-4);
  line-height: 1.6;
  max-width: 280px;
}
.footer-col h5 {
  font: 600 11px/1 var(--font-mono);
  color: var(--ink-4);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col a {
  font-size: 13.5px;
  color: var(--ink-3);
  transition: color var(--d-popover) ease-out;
}
@media (hover: hover) and (pointer: fine) {
  .footer-col a:hover { color: var(--cyan); }
}
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-4);
}
.footer-bottom .compliance {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-bottom .compliance span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.footer-bottom .compliance span::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.5);
}
.footer-region {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 100px;
  cursor: pointer;
  transition: border-color var(--d-popover) ease-out;
}
@media (hover: hover) and (pointer: fine) {
  .footer-region:hover { border-color: var(--line-hi); }
}

@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: span 2; }
}
@media (max-width: 600px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-brand { grid-column: span 1; }
}

/* =========================================================================
   SECTION REVEAL
   ========================================================================= */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity var(--d-section) var(--ease-out),
    transform var(--d-section) var(--ease-out);
  transition-delay: calc(var(--i, 0) * 60ms);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-phone-wrap { order: -1; }
  .phone { max-width: 280px; }
  .float-pill.tr { right: 4px; }
  .float-pill.bl { left: 4px; }

  .story { height: 480vh; }
  .story-pin { grid-template-columns: 1fr; }
  .story-rail, .story-rail-dots { display: none; }
  .story-text-side { min-height: 200px; order: 2; }
  .story-phone-side { order: 1; }

  .iq-stage { grid-template-columns: 1fr; gap: 32px; }
  .iq-stack-side { height: 320px; }

  .eco-grid, .team { grid-template-columns: 1fr; }

  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-tile.span-2, .bento-tile.span-3, .bento-tile.span-4 { grid-column: span 2; }

  .investor-wrap { padding: 36px; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .iq-card { width: 240px; }
  .bento { grid-template-columns: 1fr; }
  .bento-tile.span-2, .bento-tile.span-3, .bento-tile.span-4 { grid-column: span 1; }
}

/* =========================================================================
   ACCESSIBILITY — prefers-reduced-motion
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .aurora, .hero-grid, .hero-beam, .god-rays, .iq-stack-side .iq-card, .marquee-track, .particles {
    transform: none !important;
    animation: none !important;
  }
  .reveal, .hero h1, .hero-sub, .hero-actions, .status-pill, .hero-fine, .hero-phone, .scroll-cue, .float-pill {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  .story { height: auto; }
  .story-pin { position: static; height: auto; padding: 60px var(--gutter); }
  .story-state { position: static; opacity: 1; filter: none; transform: none; margin-bottom: 60px; }
  .story-text { position: static; opacity: 1; transform: none; margin-bottom: 60px; }
  .headline-scene { height: auto; }
  .headline-pin { position: static; height: auto; padding: 60px var(--gutter); }
  .headline-text .word { opacity: 1; transform: none; filter: none; }
  .iq-scene { height: auto; }
  .iq-pin { position: static; height: auto; padding: 60px var(--gutter); }
  .patent { opacity: 1; clip-path: none; -webkit-clip-path: none; }
  .cursor-dot, .cursor-ring { display: none; }
  body.has-custom-cursor { cursor: auto; }
  body.has-custom-cursor a, body.has-custom-cursor button { cursor: pointer; }
}
