/* ── Reset & base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #0c0e14;
  --bg-alt:     #10121a;
  --surface:    #161924;
  --surface-2:  #1e2230;
  --border:     #252836;
  --accent:     #5b8def;
  --accent-dim: #3a5fad;
  --text:       #e2e6f0;
  --text-muted: #7c8499;
  --text-dim:   #4a5068;
  --green:      #3dd68c;
  --red:        #f87171;
  --radius:     10px;
  --radius-lg:  16px;
  --mono:       'JetBrains Mono', 'Fira Code', monospace;
  --sans:       'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ───────────────────────────────────────────────────────── */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }

/* ── Nav ──────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 14, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.nav-logo:hover { text-decoration: none; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin-left: auto;
}
.nav-links a { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-hamburger { display: none; background: none; border: none; color: var(--text); font-size: 1.4rem; cursor: pointer; margin-left: auto; }

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  text-decoration: none !important;
  border: 1px solid transparent;
}
.btn-sm { padding: 6px 14px; font-size: 0.82rem; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #4a7de0; }
.btn-outline { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* ── Badge ────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  background: rgba(91, 141, 239, 0.12);
  color: var(--accent);
  border: 1px solid rgba(91, 141, 239, 0.25);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 24px;
}

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero {
  padding: 96px 0 64px;
  text-align: center;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(91,141,239,0.12) 0%, transparent 70%);
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin-bottom: 20px;
}
.hero-sub {
  max-width: 600px;
  margin: 0 auto 32px;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}
.hero-cta { display: flex; gap: 12px; justify-content: center; margin-bottom: 48px; flex-wrap: wrap; }

/* ── Terminal ─────────────────────────────────────────────────────── */
.hero-terminal {
  max-width: 640px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-align: left;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}
.terminal-bar {
  background: var(--surface-2);
  padding: 10px 14px;
  display: flex;
  gap: 6px;
}
.terminal-bar span {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--border);
}
.terminal-bar span:nth-child(1) { background: #f87171; }
.terminal-bar span:nth-child(2) { background: #fbbf24; }
.terminal-bar span:nth-child(3) { background: #3dd68c; }
.terminal-body {
  padding: 20px 24px;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.7;
  white-space: pre;
  overflow-x: auto;
}

/* terminal colour helpers */
.t-cmd  { color: var(--green); }
.t-out  { color: var(--text-muted); }
.t-dim  { color: var(--text-dim); }
.t-comment { color: var(--text-dim); }

/* ── Headings ─────────────────────────────────────────────────────── */
h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
}
.section-sub {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 48px;
}

/* ── Steps ────────────────────────────────────────────────────────── */
.steps { display: flex; flex-direction: column; gap: 28px; }
.step { display: flex; gap: 20px; align-items: flex-start; }
.step-num {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(91,141,239,0.15);
  border: 1px solid rgba(91,141,239,0.3);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
}
.step h3 { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.step p { color: var(--text-muted); font-size: 0.92rem; }

/* ── Architecture diagram ─────────────────────────────────────────── */
.arch-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  margin-top: 56px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  gap: 0;
}
.arch-node {
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}
.arch-dev  { background: rgba(91,141,239,0.15); border: 1px solid rgba(91,141,239,0.3); color: var(--accent); }
.arch-cli  { background: rgba(61,214,140,0.12); border: 1px solid rgba(61,214,140,0.25); color: var(--green); }
.arch-api  { background: rgba(251,191,36,0.1);  border: 1px solid rgba(251,191,36,0.25);  color: #fbbf24; }
.arch-kv   { background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.25); color: var(--red); }
.arch-arrow {
  padding: 0 10px;
  color: var(--text-dim);
  font-size: 0.72rem;
  font-family: var(--mono);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.arch-arrow::before, .arch-arrow::after { content: '──'; color: var(--border); }
.arch-arrow::after { content: '──▶'; }

/* ── Features grid ────────────────────────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 8px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.feature-icon { font-size: 1.5rem; margin-bottom: 12px; }
.feature h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 6px; }
.feature p  { color: var(--text-muted); font-size: 0.88rem; line-height: 1.6; }

/* ── Quick start tabs ─────────────────────────────────────────────── */
.qs-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.qs-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 18px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: -1px;
  font-family: var(--sans);
}
.qs-tab:hover  { color: var(--text); }
.qs-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.qs-panel { display: none; }
.qs-panel.active { display: block; }

/* ── Code blocks ──────────────────────────────────────────────────── */
.code-block { margin-bottom: 20px; }
.code-block pre, .install-script pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre;
  color: var(--text);
}
.code-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.code-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 10px;
}
code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent);
}

/* ── Download ─────────────────────────────────────────────────────── */
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 36px;
}
.download-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
  transition: all 0.15s;
  text-decoration: none !important;
  display: block;
}
.download-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.dl-os   { font-weight: 700; font-size: 1rem; margin-bottom: 4px; color: var(--text); }
.dl-arch { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 8px; }
.dl-ext  { font-size: 0.75rem; font-family: var(--mono); color: var(--text-dim); background: var(--surface-2); padding: 2px 8px; border-radius: 4px; display: inline-block; }
.install-script { max-width: 560px; }
.install-script pre { padding: 14px 18px; }

/* ── Footer ───────────────────────────────────────────────────────── */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-brand p { color: var(--text-muted); font-size: 0.88rem; margin-top: 8px; }
.footer-links { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); font-size: 0.88rem; }
.footer-links a:hover { color: var(--text); text-decoration: none; }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-hamburger { display: block; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    gap: 16px;
  }
  .arch-diagram { flex-direction: column; }
  .arch-arrow { transform: rotate(90deg); }
  .hero { padding: 60px 0 48px; }
}
