/* =========================================================
   VitalFusionAI — Shared Design System
   Frontier AI for Finance & Industry
   ---------------------------------------------------------
   Two aesthetics, one brand:
   - Financial (Hebbia-grade): dark, minimal, editorial, precise
   - Manufacturing (Cognite-grade): clean, blueprint grids, signal-blue
   ========================================================= */

:root {
  /* Core ink palette */
  --ink:        #080B12;
  --ink-1:      #0B0F18;
  --ink-2:      #111726;
  --ink-3:      #18203214;
  --panel:      #0E1320;
  --panel-2:    #131A2A;
  --line:       rgba(255,255,255,0.08);
  --line-soft:  rgba(255,255,255,0.05);

  /* Text */
  --text:       #EAF0F8;
  --text-dim:   #B6C2D4;
  --muted:      #7E8DA5;
  --faint:      #56627A;

  /* Fusion accents */
  --accent:     #4F7CFF;   /* electric blue  */
  --accent-2:   #2BD4C4;   /* teal           */
  --accent-3:   #8A6CFF;   /* violet         */
  --signal:     #5B8CFF;
  --grad-fusion: linear-gradient(120deg, #4F7CFF 0%, #2BD4C4 100%);
  --grad-soft:   linear-gradient(120deg, rgba(79,124,255,0.16), rgba(43,212,196,0.12));

  /* Light surfaces (manufacturing) */
  --paper:      #F4F7FB;
  --paper-2:    #FFFFFF;
  --paper-line: #E2E9F2;
  --ink-on-paper: #0C1322;
  --muted-on-paper: #5A6B85;

  /* Type */
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --body:    "Inter", system-ui, -apple-system, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  /* Geometry */
  --radius:   14px;
  --radius-lg: 22px;
  --maxw:     1200px;
  --gut:      clamp(20px, 5vw, 48px);
  --ease:     cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  background: var(--ink);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  letter-spacing: 0.1px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

h1,h2,h3,h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); }
p  { margin: 0 0 1em; color: var(--text-dim); }

.container { width: min(100% - var(--gut)*2, var(--maxw)); margin-inline: auto; }
.wide      { width: min(100% - var(--gut)*2, 1360px); margin-inline: auto; }

/* ---------- Utility ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent-2);
  display: inline-flex;
  align-items: center;
  gap: .6em;
  margin: 0 0 1.2em;
}
.eyebrow::before {
  content: ""; width: 26px; height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.gradient-text {
  background: var(--grad-fusion);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.lede { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--text-dim); max-width: 60ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--body); font-weight: 600; font-size: .95rem;
  padding: .85em 1.5em; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, border-color .25s;
}
.btn-primary { background: var(--grad-fusion); color: #04121A; box-shadow: 0 8px 30px -8px rgba(79,124,255,.5); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -10px rgba(43,212,196,.55); }
.btn-ghost { border-color: var(--line); color: var(--text); background: rgba(255,255,255,.02); }
.btn-ghost:hover { border-color: var(--accent); color: #fff; transform: translateY(-2px); }
.btn .ar { transition: transform .25s var(--ease); }
.btn:hover .ar { transform: translateX(3px); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(8,11,18,.72);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: flex; align-items: center; gap: .65em; font-family: var(--display); font-weight: 600; font-size: 1.18rem; letter-spacing: -.01em; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--grad-fusion);
  display: grid; place-items: center;
  box-shadow: 0 4px 16px -4px rgba(79,124,255,.6);
  flex: none;
}
.brand .mark svg { width: 18px; height: 18px; }
.brand b { font-weight: 600; }
.brand .ai { color: var(--accent-2); }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a { font-size: .92rem; color: var(--text-dim); transition: color .2s; }
.nav-links a:hover { color: #fff; }
.nav-cta { font-size: .9rem; padding: .6em 1.2em; }
.nav-burger { display: none; background: none; border: 0; color: #fff; cursor: pointer; }

/* ---------- Section scaffolding ---------- */
section { position: relative; }
.sec { padding: clamp(72px, 11vw, 140px) 0; }
.sec-head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 72px); }
.sec-head.center { margin-inline: auto; text-align: center; }
.sec-head.center .eyebrow { justify-content: center; }

/* ---------- Hero (shared) ---------- */
.hero { position: relative; padding: clamp(90px,14vw,170px) 0 clamp(60px,9vw,110px); overflow: hidden; }
.hero-grid-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}
.hero-glow {
  position: absolute; z-index: 0; filter: blur(90px); opacity: .5; pointer-events: none;
  width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle, rgba(79,124,255,.5), transparent 60%);
  top: -240px; left: 50%; transform: translateX(-50%);
}
.hero-glow.two { background: radial-gradient(circle, rgba(43,212,196,.35), transparent 60%); top: 120px; left: 78%; width: 460px; height: 460px; }
.hero .container { position: relative; z-index: 2; }
.hero h1 { max-width: 16ch; }
.hero .lede { margin: 1.4rem 0 2.2rem; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

.pill {
  display: inline-flex; align-items: center; gap: .6em;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-dim);
  padding: .5em 1em; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255,255,255,.02); margin-bottom: 1.8rem;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 10px var(--accent-2); }

