/* =========================================
   STACKFLOW — Landing Page Theme
   Dark terminal aesthetic, developer-native
   ========================================= */

:root {
  --bg-primary: #0a0b0f;
  --bg-secondary: #0f1117;
  --bg-card: #141720;
  --bg-card-hover: #191d28;
  --bg-terminal: #080a0e;
  --fg-primary: #f0f2f7;
  --fg-secondary: #8892a4;
  --fg-dim: #4a5268;
  --accent-lime: #a3e635;
  --accent-lime-dim: rgba(163, 230, 53, 0.15);
  --accent-lime-glow: rgba(163, 230, 53, 0.4);
  --accent-yellow: #fbbf24;
  --accent-red: #f87171;
  --accent-blue: #60a5fa;
  --border: rgba(255,255,255,0.06);
  --border-lime: rgba(163,230,53,0.2);
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-sans: 'DM Sans', system-ui, sans-serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

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

body {
  background: var(--bg-primary);
  color: var(--fg-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Background atmosphere */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(163,230,53,0.04) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(96,165,250,0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

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

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

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--fg-primary);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.02em;
}

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

.nav-links a {
  text-decoration: none;
  color: var(--fg-secondary);
  font-size: 14px;
  font-weight: 400;
  transition: color 0.15s;
}

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

/* ---- Hero ---- */
.hero {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 140px 24px 100px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-lime-dim);
  border: 1px solid var(--border-lime);
  border-radius: 100px;
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-lime);
  margin-bottom: 28px;
  letter-spacing: 0.02em;
}

.hero-tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-lime);
  box-shadow: 0 0 6px var(--accent-lime);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--accent-lime); }
  50% { opacity: 0.5; box-shadow: 0 0 12px var(--accent-lime); }
}

.hero-headline {
  font-family: var(--font-mono);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero-highlight {
  color: var(--accent-lime);
  position: relative;
}

.hero-sub {
  font-size: 17px;
  color: var(--fg-secondary);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 440px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
}

.hero-stat { display: flex; flex-direction: column; gap: 2px; }

.stat-num {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-lime);
}

.stat-label {
  font-size: 12px;
  color: var(--fg-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hero-stat-sep {
  width: 1px;
  height: 32px;
  background: var(--border);
}

/* Terminal window */
.hero-visual { position: relative; }

.terminal-window {
  background: var(--bg-terminal);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(163,230,53,0.06),
    0 20px 60px rgba(0,0,0,0.5),
    0 0 80px rgba(163,230,53,0.05);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}

.terminal-dots { display: flex; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-red { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-dim);
  flex: 1;
  text-align: center;
}

.terminal-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.8;
  min-height: 280px;
}

.terminal-line { white-space: pre-wrap; }
.t-dim { color: var(--fg-dim); }
.t-gray { color: #6b7280; }
.t-green { color: #4ade80; }
.t-yellow { color: var(--accent-yellow); }
.t-red { color: var(--accent-red); }
.t-blue { color: var(--accent-blue); }
.t-lime { color: var(--accent-lime); }

.cursor-line { margin-top: 4px; }
.cursor-blink {
  color: var(--accent-lime);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-badge {
  position: absolute;
  bottom: -16px;
  left: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-secondary);
}

.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-lime);
  box-shadow: 0 0 6px var(--accent-lime);
}

/* ---- Demo Section ---- */
.demo-section {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 120px;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-lime);
  margin-bottom: 16px;
}

.section-headline {
  font-family: var(--font-mono);
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-bottom: 48px;
  max-width: 600px;
}

.demo-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
  align-items: start;
}

.demo-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.demo-card-main { padding: 20px; }

.demo-card-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.pr-list { display: flex; flex-direction: column; gap: 8px; }

.pr-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
}

.pr-item-current {
  border-color: var(--border-lime);
  background: rgba(163,230,53,0.03);
}

.pr-num { color: var(--fg-dim); min-width: 32px; }
.pr-title { flex: 1; color: var(--fg-primary); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-time { color: var(--fg-dim); font-size: 11px; }

.pr-badge {
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.pr-badge-fixed { background: rgba(74,222,128,0.15); color: #4ade80; }
.pr-badge-ok { background: rgba(100,116,139,0.15); color: var(--fg-secondary); }
.pr-badge-warn { background: rgba(251,191,36,0.15); color: var(--accent-yellow); }
.pr-badge-reviewing { background: rgba(163,230,53,0.15); color: var(--accent-lime); }

.demo-right-col { display: flex; flex-direction: column; gap: 16px; }

.demo-card-compact { padding: 20px; }

.big-stat {
  font-family: var(--font-mono);
  font-size: 40px;
  font-weight: 700;
  color: var(--accent-lime);
  line-height: 1;
  margin-bottom: 6px;
}

.big-stat-sub {
  font-size: 12px;
  color: var(--fg-dim);
  line-height: 1.4;
}

/* ---- Features ---- */
.features-section {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 120px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.feature-card {
  background: var(--bg-card);
  padding: 32px;
  transition: background 0.2s;
}

.feature-card:hover { background: var(--bg-card-hover); }

.feature-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-lime-dim);
  border: 1px solid var(--border-lime);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-title {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--fg-primary);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.feature-desc {
  font-size: 14px;
  color: var(--fg-secondary);
  line-height: 1.65;
}

/* ---- How it works ---- */
.how-section {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px 120px;
}

.steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-bottom: 48px;
}

.step {
  flex: 1;
  padding: 0 32px 0 0;
}

.step-connector {
  width: 60px;
  height: 1px;
  background: var(--border);
  margin-top: 28px;
  flex-shrink: 0;
  position: relative;
}

.step-connector::after {
  content: '';
  position: absolute;
  right: 0;
  top: -3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-lime);
  box-shadow: 0 0 6px var(--accent-lime);
}

.step-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-lime);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.step-title {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--fg-primary);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.step-desc {
  font-size: 14px;
  color: var(--fg-secondary);
  line-height: 1.65;
}

