/* ===== CSS VARIABLES ===== */
:root {
  --bg: #0F172A;
  --surface: #1E293B;
  --surface-el: #334155;
  --border: #334155;
  --border-hover: #475569;
  --primary: #06B6D4;
  --primary-hover: #0891B2;
  --primary-dim: rgba(6, 182, 212, 0.12);
  --secondary: #8B5CF6;
  --secondary-dim: rgba(139, 92, 246, 0.12);
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --text: #F8FAFC;
  --text-sec: #94A3B8;
  --text-muted: #64748B;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --transition: 150ms ease;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--primary); color: var(--bg); }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }
.hidden { display: none !important; }

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

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-sec);
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}
.nav-link {
  padding: 6px 12px;
  font-size: 14px;
  color: var(--text-sec);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover { color: var(--text); background: var(--surface); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: var(--bg);
  border: 1px solid var(--primary);
}
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-primary:active { transform: scale(0.98); }
.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}
.btn-secondary:hover { background: var(--primary-dim); }
.btn-ghost {
  background: transparent;
  color: var(--text-sec);
  border: 1px solid transparent;
}
.btn-ghost:hover { color: var(--text); background: var(--surface); }
.btn-full { width: 100%; justify-content: center; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(6, 182, 212, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6, 182, 212, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}
.hero .container {
  position: relative;
  z-index: 1;
  text-align: center;
}
.hero-headline {
  font-size: 56px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  font-family: var(--font-mono);
}
.hero-sub {
  font-size: 18px;
  color: var(--text-sec);
  max-width: 600px;
  margin: 0 auto 32px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 48px;
}
.hero-code {
  max-width: 600px;
  margin: 0 auto 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: left;
}
.code-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface-el);
  border-bottom: 1px solid var(--border);
}
.code-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.code-dot.red { background: #EF4444; }
.code-dot.yellow { background: #F59E0B; }
.code-dot.green { background: #10B981; }
.code-title {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 8px;
  font-family: var(--font-mono);
}
.code-content {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-sec);
}
.code-comment { color: var(--text-muted); }
.code-prompt { color: var(--primary); }
.code-cmd { color: var(--text); font-weight: 500; }
.code-success { color: var(--success); }
.code-hash { color: var(--secondary); }
.hero-proof {
  font-size: 14px;
  color: var(--text-muted);
}
.hero-proof strong { color: var(--text); }

/* ===== SECTIONS ===== */
.section-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: 12px;
}
.section-title {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  font-family: var(--font-mono);
}
.section-sub {
  font-size: 18px;
  color: var(--text-sec);
  max-width: 600px;
  margin-bottom: 48px;
}

/* ===== PROBLEM ===== */
.section-problem {
  padding: 80px 0;
  background: var(--surface);
}
.section-problem .section-title {
  text-align: center;
}
.section-problem .section-sub {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.problem-card {
  padding: 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-left: 3px solid var(--danger);
}
.problem-icon {
  margin-bottom: 16px;
}
.problem-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}
.problem-card p {
  font-size: 14px;
  color: var(--text-sec);
  line-height: 1.6;
}

/* ===== HOW IT WORKS ===== */
.section-how {
  padding: 80px 0;
}
.section-how .container {
  text-align: center;
}
.steps-flow {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
  margin-bottom: 48px;
}
.step-item {
  flex: 0 0 auto;
  max-width: 200px;
}
.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--bg);
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-family: var(--font-mono);
}
.step-content h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}
.step-content p {
  font-size: 14px;
  color: var(--text-sec);
}
.step-content code {
  font-family: var(--font-mono);
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}
.step-connector {
  width: 60px;
  height: 2px;
  background: var(--border);
  margin-top: 20px;
  flex-shrink: 0;
}
.workflow-demo {
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: inline-block;
}
.git-graph {
  margin-bottom: 24px;
}
.supported-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.supported-tag {
  background: var(--surface-el);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-sec);
}

/* ===== FEATURES ===== */
.section-features {
  padding: 80px 0;
  background: var(--surface);
}
.section-features .container {
  text-align: center;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  padding: 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: left;
  transition: border-color var(--transition);
}
.feature-card:hover {
  border-color: var(--primary);
}
.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.feature-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 14px;
  color: var(--text-sec);
  line-height: 1.6;
}

