/* ==========================================================================
   CarveAI — marketing site design system
   Self-contained. No build step, no JS/CSS dependencies.
   Tokens mirror the shipping product dashboard so screenshots match 1:1.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Surfaces (4 explicit elevation steps — never one flat black) */
  --bg: #0A0A0C;
  --surface: #141418;
  --surface-2: #1C1C22;
  --surface-3: #24242C;
  --border: rgba(255,255,255,.08);
  --border-strong: rgba(255,255,255,.14);

  /* Text ramp */
  --text: #F4F4F5;
  --text-dim: #A1A1AA;
  --text-mute: #71717A;

  /* Signature accent — Carve Indigo (replaces copper). --accent* is canonical; --copper* are aliases. */
  --accent: #6E7BF2;
  --accent-hover: #8A95FF;
  --accent-deep: #4F5BD0;
  --accent-ink: #0B0B14;
  --copper: var(--accent);
  --copper-hover: var(--accent-hover);
  --copper-deep: var(--accent-deep);
  /* Neutral cool slate — demoted from the old saturated indigo */
  --secondary: #94A3B8;
  --info-deep: #64748B;

  /* Legacy indigo token — repointed to neutral slate so it never rivals the accent */
  --indigo: var(--secondary);

  /* Classification (fixed governance signature — always color + icon + label) */
  --safe: #34D399;
  --internal: #FBBF24;
  --restricted: #F87171;

  /* Warm-paper light surfaces (Trust / compliance bands) */
  --paper: #FAF8F3;
  --paper-ink: #1A1815;
  --paper-dim: #5C564C;
  --paper-border: #E6E1D6;

  /* Glass */
  --glass-bg: rgba(15, 15, 20, 0.66);

  /* Typography */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Spacing (8px grid) */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px; --s11: 192px;

  /* Radii */
  --r-xs: 4px; --r-sm: 6px; --r-md: 8px; --r-lg: 14px; --r-pill: 9999px;

  /* Layout */
  --container: 1200px;
  --nav-h: 68px;

  /* Shadows / lift */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -6px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,255,255,.04);
  --shadow-lg: 0 30px 80px rgba(0,0,0,.55);
  --shadow-glow: 0 0 0 1px var(--border), inset 0 1px 0 rgba(255,255,255,.06), 0 14px 44px -12px rgba(0,0,0,.6);
  --glow-copper: 0 0 0 1px rgba(110,123,242,.35), 0 8px 40px rgba(110,123,242,.16);
  --glow-accent: var(--glow-copper);

  /* Motion — surgical, no bounce */
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-out: cubic-bezier(.22, .61, .36, 1);
  --dur: .55s;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
/* scroll-padding-top keeps anchor targets (e.g. "See how it's protected" → #security-overview)
   from landing hidden behind the sticky .nav; tracks --nav-h so it stays correct on mobile. */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 24px); -webkit-text-size-adjust: 100%; }
html:focus-within { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 16px;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; color: inherit; background: none; border: none; }
ul { list-style: none; padding: 0; }
::selection { background: rgba(110,123,242,.30); color: #fff; }

:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

/* Grain overlay — rendered once, fixed, never animated */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: .035;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Typography ---------- */
.display, h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.05; letter-spacing: -0.03em; }
.display { font-size: clamp(2.6rem, 6.2vw, 6rem); line-height: 1.02; letter-spacing: -0.04em; font-weight: 500; }
h1, .h1 { font-size: clamp(2.2rem, 4.6vw, 3.75rem); }
h2, .h2 { font-size: clamp(1.85rem, 3.4vw, 3rem); letter-spacing: -0.035em; }
h3, .h3 { font-size: clamp(1.25rem, 1.9vw, 1.6rem); letter-spacing: -0.02em; }
.h4 { font-family: var(--font-display); font-weight: 500; font-size: 1.18rem; letter-spacing: -0.02em; line-height: 1.2; }

p { color: var(--text-dim); }
.lead { font-size: clamp(1.06rem, 1.5vw, 1.3rem); color: var(--text-dim); line-height: 1.6; }
.muted { color: var(--text-mute); }
strong { color: var(--text); font-weight: 600; }
em { font-style: italic; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: .76rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--copper);
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
}
.eyebrow::before {
  content: "";
  width: 18px; height: 1px;
  background: var(--copper);
  display: inline-block;
}
.eyebrow.no-rule::before { display: none; }