.how-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-terminal);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  width: fit-content;
}

.code-snippet {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent-lime);
  background: none;
  border: none;
}

.code-hint {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-dim);
}

/* ---- Manifesto ---- */
.manifesto-section {
  position: relative;
  z-index: 1;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 100px 24px;
}

.manifesto-inner { max-width: 680px; margin: 0 auto; }

.manifesto-quote {
  font-family: var(--font-mono);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  color: var(--fg-primary);
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 28px;
  font-style: italic;
}

.manifesto-body {
  font-size: 16px;
  color: var(--fg-secondary);
  line-height: 1.8;
  margin-bottom: 20px;
}

.manifesto-highlight {
  color: var(--fg-primary);
  font-weight: 500;
}

.manifesto-divider {
  width: 40px;
  height: 2px;
  background: var(--accent-lime);
  margin: 40px 0;
  box-shadow: 0 0 8px var(--accent-lime-glow);
}

.manifesto-stats {
  display: flex;
  gap: 48px;
}

.m-stat { display: flex; flex-direction: column; gap: 4px; }

.m-num {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-lime);
}

.m-label {
  font-size: 12px;
  color: var(--fg-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  max-width: 120px;
  line-height: 1.4;
}

/* ---- Closing ---- */
.closing-section {
  position: relative;
  z-index: 1;
  padding: 100px 24px 120px;
  text-align: center;
}

.closing-inner { max-width: 600px; margin: 0 auto; }

.closing-headline {
  font-family: var(--font-mono);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.closing-sub {
  font-size: 18px;
  color: var(--fg-secondary);
  margin-bottom: 48px;
}

.closing-terminal {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 16px;
  background: var(--bg-terminal);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 28px;
}

/* ---- Footer ---- */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 32px 24px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--fg-secondary);
}

.footer-copy {
  font-size: 13px;
  color: var(--fg-dim);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 48px;
    padding: 120px 24px 80px;
  }

  .hero-headline { font-size: 30px; }
  .hero-sub { font-size: 15px; }

  .hero-stats { flex-wrap: wrap; gap: 16px; }
  .hero-stat-sep { display: none; }

  .demo-grid { grid-template-columns: 1fr; }
  .demo-right-col { flex-direction: row; }
  .demo-card-compact { flex: 1; }

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

  .steps { flex-direction: column; gap: 0; }
  .step { padding: 0 0 32px 0; }
  .step-connector { display: none; }

  .manifesto-stats { flex-direction: column; gap: 24px; }

  .footer-inner { flex-direction: column; gap: 16px; text-align: center; }

  .nav-links { display: none; }
}

/* ---- CTA Buttons (hero + landing) ---- */
.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-lime);
  color: #000;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s, box-shadow 0.15s;
  box-shadow: 0 0 20px rgba(163,230,53,0.2);
}
.btn-cta:hover { opacity: 0.88; box-shadow: 0 0 32px rgba(163,230,53,0.35); }

.btn-cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--fg-secondary);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.btn-cta-secondary:hover { border-color: var(--accent-lime); color: var(--accent-lime); }

/* Nav GitHub button */
.nav-cta-github {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--fg-primary);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.nav-cta-github:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.15); }

/* ---- Pricing Section ---- */
.pricing-section {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 120px;
}

.pricing-header { text-align: center; margin-bottom: 56px; }
.pricing-label { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent-lime); margin-bottom: 16px; }
.pricing-headline { font-family: var(--font-mono); font-size: clamp(28px, 3.5vw, 44px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; }
.pricing-sub { font-size: 16px; color: var(--fg-secondary); margin-top: 12px; }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: start;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.pricing-card:hover { border-color: rgba(255,255,255,0.1); }

.pricing-card.featured {
  border-color: var(--border-lime);
  box-shadow: 0 0 0 1px var(--border-lime), 0 0 40px rgba(163,230,53,0.08);
  position: relative;
}

.pricing-card.featured::before {
  content: 'MOST POPULAR';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-lime);
  color: #000;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 4px 12px;
  border-radius: 100px;
}

.pricing-tier { font-family: var(--font-mono); font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--fg-secondary); margin-bottom: 8px; }
.pricing-price { display: flex; align-items: baseline; gap: 4px; margin-bottom: 8px; }
.pricing-amount { font-family: var(--font-mono); font-size: 44px; font-weight: 700; color: var(--fg-primary); }
.pricing-period { font-size: 14px; color: var(--fg-dim); }
.pricing-desc { font-size: 14px; color: var(--fg-secondary); line-height: 1.6; margin-bottom: 24px; min-height: 48px; }
.pricing-divider { height: 1px; background: var(--border); margin: 24px 0; }
.pricing-features { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; flex: 1; }
.pricing-feature { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--fg-secondary); }
.pricing-feature-icon { color: var(--accent-lime); font-size: 16px; flex-shrink: 0; }
.pricing-cta { width: 100%; justify-content: center; }

.pricing-card .btn-cta-secondary { width: 100%; justify-content: center; }

.pricing-enterprise-note {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--fg-dim);
}

@media (max-width: 768px) {
  .pricing-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .pricing-card.featured { order: -1; }
}

@media (max-width: 480px) {
  .big-stat { font-size: 28px; }
  .demo-right-col { flex-direction: column; }
}
