:root {
  --bg: #0b0d16;
  --surface: rgba(255, 255, 255, 0.03);
  --border: rgba(255, 255, 255, 0.07);
  --text: #e8eaf2;
  --muted: #7b80a0;
  --violet: oklch(65% 0.22 278);
  --violet-glow: oklch(65% 0.22 278 / 0.25);
  --green: oklch(72% 0.22 148);
  --red: oklch(65% 0.22 25);
  --amber: oklch(72% 0.18 75);
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: #b6a6ff; text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0; letter-spacing: -0.02em; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(11, 13, 22, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font: 700 20px var(--font-head); }
.brand:hover { text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 24px; font-size: 14px; }
.nav-links a:not(.btn) { color: var(--muted); }
.nav-links a:not(.btn):hover { color: var(--text); text-decoration: none; }

/* buttons */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 10px;
  background: var(--violet);
  color: #fff;
  font: 600 15px var(--font-head);
  box-shadow: 0 0 32px var(--violet-glow);
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 0 44px var(--violet-glow); }
.btn-small { padding: 8px 14px; font-size: 14px; }
.btn-ghost { background: transparent; border: 1px solid var(--border); box-shadow: none; color: var(--text); }
.btn-ghost:hover { border-color: rgba(255,255,255,.2); box-shadow: none; }

/* hero */
main { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.hero { position: relative; text-align: center; padding: 88px 0 64px; }
.glow {
  position: absolute; inset: -40px 10% auto; height: 420px; z-index: -1;
  background: radial-gradient(ellipse at center, var(--violet-glow), transparent 70%);
  filter: blur(40px);
}
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px;
  font: 500 12px var(--font-mono); color: var(--muted); letter-spacing: .06em;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .4; } }
.hero h1 { font-size: clamp(38px, 6.5vw, 68px); margin: 24px auto 18px; max-width: 14ch; }
.hero h1 em { font-style: normal; color: var(--violet); }
.lead { color: var(--muted); font-size: clamp(16px, 2vw, 19px); max-width: 58ch; margin: 0 auto 32px; }
.ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.fine { color: var(--muted); font-size: 13px; margin-top: 14px; }

/* trace mock */
.trace, .terminal {
  margin: 56px auto 0; max-width: 760px; text-align: left;
  background: #0f1220; border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.45);
}
.trace-bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.d { width: 10px; height: 10px; border-radius: 50%; }
.d-red { background: var(--red); } .d-amber { background: var(--amber); } .d-green { background: var(--green); }
.trace-title { margin-left: 10px; font: 12px var(--font-mono); color: var(--muted); }
.spans { list-style: none; margin: 0; padding: 12px 16px 16px; font: 13px var(--font-mono); }
.spans li { display: grid; grid-template-columns: minmax(0, 15rem) 1fr 3.5rem; gap: 12px; align-items: center; padding: 7px 0; }
.spans .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spans .lbl b { color: var(--red); font-weight: 500; margin-left: 4px; }
.spans .bar { position: relative; height: 8px; border-radius: 4px; background: var(--surface); }
.spans .bar::after {
  content: ""; position: absolute; top: 0; bottom: 0; border-radius: 4px;
  left: var(--o, 0); width: var(--w); background: var(--c);
}
.spans .ms { text-align: right; color: var(--muted); }
.spans .hot { background: oklch(65% 0.22 25 / 0.08); margin: 0 -16px; padding: 7px 16px; }

/* sections */
.section { padding: 72px 0; border-top: 1px solid var(--border); }
.tag { font: 13px var(--font-mono); color: var(--violet); margin-bottom: 12px; }
.section h2 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 32px; max-width: 22ch; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  padding: 24px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface);
  transition: border-color .2s;
}
.card:hover { border-color: rgba(255,255,255,.14); }
.card h3 { font-size: 19px; margin-bottom: 8px; }
.card p { color: var(--muted); margin: 0 0 16px; }
.grid-3 .card p { margin: 0; }
.pill { display: inline-block; font: 500 11px var(--font-mono); letter-spacing: .06em; padding: 4px 10px; border-radius: 6px; }
.pill-violet { color: var(--violet); background: oklch(65% 0.22 278 / .12); }
.pill-amber { color: var(--amber); background: oklch(72% 0.18 75 / .12); }
.pill-green { color: var(--green); background: oklch(72% 0.22 148 / .12); }

.terminal { margin: 0; max-width: none; }
.terminal pre { margin: 0; padding: 20px; font: 14px/1.8 var(--font-mono); overflow-x: auto; }
.terminal .c { color: var(--muted); } .terminal .s { color: var(--green); } .terminal .p { color: var(--violet); }

.final { text-align: center; padding: 88px 0; border-top: 1px solid var(--border); }
.final h2 { font-size: clamp(28px, 4vw, 40px); margin: 20px 0 28px; }

.footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  padding: 24px clamp(16px, 4vw, 48px); border-top: 1px solid var(--border);
  color: var(--muted); font-size: 13px;
}
.footer a { color: var(--muted); }

@media (max-width: 760px) {
  .nav-links a:not(.btn) { display: none; }
  .grid, .grid-3 { grid-template-columns: 1fr; }
  .spans li { grid-template-columns: minmax(0, 9rem) 1fr 3rem; gap: 8px; font-size: 12px; }
  .hero { padding-top: 56px; }
}
