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

:root {
  --bg:        #09090b;
  --bg-card:   #111113;
  --bg-dim:    #0c0c0e;
  --surface:   #18181b;
  --border:    #27272a;
  --border-hi: #3f3f46;
  --text:      #fafafa;
  --text-2:    #a1a1aa;
  --text-3:    #71717a;
  --accent:    #6d5cff;
  --accent-hi: #8577ff;
  --green:     #22c55e;
  --gradient:  linear-gradient(135deg, #6d5cff, #a855f7, #ec4899);
  --font:      'Inter', system-ui, -apple-system, sans-serif;
  --mono:      'JetBrains Mono', ui-monospace, monospace;
  --radius:    12px;
  --radius-sm: 8px;
  --max-w:     1200px;
  --nav-h:     64px;
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 800px; }

/* ── Nav ──────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(9,9,11,.8);
  backdrop-filter: blur(16px) saturate(1.5);
  border-bottom: 1px solid var(--border);
  transition: background .3s;
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
  height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--gradient); color: #fff; font-weight: 800; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 14px; color: var(--text-2); }
.nav-links a:hover { color: var(--text); }
.nav-cta {
  background: var(--accent) !important; color: #fff !important;
  padding: 8px 16px; border-radius: var(--radius-sm); font-weight: 500;
  transition: background .2s;
}
.nav-cta:hover { background: var(--accent-hi) !important; }

.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  width: 28px; height: 20px; position: relative;
}
.nav-toggle span {
  display: block; width: 100%; height: 2px; background: var(--text);
  position: absolute; left: 0; transition: all .3s;
}
.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 9px; }
.nav-toggle span:nth-child(3) { top: 18px; }

/* ── Hero ─────────────────────────────────────────── */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  padding: calc(var(--nav-h) + 40px) 24px 80px; overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-glow {
  position: absolute; top: -20%; left: 50%; transform: translateX(-50%);
  width: 800px; height: 800px; border-radius: 50%;
  background: radial-gradient(circle, rgba(109,92,255,.15) 0%, transparent 70%);
  filter: blur(60px);
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(39,39,42,.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(39,39,42,.3) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black 30%, transparent 70%);
}
.hero-content { position: relative; max-width: 800px; margin: 0 auto; text-align: center; }

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 100px;
  background: rgba(109,92,255,.1); border: 1px solid rgba(109,92,255,.2);
  font-size: 13px; color: var(--text-2); margin-bottom: 32px;
  animation: fadeInUp .6s ease-out;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

.hero h1 {
  font-size: clamp(36px, 6vw, 64px); font-weight: 800;
  line-height: 1.1; letter-spacing: -0.03em;
  animation: fadeInUp .6s ease-out .1s both;
}
.gradient { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.hero-sub {
  margin-top: 24px; font-size: 18px; color: var(--text-2); max-width: 560px;
  margin-left: auto; margin-right: auto;
  animation: fadeInUp .6s ease-out .2s both;
}
.hero-sub strong { color: var(--text); }

.hero-actions {
  margin-top: 40px; display: flex; gap: 12px; justify-content: center;
  animation: fadeInUp .6s ease-out .3s both;
}

.hero-stats {
  margin-top: 64px; display: flex; gap: 48px; justify-content: center;
  animation: fadeInUp .6s ease-out .4s both;
}
.stat { text-align: center; }
.stat-value { display: block; font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.stat-label { font-size: 13px; color: var(--text-3); }

/* ── Buttons ──────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all .2s; border: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hi); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text-2); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); border-color: var(--border-hi); background: var(--surface); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-full { width: 100%; justify-content: center; }
.btn-lg { padding: 16px 32px; font-size: 16px; }

/* ── Sections ─────────────────────────────────────── */
.section { padding: 100px 0; }
.section-dark { background: var(--bg-dim); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-title { text-align: center; font-size: 36px; font-weight: 800; letter-spacing: -0.02em; }
.section-sub { text-align: center; color: var(--text-2); margin-top: 12px; font-size: 16px; }

/* ── Features ─────────────────────────────────────── */
.features-grid {
  margin-top: 56px; display: grid; gap: 20px;
  grid-template-columns: repeat(3, 1fr);
}
.feature-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  transition: border-color .2s, transform .2s;
}
.feature-card:hover { border-color: var(--border-hi); transform: translateY(-2px); }
.feature-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: rgba(109,92,255,.1); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.feature-card h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--text-2); line-height: 1.5; }

/* ── Code ─────────────────────────────────────────── */
.code-grid { margin-top: 56px; display: grid; gap: 20px; grid-template-columns: 1fr 1fr; }
.code-block {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.code-header {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.code-dot { width: 10px; height: 10px; border-radius: 50%; }
.code-dot.red { background: #ef4444; }
.code-dot.yellow { background: #eab308; }
.code-dot.green { background: #22c55e; }
.code-lang { margin-left: auto; font-size: 12px; color: var(--text-3); font-family: var(--mono); }
.code-block pre {
  padding: 20px; overflow-x: auto; font-family: var(--mono);
  font-size: 13px; line-height: 1.7; color: var(--text-2);
}
.code-block .kw { color: #c084fc; }
.code-block .str { color: #34d399; }
.code-block .fn { color: #60a5fa; }
.code-block .cmt { color: #52525b; }

/* ── Pricing ──────────────────────────────────────── */
.pricing-grid {
  margin-top: 56px; display: grid; gap: 20px;
  grid-template-columns: repeat(4, 1fr);
}
.price-card {
  position: relative; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  transition: border-color .2s, transform .2s;
}
.price-card:hover { border-color: var(--border-hi); transform: translateY(-2px); }
.price-popular { border-color: var(--accent); background: rgba(109,92,255,.03); }
.popular-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 600;
  padding: 4px 12px; border-radius: 100px; white-space: nowrap;
}
.price-card h3 { font-size: 18px; font-weight: 600; }
.price { margin-top: 12px; display: flex; align-items: baseline; gap: 4px; }
.price-amount { font-size: 36px; font-weight: 800; letter-spacing: -0.03em; }
.price-period { font-size: 14px; color: var(--text-3); }
.price-limits { font-size: 13px; color: var(--text-3); margin-top: 4px; }
.price-card ul { margin-top: 20px; list-style: none; }
.price-card li {
  padding: 6px 0; font-size: 14px; color: var(--text-2);
  display: flex; align-items: start; gap: 8px;
}
.price-card li::before { content: "\2713"; color: var(--green); font-weight: 600; flex-shrink: 0; }
.price-card .btn { margin-top: 24px; }

/* ── Comparison ───────────────────────────────────── */
.compare-table {
  margin-top: 56px; overflow-x: auto; border-radius: var(--radius);
  border: 1px solid var(--border);
}
.compare-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.compare-table th, .compare-table td {
  padding: 14px 20px; text-align: left; border-bottom: 1px solid var(--border);
}
.compare-table th { background: var(--surface); font-weight: 600; color: var(--text-2); }
.compare-table td { color: var(--text-2); }
.compare-table tr:last-child td { border-bottom: none; }
.compare-us { color: var(--accent) !important; font-weight: 500; }
.compare-table th.compare-us { color: var(--accent) !important; }
.compare-table tr:hover { background: rgba(109,92,255,.03); }

/* ── FAQ ──────────────────────────────────────────── */
.faq-list { margin-top: 48px; }
.faq-item {
  border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 12px; overflow: hidden; transition: border-color .2s;
}
.faq-item[open] { border-color: var(--border-hi); }
.faq-item summary {
  padding: 18px 20px; font-weight: 600; font-size: 15px;
  cursor: pointer; list-style: none; display: flex; align-items: center;
  justify-content: space-between;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-size: 20px; color: var(--text-3); transition: transform .2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 20px 18px; font-size: 14px; color: var(--text-2); line-height: 1.6; }

/* ── CTA ──────────────────────────────────────────── */
.cta-section { text-align: center; padding: 120px 0; }
.cta-title { font-size: 40px; font-weight: 800; letter-spacing: -0.02em; }
.cta-sub { color: var(--text-2); margin-top: 12px; font-size: 16px; }
.cta-actions { margin-top: 40px; display: flex; gap: 12px; justify-content: center; }

/* ── Footer ───────────────────────────────────────── */
.footer { border-top: 1px solid var(--border); padding: 32px 0; }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.footer-links { display: flex; gap: 24px; font-size: 13px; color: var(--text-3); }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 13px; color: var(--text-3); }

/* ── Animations ───────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Scroll reveal ────────────────────────────────── */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity .6s ease-out, transform .6s ease-out;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .code-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 24px; gap: 16px;
  }
  .nav-toggle { display: block; }
  .features-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: column; gap: 24px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .cta-actions { flex-direction: column; align-items: center; }
  .footer-inner { flex-direction: column; text-align: center; }
}
