/* ustack.ai — Design system
   Palette: Voltage  |  Type: Space Grotesk + IBM Plex Mono  |  Mark: Slab Stack */

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

:root {
  --ink: #0B0D10;
  --ink-2: #1A1E24;
  --paper: #F4F1E8;
  --paper-2: #ECE7D8;
  --paper-3: #E2DCC8;
  --white: #FFFFFF;
  --volt: #CDFA52;
  --volt-deep: #A8D62E;
  --muted: #5A5E66;
  --muted-2: #8C8F96;
  --line: rgba(11, 13, 16, 0.10);
  --line-soft: rgba(11, 13, 16, 0.06);

  --display: "Space Grotesk", -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --maxw: 1280px;
  --gutter: 32px;
  --radius: 14px;
  --radius-lg: 20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--paper); color: var(--ink); font-family: var(--display); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
body { overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: 0; }
img, svg { display: block; max-width: 100%; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.eyebrow::before { content: "//"; color: var(--volt-deep); font-weight: 600; }

/* ---------- NAV ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(244, 241, 232, 0.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; letter-spacing: -0.02em; }
.brand-mark { width: 32px; height: 32px; }
.footer .brand-mark { width: 44px; height: 44px; }
.footer .brand { font-size: 22px; gap: 12px; }

/* Stat band */
.stat-band { background: var(--ink); color: var(--paper); padding: 56px 0; }
.stat-band-inner { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.stat { display: flex; flex-direction: column; gap: 12px; border-left: 1px solid rgba(244,241,232,0.15); padding-left: 24px; }
.stat-num { font-family: var(--display); font-size: 72px; font-weight: 500; letter-spacing: -0.04em; line-height: 0.9; color: var(--volt); }
.stat-num .stat-unit { font-size: 28px; color: rgba(244,241,232,0.7); margin-left: 4px; letter-spacing: 0; }
.stat-label { font-family: var(--mono); font-size: 13px; color: rgba(244,241,232,0.7); line-height: 1.5; max-width: 26ch; }
.brand-name { display: flex; align-items: baseline; }
.brand-name .ai { color: var(--muted); font-weight: 400; }
.brand-u { position: relative; }
.brand-u::after { content: ""; position: absolute; top: -3px; left: 50%; transform: translateX(-50%); width: 4px; height: 4px; border-radius: 50%; background: var(--volt-deep); }
.footer .brand-u::after { background: var(--volt); }

/* Definition strip */
.def-strip { display: inline-flex; align-items: baseline; gap: 14px; padding: 14px 22px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); font-family: var(--mono); font-size: 13px; color: var(--ink); }
.def-strip .word { font-family: var(--display); font-weight: 600; font-size: 16px; letter-spacing: -0.01em; }
.def-strip .pron { color: var(--muted); }
.def-strip .em { color: var(--volt-deep); font-weight: 600; }
.def-strip .word .brand-u { position: relative; }
.def-strip .word .brand-u::after { content: ""; position: absolute; top: -3px; left: 50%; transform: translateX(-50%); width: 3px; height: 3px; border-radius: 50%; background: var(--volt-deep); }
.nav-links { display: flex; gap: 36px; }
.nav-links a { font-size: 15px; color: var(--ink); position: relative; padding: 4px 0; }
.nav-links a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--volt); }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 12px; }

/* ---------- BUTTONS ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; font-weight: 500; font-size: 15px; transition: transform .12s ease, background .12s ease; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--volt); }
.btn-primary:hover { background: #000; }
.btn-volt { background: var(--volt); color: var(--ink); }
.btn-volt:hover { background: var(--volt-deep); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-link { color: var(--ink); font-weight: 500; padding: 12px 0; gap: 6px; }
.btn-link::after { content: "→"; transition: transform .15s ease; }
.btn-link:hover::after { transform: translateX(4px); }

/* ---------- HERO / SECTIONS ---------- */
.section { padding: 96px 0; }
.section.tight { padding: 72px 0; }
.section.dark { background: var(--ink); color: var(--paper); }
.section.dark .eyebrow { color: rgba(244, 241, 232, 0.55); }
.section.dark .eyebrow::before { color: var(--volt); }