/* ---------- Stat strip ---------- */
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--ink-1); padding: 1.6rem 1.4rem; }
.stat .n { font-family: var(--display); font-size: clamp(1.8rem,3vw,2.6rem); font-weight: 600; letter-spacing: -.02em; }
.stat .n .gradient-text { display: inline; }
.stat .l { font-size: .85rem; color: var(--muted); margin-top: .3rem; }

/* ---------- Vertical split cards (home) ---------- */
.verticals { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.vcard {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(28px,3.5vw,44px); min-height: 440px;
  display: flex; flex-direction: column;
  transition: transform .4s var(--ease), border-color .4s;
}
.vcard:hover { transform: translateY(-5px); border-color: rgba(255,255,255,.18); }
.vcard .tag { font-family: var(--mono); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 1.2rem; }
.vcard h3 { font-size: clamp(1.5rem,2.4vw,2rem); margin-bottom: .6rem; }
.vcard p { color: var(--text-dim); }
.vcard ul { list-style: none; padding: 0; margin: 1.2rem 0 0; }
.vcard li { font-size: .92rem; color: var(--muted); padding: .5em 0; border-top: 1px solid var(--line-soft); display: flex; gap: .7em; align-items: center; }
.vcard li::before { content: "→"; color: var(--accent); }
.vcard .v-foot { margin-top: auto; padding-top: 1.6rem; }
.vcard.fin  { background: radial-gradient(120% 100% at 0% 0%, rgba(79,124,255,.12), transparent 55%), var(--panel); }
.vcard.mfg  { background: radial-gradient(120% 100% at 100% 0%, rgba(43,212,196,.12), transparent 55%), var(--panel); }
.vcard .v-art { position: absolute; right: -40px; bottom: -40px; width: 240px; opacity: .14; }

/* ---------- Feature / service grid ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.25rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 1.25rem; }
.card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); padding: 1.8rem;
  transition: transform .35s var(--ease), border-color .35s, background .35s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,.16); background: var(--panel-2); }
.card .ico {
  width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center;
  background: var(--grad-soft); border: 1px solid var(--line); margin-bottom: 1.1rem; color: var(--accent-2);
}
.card .ico svg { width: 22px; height: 22px; }
.card h3 { font-size: 1.18rem; margin-bottom: .4rem; }
.card p { font-size: .94rem; margin: 0; color: var(--muted); }

/* ---------- Capability list rows ---------- */
.rows { border-top: 1px solid var(--line); }
.row {
  display: grid; grid-template-columns: 56px 1fr 1.4fr; gap: 1.5rem; align-items: start;
  padding: 1.8rem 0; border-bottom: 1px solid var(--line);
}
.row .num { font-family: var(--mono); color: var(--faint); font-size: .9rem; padding-top: .2rem; }
.row h3 { margin: 0; font-size: 1.3rem; }
.row p { margin: 0; color: var(--muted); font-size: .98rem; }

/* ---------- Pipeline / stack diagram ---------- */
.stack { display: grid; gap: .8rem; }
.layer {
  display: flex; align-items: center; gap: 1rem;
  border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.3rem;
  background: linear-gradient(90deg, var(--panel), transparent);
  font-size: .95rem;
}
.layer .lk { font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); width: 120px; flex: none; }
.layer .lv { color: var(--text-dim); }
.layer.alt .lk { color: var(--accent-3); }

/* ---------- Quote / proof ---------- */
.proof { border-left: 2px solid var(--accent); padding-left: 1.6rem; max-width: 60ch; }
.proof .q { font-family: var(--display); font-size: clamp(1.4rem,2.6vw,2rem); font-weight: 500; line-height: 1.25; color: var(--text); letter-spacing: -.01em; }
.proof .by { margin-top: 1rem; color: var(--muted); font-size: .92rem; }

/* ---------- Logos (anonymized) ---------- */
.logos { display: flex; flex-wrap: wrap; gap: 1.4rem; align-items: center; justify-content: center; }
.logo-chip {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .1em;
  color: var(--muted); padding: .7em 1.3em; border: 1px dashed var(--line);
  border-radius: 999px; background: rgba(255,255,255,.015);
}

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; border-radius: var(--radius-lg); border: 1px solid var(--line); padding: clamp(40px,6vw,72px); text-align: center; background: radial-gradient(120% 140% at 50% 0%, rgba(79,124,255,.18), transparent 60%), var(--panel); }
.cta-band h2 { max-width: 18ch; margin-inline: auto; }
.cta-band .hero-cta { justify-content: center; margin-top: 1.6rem; }