.mono { font-family: var(--font-mono); }
.text-copper { color: var(--copper); }
.text-indigo { color: var(--indigo); }
.balance { text-wrap: balance; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--s5); }
.container-narrow { max-width: 820px; }
.section { padding-block: clamp(var(--s9), 11vw, var(--s11)); position: relative; }
.section-sm { padding-block: clamp(var(--s8), 8vw, var(--s9)); }
.section-head { max-width: 720px; margin-bottom: var(--s8); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head .eyebrow { margin-bottom: var(--s4); }
.section-head h2 { margin-bottom: var(--s4); }
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--border) 18%, var(--border) 82%, transparent); border: 0; }

.grid { display: grid; gap: var(--s5); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  padding: 12px 22px;
  border-radius: var(--r-sm);
  font-weight: 600; font-size: .95rem; letter-spacing: -0.01em;
  transition: transform .25s var(--ease), background .2s, border-color .2s, box-shadow .3s, color .2s;
  white-space: nowrap; will-change: transform;
}
.btn .arrow { transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--glow-accent); }
.btn-primary:hover { background: var(--copper-hover); }
.btn-primary:active { background: var(--copper-deep); transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border-strong); }
.btn-ghost:hover { border-color: var(--copper); color: var(--copper-hover); background: rgba(110,123,242,.06); }
.btn-lg { padding: 15px 28px; font-size: 1rem; }
.btn-block { width: 100%; }
.link-arrow { color: var(--copper); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.link-arrow .arrow { transition: transform .3s var(--ease); }
.link-arrow:hover .arrow { transform: translateX(4px); }

/* ---------- Top trust/announcement bar ---------- */
.topbar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: .72rem; letter-spacing: .06em;
  color: var(--text-mute);
}
.topbar .container { display: flex; align-items: center; justify-content: center; gap: var(--s5); height: 34px; flex-wrap: wrap; overflow: hidden; }
.topbar .dot { color: var(--copper); }
.topbar b { color: var(--text-dim); font-weight: 500; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: height .3s var(--ease), background .3s, border-color .3s;
}
.nav.scrolled { height: 58px; border-bottom-color: var(--border); background: rgba(10,10,12,.82); }
.nav .container { display: flex; align-items: center; justify-content: space-between; gap: var(--s5); }

.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-mark { width: 30px; height: 30px; color: var(--text); transition: transform .4s var(--ease); }
.logo:hover .logo-mark { transform: rotate(-8deg); }
.logo-word { font-weight: 600; font-size: 1.22rem; letter-spacing: -0.02em; }
.logo-ai { color: var(--copper); }

.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-link {
  position: relative; padding: 8px 14px; border-radius: var(--r-sm);
  color: var(--text-dim); font-weight: 500; font-size: .93rem;
  transition: color .2s, background .2s;
}
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link.active { color: var(--text); }
.nav-link.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px;
  background: var(--copper); border-radius: 2px;
}
.nav-cta { display: flex; align-items: center; gap: var(--s3); }
.nav-signin { color: var(--text-dim); font-weight: 500; font-size: .93rem; padding: 8px 6px; transition: color .2s; }
.nav-signin:hover { color: var(--text); }

