/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: #0a0a0a;
  color: #f0f0f0;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Tokens ── */
:root {
  --bg: #0a0a0a;
  --surface: #111111;
  --surface-2: #181818;
  --border: #232323;
  --border-2: #2e2e2e;
  --text: #f0f0f0;
  --muted: #888;
  --muted-2: #555;
  --accent: #7c3aed;
  --accent-dim: rgba(124, 58, 237, 0.15);
  --accent-border: rgba(124, 58, 237, 0.35);
  --green: #00e87a;
  --green-dim: rgba(0, 232, 122, 0.12);
  --red: #ff5c5c;
  --red-dim: rgba(255, 92, 92, 0.08);
  --max: 1080px;
  --r: 10px;
}

/* ── Typography ── */
h1 { font-size: clamp(2.8rem, 6vw, 5rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; }
h3 { font-size: 1.1rem; font-weight: 600; letter-spacing: -0.01em; }
p { color: var(--muted); }
code { font-family: 'JetBrains Mono', monospace; font-size: 0.88em; color: var(--green); background: var(--green-dim); padding: 2px 6px; border-radius: 4px; }
a { color: inherit; text-decoration: none; }
.accent { color: var(--accent); }

/* ── Nav ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.star-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border: 1px solid var(--border-2);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  transition: all 0.15s;
  background: var(--surface);
}
.star-btn:hover { border-color: var(--accent-border); color: var(--text); background: var(--accent-dim); }
.star-btn svg { color: #f59e0b; }

/* ── Hero ── */
.hero {
  padding: 100px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -200px; left: 50%; transform: translateX(-50%);
  width: 800px; height: 600px;
  background: radial-gradient(ellipse at center, rgba(124,58,237,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner { max-width: var(--max); margin: 0 auto; }
.hero-badge {
  display: inline-block;
  padding: 5px 14px;
  border: 1px solid var(--border-2);
  border-radius: 20px;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 32px;
  background: var(--surface);
  letter-spacing: 0.02em;
}
.hero h1 { margin-bottom: 24px; }
.hero-sub {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
}
.hero-sub code { font-size: 0.95em; }

/* ── CTA ── */
.cta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 56px;
  flex-wrap: wrap;
}
.cta-copy {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  cursor: pointer;
  color: var(--green);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  transition: all 0.15s;
}
.cta-copy:hover { border-color: var(--accent-border); background: var(--accent-dim); }
.cta-copy:active { transform: scale(0.98); }
.cta-copy .cta-icon { color: var(--muted); flex-shrink: 0; transition: color 0.15s; }
.cta-copy:hover .cta-icon { color: var(--accent); }
.cta-copy.copied { color: var(--accent); border-color: var(--accent-border); }
.cta-secondary {
  font-size: 0.9rem;
  color: var(--muted);
  transition: color 0.15s;
  padding: 14px 0;
}
.cta-secondary:hover { color: var(--text); }

/* ── Terminal ── */
.terminal {
  max-width: 680px;
  margin: 0 auto;
  border: 1px solid var(--border-2);
  border-radius: 12px;
  overflow: hidden;
  background: #0e0e0e;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.03), 0 32px 80px rgba(0,0,0,0.6), 0 0 60px rgba(124,58,237,0.06);
  text-align: left;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: #111;
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-red { background: #ff5f57; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #28c840; }
.terminal-title {
  flex: 1;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted-2);
  font-family: 'JetBrains Mono', monospace;
}
.terminal-body {
  padding: 20px 24px;
  min-height: 220px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.75;
}
.terminal-output { white-space: pre-wrap; }
.terminal-output .t-cmd { color: var(--green); }
.terminal-output .t-brand { color: #e2e2e2; font-weight: 500; }
.terminal-output .t-label { color: var(--muted); }
.terminal-output .t-value { color: var(--green); }
.terminal-output .t-bar { color: #7c3aed; }
.terminal-output .t-muted { color: var(--muted-2); }
.terminal-cursor {
  display: inline-block;
  color: var(--green);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  animation: blink 1.1s step-end infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

/* ── Section scaffolding ── */
section { padding: 100px 24px; }
.section-inner { max-width: var(--max); margin: 0 auto; }
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
section h2 { margin-bottom: 48px; }

/* ── How it works ── */
.how { border-top: 1px solid var(--border); }
.steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
}
.step {
  flex: 1;
  padding: 32px 40px 32px 0;
}
.step-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}
.step h3 { font-size: 1.25rem; color: var(--text); margin-bottom: 10px; }
.step p { font-size: 0.95rem; line-height: 1.6; }
.step-divider {
  padding-top: 48px;
  color: var(--muted-2);
  font-size: 1.2rem;
  flex-shrink: 0;
}
@media (max-width: 680px) {
  .steps { flex-direction: column; }
  .step-divider { display: none; }
  .step { padding: 0 0 32px; }
}

/* ── VOICE.md section ── */
.voice-md-section { border-top: 1px solid var(--border); }
.voice-md-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.voice-md-left h2 { margin-bottom: 20px; }
.voice-md-left p { margin-bottom: 16px; font-size: 0.95rem; }
.voice-md-analogy {
  margin-top: 24px;
  padding: 16px 20px;
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  background: var(--surface);
  font-size: 0.9rem !important;
  color: var(--muted) !important;
}
.voice-doc-preview {
  background: #0e0e0e;
  border: 1px solid var(--border-2);
  border-radius: 10px;
  padding: 24px 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  line-height: 1.7;
  overflow: hidden;
}
.doc-line { display: block; }
.doc-h1 { color: #e2e2e2; font-weight: 500; }
.doc-h2 { color: #a78bfa; }
.doc-body { color: var(--muted); }
.doc-muted { color: var(--muted-2); }
.doc-green { color: var(--green); }
.doc-red { color: var(--red); }
@media (max-width: 800px) {
  .voice-md-card { grid-template-columns: 1fr; gap: 40px; }
}

/* ── Features ── */
.features { border-top: 1px solid var(--border); }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}
.feature-card {
  background: var(--bg);
  padding: 32px;
  transition: background 0.15s;
}
.feature-card:hover { background: var(--surface); }
.feature-icon { font-size: 1.4rem; margin-bottom: 14px; }
.feature-card h3 { color: var(--text); margin-bottom: 8px; }
.feature-card p { font-size: 0.88rem; line-height: 1.6; }
@media (max-width: 800px) { .feature-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .feature-grid { grid-template-columns: 1fr; } }

/* ── Install ── */
.install { border-top: 1px solid var(--border); text-align: center; }
.install-inner h2 { margin-bottom: 40px; }
.install-tabs { max-width: 600px; margin: 0 auto; text-align: left; }
.tab-buttons {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px;
  width: fit-content;
}
.tab-btn {
  padding: 6px 16px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s;
  font-family: 'Inter', sans-serif;
}
.tab-btn.active, .tab-btn:hover { background: var(--surface-2); color: var(--text); }
.tab-content { display: none; }
.tab-content.active { display: block; }
.tab-note { font-size: 0.8rem; color: var(--muted-2); margin-top: 12px; }
.code-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0e0e0e;
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  padding: 14px 18px;
  gap: 16px;
}
.code-block code {
  background: none;
  padding: 0;
  font-size: 0.82rem;
  color: var(--green);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.copy-btn {
  flex-shrink: 0;
  padding: 4px 12px;
  border: 1px solid var(--border-2);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s;
  font-family: 'Inter', sans-serif;
}
.copy-btn:hover { border-color: var(--accent-border); color: var(--text); background: var(--accent-dim); }
.copy-btn.copied { color: var(--green); border-color: var(--green); }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-left { display: flex; align-items: center; gap: 20px; }
.footer-meta { font-size: 0.82rem; color: var(--muted-2); }
.footer-meta a { color: var(--muted); transition: color 0.15s; }
.footer-meta a:hover { color: var(--text); }
.footer-right { display: flex; align-items: center; gap: 24px; }
.footer-line { font-size: 0.82rem; color: var(--muted-2); font-family: 'JetBrains Mono', monospace; }
.footer-gh { font-size: 0.82rem; color: var(--muted); transition: color 0.15s; }
.footer-gh:hover { color: var(--text); }

/* ── Reveal animations ── */
.reveal { opacity: 1; }
.reveal-child {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal-child.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-child:nth-child(1) { transition-delay: 0s; }
.reveal-child:nth-child(2) { transition-delay: 0.08s; }
.reveal-child:nth-child(3) { transition-delay: 0.16s; }
.reveal-child:nth-child(4) { transition-delay: 0.06s; }
.reveal-child:nth-child(5) { transition-delay: 0.12s; }
.reveal-child:nth-child(6) { transition-delay: 0.18s; }
