/* ==========================================================================
   Sync Nexus v3 — Marketing site
   Extends the "Quiet Craft / Manrope" product design system into a darker,
   more technical marketing surface. Brand green is preserved as the action
   colour; a luminous variant is introduced for dark backgrounds.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Brand — inherited from docs/design-system/QUIET_CRAFT_MANROPE.md
     Single scheme: Emerald. Every brand colour on the site derives from these
     tokens; nothing else in this file hardcodes a hue. */
  --brand:          #1f6b4f;
  --brand-hover:    #18543e;
  --brand-lum:      #3ddc97;   /* luminous accent for dark surfaces */
  --brand-lum-soft: #8ef0c4;

  /* RGB triplets — required wherever a colour needs a runtime alpha.
     rgba(var(--accent-rgb), .12) is themeable; a hardcoded rgba() is not. */
  --brand-rgb:  31, 107, 79;   /* solid brand, light surfaces */
  --accent-rgb: 61, 220, 151;  /* luminous accent, dark surfaces */
  --tint-rgb:  141, 214, 178;  /* soft tint: hairlines, panel washes, grid */
  --ink-rgb:     8,  18,  14;  /* darkest surface, for translucent overlays */

  /* Dark surfaces */
  --ink-900: #08120e;
  --ink-850: #0a1611;
  --ink-800: #0c1a15;
  --ink-700: #12241d;
  --ink-600: #1a3128;
  --ink-500: #244034;

  /* Light surfaces (from product system) */
  --paper:     #f5f7f4;
  --paper-alt: #eef2ee;
  --panel:     #ffffff;

  /* Text */
  --text-strong:  #17231d;
  --text-soft:    #637168;
  --text-invert:  #eaf3ee;
  --text-invert-soft: #9db3a7;

  /* Borders */
  --line:        #d5ded8;
  --line-strong: #a9b8ae;
  --line-dark:   rgba(141, 214, 178, 0.16);
  --line-dark-2: rgba(141, 214, 178, 0.28);

  /* Semantic */
  --success: #237a4b;
  --warning: #9a5a00;
  --danger:  #b42318;
  --info:    #2563a6;
  --success-lum: #4ade80;
  --warning-lum: #fbbf24;
  --danger-lum:  #f87171;
  --info-lum:    #60a5fa;

  /* Geometry */
  --r-control: 8px;
  --r-card:    12px;
  --r-lg:      20px;
  --r-pill:    999px;

  /* Layout */
  --maxw: 1200px;
  --maxw-narrow: 760px;
  --nav-h: 68px;

  /* Motion */
  --t-fast: 120ms cubic-bezier(.4, 0, .2, 1);
  --t-mid:  180ms cubic-bezier(.4, 0, .2, 1);
  --t-slow: 420ms cubic-bezier(.16, 1, .3, 1);

  /* Type */
  --font: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-strong);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 600; letter-spacing: -0.021em; line-height: 1.18; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--brand-lum); color: var(--ink-900); }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}
.dark :focus-visible,
.footer :focus-visible,
.mobile-menu :focus-visible,
.terminal :focus-visible { outline-color: var(--brand-lum); }

/* ---------- Layout primitives ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { width: 100%; max-width: var(--maxw-narrow); margin: 0 auto; padding: 0 24px; }

.section { padding: 104px 0; position: relative; }
.section-sm { padding: 72px 0; }
@media (max-width: 860px) {
  .section { padding: 72px 0; }
  .section-sm { padding: 56px 0; }
}

.dark {
  background: var(--ink-900);
  color: var(--text-invert);
}
.dark h1, .dark h2, .dark h3, .dark h4 { color: #fff; }

/* A second light surface keeps long pages from becoming an undifferentiated
   white wall without introducing another heavy dark band. */
