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

:root {
  --bg:       #0d0f12;
  --bg2:      #131619;
  --bg3:      #1a1d22;
  --border:   #252930;
  --text:     #c9d1d9;
  --muted:    #6e7681;
  --accent:   #58a6ff;
  --accent2:  #3fb950;
  --warn:     #d29922;
  --danger:   #f85149;
  --code-bg:  #161b22;
  --radius:   8px;
  --font-mono: "SF Mono", "Fira Code", "Cascadia Code", Consolas, monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

html { scroll-behavior: smooth; }

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

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

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.35em;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  overflow-x: auto;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.85rem;
  color: var(--accent2);
}

/* ── nav ──────────────────────────────────────────────────────── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(13, 15, 18, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.03em;
}

.nav-link {
  font-size: 0.875rem;
  color: var(--muted);
  transition: color 0.15s;
}
.nav-link:hover { color: var(--text); text-decoration: none; }

/* ── hero ─────────────────────────────────────────────────────── */
.hero {
  max-width: 860px;
  margin: 0 auto;
  padding: 6rem 2rem 4rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.hero-sub {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--muted);
  margin-bottom: 1.5rem;
  font-style: italic;
}

.hero-body {
  font-size: 1.1rem;
  color: var(--text);
  max-width: 560px;
  margin: 0 auto 2.5rem;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/* install button */
.btn-install {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent2);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  max-width: 100%;
  overflow: hidden;
  text-align: left;
}
.btn-install:hover { border-color: var(--accent); background: #1a1f2a; }

.install-prefix { color: var(--muted); flex-shrink: 0; }
.install-cmd    { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.install-copy   {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--muted);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.2em 0.55em;
  transition: color 0.15s;
}
.btn-install:hover .install-copy { color: var(--accent); }

.btn-secondary {
  font-size: 0.9rem;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.btn-secondary:hover { color: var(--text); border-color: var(--muted); text-decoration: none; }

/* ── demo / terminal ──────────────────────────────────────────── */
.demo-section {
  max-width: 1080px;
  margin: 0 auto 5rem;
  padding: 0 2rem;
}

.demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.terminal-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  min-width: 0; /* prevent grid blowout */
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.6rem 1rem;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
}
.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-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  margin-right: 36px; /* offset the dots */
}

.terminal-body {
  background: var(--bg);
  padding: 1rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.65;
  height: 320px;
  overflow: hidden;
  position: relative;
}

/* terminal line types — set via JS */
.t-prompt  { color: var(--accent2); }
.t-cmd     { color: #fff; }
.t-out     { color: var(--muted); }
.t-success { color: var(--accent2); }
.t-info    { color: var(--accent); }
.t-cursor  {
  display: inline-block;
  width: 8px; height: 1em;
  background: var(--accent2);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

@keyframes blink { 50% { opacity: 0; } }

/* ── prose sections ───────────────────────────────────────────── */
.prose-section {
  max-width: 680px;
  margin: 0 auto;
  padding: 4rem 2rem;
}
.prose-section.alt {
  background: var(--bg2);
  max-width: 100%;
}
.prose-section.alt > * {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.prose-section h2 {
  font-size: 1.9rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.prose-section p {
  color: var(--text);
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.callout {
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1.25rem;
  background: rgba(88, 166, 255, 0.07);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: #fff !important;
  font-style: italic;
  font-size: 1.1rem !important;
}

/* ── features ─────────────────────────────────────────────────── */
.features-section {
  max-width: 960px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.features-section h2 {
  font-size: 1.9rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 2.5rem;
  text-align: center;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.feature {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s;
}
.feature:hover { border-color: var(--accent); }

.feature-icon {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  color: var(--accent);
  font-family: var(--font-mono);
}

.feature h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.feature p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
}

/* ── get started ──────────────────────────────────────────────── */
.start-section {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 5rem 2rem;
}

.start-section h2 {
  font-size: 1.9rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 2.5rem;
  text-align: center;
}

.steps {
  max-width: 680px;
  margin: 0 auto 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.step {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.step-num {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--bg3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 700;
  margin-top: 0.15rem;
}

.step-body h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.4rem;
}

.step-body pre {
  margin: 0;
}

.start-cta { text-align: center; }

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius);
  transition: opacity 0.15s;
}
.btn-primary:hover { opacity: 0.85; text-decoration: none; }

/* ── footer ───────────────────────────────────────────────────── */
footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
  flex-wrap: wrap;
}
footer a { color: var(--muted); }
footer a:hover { color: var(--text); }

/* ── responsive ───────────────────────────────────────────────── */
@media (max-width: 600px) {
  nav { padding: 0.75rem 1rem; }
  .hero { padding: 4rem 1rem 2.5rem; }
  .demo-section { padding: 0 1rem; margin-bottom: 3rem; }
  .prose-section { padding: 3rem 1rem; }
  .features-section { padding: 3rem 1rem; }
  .start-section { padding: 3rem 1rem; }
  .demo-grid { grid-template-columns: 1fr; }
  .terminal-body { font-size: 0.72rem; height: 260px; }
  .btn-install { font-size: 0.72rem; }
}