.nav-toggle { display: none; width: 40px; height: 40px; border-radius: var(--r-sm); border: 1px solid var(--border); align-items: center; justify-content: center; }
.nav-toggle span { width: 18px; height: 2px; background: var(--text); position: relative; transition: .3s var(--ease); }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--text); transition: .3s var(--ease); }
.nav-toggle span::before { top: -6px; } .nav-toggle span::after { top: 6px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { top: 0; transform: rotate(45deg); }
.nav-open .nav-toggle span::after { top: 0; transform: rotate(-45deg); }

/* Scroll progress bar */
.scroll-progress { position: fixed; top: 0; left: 0; height: 2px; width: 0; background: linear-gradient(90deg, var(--copper-deep), var(--copper-hover)); z-index: 200; transition: width .1s linear; }

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(var(--s8), 9vw, 140px) clamp(var(--s9), 11vw, 150px); overflow: hidden; }
.hero-bg {
  position: absolute; inset: -25%;
  z-index: 0; pointer-events: none;
  background:
    radial-gradient(40% 50% at 22% 30%, rgba(110,123,242,.16), transparent 60%),
    radial-gradient(40% 50% at 80% 18%, rgba(80,160,255,.11), transparent 60%),
    radial-gradient(60% 60% at 60% 90%, rgba(110,123,242,.07), transparent 60%);
  background-size: 200% 200%;
  animation: heroWash 22s ease-in-out infinite alternate;
}
@keyframes heroWash { 0% { background-position: 0% 0%; } 100% { background-position: 100% 100%; } }
.hero .container { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(var(--s7), 5vw, var(--s9)); align-items: center; }
.hero h1 { margin: var(--s5) 0; }
.hero .lead { max-width: 30ch; margin-bottom: var(--s7); }
.hero-cta { display: flex; gap: var(--s3); flex-wrap: wrap; }
.hero-proof { display: flex; gap: var(--s5); margin-top: var(--s7); flex-wrap: wrap; }
.hero-proof span { font-family: var(--font-mono); font-size: .76rem; color: var(--text-mute); letter-spacing: .03em; }
.hero-proof b { color: var(--text-dim); font-weight: 500; }

/* ---------- Cards / surfaces ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s6);
  transition: border-color .3s var(--ease), transform .3s var(--ease), background .3s;
}
.card.hover:hover { border-color: var(--border-strong); transform: translateY(-3px); background: var(--surface-2); }
.card-glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
}

/* Classification chip — color + icon + mono label (never color alone) */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: .68rem; font-weight: 500; letter-spacing: .04em;
  padding: 3px 9px 3px 7px; border-radius: var(--r-pill);
  border: 1px solid currentColor; white-space: nowrap;
}
.chip svg { width: 11px; height: 11px; }
.chip-safe { color: var(--safe); background: rgba(52,211,153,.08); }
.chip-internal { color: var(--internal); background: rgba(251,191,36,.08); }
.chip-restricted { color: var(--restricted); background: rgba(248,113,113,.08); }

/* Block-memory card (mirrors real dashboard) */
.block-card {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: var(--s4); display: grid; gap: 10px;
}
.block-card .block-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.block-card .block-label { font-weight: 600; font-size: .95rem; }
.block-card .block-body { color: var(--text-dim); font-size: .9rem; line-height: 1.45; }
.block-card .block-meta { display: flex; gap: var(--s4); font-family: var(--font-mono); font-size: .68rem; color: var(--text-mute); }
.block-card .block-meta span b { color: var(--text-dim); font-weight: 500; }