.section-tonal {
  background: var(--paper-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* Grid items default to min-width:auto, which lets long unbreakable content push
   a track wider than its container and produce horizontal page overflow. */
.grid > *, .split > *, .price-grid > *, .calc-grid > *, .stat-row > *, .boundary > * { min-width: 0; }

.grid { display: grid; gap: 24px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .g3, .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

/* ---------- Type scale ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 18px;
}
.dark .eyebrow { color: var(--brand-lum); }
.eyebrow::before {
  content: ""; width: 22px; height: 1.5px; background: currentColor; opacity: .55;
}

.h-display { font-size: clamp(38px, 5.8vw, 72px); line-height: 1.04; letter-spacing: -0.032em; }
.h1 { font-size: clamp(32px, 4.4vw, 54px); line-height: 1.08; letter-spacing: -0.028em; }
.h2 { font-size: clamp(27px, 3.2vw, 40px); line-height: 1.14; letter-spacing: -0.024em; }
.h3 { font-size: clamp(20px, 2vw, 25px); line-height: 1.24; }
.h4 { font-size: 17px; line-height: 1.35; }

.lead {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.62;
  color: var(--text-soft);
}
.dark .lead { color: var(--text-invert-soft); }

.muted { color: var(--text-soft); }
.dark .muted { color: var(--text-invert-soft); }
.mono { font-family: var(--mono); font-size: .875em; letter-spacing: -0.01em; }
.accent { color: var(--brand); }
.dark .accent { color: var(--brand-lum); }

.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .h2 + .lead { margin-top: 18px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 46px; padding: 0 22px;
  border-radius: var(--r-control);
  font-size: 15px; font-weight: 600;
  border: 1px solid transparent;
  transition: background var(--t-fast), color var(--t-fast),
              border-color var(--t-fast), transform var(--t-fast),
              box-shadow var(--t-fast);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; flex: none; }

.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.btn-primary:hover { background: var(--brand-hover); box-shadow: 0 6px 20px rgba(var(--brand-rgb),.28); }
.dark .btn-primary { background: var(--brand-lum); color: var(--ink-900); }
.dark .btn-primary:hover { background: var(--brand-lum-soft); box-shadow: 0 8px 28px rgba(var(--accent-rgb),.26); }

.btn-ghost { background: transparent; color: var(--text-strong); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--paper-alt); border-color: var(--text-soft); }
.dark .btn-ghost { color: var(--text-invert); border-color: var(--line-dark-2); }
.dark .btn-ghost:hover { background: rgba(var(--tint-rgb),.09); border-color: var(--brand-lum); }

.btn-lg { height: 54px; padding: 0 30px; font-size: 16px; }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-weight: 600; font-size: 15px; color: var(--brand);
}
.dark .link-arrow { color: var(--brand-lum); }
.link-arrow svg { width: 15px; height: 15px; transition: transform var(--t-fast); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 90;
  height: var(--nav-h);
  /* Opaque enough that the sticky bar stays dark over a light page head —
     at .72 the nav lightened over light content and link contrast fell to 3.6:1. */
  background: rgba(var(--ink-rgb),.90);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line-dark);
  transition: background var(--t-mid), border-color var(--t-mid);
}
.nav.scrolled { background: rgba(var(--ink-rgb),.97); border-bottom-color: var(--line-dark-2); }
.nav-inner {
  height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 28px;
}
.logo { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
/* Logo marks paint with currentColor so they follow the active theme. */
.logo-mark { width: 30px; height: 30px; flex: none; color: var(--brand-lum); }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 8px 13px; border-radius: var(--r-control);
  font-size: 14.5px; font-weight: 500; color: var(--text-invert-soft);
  transition: color var(--t-fast), background var(--t-fast);
}
.nav-links a:hover { color: #fff; background: rgba(var(--tint-rgb),.09); }
.nav-links a.current { color: var(--brand-lum); }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: none; width: 42px; height: 42px; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--line-dark-2);
  border-radius: var(--r-control); color: #fff;
}
@media (max-width: 1040px) {
  .nav-links, .nav-actions .btn-ghost { display: none; }
  .nav-toggle { display: inline-flex; }
}
/* On small phones the nav CTA would push the menu button off-screen.
   The same CTA is repeated inside the mobile menu, so hide it here. */
@media (max-width: 600px) {
  .nav-actions .btn-primary { display: none; }
}

.mobile-menu {
  position: fixed; inset: var(--nav-h) 0 0; z-index: 89;
  background: var(--ink-900);
  padding: 24px;
  display: none; flex-direction: column; gap: 4px;
  overflow-y: auto;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 15px 12px; border-radius: var(--r-control);
  font-size: 18px; font-weight: 600; color: var(--text-invert);
  border-bottom: 1px solid var(--line-dark);
}
.mobile-menu .btn { margin-top: 18px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--ink-900);
  color: var(--text-invert);
  padding: 92px 0 96px;
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  /* precision grid */
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(var(--tint-rgb),.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--tint-rgb),.055) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 105% 78% at 50% 32%, #000 35%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 105% 78% at 50% 32%, #000 35%, transparent 100%);
}
.hero::after {
  content: ""; position: absolute; z-index: -1;
  width: 900px; height: 620px; top: -220px; left: 50%;
  transform: translateX(-42%);
  background: radial-gradient(circle, rgba(var(--accent-rgb),.16), transparent 66%);
  filter: blur(28px);
  pointer-events: none;
}
.hero-grid {
  display: grid; grid-template-columns: 1.02fr .98fr; gap: 56px; align-items: center;
}
@media (max-width: 1040px) { .hero-grid { grid-template-columns: 1fr; gap: 44px; } }

