:root {
  --bg: #0b1020;
  --bg-alt: #0f1630;
  --surface: #141c3a;
  --border: #26305a;
  --text: #e6eaf7;
  --muted: #8b95b8;
  --accent: #7dd3fc;
  --accent-2: #a78bfa;
  --green: #4ade80;
  --amber: #fbbf24;
  --radius: 16px;
  --font: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { width: min(1120px, 100% - 40px); margin-inline: auto; }
.muted { color: var(--muted); }
a { color: inherit; text-decoration: none; }

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px max(20px, calc((100% - 1120px) / 2));
  background: rgba(11, 16, 32, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand { font-weight: 700; font-size: 1.1rem; display: flex; align-items: center; gap: 10px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.nav nav { display: flex; gap: 6px; }
.nav nav a { padding: 8px 14px; border-radius: 999px; color: var(--muted); font-size: .95rem; transition: .2s; }
.nav nav a:hover { color: var(--text); background: var(--surface); }
.menu-btn { display: none; background: none; border: 1px solid var(--border); color: var(--text); font-size: 1.2rem; border-radius: 10px; padding: 6px 12px; cursor: pointer; }

/* HERO */
.hero { padding: 96px 0 80px; background:
  radial-gradient(700px 400px at 85% 0%, rgba(167, 139, 250, .18), transparent 60%),
  radial-gradient(600px 400px at 0% 30%, rgba(125, 211, 252, .14), transparent 60%); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.tag { display: inline-block; font-family: var(--mono); font-size: .8rem; color: var(--accent); border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; margin-bottom: 22px; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); line-height: 1.08; letter-spacing: -0.02em; margin-bottom: 22px; }
.grad { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 56ch; margin-bottom: 32px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { padding: 13px 24px; border-radius: 12px; font-weight: 500; transition: .2s; border: 1px solid transparent; }
.btn.primary { background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #0b1020; }
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(125, 211, 252, .25); }
.btn.ghost { border-color: var(--border); }
.btn.ghost:hover { background: var(--surface); }

/* TERMINAL */
.terminal { background: #070b18; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: 0 30px 60px rgba(0, 0, 0, .4); }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; background: var(--surface); font-family: var(--mono); font-size: .75rem; color: var(--muted); }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.term-bar i:nth-child(2) { background: #febc2e; }
.term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: 10px; }
.terminal pre { padding: 20px; font-family: var(--mono); font-size: .85rem; line-height: 1.7; overflow-x: auto; }
.c-g { color: var(--green); }
.cursor { animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* SECTIONS */
.section { padding: 88px 0; }
.section.alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); letter-spacing: -0.01em; margin-bottom: 12px; }
.section-lead { color: var(--muted); font-size: 1.1rem; max-width: 62ch; margin-bottom: 44px; }
h3 { font-size: 1.15rem; margin-bottom: 8px; }

/* CARDS */
.cards { display: grid; gap: 20px; }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.cards.four { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; transition: .25s; }
.card:hover { transform: translateY(-4px); border-color: var(--accent); }
.card p { color: var(--muted); font-size: .96rem; }
.icon { display: block; font-size: 1.8rem; margin-bottom: 14px; }
.cards.four { margin-top: 36px; }

/* SPECS */
.specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.spec { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 4px; }
.spec-k { font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.spec-v { font-size: 1.2rem; font-weight: 500; }

/* DIAGRAM */
.diagram { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; overflow-x: auto; }
.diagram svg { width: 100%; min-width: 560px; height: auto; display: block; }
.diagram .node rect { fill: var(--bg); stroke: var(--border); stroke-width: 1.5; }
.diagram .node.hl > rect:first-of-type { stroke: var(--accent); }
.diagram .node .inner { fill: var(--surface); stroke: var(--border); }
.diagram text { fill: var(--text); font-family: var(--font); font-size: 17px; font-weight: 500; }
.diagram text.sub, .diagram text.lbl { fill: var(--muted); font-size: 13px; font-weight: 400; }
.diagram text.small { font-size: 14px; }
.diagram .link { stroke: var(--accent); stroke-width: 2; }
.diagram .link.dashed { stroke-dasharray: 6 5; stroke: var(--accent-2); }

/* STEPS */
.steps { list-style: none; counter-reset: s; display: grid; gap: 16px; max-width: 820px; }
.steps li { counter-increment: s; position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 22px 22px 22px 74px; }
.steps li::before { content: counter(s); position: absolute; left: 22px; top: 22px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #0b1020; font-weight: 700; }
.steps p { color: var(--muted); }
.code { display: flex; gap: 12px; align-items: center; justify-content: space-between; background: #070b18; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-top: 8px; }
.code code { font-family: var(--mono); font-size: .85rem; color: var(--accent); overflow-x: auto; white-space: nowrap; }
.copy { flex-shrink: 0; font-family: var(--font); font-size: .8rem; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px; cursor: pointer; transition: .2s; }
.copy:hover { border-color: var(--accent); }

/* TIMELINE */
.timeline { list-style: none; display: grid; gap: 14px; max-width: 820px; }
.timeline li { display: flex; gap: 18px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px 22px; }
.timeline p { color: var(--muted); font-size: .95rem; }
.badge { flex-shrink: 0; font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; padding: 5px 12px; border-radius: 999px; margin-top: 2px; }
.done .badge { background: rgba(74, 222, 128, .15); color: var(--green); }
.doing .badge { background: rgba(251, 191, 36, .15); color: var(--amber); }
.todo .badge { background: rgba(139, 149, 184, .15); color: var(--muted); }

/* TEAM */
.member { text-align: center; }
.avatar { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #0b1020; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }

/* FOOTER */
.footer { padding: 40px 0; text-align: center; border-top: 1px solid var(--border); }
.footer p + p { margin-top: 4px; font-size: .9rem; }

/* REVEAL */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* RESPONSIVE */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .cards.three { grid-template-columns: 1fr; }
  .cards.four { grid-template-columns: repeat(2, 1fr); }
  .specs { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .menu-btn { display: block; }
  .nav nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--border); padding: 10px 20px 16px; }
  .nav nav.open { display: flex; }
  .hero { padding: 64px 0 56px; }
  .section { padding: 64px 0; }
  .cards.four, .specs { grid-template-columns: 1fr; }
  .steps li { padding-left: 66px; }
  .timeline li { flex-direction: column; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .dot, .cursor { animation: none; }
}