/* Audit-log stream panel */
.audit {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  font-family: var(--font-mono); font-size: .72rem; overflow: hidden;
}
.audit-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  color: var(--text-mute); letter-spacing: .06em; font-size: .68rem;
}
.audit-head .live { display: inline-flex; align-items: center; gap: 6px; color: var(--safe); }
.audit-head .live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--safe); box-shadow: 0 0 0 0 rgba(52,211,153,.5); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.5); } 70% { box-shadow: 0 0 0 6px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
.audit-body { padding: 8px 0; max-height: 250px; overflow: hidden; }
.audit-row { display: grid; grid-template-columns: 64px 1fr auto; gap: var(--s3); padding: 5px 14px; align-items: center; color: var(--text-dim); border-left: 2px solid transparent; }
.audit-row .ts { color: var(--text-mute); }
.audit-row .ev { color: var(--text); }
.audit-row .ev.created { color: var(--indigo); }
.audit-row .ev.approved { color: var(--safe); }
.audit-row .ev.accepted { color: var(--copper); }
.audit-row .ev.declined { color: var(--restricted); }
.audit-row.new { border-left-color: var(--copper); background: rgba(110,123,242,.05); animation: rowIn .5s var(--ease); }
@keyframes rowIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.audit-cursor { display: inline-block; width: 7px; height: 13px; background: var(--copper); margin-left: 2px; vertical-align: middle; animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* HITL approval card */
.hitl {
  padding: var(--s5); display: grid; gap: var(--s4); max-width: 320px;
}
.hitl-head { display: flex; align-items: center; gap: var(--s2); font-size: .82rem; color: var(--text-dim); }
.hitl-head .badge { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; color: var(--internal); border: 1px solid var(--internal); border-radius: var(--r-pill); padding: 2px 8px; }
.hitl-body { font-size: .92rem; color: var(--text); line-height: 1.45; }
.hitl-meta { font-family: var(--font-mono); font-size: .68rem; color: var(--text-mute); display: grid; gap: 3px; }
.hitl-actions { display: flex; gap: var(--s2); }
.hitl-actions .btn { flex: 1; padding: 9px; font-size: .85rem; }
.btn-approve { background: var(--safe); color: #04231a; }
.btn-decline { background: transparent; border: 1px solid var(--border-strong); color: var(--text-dim); }
/* HITL interactive resolve (approve / decline → outcome + audit receipt) */
.hitl-actions .btn { transition: transform 160ms var(--ease); user-select: none; }
.hitl-actions .btn:active { transform: scale(.97); }
.hitl-outcome { display: grid; gap: 7px; animation: hitl-resolve 220ms var(--ease) both; }
.hitl-status { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 600; }
.hitl-status.ok { color: var(--safe); }
.hitl-status.no { color: var(--restricted); }
.hitl-msg { margin: 0; font-size: .86rem; line-height: 1.45; color: var(--text-dim); }
.hitl-receipt { margin: 0; display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: .66rem; letter-spacing: .04em; color: var(--text-mute); }
.hitl-receipt .dot { color: var(--safe); font-size: .7em; }
.hitl-replay { align-self: start; margin-top: 2px; padding: 0; background: none; border: 0; cursor: pointer; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .04em; color: var(--text-mute); transition: color 160ms ease; }
.hitl-replay:hover { color: var(--text-dim); }
@keyframes hitl-resolve { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hitl-outcome { animation: none; } .hitl-actions .btn:active { transform: none; } }

/* ---------- Bento grid ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: minmax(170px, auto); gap: var(--s4); }
/* Desktop: force two equal-height rows so the four tiles read as a balanced square. */
@media (min-width: 1025px) { .bento { grid-template-rows: repeat(2, 1fr); } }
.bento .tile {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--s6); display: flex; flex-direction: column; justify-content: flex-end; gap: var(--s2);
  transition: border-color .35s var(--ease), background .35s, transform .35s var(--ease);
}
.bento .tile:hover { border-color: var(--border-strong); background: var(--surface-2); transform: translateY(-3px); }
.bento .tile::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, rgba(110,123,242,.5), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .35s;
}
.bento .tile:hover::before { opacity: 1; }
.tile .tile-icon { color: var(--copper); margin-bottom: auto; }
.tile h3 { font-size: 1.15rem; }
.tile p { font-size: .9rem; }
.span-3 { grid-column: span 3; } .span-2 { grid-column: span 2; } .span-4 { grid-column: span 4; }
.row-2 { grid-row: span 2; }

/* ---------- Specialist / icon cards ---------- */
.spec-card { display: flex; gap: var(--s4); align-items: flex-start; }
.spec-icon { flex: none; width: 42px; height: 42px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; color: var(--copper); }
.spec-card h4 { margin-bottom: 3px; }
.spec-card p { font-size: .88rem; }

/* Feature block: Pain → Benefit → Proof */
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(var(--s7), 6vw, var(--s9)); align-items: center; }
.feature-row.flip .feature-visual { order: -1; }
.feature-pain { font-family: var(--font-mono); font-size: .82rem; color: var(--restricted); margin-top: var(--s3); margin-bottom: var(--s4); display: flex; width: fit-content; gap: 8px; align-items: center; letter-spacing: .01em; }
.feature-pain::before { content: "✕"; flex: none; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; font-family: var(--font-body); font-size: .6rem; line-height: 1; color: var(--restricted); background: rgba(248,113,113,.14); }