.hero h1 { color: #fff; }
.hero .lead { margin-top: 22px; max-width: 560px; }
.hero .btn-row { margin-top: 34px; }

.hero-note {
  margin-top: 22px; font-size: 13.5px; color: var(--text-invert-soft);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.hero-note svg { width: 15px; height: 15px; color: var(--brand-lum); flex: none; }

/* Offer badge */
.offer-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 8px 7px 7px;
  border-radius: var(--r-pill);
  background: rgba(var(--accent-rgb),.10);
  border: 1px solid rgba(var(--accent-rgb),.30);
  font-size: 13.5px; font-weight: 600; color: var(--brand-lum-soft);
  margin-bottom: 26px;
}
.offer-badge .tag {
  background: var(--brand-lum); color: var(--ink-900);
  padding: 3px 10px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 800; letter-spacing: .01em;
}
.offer-badge .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--brand-lum);
  animation: pulse-dot 2.4s ease-in-out infinite;
}
.pagehead .offer-badge {
  color: var(--brand);
  background: rgba(var(--brand-rgb),.08);
  border-color: rgba(var(--brand-rgb),.30);
}
.pagehead .offer-badge .dot { background: var(--brand); }
@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(var(--accent-rgb),.5); }
  50% { opacity: .55; box-shadow: 0 0 0 6px rgba(var(--accent-rgb),0); }
}

/* ---------- Logo strip ---------- */
.logostrip { border-top: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark); padding: 30px 0; background: var(--ink-900); }
.logostrip-label { text-align: center; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-invert-soft); margin-bottom: 22px; }
.logostrip-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 34px; }
.logostrip-row span {
  font-size: 16px; font-weight: 600; color: rgba(234,243,238,.52);
  transition: color var(--t-fast), transform var(--t-fast);
}
.logostrip-row span:hover { color: var(--brand-lum); transform: translateY(-1px); }
.logostrip-light {
  background: var(--paper-alt);
  border-color: var(--line);
}
.logostrip-light .logostrip-label { color: var(--text-soft); }
.logostrip-light .logostrip-row span { color: var(--text-soft); }
.logostrip-light .logostrip-row span:hover { color: var(--brand); }

/* ---------- Cards ---------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 28px;
  transition: transform var(--t-mid), box-shadow var(--t-mid), border-color var(--t-mid);
}
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(0,0,0,.09); border-color: var(--line-strong); }
.card .h4 { margin-bottom: 9px; }
.card p { font-size: 14.5px; color: var(--text-soft); line-height: 1.62; }

.dark .card,
.card-dark {
  background: linear-gradient(180deg, rgba(var(--tint-rgb),.045), rgba(var(--tint-rgb),.015));
  border-color: var(--line-dark);
  color: var(--text-invert);
}
.dark .card:hover, .card-dark:hover {
  border-color: var(--line-dark-2);
  box-shadow: 0 14px 44px rgba(0,0,0,.42);
}
.dark .card p, .card-dark p { color: var(--text-invert-soft); }

.card-icon {
  width: 42px; height: 42px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(var(--brand-rgb),.10); color: var(--brand);
  margin-bottom: 18px;
}
.card-icon svg { width: 21px; height: 21px; }
.dark .card-icon, .card-dark .card-icon { background: rgba(var(--accent-rgb),.12); color: var(--brand-lum); }

.card-num {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  color: var(--brand); opacity: .8; margin-bottom: 14px; display: block;
}
.dark .card-num { color: var(--brand-lum); }

/* ---------- Stats ---------- */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.dark .stat-row { background: var(--line-dark); border-color: var(--line-dark); }
@media (max-width: 780px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
.stat {
  background: var(--panel); padding: 30px 24px; text-align: center;
  transition: background var(--t-mid);
}
.stat:hover { background: var(--paper-alt); }
.dark .stat { background: var(--ink-900); }
.dark .stat:hover { background: var(--ink-800); }
.stat-value {
  font-size: clamp(30px, 3.6vw, 44px); font-weight: 700; line-height: 1;
  color: var(--brand); letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.stat-label { margin-top: 10px; font-size: 13.5px; color: var(--text-soft); line-height: 1.45; }
.dark .stat-value { color: var(--brand-lum); }
.dark .stat-label { color: var(--text-invert-soft); }

/* ---------- Terminal / prompt demo ---------- */
.terminal {
  background: #06100c;
  border: 1px solid var(--line-dark-2);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0,0,0,.55);
}
.terminal-bar {
  display: flex; align-items: center; gap: 9px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-dark);
  background: rgba(var(--tint-rgb),.035);
}
.terminal-dots { display: flex; gap: 6px; }
.terminal-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(234,243,238,.2); }
.terminal-title {
  font-family: var(--mono); font-size: 12px; color: var(--text-invert-soft);
  margin-left: 6px;
}
.terminal-badge {
  margin-left: auto; font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  color: var(--brand-lum); background: rgba(var(--accent-rgb),.12);
  border: 1px solid rgba(var(--accent-rgb),.24);
  padding: 3px 8px; border-radius: var(--r-pill);
}
.terminal-body { padding: 22px; min-height: 340px; }