/* ===== DEMO ===== */
.section-demo {
  padding: 80px 0;
}
.section-demo .container {
  text-align: center;
}
.demo-terminal {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: left;
}
.demo-tabs {
  display: flex;
  gap: 2px;
  padding: 12px 12px 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.demo-tab {
  padding: 8px 16px;
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--text-sec);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: all var(--transition);
}
.demo-tab:hover { color: var(--text); background: var(--surface-el); }
.demo-tab.active { color: var(--primary); background: var(--bg); border-bottom: 2px solid var(--primary); }
.demo-content {
  padding: 24px;
}
.demo-code {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-sec);
  white-space: pre-wrap;
}
.cursor {
  animation: blink 1s infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.diff-header { color: var(--primary); }
.diff-meta { color: var(--text-muted); }
.diff-removed { color: var(--danger); background: rgba(239, 68, 68, 0.1); padding-left: 16px; display: block; }
.diff-added { color: var(--success); background: rgba(16, 185, 129, 0.1); padding-left: 16px; display: block; }
.demo-actions {
  display: flex;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}
.history-visual {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.commit-row {
  display: grid;
  grid-template-columns: 70px 50px 1fr auto;
  gap: 16px;
  padding: 12px 16px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: var(--font-mono);
  align-items: center;
}
.commit-row.faded { opacity: 0.5; }
.commit-hash { color: var(--secondary); }
.commit-branch {
  display: inline-block;
  padding: 2px 8px;
  background: var(--surface-el);
  border-radius: 4px;
  font-size: 11px;
  color: var(--text-muted);
}
.commit-branch.main { background: var(--primary-dim); color: var(--primary); }
.commit-msg { color: var(--text); }
.commit-time { color: var(--text-muted); text-align: right; }

/* ===== INTEGRATIONS ===== */
.section-integrations {
  padding: 80px 0;
  background: var(--surface);
}
.section-integrations .container {
  text-align: center;
}
.integrations-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}
.integration-card {
  padding: 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: left;
  transition: border-color var(--transition);
}
.integration-card:hover { border-color: var(--secondary); }
.integration-icon { margin-bottom: 16px; }
.integration-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.integration-card p { font-size: 14px; color: var(--text-sec); margin-bottom: 16px; }
.integration-link {
  font-size: 13px;
  color: var(--primary);
  transition: color var(--transition);
}
.integration-link:hover { color: var(--primary-hover); }
.integrations-note { font-size: 14px; color: var(--text-muted); }

/* ===== PRICING ===== */
.section-pricing {
  padding: 80px 0;
}
.section-pricing .container {
  text-align: center;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}
.pricing-card {
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: left;
  position: relative;
}
.pricing-card.featured {
  border-color: var(--primary);
  background: linear-gradient(180deg, var(--primary-dim) 0%, var(--surface) 100%);
}
.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: var(--bg);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}
.pricing-header { margin-bottom: 24px; }
.pricing-header h3 {
  font-size: 18px;
  font-weight: 600;
  font-family: var(--font-mono);
  margin-bottom: 8px;
}
.pricing-price { display: flex; align-items: baseline; gap: 4px; }
.price-amount { font-size: 40px; font-weight: 700; font-family: var(--font-mono); }
.price-period { font-size: 16px; color: var(--text-muted); }
.pricing-features {
  margin-bottom: 24px;
}
.pricing-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-sec);
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.pricing-features li:last-child { border-bottom: none; }
.pricing-features .check { color: var(--success); font-weight: 600; }
.pricing-features .dimmed { color: var(--text-muted); }
.pricing-note { font-size: 14px; color: var(--text-muted); }

/* ===== FAQ ===== */
.section-faq {
  padding: 80px 0;
  background: var(--surface);
}
.section-faq .container {
  text-align: center;
}
.faq-list {
  max-width: 700px;
  margin: 0 auto;
  text-align: left;
}
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  transition: color var(--transition);
}
.faq-question:hover { color: var(--primary); }
.faq-icon { transition: transform var(--transition); flex-shrink: 0; color: var(--text-muted); }
.faq-item.open .faq-icon { transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 300ms ease;
}
.faq-item.open .faq-answer { max-height: 200px; }
.faq-answer p {
  padding-bottom: 20px;
  font-size: 14px;
  color: var(--text-sec);
  line-height: 1.7;
}
.faq-answer code {
  font-family: var(--font-mono);
  background: var(--surface-el);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

/* ===== CTA ===== */
.section-cta {
  padding: 100px 0;
  background: linear-gradient(180deg, var(--bg) 0%, #0c2535 100%);
  text-align: center;
}
.cta-title {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  font-family: var(--font-mono);
}
.cta-sub {
  font-size: 18px;
  color: var(--text-sec);
  margin-bottom: 32px;
}
.cta-form {
  display: flex;
  gap: 12px;
  max-width: 500px;
  margin: 0 auto 24px;
}
.cta-input {
  flex: 1;
  padding: 14px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  color: var(--text);
  transition: border-color var(--transition);
}
.cta-input::placeholder { color: var(--text-muted); }
.cta-input:focus { outline: none; border-color: var(--primary); }
.cta-trust {
  font-size: 14px;
  color: var(--text-muted);
}
.signup-success {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--success);
  border-radius: var(--radius);
  color: var(--success);
  font-weight: 600;
}

/* ===== FOOTER ===== */
.footer {
  padding: 60px 0 40px;
  border-top: 1px solid var(--border);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand .nav-logo { margin-bottom: 12px; }
.footer-tagline {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.footer-social {
  display: flex;
  gap: 12px;
}
.footer-social a {
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer-social a:hover { color: var(--text); }
.footer-col h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
}
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}

/* ===== REVEAL ANIMATION ===== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 400ms ease, transform 400ms ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .features-grid, .integrations-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .hero-headline { font-size: 36px; }
  .section-title { font-size: 28px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-code { display: none; }
  .problem-grid, .features-grid, .pricing-grid, .integrations-grid {
    grid-template-columns: 1fr;
  }
  .steps-flow {
    flex-direction: column;
    align-items: center;
  }
  .step-connector {
    width: 2px;
    height: 40px;
    margin: 0;
  }
  .cta-form {
    flex-direction: column;
  }
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-links .btn { display: none; }
  .commit-row {
    grid-template-columns: 60px 1fr;
    gap: 8px;
  }
  .commit-branch, .commit-time { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 375px) {
  .container { padding: 0 16px; }
  .hero { padding: 100px 0 60px; }
  .section-problem, .section-how, .section-features, .section-demo, .section-integrations, .section-pricing, .section-faq {
    padding: 60px 0;
  }
  .section-cta { padding: 80px 0; }
  .pricing-card { padding: 24px; }
  .btn-lg { padding: 12px 24px; font-size: 14px; }
}