/* ---------- Company Brain ---------- */
.brain-map-card { padding: var(--s4); display: grid; gap: var(--s3); }
.brain-map-head { display: flex; align-items: center; justify-content: space-between; font-family: var(--font-mono); font-size: .64rem; letter-spacing: .07em; text-transform: uppercase; color: var(--text-mute); }
.brain-map-head .live { display: inline-flex; align-items: center; gap: 6px; color: var(--safe); }
.brain-map-head .live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--safe); box-shadow: 0 0 0 0 rgba(52,211,153,.5); animation: pulse 2s infinite; }
.brain-map { position: relative; width: 100%; aspect-ratio: 16 / 11; border-radius: var(--r-md); overflow: hidden; background: radial-gradient(120% 120% at 50% 0%, rgba(110,123,242,.07), transparent 70%), var(--bg); border: 1px solid var(--border); }
.brain-map-canvas { position: absolute; inset: 0; display: block; }
.brain-region { position: absolute; transform: translate(-50%,-50%); font-family: var(--font-mono); font-size: .62rem; letter-spacing: .03em; color: var(--text-dim); background: rgba(10,10,12,.6); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 3px 9px; white-space: nowrap; pointer-events: none; }
.brain-map-cap { font-size: .82rem; line-height: 1.5; color: var(--text-dim); margin: 0; }

.brain-steps { list-style: none; display: grid; gap: var(--s5); margin: 0; padding: 0; }
.brain-steps li { display: grid; grid-template-columns: auto 1fr; gap: var(--s4); align-items: start; }
.brain-steps .bs-num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-mono); font-size: .82rem; font-weight: 600; color: var(--accent); background: rgba(110,123,242,.12); border: 1px solid rgba(110,123,242,.3); }
.brain-steps h4 { margin: 0 0 3px; font-size: 1rem; }
.brain-steps p { margin: 0; color: var(--text-dim); font-size: .92rem; line-height: 1.5; }

.brain-review { max-width: 560px; margin-inline: auto; }
.brain-review .hitl-head { flex-wrap: wrap; }
.brain-screen-ok { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; color: var(--safe); font-family: var(--font-mono); font-size: .6rem; letter-spacing: .04em; text-transform: uppercase; }
.brain-meta-row { font-size: .82rem; color: var(--text-dim); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: var(--s3); }
.brain-diff { display: grid; gap: 6px; font-family: var(--font-mono); font-size: .8rem; }
.diff-line { display: flex; gap: 9px; align-items: baseline; padding: 7px 11px; line-height: 1.45; border-radius: var(--r-xs); }
.diff-line .diff-mark { font-weight: 700; flex: none; }
.diff-line.add { color: #C9F2DC; background: rgba(52,211,153,.10); }
.diff-line.add .diff-mark { color: var(--safe); }
.diff-line.del { color: var(--text-dim); background: rgba(248,113,113,.06); }
.diff-line.del .diff-text { text-decoration: line-through; text-decoration-color: rgba(248,113,113,.45); }
.diff-line.del .diff-mark { color: var(--restricted); }
.diff-note { font-family: var(--font-body); font-style: normal; color: var(--text-dim); font-size: .92em; margin-left: 6px; }
.brain-review .hitl-actions { flex-wrap: wrap; }
.brain-review .hitl-actions .btn { flex: 1 1 auto; min-width: 110px; }
.brain-review-label { text-align: center; font-family: var(--font-mono); font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-mute); margin-bottom: var(--s3); }
/* top-align the map visual with the steps list so their tops line up */
#company-brain .feature-row { align-items: flex-start; }

/* Carve Protect pillar */
.pillar { display: grid; gap: var(--s4); }
.pillar .pillar-icon { width: 44px; height: 44px; border-radius: var(--r-md); display: grid; place-items: center; color: var(--copper); background: rgba(110,123,242,.1); border: 1px solid rgba(110,123,242,.25); }
.pillar ul { display: grid; gap: 10px; margin-top: var(--s2); }
.pillar li { display: flex; gap: 10px; font-size: .9rem; color: var(--text-dim); align-items: flex-start; }
.pillar li::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 2px; border-radius: 50%; background: rgba(52,211,153,.14); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12' fill='none' stroke='%2334D399' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 6l3 3 5-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; }