.prompt-line {
  display: flex; align-items: flex-start; gap: 10px;
  font-family: var(--mono); font-size: 13.5px; line-height: 1.6;
  color: var(--text-invert);
  padding-bottom: 18px; margin-bottom: 18px;
  border-bottom: 1px solid var(--line-dark);
}
.prompt-line .caret { color: var(--brand-lum); font-weight: 700; flex: none; }

/* The typed text overlays a hidden full-length copy of itself. The ghost sets
   the line box, so the prompt occupies its final height from the first frame
   instead of growing line-by-line and shifting the hero as it types. */
.prompt-wrap { position: relative; flex: 1 1 auto; min-width: 0; }
.prompt-ghost { display: block; visibility: hidden; }
.prompt-text { position: absolute; inset: 0; }
.prompt-text::after {
  content: "▊"; color: var(--brand-lum); margin-left: 2px;
  animation: blink 1.05s step-end infinite;
}
.prompt-text.done::after { display: none; }
@keyframes blink { 50% { opacity: 0; } }

.steps { display: flex; flex-direction: column; gap: 9px; }
.step {
  display: flex; align-items: center; gap: 11px;
  font-size: 13px; font-family: var(--mono);
  color: var(--text-invert-soft);
  padding: 9px 12px;
  border-radius: var(--r-control);
  border: 1px solid transparent;
  opacity: 0; transform: translateY(6px);
  transition: opacity var(--t-slow), transform var(--t-slow), background var(--t-mid), border-color var(--t-mid);
}
.step.show { opacity: 1; transform: none; }
.step.active { background: rgba(var(--accent-rgb),.07); border-color: rgba(var(--accent-rgb),.22); color: var(--text-invert); }
.step.done { color: var(--text-invert-soft); }
.step-icon { width: 16px; height: 16px; flex: none; color: var(--brand-lum); }
.step .spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.step-tail { margin-left: auto; font-size: 11px; opacity: .62; }
/* On narrow screens the tail pushes each row onto a second line as it is
   filled in, growing the panel mid-animation. It is supplementary detail, so
   drop it rather than let the layout shift. */
@media (max-width: 560px) { .step-tail { display: none; } }

.terminal-result {
  margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line-dark);
  opacity: 0; transform: translateY(8px);
  transition: opacity var(--t-slow), transform var(--t-slow);
}
.terminal-result.show { opacity: 1; transform: none; }
.result-head { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 600; color: var(--brand-lum); margin-bottom: 12px; }
.result-head svg { width: 16px; height: 16px; }

.chipset { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  font-family: var(--mono); font-size: 11.5px;
  padding: 5px 10px; border-radius: var(--r-pill);
  background: rgba(var(--tint-rgb),.08); border: 1px solid var(--line-dark-2);
  color: var(--text-invert-soft);
}
.chip.ok { color: var(--brand-lum); border-color: rgba(var(--accent-rgb),.3); background: rgba(var(--accent-rgb),.1); }

.demo-tabs { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 18px; }
.demo-tab {
  font-size: 13px; font-weight: 500;
  padding: 8px 14px; border-radius: var(--r-pill);
  background: rgba(var(--tint-rgb),.06); border: 1px solid var(--line-dark);
  color: var(--text-invert-soft);
  transition: all var(--t-fast);
}
.demo-tab:hover { border-color: var(--line-dark-2); color: var(--text-invert); }
.demo-tab.active { background: var(--brand-lum); border-color: var(--brand-lum); color: var(--ink-900); font-weight: 600; }

/* ---------- Flow diagram (animated SVG) ---------- */
/* Diagrams scroll horizontally on narrow screens rather than scaling their
   labels down to an unreadable size. */