h1, h2, h3 { font-family: var(--display); letter-spacing: -0.03em; line-height: 1.02; font-weight: 500; }
.h-display { font-size: clamp(48px, 7.2vw, 104px); font-weight: 500; letter-spacing: -0.04em; line-height: 0.94; }
.h-1 { font-size: clamp(40px, 5vw, 72px); font-weight: 500; }
.h-2 { font-size: clamp(28px, 3vw, 40px); font-weight: 500; line-height: 1.1; }
.h-3 { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.lede { font-size: clamp(18px, 1.4vw, 21px); line-height: 1.5; color: var(--muted); max-width: 56ch; }
.lede-dark { color: rgba(244, 241, 232, 0.7); }

/* ---------- CARDS ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 32px; transition: transform .15s ease, border-color .15s ease; }
.card:hover { border-color: var(--ink); }
.card-dark { background: var(--ink-2); border: 1px solid rgba(255,255,255,0.08); color: var(--paper); }
.card-num { font-family: var(--mono); font-size: 12px; color: var(--volt-deep); margin-bottom: 16px; }
.card .h-3 { margin-bottom: 12px; }
.card p { color: var(--muted); font-size: 15px; line-height: 1.55; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .nav-links { display: none; } }

/* ---------- FOOTER ---------- */
.footer { background: var(--ink); color: var(--paper); padding: 80px 0 32px; }
.footer .brand { color: var(--paper); }
.footer .brand-name .ai { color: var(--muted-2); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-grid h4 { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-2); margin-bottom: 16px; }
.footer-grid ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-grid a { color: rgba(244, 241, 232, 0.75); font-size: 15px; }
.footer-grid a:hover { color: var(--volt); }
.footer-tag { color: rgba(244, 241, 232, 0.6); margin-top: 16px; font-size: 14px; max-width: 32ch; }
.footer-bot { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; font-family: var(--mono); font-size: 12px; color: var(--muted-2); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- HERO ---------- */
.hero { position: relative; padding: 80px 0 96px; overflow: hidden; }
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 90%);
  pointer-events: none;
}
.hero-inner { position: relative; }
.hero-eyebrow { margin-bottom: 32px; }
.hero h1 { margin-bottom: 28px; }
.hero h1 .underline-volt { background: linear-gradient(transparent 60%, var(--volt) 60%); padding: 0 4px; }
.hero-sub { margin-bottom: 40px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 56px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.hero-chips span { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); }
.hero-chips span::before { content: "● "; color: var(--volt-deep); }

/* ---------- STACK VIZ (right side) ---------- */
.hero-layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 80px; align-items: center; }
@media (max-width: 1100px) { .hero-layout { grid-template-columns: 1fr; gap: 48px; } }

.stack-viz { background: var(--ink); border-radius: var(--radius-lg); padding: 28px; color: var(--paper); position: relative; box-shadow: 0 20px 60px -20px rgba(11,13,16,0.3); }
.stack-viz-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.stack-viz-head .mono { font-size: 11px; color: var(--muted-2); }
.stack-viz-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--volt); box-shadow: 0 0 8px var(--volt); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.stack-row { display: grid; grid-template-columns: 80px 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 10px; background: rgba(255,255,255,0.04); margin-bottom: 8px; font-size: 14px; }
.stack-row.active { background: rgba(205, 250, 82, 0.10); border: 1px solid rgba(205, 250, 82, 0.3); }
.stack-row .mono { font-size: 11px; color: var(--muted-2); }
.stack-row .label { color: var(--paper); font-weight: 500; }
.stack-row .meta { font-family: var(--mono); font-size: 11px; color: var(--volt); }
.stack-foot { margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.08); display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--muted-2); }
.stack-foot strong { color: var(--volt); font-weight: 500; }