/* ---------- Stats ---------- */
.stat { text-align: center; }
.stat .num { font-family: var(--font-display); font-weight: 500; font-size: clamp(2.4rem, 4vw, 3.4rem); color: var(--copper); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.stat .label { color: var(--text-dim); font-size: .92rem; margin-top: var(--s3); }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: var(--s8); width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee .item { font-family: var(--font-display); font-size: 1.25rem; color: var(--text-mute); white-space: nowrap; opacity: .8; }

/* ---------- Testimonial ---------- */
.quote { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.4rem, 2.4vw, 2.05rem); line-height: 1.35; letter-spacing: -0.02em; color: var(--text); }
.quote-cite { display: flex; align-items: center; gap: var(--s3); margin-top: var(--s5); }
.quote-cite .avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; color: var(--copper); font-family: var(--font-mono); font-size: .8rem; }
.quote-cite .who { font-size: .9rem; } .quote-cite .who b { display: block; color: var(--text); } .quote-cite .who span { color: var(--text-mute); }

/* ---------- Pricing ---------- */
.price-card { display: flex; flex-direction: column; gap: var(--s4); height: 100%; }
.price-card.featured { border-color: var(--copper); box-shadow: var(--glow-copper); position: relative; }
.price-card.featured::after { content: "Most chosen"; position: absolute; top: -11px; left: var(--s6); font-family: var(--font-mono); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; background: var(--accent); color: var(--accent-ink); padding: 3px 10px; border-radius: var(--r-pill); }
.price-card .tier { font-family: var(--font-mono); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--copper); }
.price-card .price { font-family: var(--font-display); font-size: 2.2rem; font-weight: 500; }
.price-card .price small { font-family: var(--font-body); font-size: .9rem; color: var(--text-mute); font-weight: 400; }
.price-card .feat { display: grid; gap: 10px; margin-top: var(--s2); }
.price-card .feat li { display: flex; gap: 10px; font-size: .9rem; color: var(--text-dim); }
.price-card .feat li::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 2px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 12 12' fill='none' stroke='%236E7BF2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 6l3 3 5-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; }

/* Comparison table */
.cmp { width: 100%; border-collapse: collapse; font-size: .9rem; }
.cmp th, .cmp td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.cmp thead th { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text-mute); }
.cmp td.c { text-align: center; }
.cmp .yes { color: var(--safe); } .cmp .no { color: var(--text-mute); }
.cmp tbody tr:hover { background: var(--surface); }

/* ---------- Industry / role cards ---------- */
.icard { position: relative; overflow: hidden; }
.icard .kicker { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text-mute); margin-bottom: var(--s3); }