.flow-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.flowcanvas { width: 100%; height: auto; min-width: 720px; }
.flow-node rect { transition: fill var(--t-mid), stroke var(--t-mid); }
.flow-label { font-family: var(--mono); font-size: 10px; fill: var(--text-invert-soft); }
.flow-title { font-family: var(--font); font-size: 12px; font-weight: 600; fill: #fff; }
/* SVG presentation attributes cannot read var(), so themeable diagram colours
   are applied as CSS rules instead. Any CSS rule outranks a presentation
   attribute, so the inline fill/stroke values remain as a no-CSS fallback. */
.sv-tint        { fill: rgba(var(--tint-rgb), .05);   stroke: rgba(var(--tint-rgb), .20); }
.sv-tint-soft   { fill: rgba(var(--tint-rgb), .04);   stroke: rgba(var(--tint-rgb), .18); }
.sv-accent      { fill: rgba(var(--accent-rgb), .09); stroke: rgba(var(--accent-rgb), .33); }
.sv-accent-soft { fill: rgba(var(--accent-rgb), .06); stroke: rgba(var(--accent-rgb), .30); }
.sv-arrow       { fill: rgba(var(--tint-rgb), .50);   stroke: none; }
.sv-tint-text   { fill: rgba(var(--tint-rgb), .60);   stroke: none; }

.flow-path { fill: none; stroke: rgba(var(--tint-rgb),.30); stroke-width: 1.5; }
.flow-path.fail { stroke: rgba(248,113,113,.34); stroke-dasharray: 4 4; }
.packet { fill: var(--brand-lum); }
.packet.err { fill: var(--danger-lum); }

@media (prefers-reduced-motion: reduce) {
  .packet, .step .spin, .offer-badge .dot { animation: none !important; }
  animate, animateMotion, animateTransform { display: none; }
}

/* ---------- Split feature rows ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split.reverse .split-media { order: -1; }
@media (max-width: 940px) {
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split.reverse .split-media { order: 0; }
}
.split + .split { margin-top: 104px; }
@media (max-width: 940px) { .split + .split { margin-top: 72px; } }

.checklist { display: flex; flex-direction: column; gap: 13px; margin-top: 26px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.55; }
.checklist svg { width: 19px; height: 19px; flex: none; color: var(--brand); margin-top: 2px; }
.dark .checklist svg { color: var(--brand-lum); }
.checklist strong { font-weight: 600; }

/* ---------- Governance / boundary list ---------- */
.boundary { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.dark .boundary { background: var(--line-dark); border-color: var(--line-dark); }
@media (max-width: 780px) { .boundary { grid-template-columns: 1fr; } }
.boundary-col { background: var(--panel); padding: 30px; }
.dark .boundary-col { background: var(--ink-900); }
.boundary-col h4 {
  display: flex; align-items: center; gap: 9px;
  font-size: 14px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  margin-bottom: 20px;
}
.boundary-col.can h4 { color: var(--success); }
.dark .boundary-col.can h4 { color: var(--brand-lum); }
.boundary-col.cannot h4 { color: var(--danger); }
.dark .boundary-col.cannot h4 { color: var(--danger-lum); }
.boundary-col li {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 10px 0; font-size: 14.5px; color: var(--text-soft);
  border-bottom: 1px solid var(--line);
}
.dark .boundary-col li { color: var(--text-invert-soft); border-bottom-color: rgba(var(--tint-rgb),.07); }
.boundary-col li:last-child { border-bottom: 0; }
.boundary-col li svg { width: 17px; height: 17px; flex: none; margin-top: 3px; }
.boundary-col.can li svg { color: var(--success); }
.dark .boundary-col.can li svg { color: var(--brand-lum); }
.boundary-col.cannot li svg { color: var(--danger); }
.dark .boundary-col.cannot li svg { color: var(--danger-lum); }

/* ---------- Comparison table ---------- */
/* Comparison table — light is the default, dark is the .dark variant.
   Dense tabular data is easier to scan on light, so prefer light sections. */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r-card); border: 1px solid var(--line); }
.dark .table-scroll { border-color: var(--line-dark); }
.cmp { width: 100%; border-collapse: collapse; min-width: 760px; font-size: 14.5px; }
.cmp th, .cmp td { padding: 16px 18px; text-align: left; border-bottom: 1px solid var(--line); }
.dark .cmp th, .dark .cmp td { border-bottom-color: var(--line-dark); }
.cmp thead th {
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-soft); background: var(--paper-alt);
  position: sticky; top: 0;
}
.cmp thead th.us { color: var(--brand); background: rgba(var(--brand-rgb),.10); }
.cmp tbody td.us { background: rgba(var(--brand-rgb),.05); color: var(--text-strong); font-weight: 600; }
.cmp tbody tr:last-child td { border-bottom: 0; }
.cmp tbody th { font-weight: 500; color: var(--text-soft); }
.cmp tbody tr:hover td, .cmp tbody tr:hover th { background: var(--paper-alt); }
.cmp tbody tr:hover td.us { background: rgba(var(--brand-rgb),.09); }

