/* ── NLP Processing · shared design system ─────────────────────────── */
/* ── Self-hosted fonts (SIL Open Font License) — no third-party requests ── */
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 300 700; font-display: swap; src: url("fonts/space-grotesk-var.woff2") format("woff2"); }
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/instrument-sans-var.woff2") format("woff2"); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-400.woff2") format("woff2"); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-500.woff2") format("woff2"); }

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

:root {
  --bg: #070a13;
  --bg2: #0a0f1d;
  --surface: #0e1526;
  --surface2: #121a30;
  --line: rgba(148, 170, 220, 0.13);
  --line2: rgba(148, 170, 220, 0.24);
  --ink: #e9eefb;
  --muted: #9aa7c7;
  --faint: #6b7798;
  --cyan: #24d0d6;
  --indigo: #6250ee;
  --violet: #8b7bff;
  --grad: linear-gradient(100deg, var(--cyan), var(--indigo));
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Instrument Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --maxw: 1140px;
  --glow: 0.6;
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: rgba(98, 80, 238, 0.45); }

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

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: clamp(40px, 5.4vw, 68px); font-weight: 700; }
h2 { font-size: clamp(30px, 3.6vw, 44px); font-weight: 700; }
h3 { font-size: 21px; font-weight: 600; }
p { text-wrap: pretty; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--cyan); opacity: 0.7; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede { color: var(--muted); font-size: 19px; max-width: 58ch; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-body);
  font-size: 15.5px;
  font-weight: 600;
  padding: 13px 24px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 6px 24px -8px rgba(98, 80, 238, 0.65);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 32px -8px rgba(98, 80, 238, 0.8); }
.btn-ghost {
  background: rgba(148, 170, 220, 0.06);
  border-color: var(--line2);
  color: var(--ink);
}
.btn-ghost:hover { background: rgba(148, 170, 220, 0.12); border-color: rgba(148, 170, 220, 0.4); }
.btn .arr { transition: transform 0.15s ease; }
.btn:hover .arr { transform: translateX(3px); }

/* ── Navigation ── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(7, 10, 19, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 36px;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand img { width: 34px; height: 36px; }
.brand-word {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.35;
  color: var(--ink);
}
.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; }
.nav-links > li { position: relative; }
.nav-links a.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-links a.nav-link:hover, .nav-links a.nav-link[aria-current="page"] { color: var(--ink); background: rgba(148, 170, 220, 0.08); }
.nav-links .caret { width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); opacity: 0.7; }

.sub-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 280px;
  background: var(--surface2);
  border: 1px solid var(--line2);
  border-radius: 14px;
  padding: 8px;
  list-style: none;
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.7);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}
.has-sub:hover .sub-menu, .has-sub:focus-within .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.sub-menu a {
  display: block;
  padding: 11px 14px;
  border-radius: 9px;
  transition: background 0.13s ease;
}
.sub-menu a:hover { background: rgba(148, 170, 220, 0.08); }
.sub-menu .sm-title { font-size: 15px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.sub-menu .sm-desc { display: block; font-size: 13px; color: var(--faint); margin-top: 1px; }
.sub-menu .sm-group {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 12px 14px 4px;
}
.sub-menu li + li > .sm-group { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; }
.sm-flag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(36, 208, 214, 0.12);
  color: var(--cyan);
  border: 1px solid rgba(36, 208, 214, 0.3);
}

.nav-burger {
  display: none;
  background: none;
  border: 1px solid var(--line2);
  border-radius: 8px;
  width: 42px; height: 42px;
  cursor: pointer;
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
}

/* ── Page hero (subpages) ── */
.page-hero { position: relative; padding: 168px 0 84px; overflow: hidden; }
.page-hero .eyebrow { margin-bottom: 18px; }
.page-hero h1 { font-size: clamp(36px, 4.6vw, 58px); max-width: 18ch; }
.page-hero .lede { margin-top: 22px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

/* ── Glow orbs ── */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: var(--glow);
  pointer-events: none;
}
.glow-cyan { background: radial-gradient(circle, rgba(36, 208, 214, 0.34), transparent 70%); }
.glow-indigo { background: radial-gradient(circle, rgba(98, 80, 238, 0.4), transparent 70%); }