/* ---------- Scroll narrative (sticky steps) ---------- */
.narrative { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s8); align-items: start; }
.narrative-steps { display: grid; gap: var(--s5); }
.nstep { padding: var(--s5); border-left: 2px solid var(--border); opacity: .4; transition: opacity .4s var(--ease), border-color .4s; }
.nstep.active { opacity: 1; border-left-color: var(--copper); }
.nstep .num { font-family: var(--font-mono); font-size: .72rem; color: var(--copper); letter-spacing: .08em; }
.nstep h3 { font-size: 1.3rem; margin: var(--s2) 0; }
.narrative-visual { position: sticky; top: 120px; }
.narrative-panel { display: none; }
.narrative-panel.active { display: block; animation: fadeUp .5s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- Architecture / diagram ---------- */
.diagram path, .diagram line, .diagram rect, .diagram circle { vector-effect: non-scaling-stroke; }
.draw { stroke-dasharray: var(--len, 1000); stroke-dashoffset: var(--len, 1000); }
.draw.is-visible { animation: draw 1.4s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Light / paper bands ---------- */
.band-paper { background: var(--paper); color: var(--paper-ink); }
.band-paper h1, .band-paper h2, .band-paper h3, .band-paper .h4 { color: var(--paper-ink); }
.band-paper p, .band-paper .lead { color: var(--paper-dim); }
.band-paper .eyebrow { color: var(--copper-deep); }
.band-paper .eyebrow::before { background: var(--copper-deep); }
.band-paper .card { background: #fff; border-color: var(--paper-border); box-shadow: 0 4px 24px rgba(26,24,21,.06); }
.band-paper .cert { background: #fff; border: 1px solid var(--paper-border); border-radius: var(--r-md); padding: var(--s5); display: flex; flex-direction: column; gap: var(--s2); align-items: center; text-align: center; }
.band-paper .cert .badge-ico { width: 38px; height: 38px; color: var(--copper-deep); }
.band-paper .cert b { color: var(--paper-ink); font-size: .95rem; }
.band-paper .cert span { color: var(--paper-dim); font-size: .78rem; font-family: var(--font-mono); }
.band-paper .muted { color: var(--paper-dim); }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--surface); padding: clamp(var(--s8), 7vw, var(--s10)); text-align: center; }
.cta-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 120% at 50% 0%, rgba(110,123,242,.16), transparent 60%); pointer-events: none; }
.cta-band > * { position: relative; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding-block: var(--s9) var(--s7); margin-top: var(--s8); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: var(--s6); margin-bottom: var(--s8); }
.footer h5 { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-mute); margin-bottom: var(--s4); font-weight: 500; }
.footer-links { display: grid; gap: 10px; }
.footer-links a { color: var(--text-dim); font-size: .9rem; transition: color .2s; }
.footer-links a:hover { color: var(--copper); }
.footer-brand p { font-size: .9rem; max-width: 30ch; margin: var(--s4) 0; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding-top: var(--s6); border-top: 1px solid var(--border); font-size: .82rem; color: var(--text-mute); flex-wrap: wrap; }
.status-dot { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: .76rem; }
.status-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--safe); box-shadow: 0 0 8px var(--safe); }

/* ---------- Custom cursor (pointer:fine only) ---------- */
.cursor-ring { position: fixed; top: 0; left: 0; width: 26px; height: 26px; border: 1.5px solid var(--copper); border-radius: 50%; pointer-events: none; z-index: 9998; transform: translate(-50%, -50%); transition: width .25s var(--ease), height .25s var(--ease), background .25s, opacity .3s; opacity: 0; mix-blend-mode: difference; }
.cursor-ring.active { opacity: 1; }
.cursor-ring.hover { width: 46px; height: 46px; background: rgba(110,123,242,.12); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i, 0) * 75ms); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-scale { opacity: 0; transform: scale(.96); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i, 0) * 75ms); }
.reveal-scale.is-visible { opacity: 1; transform: none; }

/* ---------- Utilities ---------- */
.mt-2 { margin-top: var(--s2); } .mt-4 { margin-top: var(--s4); } .mt-5 { margin-top: var(--s5); } .mt-6 { margin-top: var(--s6); } .mt-8 { margin-top: var(--s8); }
.mb-4 { margin-bottom: var(--s4); } .mb-6 { margin-bottom: var(--s6); } .mb-8 { margin-bottom: var(--s8); }
.center { text-align: center; } .center-x { margin-inline: auto; }
.full { width: 100%; } .nowrap { white-space: nowrap; }
.hide-mobile { } .show-mobile { display: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--s8); }
  .hero-visual { max-width: 520px; }
  .feature-row, .narrative { grid-template-columns: 1fr; gap: var(--s6); }
  .feature-row.flip .feature-visual { order: 0; }
  .narrative-visual { position: static; }
  .cols-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .span-3, .span-4, .span-2 { grid-column: span 2; }
}
@media (max-width: 720px) {
  :root { --nav-h: 60px; }
  .nav-links { display: none; }
  .nav.nav-open .nav-links {
    display: flex; flex-direction: column; align-items: stretch; gap: 4px;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border); padding: var(--s4);
  }
  .nav-toggle { display: inline-flex; }
  .nav-signin { display: none; }
  .cols-2, .cols-3, .cols-4, .bento { grid-template-columns: 1fr; }
  .span-3, .span-4, .span-2 { grid-column: span 1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .hide-mobile { display: none !important; }
  .show-mobile { display: revert !important; }
  .hero-proof { gap: var(--s4); }
  .topbar .container { gap: var(--s3); font-size: .64rem; }
}