.dark .cmp thead th { color: var(--text-invert-soft); background: rgba(var(--tint-rgb),.04); }
.dark .cmp thead th.us { color: var(--brand-lum); background: rgba(var(--accent-rgb),.09); }
.dark .cmp tbody td.us { background: rgba(var(--accent-rgb),.05); color: #fff; }
.dark .cmp tbody th { color: var(--text-invert-soft); }
.dark .cmp tbody tr:hover td, .dark .cmp tbody tr:hover th { background: rgba(var(--tint-rgb),.045); }
.dark .cmp tbody tr:hover td.us { background: rgba(var(--accent-rgb),.1); }

/* ---------- Pricing ---------- */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
@media (max-width: 940px) { .price-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; } }
.price-card {
  border: 1px solid var(--line-dark); border-radius: var(--r-lg);
  padding: 32px; background: var(--ink-900);
  display: flex; flex-direction: column; height: 100%;
  transition: border-color var(--t-mid), transform var(--t-mid), box-shadow var(--t-mid);
}
.price-card:hover { transform: translateY(-3px); border-color: var(--line-dark-2); }
.price-card.featured {
  border-color: rgba(var(--accent-rgb),.42);
  background: linear-gradient(180deg, rgba(var(--accent-rgb),.07), rgba(var(--accent-rgb),.012));
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
  position: relative;
}
.price-flag {
  position: absolute; top: -12px; left: 32px;
  background: var(--brand-lum); color: var(--ink-900);
  font-size: 11.5px; font-weight: 800; letter-spacing: .03em;
  padding: 5px 13px; border-radius: var(--r-pill);
}
.price-name { font-size: 19px; font-weight: 700; color: #fff; }
.price-for { font-size: 13.5px; color: var(--text-invert-soft); margin-top: 7px; min-height: 42px; }
.price-amt { font-size: 40px; font-weight: 700; color: #fff; letter-spacing: -.03em; margin: 22px 0 4px; line-height: 1; }
.price-amt small { font-size: 14px; font-weight: 500; color: var(--text-invert-soft); letter-spacing: 0; }
.price-sub { font-size: 13px; color: var(--text-invert-soft); margin-bottom: 24px; }
.price-card .btn { width: 100%; margin-bottom: 24px; }
.price-feats { display: flex; flex-direction: column; gap: 11px; }
.price-feats li { display: flex; gap: 10px; font-size: 14px; color: var(--text-invert-soft); line-height: 1.5; }
.price-feats svg { width: 17px; height: 17px; flex: none; color: var(--brand-lum); margin-top: 2px; }

/* ---------- Accordion ---------- */
.acc { border-top: 1px solid var(--line); }
.dark .acc { border-color: var(--line-dark); }
.acc-item { border-bottom: 1px solid var(--line); }
.dark .acc-item { border-color: var(--line-dark); }
.acc-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px 4px; background: none; border: 0; text-align: left;
  font-size: 17px; font-weight: 600; color: inherit;
  transition: color var(--t-fast);
}
.acc-btn:hover { color: var(--brand); }
.dark .acc-btn:hover { color: var(--brand-lum); }
.acc-btn svg { width: 19px; height: 19px; flex: none; transition: transform var(--t-mid); color: var(--text-soft); }
.dark .acc-btn svg { color: var(--text-invert-soft); }
.acc-btn[aria-expanded="true"] svg { transform: rotate(45deg); color: var(--brand); }
.dark .acc-btn[aria-expanded="true"] svg { color: var(--brand-lum); }
.acc-panel { max-height: 0; overflow: hidden; transition: max-height var(--t-slow); }
.acc-panel-inner { padding: 0 4px 24px; font-size: 15px; line-height: 1.68; color: var(--text-soft); max-width: 78ch; }
.dark .acc-panel-inner { color: var(--text-invert-soft); }

/* ---------- ROI calculator ---------- */
/* Calculator — light is the default so it can sit in a light section.
   The result panel stays dark in both contexts: the $0 figure is the payoff
   and reads strongest against ink. */
.calc {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--panel);
  box-shadow: 0 14px 44px rgba(0,0,0,.07);
  padding: 26px;
}
.dark .calc {
  border-color: var(--line-dark);
  background: linear-gradient(180deg, rgba(var(--tint-rgb),.05), rgba(var(--tint-rgb),.012));
  box-shadow: none;
}
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .calc-grid { grid-template-columns: 1fr; gap: 30px; } }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--text-strong); margin-bottom: 9px; }
.dark .field label { color: var(--text-invert); }
.field .val { float: right; font-family: var(--mono); color: var(--brand); font-weight: 600; }
.dark .field .val { color: var(--brand-lum); }
input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 5px;
  background: rgba(var(--brand-rgb),.18); border-radius: var(--r-pill); outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--brand); cursor: pointer;
  border: 3px solid var(--panel);
  box-shadow: 0 0 0 1px var(--brand);
  transition: transform var(--t-fast);
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%; background: var(--brand);
  cursor: pointer; border: 3px solid var(--panel); box-shadow: 0 0 0 1px var(--brand);
}
.dark input[type="range"] { background: rgba(var(--tint-rgb),.18); }
.dark input[type="range"]::-webkit-slider-thumb {
  background: var(--brand-lum); border-color: var(--ink-900); box-shadow: 0 0 0 1px var(--brand-lum);
}
.dark input[type="range"]::-moz-range-thumb {
  background: var(--brand-lum); border-color: var(--ink-900); box-shadow: 0 0 0 1px var(--brand-lum);
}

