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

:root {
  --background: #0a0a0a;
  --foreground: #fafafa;
  --muted: #a1a1aa;
  --muted-foreground: #71717a;
  --border: #27272a;
  --card: #141414;
  --card-hover: #1a1a1a;
  --primary: #f5f5f5;
  --primary-foreground: #0a0a0a;
  --accent: #f59e0b;
  --accent-muted: rgba(245, 158, 11, 0.1);
  --code-string: #a5d6ff;
  --code-number: #79c0ff;
  --code-bracket: #d2a8ff;
  --code-comment: #6e7681;
  --code-keyword: #ff7b72;
  --code-key: #7ee787;
  --radius: 12px;
  --radius-sm: 6px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Noise overlay for texture */
.noise {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.02;
  z-index: 1000;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

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

.nav-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

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

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

.nav-github {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--foreground);
  transition: transform 0.2s, opacity 0.2s;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  background-color: var(--background);
  border-bottom: 1px solid var(--border);
  padding: 1rem;
  z-index: 99;
}

.mobile-menu a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

.mobile-menu a:hover {
  color: var(--foreground);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 1.5rem 4rem;
  background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(245, 158, 11, 0.08), transparent);
}

.hero-content {
  max-width: 800px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: var(--accent-muted);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  color: var(--foreground);
}

.hero-description {
  font-size: 1.25rem;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.btn-primary:hover {
  background-color: #e5e5e5;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background-color: var(--card);
  border-color: var(--muted-foreground);
}

/* Hero Code Block */
.hero-code {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: left;
  max-width: 600px;
  margin: 0 auto;
}

.code-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background-color: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
}

.code-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--border);
}

.code-dot:nth-child(1) { background-color: #ff5f56; }
.code-dot:nth-child(2) { background-color: #ffbd2e; }
.code-dot:nth-child(3) { background-color: #27ca40; }

.code-filename {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.hero-code pre,
.code-block pre {
  margin: 0;
  padding: 1.25rem;
  overflow-x: auto;
}

.hero-code code,
.code-block code {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.7;
}

.code-string { color: var(--code-string); }
.code-number { color: var(--code-number); }
.code-bracket { color: var(--code-bracket); }
.code-comment { color: var(--code-comment); font-style: italic; }
.code-keyword { color: var(--code-keyword); }
.code-key { color: var(--code-key); }

/* Stats Section */
.stats {
  padding: 3rem 1.5rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background-color: rgba(255, 255, 255, 0.01);
}

.stats-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.stat {
  text-align: center;
  padding: 1rem;
}

.stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 0.25rem;
}

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

/* Section Headers */
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3rem;
}

.section-badge {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  background-color: var(--accent-muted);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 100px;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section-description {
  color: var(--muted);
  font-size: 1.125rem;
}

/* Features Section */
.features {
  padding: 6rem 1.5rem;
}

.features-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

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

.feature-card:hover {
  border-color: var(--muted-foreground);
  background-color: var(--card-hover);
}

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

.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

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

/* Examples Section */
.examples {
  padding: 6rem 1.5rem;
  background-color: rgba(255, 255, 255, 0.01);
  border-top: 1px solid var(--border);
}

.examples-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.example-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.example-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.example-card > p {
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.code-block {
  background-color: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.code-block pre {
  margin: 0;
  padding: 1rem;
  overflow-x: auto;
}

.code-block code {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.7;
}

.code-block.terminal {
  background-color: #000;
}

.code-block.terminal code {
  color: #22c55e;
}

/* Docs Section */
.docs {
  padding: 6rem 1.5rem;
  border-top: 1px solid var(--border);
}

.docs-content {
  max-width: 700px;
  margin: 0 auto;
}

.docs-step {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.docs-step:last-child {
  margin-bottom: 0;
}

.step-number {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--accent);
  color: var(--background);
  font-weight: 700;
  border-radius: 50%;
}

.step-content {
  flex: 1;
}

.step-content h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

/* CTA Section */
.cta {
  padding: 6rem 1.5rem;
  background: radial-gradient(ellipse 80% 50% at 50% 100%, rgba(245, 158, 11, 0.08), transparent);
  border-top: 1px solid var(--border);
}

.cta-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.cta h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.cta p {
  color: var(--muted);
  font-size: 1.125rem;
  margin-bottom: 2rem;
}

.cta-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Footer */
.footer {
  padding: 4rem 1.5rem 2rem;
  border-top: 1px solid var(--border);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 4rem;
  margin-bottom: 3rem;
}

.footer-logo p {
  color: var(--muted);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.footer-links {
  display: flex;
  gap: 4rem;
}

.footer-column h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-column a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}

.footer-column a:hover {
  color: var(--foreground);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

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

/* Responsive */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .mobile-menu-btn {
    display: flex;
  }

  .mobile-menu.active {
    display: block;
  }

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

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

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

  .footer-content {
    flex-direction: column;
    gap: 2rem;
  }

  .footer-links {
    gap: 2rem;
  }

  .docs-step {
    flex-direction: column;
    gap: 1rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .section-title {
    font-size: 1.75rem;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

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

  .cta-actions {
    flex-direction: column;
    align-items: center;
  }
}