/* ── Sections ── */
.section { position: relative; padding: 96px 0; }
.section-head { max-width: 640px; margin-bottom: 52px; }
.section-head .eyebrow { margin-bottom: 16px; }
.section-head p { color: var(--muted); margin-top: 16px; font-size: 18px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }

.feature-card {
  background: linear-gradient(180deg, var(--surface), var(--bg2));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.feature-card:hover { border-color: var(--line2); transform: translateY(-2px); }
.feature-card h3 { margin-bottom: 10px; }
.feature-card p { color: var(--muted); font-size: 15.5px; }
.fc-icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  background: rgba(36, 208, 214, 0.09);
  border: 1px solid rgba(36, 208, 214, 0.25);
  color: var(--cyan);
}
.fc-icon svg { width: 21px; height: 21px; }

/* ── Stats ── */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--surface), transparent);
  overflow: hidden;
}
.stat {
  padding: 32px 28px;
  border-left: 1px solid var(--line);
}
.stat:first-child { border-left: none; }
.stat-num {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label { color: var(--muted); font-size: 14.5px; margin-top: 4px; }

/* ── Steps ── */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; counter-reset: step; }
.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 18px 20px;
  counter-increment: step;
}
.step::before {
  content: "0" counter(step);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cyan);
  letter-spacing: 0.12em;
}
.step h3 { font-size: 17px; margin: 10px 0 6px; }
.step p { font-size: 13.5px; color: var(--muted); line-height: 1.5; }

/* ── Chips ── */
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font-family: var(--font-mono);
  font-size: 13.5px;
  padding: 9px 16px;
  border-radius: 99px;
  border: 1px solid var(--line2);
  background: rgba(148, 170, 220, 0.05);
  color: var(--muted);
}

/* ── Trust strip ── */
.trust-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(148, 170, 220, 0.025);
}
.trust-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px 40px;
  padding: 26px 0;
}
.trust-item { display: flex; align-items: center; gap: 11px; color: var(--muted); font-size: 14.5px; }
.trust-item svg { width: 17px; height: 17px; color: var(--cyan); flex: none; }

/* ── CTA band ── */
.cta-band {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line2);
  border-radius: 22px;
  padding: 64px 56px;
  background:
    radial-gradient(900px 360px at 12% -30%, rgba(36, 208, 214, 0.16), transparent 60%),
    radial-gradient(900px 360px at 88% 130%, rgba(98, 80, 238, 0.22), transparent 60%),
    var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  flex-wrap: wrap;
}
.cta-band h2 { max-width: 20ch; }
.cta-band p { color: var(--muted); margin-top: 12px; max-width: 46ch; }

/* ── Footer ── */
.site-footer { border-top: 1px solid var(--line); background: var(--bg2); margin-top: 96px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 48px;
  padding: 64px 0 48px;
}
.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 18px;
}
.footer-grid ul { list-style: none; display: grid; gap: 11px; }
.footer-grid ul a { color: var(--muted); font-size: 15px; transition: color 0.13s ease; }
.footer-grid ul a:hover { color: var(--ink); }
.footer-brand p { color: var(--muted); font-size: 14.5px; max-width: 34ch; margin-top: 16px; }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 22px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  justify-content: space-between;
  color: var(--faint);
  font-size: 13.5px;
}

/* ── Legal pages ── */
.legal { max-width: 72ch; color: var(--muted); font-size: 16px; }
.legal .meta { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); margin-bottom: 28px; }
.legal h2 { font-size: 22px; color: var(--ink); margin: 40px 0 12px; }
.legal h2:first-of-type { margin-top: 0; }
.legal p + p { margin-top: 12px; }
.legal ul { margin: 12px 0 0 22px; display: grid; gap: 8px; }
.legal a { color: var(--cyan); }
.legal a:hover { text-decoration: underline; }
.legal strong { color: var(--ink); font-weight: 600; }
.legal address { font-style: normal; }

