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

:root {
  --bg: #0a0a0f;
  --bg-card: #111119;
  --bg-card-hover: #16161f;
  --bg-dark: #08080d;
  --border: #1e1e2e;
  --text: #e2e8f0;
  --text-muted: #64748b;
  --text-dim: #475569;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --green: #22c55e;
  --amber: #f59e0b;
  --pink: #ec4899;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
}

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

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

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

code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875em;
  background: rgba(99, 102, 241, 0.1);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: var(--accent-light);
}

/* ===== Container ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 800px;
}

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

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

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

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  background: none;
  color: var(--text);
}

.btn-sm {
  padding: 6px 16px;
  background: var(--accent);
  color: white;
  font-weight: 600;
}

.btn-sm:hover {
  background: var(--accent-light);
}

.btn-primary {
  background: var(--accent);
  color: white;
  font-weight: 600;
  padding: 12px 28px;
  font-size: 0.9375rem;
  box-shadow: 0 0 20px var(--accent-glow), 0 0 60px rgba(99, 102, 241, 0.08);
}

.btn-primary:hover {
  background: var(--accent-light);
  box-shadow: 0 0 30px var(--accent-glow), 0 0 80px rgba(99, 102, 241, 0.12);
  transform: translateY(-1px);
}

.btn-ghost {
  border: 1px solid var(--border);
  padding: 12px 28px;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.btn-ghost:hover {
  border-color: var(--text-dim);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

/* ===== Badge ===== */
.badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent-light);
  background: var(--accent-glow);
  border: 1px solid rgba(99, 102, 241, 0.2);
  margin-bottom: 20px;
  letter-spacing: 0.01em;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 180px 0 80px;
  text-align: center;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 24px;
  background: linear-gradient(to bottom, #ffffff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.hero-sub em {
  color: var(--accent-light);
  font-style: italic;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 60px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* ===== Logos ===== */
.logos-section {
  padding: 60px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.logos-label {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 32px;
}

.logos-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dim);
  opacity: 0.4;
  letter-spacing: -0.01em;
}

/* ===== Sections ===== */
.section {
  padding: 120px 0;
}

.section-dark {
  background: var(--bg-dark);
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.section-sub {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ===== Charts ===== */
.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
}

.chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.chart-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.chart-sub {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.chart-legend {
  display: flex;
  gap: 20px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.chart-footnote {
  margin-top: 20px;
  font-size: 0.8125rem;
  color: var(--text-dim);
  font-style: italic;
}

/* ===== Bar Chart ===== */
.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.bar-label {
  width: 120px;
  flex-shrink: 0;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: right;
  color: var(--text-muted);
}

.bar-track {
  flex: 1;
  height: 40px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.bar {
  height: 100%;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: white;
  width: var(--bar-width);
  min-width: fit-content;
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.bar-value {
  white-space: nowrap;
}

.bar-rift {
  background: linear-gradient(90deg, #6366f1, #a855f7);
}

.bar-v8 {
  background: linear-gradient(90deg, #16a34a, #22c55e);
}

.bar-sm {
  background: linear-gradient(90deg, #d97706, #f59e0b);
}

.bar-jsc {
  background: linear-gradient(90deg, #db2777, #ec4899);
}

/* ===== Line Chart ===== */
.line-chart-container {
  width: 100%;
  overflow: hidden;
}

.line-chart {
  width: 100%;
  height: auto;
}

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all 0.3s;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(99, 102, 241, 0.2);
  transform: translateY(-2px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent-light);
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

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

/* ===== Comparison Table ===== */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.comparison-table th,
.comparison-table td {
  padding: 16px 24px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.comparison-table thead th {
  background: var(--bg-card);
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.comparison-table tbody tr:last-child td {
  border-bottom: none;
}

.comparison-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.comparison-table .check {
  color: var(--green);
}

.comparison-table .cross {
  color: #ef4444;
}

.comparison-table .highlight-col {
  background: rgba(99, 102, 241, 0.05);
  font-weight: 500;
}

.comparison-table thead .highlight-col {
  color: var(--accent-light);
  background: rgba(99, 102, 241, 0.1);
}

.table-footnote {
  margin-top: 16px;
  font-size: 0.8125rem;
  color: var(--text-dim);
}

/* ===== Code Block ===== */
.code-block {
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 700px;
  margin: 0 auto;
}

.code-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}

.code-dots {
  display: flex;
  gap: 6px;
}

.code-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
}

.code-dots span:nth-child(1) { background: #ef4444; }
.code-dots span:nth-child(2) { background: #f59e0b; }
.code-dots span:nth-child(3) { background: #22c55e; }

.code-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.code-block pre {
  padding: 24px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8125rem;
  line-height: 1.8;
}

.code-comment {
  color: var(--text-dim);
}

.code-prompt {
  color: var(--green);
  user-select: none;
}

.code-output {
  color: var(--text-muted);
}

/* ===== Testimonials ===== */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all 0.3s;
}

.testimonial-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.testimonial-stars {
  color: var(--amber);
  font-size: 0.875rem;
  margin-bottom: 16px;
  letter-spacing: 2px;
}

.testimonial-card > p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 24px;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
}

.author-name {
  font-weight: 600;
  font-size: 0.875rem;
}

.author-title {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ===== FAQ ===== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.faq-item:hover {
  border-color: rgba(99, 102, 241, 0.2);
}

.faq-item summary {
  padding: 20px 24px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9375rem;
  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: 1.25rem;
  color: var(--text-dim);
  font-weight: 300;
  transition: transform 0.2s;
}

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

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

/* ===== CTA ===== */
.cta-section {
  text-align: center;
  position: relative;
}

.cta-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.cta-section h2 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.cta-section .section-sub {
  margin-bottom: 40px;
}

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

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

.footer-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--text-dim);
}

.footer-links {
  display: flex;
  gap: 24px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

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

/* ===== Animations ===== */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hero {
    padding: 140px 0 60px;
  }

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

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

  .hero-stats {
    gap: 20px;
  }

  .stat-divider {
    display: none;
  }

  .bar-label {
    width: 80px;
    font-size: 0.75rem;
  }

  .chart-card {
    padding: 20px;
  }

  .logos-grid {
    gap: 30px;
  }

  .footer-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .section {
    padding: 80px 0;
  }
}
