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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1e293b;
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

code, pre {
  font-family: 'JetBrains Mono', 'SF Mono', Monaco, 'Cascadia Code', monospace;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ─── Layout ────────────────────────────────────────── */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

.section-alt {
  background: #f8fafc;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.section-header h2 {
  font-size: 40px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.section-header p {
  font-size: 18px;
  color: #64748b;
  line-height: 1.6;
}

/* ─── Hero ──────────────────────────────────────────── */
.hero {
  background:
    radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.08), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.08), transparent 50%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding-bottom: 96px;
  border-bottom: 1px solid #e2e8f0;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
}

.brand {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
}

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

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: #475569;
  transition: color 0.15s;
}

.nav-links a:hover {
  color: #3b82f6;
}

.hero-content {
  text-align: center;
  padding: 72px 0 40px;
  max-width: 800px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 24px;
}

.hero-content h1 {
  font-size: 64px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: #0f172a;
  margin-bottom: 24px;
}

.gradient {
  background: linear-gradient(135deg, #3b82f6 0%, #a855f7 50%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.lede {
  font-size: 20px;
  color: #475569;
  max-width: 640px;
  margin: 0 auto 40px;
  line-height: 1.5;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.15s;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: #0f172a;
  color: #fff;
}

.btn-primary:hover {
  background: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 10px 25px -10px rgba(15, 23, 42, 0.3);
}

.btn-ghost {
  background: #fff;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.btn-ghost:hover {
  border-color: #cbd5e1;
  color: #1e293b;
}

/* ─── Stats ─────────────────────────────────────────── */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 32px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 4px 20px -4px rgba(15, 23, 42, 0.05);
}

.stat {
  text-align: center;
}

.stat-value {
  font-size: 32px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}

/* ─── Cards ─────────────────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  padding: 32px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  transition: all 0.2s;
}

.card:hover {
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.08);
}

.card-featured {
  position: relative;
}

.card-featured::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(135deg, #3b82f6, #a855f7);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.2s;
}

.card-featured:hover::before {
  opacity: 1;
}

.card-header {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 20px;
  font-weight: 600;
  flex-shrink: 0;
}

.card-icon.core {
  background: linear-gradient(135deg, #64748b, #475569);
  color: #fff;
}

.card-icon.react {
  background: linear-gradient(135deg, #06b6d4, #0ea5e9);
  color: #fff;
  font-size: 24px;
}

.card-icon.angular {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
  font-size: 22px;
}

.card h3 {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}

.card-badge {
  display: inline-block;
  padding: 2px 8px;
  background: #f1f5f9;
  color: #475569;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card p {
  color: #475569;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.card code {
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 13px;
  color: #0f172a;
}

.card-footer {
  display: flex;
  gap: 20px;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid #f1f5f9;
}

.card-link-primary {
  color: #3b82f6;
  font-weight: 600;
  font-size: 14px;
  transition: color 0.15s;
}

.card-link-primary:hover {
  color: #2563eb;
}

.card-link {
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s;
}

.card-link:hover {
  color: #1e293b;
}

/* ─── Code blocks ───────────────────────────────────── */
.code-block {
  background: #0f172a;
  color: #e2e8f0;
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
}

.code-block-lg {
  padding: 24px 28px;
  font-size: 14px;
  line-height: 1.7;
}

.code-block code {
  background: transparent;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.code-block .kw {
  color: #c084fc;
}
.code-block .str {
  color: #86efac;
}
.code-block .fn {
  color: #60a5fa;
}
.code-block .cmt {
  color: #64748b;
  font-style: italic;
}

/* ─── Examples ──────────────────────────────────────── */
.example {
  margin-bottom: 48px;
}

.example:last-child {
  margin-bottom: 0;
}

.example-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.example-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.example-icon.core {
  background: linear-gradient(135deg, #64748b, #475569);
}

.example-icon.react {
  background: linear-gradient(135deg, #06b6d4, #0ea5e9);
  font-size: 16px;
}

.example-icon.angular {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  font-size: 15px;
}

.example h3 {
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
}

/* ─── Features grid ─────────────────────────────────── */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.feature {
  padding: 24px;
}

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

.feature h4 {
  font-size: 17px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 8px;
}

.feature p {
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
}

.feature code {
  background: #f1f5f9;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 12px;
  color: #0f172a;
}

/* ─── Demos ─────────────────────────────────────────── */
.demos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.demo-card {
  display: block;
  padding: 40px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.demo-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.04), rgba(168, 85, 247, 0.04));
  opacity: 0;
  transition: opacity 0.2s;
}

.demo-card:hover {
  border-color: #3b82f6;
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -15px rgba(59, 130, 246, 0.15);
}

.demo-card:hover::before {
  opacity: 1;
}

.demo-card > * {
  position: relative;
}

.demo-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-size: 28px;
  color: #fff;
  margin-bottom: 20px;
}

.demo-icon.react {
  background: linear-gradient(135deg, #06b6d4, #0ea5e9);
}

.demo-icon.angular {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.demo-card h3 {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 12px;
}

.demo-card p {
  color: #64748b;
  margin-bottom: 20px;
  line-height: 1.6;
}

.demo-cta {
  color: #3b82f6;
  font-weight: 600;
  font-size: 15px;
}

/* ─── Footer ────────────────────────────────────────── */
.footer {
  padding: 48px 0;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.footer p {
  color: #64748b;
  font-size: 14px;
  margin-top: 4px;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 14px;
  color: #475569;
  font-weight: 500;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: #3b82f6;
}

/* ─── Responsive ────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-content h1 {
    font-size: 44px;
  }

  .lede {
    font-size: 18px;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .cards,
  .features {
    grid-template-columns: 1fr;
  }

  .demos {
    grid-template-columns: 1fr;
  }

  .section-header h2 {
    font-size: 32px;
  }

  .section {
    padding: 64px 0;
  }

  .nav-links a:not(:last-child) {
    display: none;
  }
}

@media (max-width: 500px) {
  .hero-content h1 {
    font-size: 34px;
  }

  .hero-actions {
    flex-direction: column;
  }

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

  .code-block-lg {
    font-size: 12px;
    padding: 16px;
  }
}
