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

:root {
  --bg: #0a0a0a;
  --bg-secondary: #111111;
  --bg-tertiary: #1a1a1a;
  --border: #222222;
  --border-light: #2a2a2a;
  --text: #fafafa;
  --text-secondary: #a0a0a0;
  --text-tertiary: #666666;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-glow: rgba(59, 130, 246, 0.15);
  --gradient-1: #3b82f6;
  --gradient-2: #8b5cf6;
  --gradient-3: #06b6d4;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --transition: 0.2s ease;
}

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

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

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: all var(--transition);
}

.nav-scrolled {
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

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

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

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

.nav-links a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color var(--transition);
  font-weight: 500;
}

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

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

.nav-mobile.active {
  display: flex;
}

.nav-mobile a {
  font-size: 16px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  font-family: inherit;
  white-space: nowrap;
}

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

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 0 24px var(--primary-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-light);
}

.btn-outline:hover {
  background: var(--bg-tertiary);
  border-color: var(--text-tertiary);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
  border-radius: var(--radius);
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  padding: 160px 0 100px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-gradient {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, var(--primary-glow) 0%, transparent 70%);
  opacity: 0.6;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 20%, transparent 100%);
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.badge svg {
  color: var(--primary);
}

.hero h1 {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2), var(--gradient-3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

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

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

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 500;
}

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

/* ===== Section Headers ===== */
.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

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

.section-header p {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ===== Features ===== */
.features {
  padding: 120px 0;
  border-top: 1px solid var(--border);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
}

.feature-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.feature-card:hover {
  border-color: var(--border-light);
  background: var(--bg-tertiary);
  transform: translateY(-4px);
}

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

.feature-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== How It Works ===== */
.how-it-works {
  padding: 120px 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

.steps {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.step {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  opacity: 0;
  transform: translateX(-20px);
}

.step.visible {
  opacity: 1;
  transform: translateX(0);
}

.step-number {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
}

.step-content h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.step-content p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.step-connector {
  width: 2px;
  height: 32px;
  background: linear-gradient(to bottom, var(--border-light), transparent);
  margin-left: 23px;
}

/* ===== Screenshots ===== */
.screenshots {
  padding: 120px 0;
  border-top: 1px solid var(--border);
}

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

.screenshot-card {
  opacity: 0;
  transform: translateY(20px);
}

.screenshot-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.screenshot-card-large {
  grid-column: span 2;
}

.screenshot-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.screenshot-frame {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--bg-secondary);
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.screenshot-card-large .screenshot-frame {
  aspect-ratio: 21 / 9;
}

.screenshot-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.screenshot-card:hover .screenshot-frame img {
  transform: scale(1.02);
}

/* Placeholder for missing screenshots */
.screenshot-frame img[src$=".png"]:not([src^="data"]) {
  object-fit: contain;
  padding: 40px;
}

/* ===== AI IDE Section ===== */
.ai-ide {
  padding: 120px 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

.ai-ide-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  opacity: 0;
  transform: translateY(20px);
}

.ai-ide-content.visible {
  opacity: 1;
  transform: translateY(0);
}

.ai-ide-text h2 {
  font-size: clamp(28px, 3.5vw, 36px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  margin-top: 16px;
}

.ai-ide-text p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
}

.ide-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.ide-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
}

.ide-item svg {
  color: #22c55e;
  flex-shrink: 0;
}

.code-window {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  background: #0d0d0d;
}

.code-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
}

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

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

.code-dots span:nth-child(1) { background: #ff5f57; }
.code-dots span:nth-child(2) { background: #febc2e; }
.code-dots span:nth-child(3) { background: #28c840; }

.code-title {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.code-body {
  padding: 24px;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 13px;
  line-height: 1.8;
  overflow-x: auto;
}

.code-comment { color: #6b7280; }
.code-prompt { color: #22c55e; }
.code-keyword { color: var(--text); }
.code-string { color: #f59e0b; }
.code-success { color: #22c55e; }

/* ===== Tech Stack ===== */
.tech-stack {
  padding: 120px 0;
  border-top: 1px solid var(--border);
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.tech-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
}

.tech-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.tech-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.tech-name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.tech-desc {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ===== CTA ===== */
.cta {
  padding: 120px 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

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

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

.cta p {
  font-size: 17px;
  color: var(--text-secondary);
  margin-bottom: 40px;
  line-height: 1.7;
}

.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

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

.footer-content {
  display: grid;
  grid-template-columns: 1.5fr 2fr;
  gap: 64px;
  margin-bottom: 48px;
}

.footer-brand p {
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-tertiary);
  line-height: 1.6;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--text-tertiary);
  padding: 4px 0;
  transition: color var(--transition);
}

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

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-bottom p {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ===== Animations ===== */
.feature-card,
.step,
.screenshot-card,
.tech-card,
.ai-ide-content {
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.feature-card:nth-child(2) { transition-delay: 0.1s; }
.feature-card:nth-child(3) { transition-delay: 0.2s; }
.feature-card:nth-child(4) { transition-delay: 0.3s; }
.feature-card:nth-child(5) { transition-delay: 0.4s; }
.feature-card:nth-child(6) { transition-delay: 0.5s; }
.feature-card:nth-child(7) { transition-delay: 0.6s; }
.feature-card:nth-child(8) { transition-delay: 0.7s; }

.step:nth-child(3) { transition-delay: 0.1s; }
.step:nth-child(5) { transition-delay: 0.2s; }
.step:nth-child(7) { transition-delay: 0.3s; }
.step:nth-child(9) { transition-delay: 0.4s; }

.tech-card:nth-child(2) { transition-delay: 0.05s; }
.tech-card:nth-child(3) { transition-delay: 0.1s; }
.tech-card:nth-child(4) { transition-delay: 0.15s; }
.tech-card:nth-child(5) { transition-delay: 0.2s; }
.tech-card:nth-child(6) { transition-delay: 0.25s; }
.tech-card:nth-child(7) { transition-delay: 0.3s; }
.tech-card:nth-child(8) { transition-delay: 0.35s; }

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

  .tech-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .ai-ide-content {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

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

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding: 120px 0 80px;
  }

  .hero h1 {
    font-size: clamp(32px, 8vw, 48px);
  }

  .hero-description {
    font-size: 16px;
  }

  .hero-stats {
    gap: 24px;
  }

  .stat-value {
    font-size: 24px;
  }

  .features,
  .how-it-works,
  .screenshots,
  .ai-ide,
  .tech-stack,
  .cta {
    padding: 80px 0;
  }

  .section-header {
    margin-bottom: 48px;
  }

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

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

  .screenshot-card-large {
    grid-column: span 1;
  }

  .screenshot-card-large .screenshot-frame {
    aspect-ratio: 16 / 9;
  }

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

  .footer-content {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .footer-links {
    grid-template-columns: repeat(3, 1fr);
  }

  .ide-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

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

  .hero-actions .btn {
    width: 100%;
  }

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

  .cta-actions .btn {
    width: 100%;
  }

  .footer-links {
    grid-template-columns: 1fr 1fr;
  }

  .hero-stats {
    flex-direction: column;
    gap: 16px;
  }

  .stat-divider {
    width: 40px;
    height: 1px;
  }
}
