/* ---------- Tokens ---------- */
:root {
  --bg: #FAFBFC;
  --bg-tint: #F2F5FA;
  --bg-wash: #EEF4FC;
  --bg-dark: #0A0E1A;
  --bg-darker: #05070E;

  --ink: #0B0F19;
  --ink-2: #2D2D2D;
  --ink-muted: #5A5A5A;
  --ink-faint: #94A3B8;
  --hair: #E6EAF0;
  --hair-strong: #D8DEE7;

  --blue: #3A87F9;
  --blue-deep: #1E5FD8;
  --blue-tint: #E6F0FE;
  --green: #A8CD49;
  --green-bright: #8FC23D;
  --green-tint: #F0F8DE;
  --lime-glow: #C8F261;

  --red: #E45B5B;
  --amber: #E6A23C;

  --radius-card: 16px;
  --radius-pill: 999px;
  --radius-btn: 10px;

  --shadow-soft: 0 1px 2px rgba(11,15,25,.04), 0 4px 16px rgba(11,15,25,.04);
  --shadow-lift: 0 4px 8px rgba(11,15,25,.04), 0 20px 40px rgba(11,15,25,.08);
  --shadow-card: 0 1px 0 rgba(11,15,25,.03), 0 2px 6px rgba(11,15,25,.04), 0 8px 32px rgba(11,15,25,.05);

  --sans: 'Geist', system-ui, -apple-system, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --container: 1200px;
  --ease-out: cubic-bezier(.21,.47,.32,.98);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 { color: var(--ink); font-weight: 600; letter-spacing: -0.022em; line-height: 1.05; }
h1 { font-weight: 700; letter-spacing: -0.032em; }
p { color: var(--ink-muted); }

.mono { font-family: var(--mono); font-feature-settings: "ss02"; }
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

::selection { background: var(--blue); color: white; }

/* ---------- Layout ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 32px; }
.container-narrow { max-width: 880px; margin: 0 auto; padding: 0 32px; }

section { position: relative; }
.section-pad { padding: 120px 0; }
.section-pad-sm { padding: 80px 0; }

@media (max-width: 768px) {
  .section-pad { padding: 80px 0; }
  .container, .container-narrow { padding: 0 24px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-weight: 500; font-size: 14px; letter-spacing: -0.01em;
  padding: 11px 18px;
  border-radius: var(--radius-btn);
  border: 1px solid transparent;
  cursor: pointer; white-space: nowrap;
  transition: transform .15s var(--ease-out), box-shadow .2s var(--ease-out),
              background .2s var(--ease-out), color .2s var(--ease-out), border-color .2s var(--ease-out);
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--ink); color: white;
  box-shadow: 0 1px 2px rgba(11,15,25,.2), 0 0 0 1px rgba(11,15,25,1) inset, 0 1px 0 rgba(255,255,255,.1) inset;
}
.btn-primary:hover { background: #000; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(11,15,25,.22), 0 0 0 1px rgba(11,15,25,1) inset; }

.btn-blue {
  background: var(--blue); color: white;
  box-shadow: 0 1px 2px rgba(30,95,216,.3), 0 0 0 1px var(--blue-deep) inset, 0 1px 0 rgba(255,255,255,.2) inset;
}
.btn-blue:hover { background: #2577EE; transform: translateY(-1px); box-shadow: 0 8px 22px rgba(58,135,249,.28), 0 0 0 1px var(--blue-deep) inset; }

.btn-ghost {
  background: white; color: var(--ink);
  border-color: var(--hair-strong);
  box-shadow: 0 1px 0 rgba(11,15,25,.02);
}
.btn-ghost:hover { border-color: var(--ink-faint); transform: translateY(-1px); box-shadow: var(--shadow-soft); }

.btn-inverse {
  background: white; color: var(--ink);
  box-shadow: 0 1px 2px rgba(0,0,0,.1), 0 0 0 1px rgba(255,255,255,1) inset;
}
.btn-inverse:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,0,0,.2); }

.btn-lg { padding: 13px 22px; font-size: 15px; }

/* ---------- Hairlines + hairline grid ---------- */
.hair-top { border-top: 1px solid var(--hair); }
.hair-bottom { border-bottom: 1px solid var(--hair); }

.bg-grid {
  background-image:
    linear-gradient(to right, rgba(11,15,25,.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(11,15,25,.04) 1px, transparent 1px);
  background-size: 56px 56px;
}

.bg-dots {
  background-image: radial-gradient(rgba(11,15,25,.1) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ---------- Pills / Badges ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.02em;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hair);
  background: white;
  color: var(--ink-2);
  text-transform: uppercase;
}
.pill-live {
  background: #F5FCE4;
  border-color: #D9EBA5;
  color: #5C7A1F;
}
.pill-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--green-bright);
  box-shadow: 0 0 0 3px rgba(168,205,73,.2);
}
.pill-dot-live { animation: pulse-dot 1.6s ease-in-out infinite; }

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(168,205,73,.2); }
  50% { box-shadow: 0 0 0 6px rgba(168,205,73,.08); }
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: .08s; }
.reveal-delay-2 { transition-delay: .16s; }
.reveal-delay-3 { transition-delay: .24s; }
.reveal-delay-4 { transition-delay: .32s; }

/* ---------- Blink / cursor ---------- */
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.caret { display: inline-block; width: 8px; height: 1em; vertical-align: -2px; background: currentColor; margin-left: 2px; animation: blink 1s step-end infinite; }

/* ---------- Hero constellation ---------- */
@keyframes float-node {
  0%, 100% { transform: translate(0,0); }
  50% { transform: translate(var(--fx, 0), var(--fy, 0)); }
}
@keyframes pulse-ring {
  0% { transform: scale(0.6); opacity: .6; }
  100% { transform: scale(1.8); opacity: 0; }
}
@keyframes dash {
  to { stroke-dashoffset: -20; }
}

/* ---------- Terminal ---------- */
.term-dot { width: 10px; height: 10px; border-radius: 50%; }
.term-green { color: var(--green-bright); }
.term-blue { color: #6AAFFF; }
.term-lime { color: var(--lime-glow); }
.term-muted { color: #6B7A8F; }

/* ---------- Marquee ---------- */
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marquee { display: flex; animation: marquee 40s linear infinite; }

/* ---------- Links ---------- */
a { color: inherit; text-decoration: none; }
.link-underline { position: relative; }
.link-underline::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease-out);
}
.link-underline:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- Utility ---------- */
.row { display: flex; }
.col { display: flex; flex-direction: column; }
.center { align-items: center; justify-content: center; }
.between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.gap-6 { gap: 24px; } .gap-8 { gap: 32px; } .gap-10 { gap: 40px; } .gap-12 { gap: 48px; }

.tabular { font-variant-numeric: tabular-nums; }

/* ---------- Card ---------- */
.card {
  background: white;
  border: 1px solid var(--hair);
  border-radius: var(--radius-card);
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out), border-color .3s var(--ease-out);
}
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
  border-color: var(--hair-strong);
}

/* ---------- Tweaks panel ---------- */
.tweaks-panel {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 100;
  background: white;
  border: 1px solid var(--hair);
  border-radius: 14px;
  box-shadow: var(--shadow-lift);
  padding: 14px;
  min-width: 240px;
  font-family: var(--sans);
}

/* ---------- Screen-reader only ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