/* ── Reveal ── */
@media (prefers-reduced-motion: no-preference) {
  body:not(.no-anim) .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.65s ease, transform 0.65s ease;
  }
  body:not(.no-anim) .reveal.in { opacity: 1; transform: none; }

  /* Staggered reveals inside grids */
  body:not(.no-anim) :is(.grid-2, .grid-3, .grid-4) > .reveal:nth-child(2) { transition-delay: 0.09s; }
  body:not(.no-anim) :is(.grid-2, .grid-3, .grid-4) > .reveal:nth-child(3) { transition-delay: 0.18s; }
  body:not(.no-anim) :is(.grid-2, .grid-3, .grid-4) > .reveal:nth-child(4) { transition-delay: 0.27s; }
  body:not(.no-anim) :is(.grid-2, .grid-3, .grid-4) > .reveal:nth-child(5) { transition-delay: 0.36s; }
  body:not(.no-anim) :is(.grid-2, .grid-3, .grid-4) > .reveal:nth-child(6) { transition-delay: 0.45s; }

  /* Steps cascade once their container reveals */
  body:not(.no-anim) .steps.reveal .step { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
  body:not(.no-anim) .steps.reveal.in .step { opacity: 1; transform: none; }
  body:not(.no-anim) .steps.reveal.in .step:nth-child(2) { transition-delay: 0.1s; }
  body:not(.no-anim) .steps.reveal.in .step:nth-child(3) { transition-delay: 0.2s; }
  body:not(.no-anim) .steps.reveal.in .step:nth-child(4) { transition-delay: 0.3s; }
  body:not(.no-anim) .steps.reveal.in .step:nth-child(5) { transition-delay: 0.4s; }

  /* Hero / page-hero entrance cascade (JS-armed: html.entrance-armed applies the
     hidden pre-state, site.js removes it next frame so content TRANSITIONS in.
     If JS or animations never run, base state is fully visible.) */
  body:not(.no-anim) :is(.hero, .page-hero) :is(.eyebrow, h1, .lede, .hero-actions) {
    transition: opacity 0.95s cubic-bezier(0.16, 1, 0.3, 1), transform 0.95s cubic-bezier(0.16, 1, 0.3, 1), filter 0.95s cubic-bezier(0.16, 1, 0.3, 1);
  }
  body:not(.no-anim) :is(.hero, .page-hero) .eyebrow { transition-delay: 0.05s; }
  body:not(.no-anim) :is(.hero, .page-hero) h1 { transition-delay: 0.16s; }
  body:not(.no-anim) :is(.hero, .page-hero) .lede { transition-delay: 0.32s; }
  body:not(.no-anim) :is(.hero, .page-hero) .hero-actions { transition-delay: 0.46s; }
  html.entrance-armed body:not(.no-anim) :is(.hero, .page-hero) :is(.eyebrow, h1, .lede, .hero-actions) {
    opacity: 0;
    transform: translateY(26px);
    filter: blur(12px);
  }

  /* Slow glow drift */
  body:not(.no-anim) .glow-orb { animation: orbDrift 16s ease-in-out infinite alternate; }
  body:not(.no-anim) .glow-orb.glow-cyan { animation-duration: 21s; }

  /* Gradient shimmer on hero accent text */
  body:not(.no-anim) h1 .grad-text {
    background-size: 200% 100%;
    animation: gradShift 7s ease-in-out infinite alternate;
  }
}
@keyframes orbDrift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(42px, 28px, 0) scale(1.1); }
}
@keyframes gradShift {
  from { background-position: 0% 50%; }
  to { background-position: 100% 50%; }
}

/* Frozen-timeline fallback: when site.js detects animations never advance
   (capture/export contexts), this snaps everything to its end state. */
html.anim-snap *, html.anim-snap *::before, html.anim-snap *::after {
  transition: none !important;
  animation: none !important;
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: none; }
  .stat { border-top: 1px solid var(--line); }
  .stat:nth-child(-n+2) { border-top: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav-links {
    position: fixed;
    inset: 72px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--bg2);
    border-bottom: 1px solid var(--line2);
    padding: 14px 20px 22px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-burger { display: block; }
  .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: transparent;
    border: none;
    border-left: 1px solid var(--line2);
    border-radius: 0;
    margin: 4px 0 6px 16px;
    min-width: 0;
  }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr; }
  .stat { border-left: none; border-top: 1px solid var(--line); }
  .stat:first-child { border-top: none; }
  .cta-band { padding: 44px 30px; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
}