/* ==========================================================================
   v2 premium upgrades — depth, spotlight, glow border, gradient text, hero canvas
   ========================================================================== */

/* Lighter display weight + crafted OpenType (authority through restraint) */
.display { font-weight: 400; }
body { font-feature-settings: "cv05", "ss01", "calt", "liga", "kern"; }

/* Cooler, recessed audit/code panels (append-only "terminal" aesthetic) */
.audit { background: #08080C; }

/* Primary button hover lift */
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:active { transform: translateY(1px); }

/* Light-catching elevation on hover */
.card.hover:hover, .bento .tile:hover { box-shadow: var(--shadow-glow); }
.card-glass { box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,.06); }

/* Cursor spotlight on cards (JS sets --mx/--my; fine pointers only) */
.card.hover { position: relative; isolation: isolate; }
.card.hover:not(.glow-border)::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(110,123,242,.15), transparent 60%);
  opacity: 0; transition: opacity .4s var(--ease);
}
.card.hover:not(.glow-border):hover::before { opacity: 1; }

/* Animated conic glow border — featured price card + HITL card only */
@property --gb-angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.glow-border { position: relative; }
.glow-border::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--gb-angle), var(--accent), transparent 18%, transparent 82%, var(--accent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: gbSpin 7s linear infinite;
}
@keyframes gbSpin { to { --gb-angle: 360deg; } }
@supports not (background: conic-gradient(from 0deg, red)) {
  .glow-border::before { background: var(--accent); }
}

/* Gradient text — one headline word only (restraint = trust) */
.grad-text {
  background: linear-gradient(110deg, #8A95FF, #6E7BF2 45%, #50A0FF);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: gradShimmer 9s linear infinite;
}
@keyframes gradShimmer { to { background-position: -220% 0; } }

/* Hero constellation canvas (between the color wash and content) */
.hero-canvas { position: absolute; inset: 0; z-index: 0; pointer-events: none; display: block; }

/* ---------- "Book a demo" modal (reliable replacement for a bare mailto:) ----------
   A raw mailto: silently no-ops for visitors without a registered mail handler.
   The demo CTA opens this dialog instead, which always offers a working path. */
.demo-modal-overlay {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  padding: var(--s5);
  background: rgba(6, 6, 10, .66);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .25s var(--ease);
}
.demo-modal-overlay.open { opacity: 1; }
.demo-modal-overlay[hidden] { display: none; }
.demo-modal {
  position: relative;
  width: min(440px, 100%);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: clamp(var(--s6), 4vw, var(--s7));
  transform: translateY(10px) scale(.98);
  transition: transform .28s var(--ease);
}
.demo-modal-overlay.open .demo-modal { transform: none; }
.demo-modal h3 { font-size: 1.5rem; margin: var(--s2) 0 var(--s3); letter-spacing: -0.02em; }
.demo-modal-sub { color: var(--text-dim); font-size: .95rem; margin-bottom: var(--s5); }
.demo-modal-close {
  position: absolute; top: var(--s4); right: var(--s4);
  width: 34px; height: 34px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: var(--text-dim);
  background: transparent; border: 1px solid var(--border); border-radius: var(--r-sm);
  transition: color .2s, border-color .2s, background .2s;
}
.demo-modal-close:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-2); }
.demo-email-row { display: flex; align-items: stretch; gap: var(--s2); margin-bottom: var(--s4); }
.demo-email {
  flex: 1; min-width: 0;
  display: flex; align-items: center;
  padding: 10px var(--s4);
  font-family: var(--font-mono); font-size: .9rem; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.demo-copy { flex: 0 0 auto; }
.demo-modal-actions { display: flex; flex-direction: column; gap: var(--s2); }
.demo-modal-actions .btn { width: 100%; }
@media (prefers-reduced-motion: reduce) {
  .demo-modal-overlay, .demo-modal { transition: none; }
  .demo-modal { transform: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal, .reveal-scale { opacity: 1 !important; transform: none !important; }
  .hero-bg { animation: none; }
  .audit-cursor { animation: none; }
  .cursor-ring { display: none; }
  .glow-border::before, .grad-text { animation: none; }
}
