/* ── Reset & Base ─────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #0e0e10;
  --bg-card:     #18181b;
  --bg-elevated: #1f1f23;
  --border:      #2d2d35;
  --purple:      #9146ff;
  --purple-dark: #772ce8;
  --green:       #00c853;
  --text:        #efeff1;
  --text-muted:  #adadb8;
  --text-dim:    #6b6b7a;
  --radius:      8px;
  --font:        'Inter', system-ui, -apple-system, sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

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

/* ── Layout ──────────────────────────────────────────────────────────────── */

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Nav ──────────────────────────────────────────────────────────────────── */

nav {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

.nav-logo span { color: var(--purple); }

.nav-links { display: flex; gap: 24px; }
.nav-links a { color: var(--text-muted); font-size: 14px; }
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, transform 0.1s;
  text-decoration: none;
}

.btn:hover { opacity: 0.88; text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.btn-purple  { background: var(--purple); color: #fff; }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-lg      { padding: 14px 28px; font-size: 16px; }

/* ── Hero ────────────────────────────────────────────────────────────────── */

.hero {
  padding: 80px 0 64px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 13px;
  color: var(--purple);
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero h1 span { color: var(--purple); }

.hero p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 36px;
}

.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Features ────────────────────────────────────────────────────────────── */

.section { padding: 64px 0; }
.section-title {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}
.section-sub { color: var(--text-muted); margin-bottom: 40px; }

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.feature-icon { font-size: 28px; margin-bottom: 12px; }
.feature-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.feature-card p { font-size: 14px; color: var(--text-muted); }

/* ── Pricing table ───────────────────────────────────────────────────────── */

.pricing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  align-items: start;
}

.tier-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
}

.tier-card.featured {
  border-color: var(--purple);
  position: relative;
}

.tier-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--purple);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 10px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tier-name { font-size: 13px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.tier-price { font-size: 32px; font-weight: 800; margin: 8px 0 4px; letter-spacing: -1px; }
.tier-price-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }

.tier-features { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.tier-features li { font-size: 14px; display: flex; align-items: flex-start; gap: 8px; }
.tier-features li::before { content: '✓'; color: var(--green); font-weight: 700; flex-shrink: 0; margin-top: 1px; }
.tier-features li.muted { color: var(--text-muted); }
.tier-features li.muted::before { content: '—'; color: var(--text-dim); }

/* ── Cards / generic ─────────────────────────────────────────────────────── */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.card + .card { margin-top: 16px; }

/* ── Code block ──────────────────────────────────────────────────────────── */

.code-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 13px;
  color: #c9d1d9;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre;
  position: relative;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
}
.copy-btn:hover { color: var(--text); }

.api-key-highlight { color: #f0c27f; font-weight: 600; }

/* ── Step list ───────────────────────────────────────────────────────────── */

.steps { display: flex; flex-direction: column; gap: 20px; }

.step { display: flex; gap: 16px; }
.step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-body h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.step-body p  { font-size: 14px; color: var(--text-muted); }

/* ── Status pill ─────────────────────────────────────────────────────────── */

.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}
.pill-free   { background: #2d2d35; color: var(--text-muted); }
.pill-sub    { background: #1e1035; color: var(--purple); border: 1px solid var(--purple); }
.pill-pro    { background: #0d2218; color: var(--green);  border: 1px solid var(--green); }

/* ── Page header (inner pages) ───────────────────────────────────────────── */

.page-header { padding: 48px 0 32px; }
.page-header h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.5px; }
.page-header p  { color: var(--text-muted); margin-top: 6px; }

/* ── Alert ───────────────────────────────────────────────────────────────── */

.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 20px;
}
.alert-success { background: #0d2218; border: 1px solid #1a4731; color: #4ade80; }
.alert-error   { background: #200d0d; border: 1px solid #4a1a1a; color: #f87171; }
.alert-info    { background: #1a1a2e; border: 1px solid #2d2d55; color: #a5b4fc; }

/* ── Footer ──────────────────────────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 80px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}

footer a { color: var(--text-muted); }

/* ── Spinner ─────────────────────────────────────────────────────────────── */

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Utilities ───────────────────────────────────────────────────────────── */

.text-muted  { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }

.divider { border: none; border-top: 1px solid var(--border); margin: 32px 0; }

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
  .hero { padding: 48px 0 40px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .nav-links { display: none; }
}
