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

:root {
  --bg: #0a0a0f;
  --bg-card: #12121a;
  --bg-elevated: #1a1a28;
  --text: #e8e8ed;
  --text-muted: #8888a0;
  --accent: #e94560;
  --accent-glow: rgba(233, 69, 96, 0.15);
  --border: #22223a;
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1100px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ── Nav ───────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  background: rgba(10, 10, 15, 0.8);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.2rem;
}

.logo-icon {
  font-size: 1.5rem;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

/* ── Hero ──────────────────────────────────────── */
.hero {
  padding: 160px 24px 80px;
  text-align: center;
}

.hero-inner {
  max-width: 700px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 32px;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #fff 0%, #aaa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

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

.hero-meta {
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ── Buttons ───────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 30px var(--accent-glow);
}

.btn-primary:hover {
  background: #d63b54;
  box-shadow: 0 0 50px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-elevated);
  border-color: #333;
}

.btn-large {
  padding: 18px 36px;
  font-size: 1.1rem;
}

/* ── Demo Terminal ─────────────────────────────── */
.demo {
  padding: 0 24px 100px;
}

.demo-inner {
  max-width: 780px;
  margin: 0 auto;
}

.terminal {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green { background: #28c840; }

.terminal-title {
  margin-left: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.terminal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.term-line {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.term-role {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.term-line.user .term-role { color: #6ec6ff; }
.term-line.assistant .term-role { color: var(--accent); }
.term-line.code .term-role { color: #28c840; }
.term-line.output .term-role { color: #febc2e; }

.term-text {
  font-size: 0.95rem;
  color: var(--text);
}

.term-line.code pre {
  background: #0d0d14;
  border-radius: var(--radius-sm);
  padding: 16px;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.5;
}

.term-line.code code {
  color: #c8d6e5;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
}

.term-line.output .term-text {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.9rem;
  color: #28c840;
}

/* ── Section Shared ────────────────────────────── */
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 60px;
}

/* ── Features ──────────────────────────────────── */
.features {
  padding: 100px 24px;
}

.features-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: #333;
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

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

/* ── How It Works ──────────────────────────────── */
.how-it-works {
  padding: 100px 24px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.how-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 60px;
}

.step {
  text-align: center;
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.step h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.step p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ── FAQ ───────────────────────────────────────── */
.faq {
  padding: 100px 24px;
}

.faq-inner {
  max-width: 700px;
  margin: 0 auto;
}

.faq-list {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-item summary {
  padding: 20px 24px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item p {
  padding: 0 24px 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ── CTA ───────────────────────────────────────── */
.cta {
  padding: 100px 24px;
  text-align: center;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}

.cta-inner {
  max-width: 600px;
  margin: 0 auto;
}

.cta h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 32px;
}

.cta-meta {
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ── Footer ────────────────────────────────────── */
.footer {
  padding: 60px 24px 40px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 48px;
}

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  color: var(--text);
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 4px 0;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  text-align: center;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ── Responsive ────────────────────────────────── */
@media (max-width: 768px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .footer-cols {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .nav-links {
    gap: 20px;
  }

  .hero {
    padding: 120px 24px 60px;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}