.calc-out { text-align: center; padding: 22px; border-radius: var(--r-card); background: var(--ink-900); border: 1px solid var(--line-dark); }
.calc-out .label { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-invert-soft); }
.calc-compare {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--line-dark); border: 1px solid var(--line-dark);
  border-radius: var(--r-card); overflow: hidden; margin-bottom: 14px;
}
/* Flex-end keeps both figures on one baseline even if a label wraps. */
.calc-compare > div {
  background: var(--ink-900); padding: 16px 12px; min-width: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.calc-compare .label { font-size: 10.5px; letter-spacing: .07em; }
.calc-compare .big { margin: 8px 0 0; }
/* Our figure is the payoff — give it the accent, leave theirs neutral. */
.calc-compare > div:first-child .big { color: var(--text-invert); }
.calc-ours { position: relative; }
.calc-ours .big { color: var(--brand-lum); }
/* Placed after the base rule so it actually wins the cascade. */
/* Below ~480px the cell is narrower than the widest figure ($122,900),
   so stack rather than clip. */
@media (max-width: 480px) { .calc-compare { grid-template-columns: 1fr; } }

.calc-out .big {
  font-size: clamp(26px, 2.6vw, 34px); font-weight: 700; color: var(--brand-lum);
  letter-spacing: -.03em; line-height: 1.05; margin: 12px 0 6px;
  font-variant-numeric: tabular-nums;
}
.calc-out .note { font-size: 13px; color: var(--text-invert-soft); line-height: 1.5; }
.calc-break { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-dark); display: flex; flex-direction: column; gap: 7px; }
.calc-break div { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--text-invert-soft); }
.calc-break div b { color: var(--text-invert); font-family: var(--mono); font-weight: 600; }

/* ---------- Forms ---------- */
.form-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 34px;
  box-shadow: 0 20px 60px rgba(0,0,0,.07);
}
.dark .form-card {
  background: linear-gradient(180deg, rgba(var(--tint-rgb),.05), rgba(var(--tint-rgb),.012));
  border-color: var(--line-dark);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.form-field { margin-bottom: 18px; }
.form-field label {
  display: block; font-size: 13px; font-weight: 600;
  margin-bottom: 7px; color: inherit;
}
.form-field .req { color: var(--danger); }
.dark .form-field .req { color: var(--danger-lum); }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 0 14px; height: 44px;
  font-family: var(--font); font-size: 15px; color: inherit;
  background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--r-control);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.dark .form-field input, .dark .form-field select, .dark .form-field textarea {
  background: rgba(var(--ink-rgb),.5); border-color: var(--line-dark-2); color: var(--text-invert);
}
.form-field textarea { height: auto; min-height: 116px; padding: 12px 14px; line-height: 1.55; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(var(--brand-rgb),.16);
}
.dark .form-field input:focus, .dark .form-field select:focus, .dark .form-field textarea:focus {
  border-color: var(--brand-lum); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.16);
}
.form-field .help { font-size: 12px; color: var(--text-soft); margin-top: 6px; }
.dark .form-field .help { color: var(--text-invert-soft); }
.form-note { font-size: 12.5px; color: var(--text-soft); margin-top: 14px; line-height: 1.55; }
.dark .form-note { color: var(--text-invert-soft); }

.form-success {
  display: none; text-align: center; padding: 30px 10px;
}
.form-success.show { display: block; }
.form-success svg { width: 52px; height: 52px; color: var(--brand-lum); margin: 0 auto 18px; }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative; overflow: hidden;
  background: var(--ink-900); color: var(--text-invert);
  border-top: 1px solid var(--line-dark);
  padding: 92px 0;
}
.cta-band::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 130% at 50% 118%, rgba(var(--accent-rgb),.19), transparent 70%);
  pointer-events: none;
}
.cta-band .wrap { position: relative; }

/* ---------- Footer ---------- */
.footer { background: var(--ink-900); color: var(--text-invert-soft); padding: 64px 0 34px; border-top: 1px solid var(--line-dark); }
.footer-grid { display: grid; grid-template-columns: 1.7fr repeat(3, 1fr); gap: 40px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 34px; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer h5 { font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--text-invert); margin-bottom: 16px; }
.footer li { margin-bottom: 10px; }
.footer a { font-size: 14.5px; transition: color var(--t-fast); }
.footer a:hover { color: var(--brand-lum); }
.footer-blurb { font-size: 14px; line-height: 1.65; margin: 16px 0 20px; max-width: 320px; }
.footer-bottom {
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line-dark);
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between;
  font-size: 13px;
}

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 620ms cubic-bezier(.16,1,.3,1), transform 620ms cubic-bezier(.16,1,.3,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  .step { opacity: 1 !important; transform: none !important; }
  .terminal-result { opacity: 1 !important; transform: none !important; }
}

