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

:root {
  --bg: #0a0a0f;
  --bg-card: #12121a;
  --bg-elevated: #1a1a26;
  --border: #1e1e2e;
  --text: #e4e4ef;
  --text-muted: #7a7a8e;
  --accent: #6366f1;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --accent-hover: #818cf8;
  --green: #34d399;
  --radius: 12px;
  --radius-sm: 8px;
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Inter', -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}
.btn:hover { border-color: var(--text-muted); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn-ghost { border-color: var(--border); }
.btn-lg { padding: 14px 32px; font-size: 1rem; }

/* ── Nav ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: rgba(10, 10, 15, 0.85);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
}
.logo:hover { color: #fff; }
.logo-icon {
  color: var(--accent);
  font-size: 1.3rem;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.88rem;
}
.nav-links a { color: var(--text-muted); }
.nav-links a:hover { color: var(--text); }
.nav-links .btn { color: var(--text); }

/* ── Hero ── */
.hero {
  max-width: 820px;
  margin: 0 auto;
  padding: 140px 24px 60px;
  text-align: center;
}
.hero-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--green);
  border: 1px solid rgba(52, 211, 153, 0.25);
  background: rgba(52, 211, 153, 0.06);
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  background: linear-gradient(to bottom right, #fff 30%, var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 36px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 60px;
}

/* ── Code blocks ── */
.hero-code, .sdk-code {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: left;
  overflow: hidden;
}
.code-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.code-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.code-dot.red { background: #ff5f57; }
.code-dot.yellow { background: #febc2e; }
.code-dot.green { background: #28c840; }
.code-title {
  margin-left: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
pre {
  padding: 20px 24px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.7;
}
code { font-family: var(--mono); }
.c-comment { color: #4a4a5e; }
.c-kw { color: #c084fc; }
.c-fn { color: #60a5fa; }
.c-str { color: #34d399; }

/* ── Works With ── */
.works-with {
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 24px;
  text-align: center;
}
.works-with-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}
.tool-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.tool-badge {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--bg-card);
  transition: border-color 0.2s, color 0.2s;
}
.tool-badge:hover {
  border-color: var(--accent);
  color: var(--text);
}

/* ── Features ── */
.features {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 24px;
  text-align: center;
}
.features h2, .sdk-section h2, .why-section h2, .get-started h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.section-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 48px;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  text-align: left;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.25s, transform 0.25s;
}
.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 14px;
  color: var(--accent-hover);
}
.feature-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ── SDK Section ── */
.sdk-section {
  max-width: 780px;
  margin: 0 auto;
  padding: 80px 24px;
  text-align: center;
}
.sdk-tabs {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-bottom: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 8px 8px 0;
}
.sdk-tab {
  padding: 8px 20px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: color 0.2s, background 0.2s;
}
.sdk-tab:hover { color: var(--text); }
.sdk-tab.active {
  color: var(--text);
  background: var(--bg-elevated);
}
.sdk-code {
  border-radius: 0 0 var(--radius) var(--radius);
}
.code-panel { display: none; }
.code-panel.active { display: block; }

/* ── Why Section ── */
.why-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 24px;
  text-align: center;
}
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  text-align: left;
}
.why-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.why-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.why-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Get Started ── */
.get-started {
  max-width: 780px;
  margin: 0 auto;
  padding: 80px 24px;
  text-align: center;
}
.get-started-steps {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 40px;
}
.step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-glow);
  border: 1px solid var(--accent);
  color: var(--accent-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.step-content { flex: 1; }
.step-content h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.step-content pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 0.78rem;
}
.get-started-cta {
  margin-top: 48px;
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  margin-top: 40px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.footer-links {
  display: flex;
  gap: 24px;
  font-size: 0.85rem;
}
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--text); }
.footer-copy {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: 1fr; }
  .nav-links a:not(.btn) { display: none; }
  .footer-inner { flex-direction: column; gap: 16px; text-align: center; }
  .hero-actions { flex-direction: column; align-items: center; }
}
@media (max-width: 480px) {
  .feature-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 100px; }
}

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero h1, .hero-sub, .hero-actions, .hero-code, .hero-badge {
  animation: fadeUp 0.6s ease-out both;
}
.hero-badge { animation-delay: 0s; }
.hero h1 { animation-delay: 0.1s; }
.hero-sub { animation-delay: 0.2s; }
.hero-actions { animation-delay: 0.3s; }
.hero-code { animation-delay: 0.4s; }