/* ---------- Founder ---------- */
.founder { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px,5vw,64px); align-items: center; }
.founder-card { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 2rem; background: var(--panel); }
.founder-card .avatar { width: 64px; height: 64px; border-radius: 16px; background: var(--grad-fusion); display: grid; place-items: center; font-family: var(--display); font-weight: 600; font-size: 1.4rem; color: #04121A; margin-bottom: 1.2rem; }
.founder-card .name { font-family: var(--display); font-size: 1.3rem; }
.founder-card .role { color: var(--accent-2); font-size: .9rem; font-family: var(--mono); letter-spacing: .08em; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.2rem; }
.chip { font-family: var(--mono); font-size: .72rem; color: var(--text-dim); padding: .4em .8em; border: 1px solid var(--line); border-radius: 8px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: clamp(48px,7vw,80px) 0 40px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
.footer h4 { font-family: var(--mono); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.footer a { display: block; color: var(--text-dim); font-size: .92rem; padding: .3em 0; transition: color .2s; }
.footer a:hover { color: #fff; }
.footer .blurb { color: var(--muted); font-size: .92rem; max-width: 34ch; }
.footer-bot { display: flex; justify-content: space-between; align-items: center; margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid var(--line-soft); color: var(--faint); font-size: .85rem; flex-wrap: wrap; gap: 1rem; }

/* ---------- Light section (Cognite mode) ---------- */
.light { background: var(--paper); color: var(--ink-on-paper); }
.light h1,.light h2,.light h3,.light h4 { color: var(--ink-on-paper); }
.light p { color: var(--muted-on-paper); }
.light .eyebrow { color: var(--accent); }
.light .card { background: var(--paper-2); border-color: var(--paper-line); box-shadow: 0 1px 2px rgba(12,19,34,.04); }
.light .card:hover { box-shadow: 0 18px 40px -20px rgba(12,19,34,.25); border-color: #cfdcec; }
.light .card p { color: var(--muted-on-paper); }
.light .card .ico { background: linear-gradient(120deg, rgba(79,124,255,.12), rgba(43,212,196,.12)); border-color: var(--paper-line); color: var(--accent); }
.light .row { border-color: var(--paper-line); }
.light .rows { border-color: var(--paper-line); }
.light .row p { color: var(--muted-on-paper); }
.light .layer { background: linear-gradient(90deg, #fff, transparent); border-color: var(--paper-line); color: var(--ink-on-paper); }
.light .layer .lv { color: var(--muted-on-paper); }
.light .stat { background: var(--paper-2); }
.light .stats { border-color: var(--paper-line); background: var(--paper-line); }
.light .stat .l { color: var(--muted-on-paper); }
.light .logo-chip { color: var(--muted-on-paper); border-color: var(--paper-line); }
.light .blueprint-bg {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(79,124,255,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,124,255,.07) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 70% 80% at 80% 20%, #000, transparent 70%);
}

/* ---------- Page hero variants ---------- */
.phero { padding: clamp(70px,11vw,140px) 0 clamp(40px,6vw,70px); position: relative; overflow: hidden; }
.phero .lede { margin-top: 1.2rem; }
.breadcrumb { font-family: var(--mono); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-bottom: 1.4rem; }
.breadcrumb a { color: var(--muted); }

/* ---------- Console mock (financial) ---------- */
.console {
  border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
  background: var(--ink-1); box-shadow: 0 40px 90px -40px rgba(0,0,0,.8);
}
.console-bar { display: flex; align-items: center; gap: .5rem; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); background: var(--panel); }
.console-bar .dots { display: flex; gap: .4rem; }
.console-bar .dots i { width: 11px; height: 11px; border-radius: 50%; background: #2a3242; display: block; }
.console-bar .title { font-family: var(--mono); font-size: .78rem; color: var(--muted); margin-left: .6rem; }
.console-body { padding: 1.4rem; display: grid; gap: 1rem; }
.msg { display: flex; gap: .8rem; align-items: flex-start; }
.msg .who { font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; width: 64px; flex: none; padding-top: .25rem; }
.msg.user .who { color: var(--muted); }
.msg.ai .who { color: var(--accent-2); }
.msg .bub { border: 1px solid var(--line); border-radius: 12px; padding: .85rem 1.05rem; font-size: .92rem; color: var(--text-dim); background: var(--panel); flex: 1; }
.msg.ai .bub { background: linear-gradient(120deg, rgba(79,124,255,.08), rgba(43,212,196,.05)); }
.msg .bub code { font-family: var(--mono); font-size: .82rem; color: var(--accent-2); background: rgba(43,212,196,.08); padding: .1em .4em; border-radius: 5px; }
.cite { font-family: var(--mono); font-size: .72rem; color: var(--faint); margin-top: .5rem; display: flex; gap: .5rem; flex-wrap: wrap; }
.cite span { border: 1px solid var(--line); border-radius: 6px; padding: .15em .55em; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .nav-links { display: none; }
  .nav-burger { display: inline-flex; }
  .verticals { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .founder { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .row { grid-template-columns: 1fr; gap: .5rem; }
  .row .num { display: none; }
  .console-body { padding: 1rem; }
  .msg .who { width: 48px; font-size: .62rem; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .stats { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .hero-cta .btn { width: 100%; justify-content: center; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