/* ---------- Page header (interior pages) ---------- */
/* Interior page heads are LIGHT by default. Only the homepage hero is dark —
   one dark anchor per journey, rather than a dark band on every page. */
.pagehead {
  background: var(--paper-alt); color: var(--text-strong);
  border-bottom: 1px solid var(--line);
  padding: 78px 0 66px; position: relative; overflow: hidden; isolation: isolate;
}
.pagehead.dark {
  background: var(--ink-900); color: var(--text-invert);
  border-bottom-color: transparent;
}
.pagehead.dark::before {
  background-image:
    linear-gradient(rgba(var(--tint-rgb),.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--tint-rgb),.05) 1px, transparent 1px);
}
.pagehead::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(var(--brand-rgb),.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--brand-rgb),.07) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 90% 100% at 30% 0%, #000 20%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 90% 100% at 30% 0%, #000 20%, transparent 85%);
}
.pagehead h1 { max-width: 900px; }
.pagehead .lead { margin-top: 20px; max-width: 660px; }
.pagehead .btn-row { margin-top: 30px; }

/* ---------- Misc utilities ---------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-40 { margin-top: 40px; }
.mt-56 { margin-top: 56px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-40 { margin-bottom: 40px; }

.pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600;
  padding: 5px 12px; border-radius: var(--r-pill);
  background: rgba(var(--brand-rgb),.08); border: 1px solid rgba(var(--brand-rgb),.26);
  color: var(--brand);
}
.dark .pill {
  background: rgba(var(--accent-rgb),.1); border-color: rgba(var(--accent-rgb),.26);
  color: var(--brand-lum);
}

.quote {
  border-left: 3px solid var(--brand-lum);
  padding-left: 22px; font-size: 19px; line-height: 1.55; font-weight: 500;
  color: var(--text-invert);
}
.quote cite { display: block; margin-top: 14px; font-size: 13.5px; font-style: normal; color: var(--text-invert-soft); font-weight: 400; }

.callout {
  border: 1px solid var(--line); border-left: 3px solid var(--brand);
  border-radius: var(--r-card); padding: 22px 24px;
  background: rgba(var(--brand-rgb),.05);
  font-size: 15px; line-height: 1.62;
}
.dark .callout {
  border-color: var(--line-dark-2); border-left-color: var(--brand-lum);
  background: rgba(var(--accent-rgb),.05);
}

.kv { display: flex; flex-direction: column; gap: 0; }
.kv div { display: flex; justify-content: space-between; gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.dark .kv div { border-bottom-color: var(--line-dark); }
.kv div:last-child { border-bottom: 0; }
.kv dt { color: var(--text-soft); }
.dark .kv dt { color: var(--text-invert-soft); }
.kv dd { margin: 0; font-weight: 600; color: var(--text-strong); text-align: right; }
.dark .kv dd { color: var(--text-invert); }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list span {
  font-size: 13px; padding: 7px 13px; border-radius: var(--r-control);
  border: 1px solid var(--line); background: var(--paper-alt);
  color: var(--text-soft);
  transition: all var(--t-fast);
}
.dark .tag-list span {
  border-color: var(--line-dark); background: rgba(var(--tint-rgb),.045);
  color: var(--text-invert-soft);
}
.tag-list span:hover { border-color: var(--brand); color: var(--brand); }
.dark .tag-list span:hover { border-color: var(--brand-lum); color: var(--brand-lum); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--brand-lum); color: var(--ink-900);
  padding: 12px 20px; border-radius: 0 0 var(--r-control) 0; font-weight: 600;
}
.skip:focus { left: 0; }

/* ---------- Lead form states ---------- */
/* Honeypot: positioned off-screen rather than display:none, which some bots
   deliberately skip. Never focusable, never announced. */
.form-trap {
  position: absolute; left: -9999px; width: 1px; height: 1px;
  overflow: hidden;
}

.field-error {
  margin-top: 6px; font-size: 12.5px; font-weight: 500;
  color: var(--danger);
}
.dark .field-error { color: var(--danger-lum); }
.form-field.has-error input,
.form-field.has-error select,
.form-field.has-error textarea { border-color: var(--danger); }
.dark .form-field.has-error input,
.dark .form-field.has-error select,
.dark .form-field.has-error textarea { border-color: var(--danger-lum); }

.form-error {
  display: none;
  margin-bottom: 14px; padding: 12px 14px;
  border: 1px solid var(--danger); border-radius: var(--r-control);
  background: rgba(180, 35, 24, .06);
  font-size: 14px; color: var(--danger);
}
.form-error.show { display: block; }
.dark .form-error { color: var(--danger-lum); border-color: var(--danger-lum); }

button[type="submit"]:disabled { opacity: .65; cursor: progress; }
