/* ═══════════════════════════════════════════════════════════
   TruStackAPI · app.css
   Design system · base · nav · hero · footer
   Palette + type straight from the brand kit + founder brief.
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  /* ── navy family (dark canvases) ── */
  --navy-900: #04050F;
  --navy-850: #070C1E;
  --navy-800: #0A1228;
  --navy-700: #0F1624;
  --navy-panel: #121C33;
  --navy-panel-2: #0E1730;
  --on-navy:   rgba(255,255,255,0.84);
  --white-soft: #C7CCDB;   /* softened cool grey — no glare on dark surfaces */
  --on-navy-2: rgba(255,255,255,0.54);
  --on-navy-3: rgba(255,255,255,0.34);
  --navy-line:  rgba(255,255,255,0.09);
  --navy-line-2: rgba(255,255,255,0.16);

  /* ── cream family (light canvases) ── */
  --cream:   #FAF7F2;
  --cream-2: #F3EEE4;
  --cream-3: #EBE4D6;
  --ink:    #0F0D0B;
  --ink-2:  #2C2820;
  --ink-3:  #6E665B;
  --rule:   #E2DBCE;
  --rule-2: #D3CABA;

  /* ── brand gradient family ── */
  --indigo:   #4F46E5;
  --indigo-d: #3730C8;
  --indigo-dd:#2E2BB0;
  --blue:     #3B82F6;
  --sky:      #1CA8FF;
  --sky-2:    #60C8FF;
  --violet:   #818CF8;
  --gold:     #B8860B;
  --green:    #1F8A5B;
  --amber:    #C77F12;
  --red:      #C53030;

  --grad-brand: linear-gradient(90deg,#3730C8 0%,#4F46E5 28%,#3B82F6 64%,#1CA8FF 100%);
  --grad-brand-135: linear-gradient(135deg,#3730C8 0%,#4F46E5 40%,#3B82F6 72%,#1CA8FF 100%);
  --grad-soft: linear-gradient(135deg,#0D1B4B 0%,#2D1B8F 45%,#4F46E5 78%,#3B82F6 100%);

  --font-display: 'Outfit', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --maxw: 1240px;
  --pad: 40px;
  --t: 0.4s cubic-bezier(.2,.7,.2,1);
  --t-fast: 0.22s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; scroll-behavior: smooth; }
body {
  font-family: var(--font-display);
  background: var(--cream);
  color: var(--ink);
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
::selection { background: rgba(79,70,229,0.22); }

/* ── shared layout helpers ── */
.shell { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }
.section { position: relative; padding: 104px 0; }
.section.tight { padding: 76px 0; }

/* dark vs light section surfaces */
.surf-navy  { background: var(--navy-800); color: var(--on-navy); }
.surf-navy-deep { background: var(--navy-900); color: var(--on-navy); }
.surf-cream { background: var(--cream); color: var(--ink); }
.surf-cream-2 { background: var(--cream-2); color: var(--ink); }

/* ── eyebrow / section label ── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 11px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold);
}
.eyebrow::before { content: ''; width: 26px; height: 1px; background: currentColor; opacity: 0.8; }
.eyebrow.no-rule::before { display: none; }
.eyebrow.indigo { color: var(--indigo); }
.surf-navy .eyebrow, .surf-navy-deep .eyebrow { color: var(--sky-2); }

/* ── section heading scale ── */
.sec-head { max-width: 720px; margin-bottom: 14px; }
.h-display {
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.02;
  font-size: clamp(34px, 4.4vw, 56px);
}
.h-section {
  font-weight: 700; letter-spacing: -0.025em; line-height: 1.12;
  font-size: clamp(25px, 2.9vw, 38px);
}
.h-sub {
  font-weight: 600; letter-spacing: -0.015em; line-height: 1.18;
  font-size: clamp(20px, 2vw, 26px);
}
.text-grad {
  background: var(--grad-brand); -webkit-background-clip: text;
  background-clip: text; color: transparent;
  padding-bottom: 0.06em;
}
.dim { color: var(--on-navy-3); }
.surf-cream .dim, .surf-cream-2 .dim { color: var(--rule-2); }

.lede {
  font-weight: 300; font-size: clamp(15px, 1.3vw, 17.5px); line-height: 1.58;
  color: var(--ink-3); max-width: 620px;
}
.surf-navy .lede, .surf-navy-deep .lede { color: var(--on-navy-2); }

/* ── buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-display); font-weight: 600; font-size: 14px;
  letter-spacing: -0.01em; padding: 13px 22px; border-radius: 8px;
  border: 1px solid transparent; cursor: pointer; transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
  white-space: nowrap;
}
.btn svg { width: 14px; height: 14px; }
.btn-primary {
  color: #F2F4FA; background: var(--indigo);
  box-shadow: 0 8px 24px rgba(79,70,229,0.34), inset 0 1px 0 rgba(255,255,255,0.18);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(79,70,229,0.46), inset 0 1px 0 rgba(255,255,255,0.18); }
.btn-ghost { color: var(--on-navy); border-color: var(--navy-line-2); background: rgba(255,255,255,0.03); }
.btn-ghost:hover { background: rgba(255,255,255,0.08); transform: translateY(-2px); }
.surf-cream .btn-ghost, .surf-cream-2 .btn-ghost { color: var(--ink); border-color: var(--rule-2); background: transparent; }
.surf-cream .btn-ghost:hover { background: var(--cream-2); }

/* ═══════════ NAV ═══════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: 72px; display: flex; align-items: center;
  background: rgba(10,18,40,0.72); backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--navy-line);
  transition: background var(--t), border-color var(--t);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; width: 100%;
  padding: 0 var(--pad); display: flex; align-items: center; gap: 28px;
}
/* ── wordmark · proportions faithful to reference/logo-system.html ── */
.nav-logo { display: inline-flex; align-items: flex-end; line-height: 1; flex-shrink: 0; font-size: 23px; }
.wm-tru {
  font-family: var(--font-display); font-weight: 800; font-size: 1em;
  letter-spacing: -0.01em; text-transform: uppercase;
  background: linear-gradient(90deg,#818CF8 0%,#635BFF 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.wm-s { display: inline-flex; align-items: flex-end; margin: 0 -0.02em 0.154em; }
.wm-s svg { display: block; width: 0.808em; height: 1.23em; }
.wm-tack {
  font-family: var(--font-display); font-weight: 300; font-size: 1em;
  letter-spacing: 0.04em; text-transform: uppercase;
  background: linear-gradient(90deg,#4F46E5 0%,#3B82F6 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.wm-api {
  font-family: var(--font-display); font-weight: 600; font-size: 0.346em;
  letter-spacing: 0.14em; text-transform: uppercase;
  margin-left: 0.33em; margin-bottom: 0.39em;
  background: linear-gradient(90deg,#3B82F6,#1CA8FF); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav-links { display: flex; align-items: center; gap: 30px; margin-left: 8px; list-style: none; }
.nav-links a {
  font-size: 13.5px; font-weight: 400; color: var(--on-navy-2);
  letter-spacing: -0.005em; transition: color var(--t-fast); white-space: nowrap;
}
.nav-links a:hover { color: var(--on-navy); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.nav-cta { padding: 10px 18px; font-size: 13.5px; }
.nav-burger {
  display: none; width: 40px; height: 40px; flex-direction: column;
  align-items: center; justify-content: center; gap: 5px; padding: 0;
  background: rgba(255,255,255,0.04); border: 1px solid var(--navy-line-2);
  border-radius: 9px; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.nav-burger span { display: block; width: 17px; height: 1.7px; background: var(--on-navy); border-radius: 2px; transition: transform .28s ease, opacity .2s ease; }
.nav.menu-open .nav-burger span:nth-child(1) { transform: translateY(6.7px) rotate(45deg); }
.nav.menu-open .nav-burger span:nth-child(2) { opacity: 0; }
.nav.menu-open .nav-burger span:nth-child(3) { transform: translateY(-6.7px) rotate(-45deg); }

/* mobile dropdown — anchored below the fixed bar */
.nav-mobile {
  position: absolute; top: 100%; left: 0; right: 0; display: none; flex-direction: column;
  padding: 8px var(--pad) 20px; background: rgba(7,12,30,0.98);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--navy-line); box-shadow: 0 24px 50px rgba(4,5,15,0.5);
}
.nav-mobile a:not(.btn) {
  font-size: 15.5px; font-weight: 400; color: var(--on-navy-2);
  padding: 14px 4px; border-bottom: 1px solid var(--navy-line); transition: color var(--t-fast);
}
.nav-mobile a:not(.btn):hover, .nav-mobile a:not(.btn):active { color: var(--on-navy); }
.nav-mobile-cta { margin-top: 16px; justify-content: center; }
.nav-burger { display: none; }

/* ═══════════ HERO ═══════════ */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(120% 90% at 78% -10%, #16225A 0%, rgba(22,34,90,0) 52%), var(--navy-800);
  color: var(--on-navy);
  padding: 120px 0 60px;
}
/* ambient graphics */
.hero-glow {
  position: absolute; pointer-events: none; border-radius: 50%;
  filter: blur(40px); opacity: 0.5;
}
.hero-glow.g1 { top: -120px; right: -60px; width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(79,70,229,0.32) 0%, rgba(28,168,255,0.08) 45%, transparent 70%); opacity: 0.7; }
.hero-glow.g2 { bottom: -200px; left: -120px; width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(28,168,255,0.16) 0%, transparent 68%); opacity: 0.5; }
.hero-grid {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.14;
  background-image: linear-gradient(var(--navy-line) 1px, transparent 1px), linear-gradient(90deg, var(--navy-line) 1px, transparent 1px);
  background-size: 80px 80px;
  -webkit-mask-image: radial-gradient(135% 95% at 25% 0%, #000 0%, transparent 72%);
  mask-image: radial-gradient(135% 95% at 25% 0%, #000 0%, transparent 72%);
}
.hero-inner {
  position: relative; z-index: 2; max-width: 100%;
  display: grid; grid-template-columns: 1.28fr 0.72fr;
  column-gap: 52px; align-items: center;
}
.hero-main { min-width: 0; }
.hero-aside {
  min-width: 0; align-self: center;
  border: 1px solid var(--navy-line-2); border-radius: 16px;
  padding: 26px 28px; background: rgba(255,255,255,0.035);
  box-shadow: 0 24px 60px rgba(4,5,15,0.4);
}

.hero-kicker {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold);
  display: inline-flex; align-items: center; gap: 12px; margin-bottom: 22px;
}
.hero-kicker::before { content: ''; width: 30px; height: 1px; background: var(--gold); }

.hero-h {
  font-weight: 800; font-size: clamp(38px, 5vw, 64px); line-height: 1.1;
  letter-spacing: -0.04em; margin-bottom: 30px; max-width: 17ch;
}
.hero-h .or { color: var(--on-navy-3); }
.hero-h .lit { background: linear-gradient(90deg,#818CF8,#60C8FF); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* hero lead-in (the trade-off setup — read first, then the headline answers it) */
.hero-leadin {
  display: inline-flex; align-items: center; gap: 13px;
  font-family: var(--font-display);
  font-size: clamp(16px, 1.7vw, 20px); font-weight: 500; letter-spacing: -0.012em;
  line-height: 1.3; color: var(--on-navy); margin: 0 0 18px;
}
.hero-leadin .hl-tick {
  width: 26px; height: 2px; border-radius: 2px;
  background: var(--gold); flex-shrink: 0;
}
.hero-leadin .hl-col { color: var(--gold); font-weight: 600; }

/* hero right-column visual · transformation infographic (complements, no reading required) */
.hero-aside.hero-vis {
  border: 0; background: none; box-shadow: none; padding: 0;
  justify-self: end; width: 100%; max-width: 360px;
}
.hvis { display: flex; flex-direction: column; align-items: stretch; }
.hvis-cap {
  font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--on-navy-3);
  display: inline-flex; align-items: center; gap: 9px; margin-bottom: 16px;
}
.hvis-cap::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

.hvis-card {
  border: 1px solid var(--navy-line-2); border-radius: 14px;
  background: rgba(255,255,255,0.03); padding: 15px 17px; position: relative;
}
.hvis-card.out {
  border-color: rgba(99,102,241,0.5);
  background: linear-gradient(180deg, rgba(79,70,229,0.15), rgba(28,168,255,0.05));
  box-shadow: 0 18px 50px rgba(8,10,30,0.45);
}
.hvis-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.hvis-doc { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 500; color: var(--on-navy); white-space: nowrap; }
.hvis-doc svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--on-navy-2); }
.hvis-card.out .hvis-doc svg { color: var(--sky-2); }
.hvis-tag {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 5px; white-space: nowrap;
}
.hvis-tag.warn { color: #F4C66B; background: rgba(244,198,107,0.12); }
.hvis-grade { font-weight: 800; font-size: 19px; letter-spacing: -0.02em; color: var(--sky-2); }

.hvis-lines { display: flex; flex-direction: column; gap: 7px; }
.hvis-ln { height: 7px; border-radius: 4px; background: rgba(255,255,255,0.07); }
.hvis-card.out .hvis-ln { background: rgba(129,140,248,0.2); }
.hvis-ln.w1 { width: 88%; } .hvis-ln.w2 { width: 62%; } .hvis-ln.w3 { width: 72%; }

.hvis-marks { display: flex; gap: 7px; margin-top: 13px; }
.hvis-mk {
  width: 23px; height: 23px; border-radius: 6px; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; border: 1px solid transparent;
}
.hvis-mk svg { width: 12px; height: 12px; }
.hvis-mk.q { color: #F4C66B; background: rgba(244,198,107,0.1); border-color: rgba(244,198,107,0.25); }
.hvis-mk.ck { color: #6FE0A8; background: rgba(111,224,168,0.12); border-color: rgba(111,224,168,0.3); }

.hvis-mid { display: flex; flex-direction: column; align-items: center; }
.hvis-stem { width: 1.5px; height: 13px; background: linear-gradient(var(--navy-line-2), rgba(99,102,241,0.55)); }
.hvis-stem.down { background: linear-gradient(rgba(99,102,241,0.55), rgba(99,102,241,0.18)); }
.hvis-engine {
  display: inline-flex; align-items: center; gap: 10px; margin: 7px 0;
  padding: 9px 16px; border-radius: 999px;
  border: 1px solid rgba(99,102,241,0.5); background: rgba(79,70,229,0.16);
  box-shadow: 0 0 30px rgba(79,70,229,0.32);
}
.hvis-engine svg { width: 17px; height: 17px; color: var(--sky-2); flex-shrink: 0; }
.hvis-engine .t { font-weight: 800; font-size: 18px; letter-spacing: -0.01em; color: var(--white-soft); }
.hvis-engine .l { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--on-navy-2); }

/* stat panel (hero right column) */
.hero-stats { display: grid; grid-template-columns: 1fr; gap: 22px; }
.hstat { padding-right: 0; }
.hstat + .hstat { padding-left: 0; padding-top: 22px; border-top: 1px solid var(--navy-line); }
.hstat-ico { width: 26px; height: 26px; margin-bottom: 12px; }
.hstat-ico.v { color: var(--violet); }
.hstat-ico.r { color: var(--sky-2); }
.hstat-lbl {
  font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--on-navy-3); margin-bottom: 12px;
}
.hstat-val { font-weight: 800; font-size: clamp(30px, 3vw, 40px); line-height: 1; letter-spacing: -0.02em; margin-bottom: 10px; }
.hstat-val.v { color: var(--violet); }
.hstat-val.r { color: var(--sky-2); }
.hstat-desc { font-weight: 300; font-size: 14.5px; line-height: 1.5; color: var(--on-navy-2); max-width: 320px; }

/* flow strip */
.hero-flow {
  display: flex; align-items: center; flex-wrap: wrap; gap: 9px;
  padding: 18px 0; border-top: 1px solid var(--navy-line); border-bottom: 1px solid var(--navy-line);
  margin-top: 40px; grid-column: 1 / -1;
}
.fnode {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--on-navy-2); padding: 10px 15px; border: 1px solid var(--navy-line-2); border-radius: 6px;
  white-space: nowrap;
}
.fnode.on { color: var(--white-soft); border-color: rgba(99,102,241,0.6); background: rgba(79,70,229,0.2); box-shadow: 0 0 26px rgba(79,70,229,0.28); display: inline-flex; align-items: center; gap: 8px; }
.fnode-mark { width: 15px; height: 15px; border-radius: 4px; flex-shrink: 0; box-shadow: 0 0 0 1px rgba(255,255,255,0.12); }
.farr { color: var(--on-navy-3); font-family: var(--font-mono); font-size: 13px; }

.hero-position {
  position: relative; margin: 0 0 20px; padding-left: 18px;
  font-family: var(--font-display);
  font-size: clamp(19px, 1.9vw, 26px); font-weight: 500; letter-spacing: -0.015em;
  line-height: 1.25; color: var(--white-soft);
}
.hero-position::before {
  content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 3px; border-radius: 3px;
  background: linear-gradient(180deg, #818CF8, #60C8FF);
}
.hero-position .hp-soft { color: var(--on-navy-3); font-weight: 400; }
@media (max-width: 760px) { .hero-position { padding-left: 14px; margin-bottom: 16px; } }

.hero-sub {
  font-weight: 300; font-size: clamp(15px, 1.5vw, 18px); line-height: 1.62;
  color: var(--on-navy-2); max-width: 760px;
}
.hero-sub strong { font-weight: 500; color: var(--on-navy); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }

/* pilot / design-partner signal (implicit early-stage cue beneath the CTAs) */
.hero-pilot {
  display: inline-flex; align-items: center; gap: 10px; margin: 18px 0 0;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
  color: var(--on-navy-3);
}
.hero-pilot .hp-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #6FE0A8; flex-shrink: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .hero-pilot .hp-dot { animation: heroPilotPulse 2.6s ease-out infinite; }
  @keyframes heroPilotPulse {
    0% { box-shadow: 0 0 0 0 rgba(111,224,168,0.5); }
    70% { box-shadow: 0 0 0 7px rgba(111,224,168,0); }
    100% { box-shadow: 0 0 0 0 rgba(111,224,168,0); }
  }
}

/* ═══════════ FOOTER ═══════════ */
.footer { background: var(--navy-900); color: var(--on-navy); padding: 56px 0 34px; border-top: 1px solid var(--navy-line); }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid var(--navy-line); }
.footer-brand .nav-logo { font-size: 26px; }
.footer-tag { margin-top: 18px; font-weight: 300; font-size: 14px; line-height: 1.6; color: var(--on-navy-2); max-width: 300px; }
.footer-org { margin-top: 12px; font-size: 12.5px; font-weight: 300; line-height: 1.55; color: var(--on-navy-3); max-width: 300px; }
.footer-org strong { font-weight: 500; color: var(--on-navy-2); }
.footer-col h4 { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--on-navy-3); margin-bottom: 16px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.footer-col a { font-size: 14px; font-weight: 300; color: var(--on-navy-2); transition: color var(--t-fast); }
.footer-col a:hover { color: var(--on-navy); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 28px; }
.footer-bottom span { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--on-navy-3); }

/* ═══════════ reveal animation ═══════════ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 940px) {
  :root { --pad: 24px; }
  .nav-links { display: none; }
  .nav-burger { display: inline-flex; }
  .nav.menu-open .nav-mobile { display: flex; }
  .hero { padding: 104px 0 56px; }
  .hero-inner { grid-template-columns: 1fr; row-gap: 34px; }
  .hero-aside { max-width: 460px; }
  .hero-aside.hero-vis { justify-self: start; max-width: 380px; }
  .hero-stats { grid-template-columns: 1fr; gap: 22px; }
  .hero-flow { margin-top: 4px; }
  .hstat { padding-right: 0; }
  .hstat + .hstat { padding-left: 0; border-left: 0; border-top: 1px solid var(--navy-line); padding-top: 22px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 560px) {
  .nav-cta { display: none; }
  .hero-h { font-size: clamp(36px, 11vw, 52px); }
  .footer-top { grid-template-columns: 1fr; }
  .section { padding: 68px 0; }
}
