/* ============================
   1. Design Tokens
   ============================ */
:root {
  /* Backgrounds */
  --bg-deep: #0c0a1a;
  --bg-surface: #110e24;
  --bg-card: rgba(255, 255, 255, 0.04);

  /* Neon accents */
  --glow-pink: #ec4899;
  --glow-purple: #8b5cf6;
  --glow-orange: #f97316;
  --glow-coral: #fb7185;

  /* Text */
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-dim: #52525b;

  /* Glass */
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(255, 255, 255, 0.15);
  --glass-blur: blur(20px);

  /* Fonts */
  --font-sans: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ============================
   2. Reset & Base
   ============================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ============================
   3. Layout
   ============================ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.stage { padding: 100px 0; min-height: 80vh; position: relative; }

/* ============================
   4. Navigation
   ============================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(12, 10, 26, 0.8);
  border-bottom: 1px solid var(--glass-border);
  transition: box-shadow 0.3s ease;
}
.nav.scrolled { box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3); }
.nav .container {
  display: flex; justify-content: space-between; align-items: center; height: 64px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.2rem; color: var(--text-primary);
}
.nav-links { display: none; list-style: none; gap: 32px; }
.nav-links a {
  color: var(--text-secondary); font-size: 0.9rem; font-weight: 500;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--glow-pink); }
.nav-cta {
  display: inline-flex; align-items: center;
  background: linear-gradient(135deg, var(--glow-pink), var(--glow-orange));
  color: white; padding: 10px 24px; border-radius: 10px;
  font-weight: 600; font-size: 0.875rem; border: none; cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 15px rgba(236, 72, 153, 0.3);
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(236, 72, 153, 0.45);
}
.mobile-menu-btn {
  display: block; background: none; border: none;
  font-size: 1.5rem; cursor: pointer; color: var(--text-primary); padding: 4px;
}

/* ============================
   5. Hero (shared)
   ============================ */
.hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  text-align: center; position: relative; overflow: hidden;
  padding: 80px 0 60px;
  background: radial-gradient(ellipse at 50% 0%, rgba(139, 92, 246, 0.15) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 50%, rgba(236, 72, 153, 0.1) 0%, transparent 50%),
              var(--bg-deep);
}
.hero .container { position: relative; z-index: 2; }
.hero h1 {
  font-size: 2.2rem; font-weight: 800; line-height: 1.1;
  max-width: 800px; margin: 0 auto; letter-spacing: -0.02em;
}
.hero p.subtitle {
  font-size: 1rem; color: var(--text-secondary);
  max-width: 600px; margin: 24px auto 0; line-height: 1.7;
}
.hero-ctas {
  display: flex; gap: 16px; justify-content: center; margin-top: 32px; flex-wrap: wrap;
}
#particles-canvas {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  z-index: 1; pointer-events: none;
}

/* ============================
   6. Buttons
   ============================ */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--glow-pink), var(--glow-orange));
  color: white; padding: 14px 32px; border-radius: 12px;
  font-weight: 600; font-size: 1rem; border: none; cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 20px rgba(236, 72, 153, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(236, 72, 153, 0.45);
}
.btn-outline {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-card); backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border); color: var(--text-primary);
  padding: 14px 32px; border-radius: 12px; font-weight: 600; font-size: 1rem;
  cursor: pointer; transition: border-color 0.2s ease, background 0.2s ease;
}
.btn-outline:hover {
  border-color: var(--glass-border-hover);
  background: rgba(255, 255, 255, 0.06);
}
.btn-sm { padding: 10px 24px; font-size: 0.875rem; }
.btn-block { width: 100%; }

/* ============================
   7. Glass Card
   ============================ */
.glass-card {
  background: var(--bg-card); backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border); border-radius: 16px; padding: 32px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.glass-card:hover {
  border-color: var(--glass-border-hover);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transform: translateY(-4px);
}

/* ============================
   8. Pipeline Progress Indicator
   ============================ */
.pipeline-progress {
  position: fixed; left: 24px; top: 50%; transform: translateY(-50%);
  z-index: 100; display: none;
}
.pipeline-progress .pipe-line {
  width: 2px; height: 300px; background: rgba(255, 255, 255, 0.06);
  border-radius: 1px; position: relative;
}
.pipeline-progress .pipe-fill {
  position: absolute; top: 0; left: 0; width: 100%;
  height: 0%; border-radius: 1px;
  background: linear-gradient(180deg, var(--glow-pink), var(--glow-purple), var(--glow-orange));
  box-shadow: 0 0 12px var(--glow-pink);
  transition: height 0.6s ease;
}
.pipeline-progress .pipe-node {
  width: 12px; height: 12px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.1); border: 2px solid rgba(255, 255, 255, 0.1);
  position: absolute; left: -5px;
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
.pipeline-progress .pipe-node.active {
  background: var(--glow-pink); border-color: var(--glow-pink);
  box-shadow: 0 0 12px var(--glow-pink);
}
.pipeline-progress .pipe-node:nth-child(3) { top: 0; }
.pipeline-progress .pipe-node:nth-child(4) { top: 25%; }
.pipeline-progress .pipe-node:nth-child(5) { top: 50%; }
.pipeline-progress .pipe-node:nth-child(6) { top: 75%; }
.pipeline-progress .pipe-node:nth-child(7) { top: 100%; }

/* ============================
   9. Stage Animations
   ============================ */
.stage-content { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease, transform 0.8s ease; }
.stage.stage-active .stage-content { opacity: 1; transform: translateY(0); }

.stage-title {
  font-size: 2.2rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 16px;
}
.stage-subtitle {
  color: var(--text-secondary); font-size: 1.1rem; max-width: 600px;
  margin-bottom: 48px; line-height: 1.7;
}

/* Staggered card entrance */
.card-group .glass-card { opacity: 0; transform: translateY(30px); }
.stage.stage-active .card-group .glass-card {
  opacity: 1; transform: translateY(0);
}
.stage.stage-active .card-group .glass-card:nth-child(1) { transition-delay: 0.1s; }
.stage.stage-active .card-group .glass-card:nth-child(2) { transition-delay: 0.25s; }
.stage.stage-active .card-group .glass-card:nth-child(3) { transition-delay: 0.4s; }

.card-group {
  display: grid; grid-template-columns: 1fr; gap: 24px;
}

/* ============================
   10. Module Cards
   ============================ */
.module-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin-bottom: 16px;
}
.module-icon.pink { background: rgba(236, 72, 153, 0.15); color: var(--glow-pink); }
.module-icon.purple { background: rgba(139, 92, 246, 0.15); color: var(--glow-purple); }
.module-icon.orange { background: rgba(249, 115, 22, 0.15); color: var(--glow-orange); }
.module-icon.coral { background: rgba(251, 113, 133, 0.15); color: var(--glow-coral); }

.module-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; }
.module-card p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.7; }
.module-price {
  font-size: 1.5rem; font-weight: 800; margin-top: 16px;
  color: var(--glow-orange);
  text-shadow: 0 0 20px rgba(249, 115, 22, 0.3);
}

/* ============================
   11. Platform Scatter (Stage 3)
   ============================ */
.platform-icons {
  display: flex; justify-content: center; gap: 24px; margin-top: 32px; flex-wrap: wrap;
}
.platform-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--bg-card); border: 1px solid var(--glass-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); font-size: 20px;
  opacity: 0; transform: scale(0.5);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.stage.stage-active .platform-icon {
  opacity: 1; transform: scale(1);
}
.stage.stage-active .platform-icon:nth-child(1) { transition-delay: 0.2s; }
.stage.stage-active .platform-icon:nth-child(2) { transition-delay: 0.35s; }
.stage.stage-active .platform-icon:nth-child(3) { transition-delay: 0.5s; }
.stage.stage-active .platform-icon:nth-child(4) { transition-delay: 0.65s; }
.stage.stage-active .platform-icon:nth-child(5) { transition-delay: 0.8s; }

/* ============================
   12. Pricing Section (Stage 5)
   ============================ */
.bundle-card {
  max-width: 600px; margin: 0 auto 48px; text-align: center;
  border-color: var(--glow-pink);
  box-shadow: 0 0 40px rgba(236, 72, 153, 0.15);
}
.bundle-badge {
  display: inline-block; background: var(--glow-pink); color: white;
  padding: 4px 16px; border-radius: 100px; font-size: 0.8rem; font-weight: 600;
  margin-bottom: 16px;
}
.bundle-price {
  font-size: 3.5rem; font-weight: 800;
  color: var(--glow-orange);
  text-shadow: 0 0 30px rgba(249, 115, 22, 0.4);
  margin: 16px 0;
}
.bundle-features { list-style: none; text-align: left; margin: 24px 0; }
.bundle-features li {
  padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.9rem; color: var(--text-secondary);
}
.bundle-features li::before {
  content: "\2713 "; color: var(--glow-pink); font-weight: 700; margin-right: 8px;
}

.module-grid {
  display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 48px;
}
.module-buy-card {
  display: flex; align-items: center; gap: 16px; padding: 20px 24px;
}
.module-buy-card h4 { flex: 1; font-weight: 600; font-size: 0.95rem; }
.module-buy-price {
  font-size: 1.2rem; font-weight: 800; color: var(--glow-orange);
  text-shadow: 0 0 15px rgba(249, 115, 22, 0.3); white-space: nowrap;
}

/* ============================
   13. Fixed Price Badge
   ============================ */
.fixed-price-badge {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: rgba(249, 115, 22, 0.08);
  border: 1px solid rgba(249, 115, 22, 0.25); border-radius: 12px;
  padding: 14px 24px; font-weight: 600; font-size: 0.9rem;
  color: var(--glow-orange); text-align: center; margin-bottom: 48px;
}

/* ============================
   14. License Table
   ============================ */
.license-table-wrap { overflow-x: auto; margin-bottom: 48px; }
.license-table {
  width: 100%; border-collapse: collapse;
  background: var(--bg-card); backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border); border-radius: 12px; overflow: hidden;
}
.license-table th, .license-table td {
  padding: 14px 20px; text-align: left; font-size: 0.9rem;
}
.license-table thead { background: rgba(255, 255, 255, 0.06); }
.license-table th { font-weight: 600; color: var(--text-primary); }
.license-table td { color: var(--text-secondary); }
.license-table tbody tr { border-bottom: 1px solid rgba(255, 255, 255, 0.04); }
.license-table tbody tr:last-child { border-bottom: none; }
.license-table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.license-table strong { color: var(--text-primary); }

/* ============================
   15. Services
   ============================ */
.services-grid {
  display: grid; grid-template-columns: 1fr; gap: 24px; max-width: 900px; margin: 0 auto;
}

/* ============================
   16. FAQ Accordion
   ============================ */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06); overflow: hidden;
  background: transparent;
  backdrop-filter: none;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-top: none;
}
button.faq-question {
  all: unset;
  box-sizing: border-box;
  width: 100%; padding: 20px 0; cursor: pointer; display: flex;
  justify-content: space-between; align-items: center;
  font-size: 1.05rem; font-weight: 600; color: #fafafa;
  background-color: transparent; border: none;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  text-align: left; transition: color 0.2s ease;
}
.faq-question:hover { color: var(--glow-pink); }
.faq-question .faq-icon {
  font-size: 1.2rem; transition: transform 0.3s ease; color: var(--glow-purple);
}
.faq-item.open .faq-icon { transform: rotate(45deg); color: var(--glow-pink); }
.faq-answer {
  max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.4s ease;
  color: #d4d4d8; font-size: 0.95rem; line-height: 1.8;
}
.faq-answer a { color: var(--glow-pink); text-decoration: underline; }
.faq-item.open .faq-answer { max-height: 300px; padding-bottom: 20px; }

/* ============================
   17. Final CTA
   ============================ */
.final-cta {
  background: linear-gradient(135deg, var(--glow-pink), var(--glow-purple), var(--glow-orange));
  padding: 80px 0; text-align: center;
}
.final-cta h2 { font-size: 2.5rem; font-weight: 800; letter-spacing: -0.02em; }
.final-cta p {
  opacity: 0.9; margin: 16px auto 32px; max-width: 600px; font-size: 1.1rem;
}
.final-cta .btn-white {
  display: inline-flex; align-items: center;
  background: white; color: var(--bg-deep);
  padding: 16px 40px; border-radius: 12px; font-weight: 700; font-size: 1.05rem;
  border: none; cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.final-cta .btn-white:hover {
  transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* ============================
   18. Footer
   ============================ */
.footer {
  background: rgba(0, 0, 0, 0.3); border-top: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-secondary); padding: 60px 0 24px;
}
.footer-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px;
}
.footer-col h4 {
  color: var(--text-primary); font-size: 0.9rem; margin-bottom: 16px; font-weight: 600;
}
.footer-col a {
  color: var(--text-secondary); font-size: 0.85rem; display: block; padding: 4px 0;
  transition: color 0.2s ease;
}
.footer-col a:hover { color: var(--glow-pink); }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  margin-top: 40px; padding-top: 24px; text-align: center; font-size: 0.8rem;
}

/* ============================
   19. Hero Variant: Alpha (Counters)
   ============================ */
.hero-counters {
  display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; margin-bottom: 24px;
}
.counter-item { text-align: center; }
.counter-value {
  font-size: 4rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1;
}
.counter-value.pink { color: var(--glow-pink); text-shadow: 0 0 30px rgba(236, 72, 153, 0.4); }
.counter-value.purple { color: var(--glow-purple); text-shadow: 0 0 30px rgba(139, 92, 246, 0.4); }
.counter-value.orange { color: var(--glow-orange); text-shadow: 0 0 30px rgba(249, 115, 22, 0.4); }
.counter-value.coral { color: var(--glow-coral); text-shadow: 0 0 30px rgba(251, 113, 133, 0.4); }
.counter-label {
  font-size: 0.85rem; color: var(--text-secondary); text-transform: uppercase;
  letter-spacing: 2px; margin-top: 8px;
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 4px 20px rgba(236, 72, 153, 0.3); }
  50% { box-shadow: 0 4px 30px rgba(236, 72, 153, 0.5); }
}
.btn-pulse { animation: pulse-glow 2s ease-in-out infinite; }

/* ============================
   20. Hero Variant: Beta (Terminal)
   ============================ */
.terminal-window {
  max-width: 600px; margin: 0 auto 32px; border-radius: 12px;
  background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1); overflow: hidden; text-align: left;
}
.terminal-header {
  display: flex; align-items: center; gap: 6px; padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
}
.terminal-dot { width: 10px; height: 10px; border-radius: 50%; }
.terminal-dot.red { background: #ef4444; }
.terminal-dot.yellow { background: #eab308; }
.terminal-dot.green { background: #22c55e; }
.terminal-body {
  padding: 20px; font-family: var(--font-mono); font-size: 0.85rem;
  line-height: 1.8; min-height: 180px;
}
.terminal-body .cmd { color: #22d3ee; }
.terminal-body .output { color: #4ade80; }
.terminal-body .check { color: #fbbf24; }
.terminal-body .prompt { color: var(--text-dim); }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.cursor-blink { animation: blink 1s step-end infinite; color: #22d3ee; }

/* ============================
   21. Hero Variant: Gamma (Living Pipeline)
   ============================ */
.pipeline-hero {
  display: flex; align-items: center; justify-content: center;
  gap: 0; margin: 0 auto 32px; max-width: 700px; position: relative;
}
.pipeline-node {
  width: 64px; height: 64px; border-radius: 16px;
  background: var(--bg-card); border: 2px solid var(--glass-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; position: relative; z-index: 2;
  transition: border-color 0.5s ease, box-shadow 0.5s ease, transform 0.5s ease;
  flex-shrink: 0;
}
.pipeline-node.active {
  border-color: var(--glow-purple);
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.4);
  transform: scale(1.1);
}
.pipeline-node.active.pink { border-color: var(--glow-pink); box-shadow: 0 0 24px rgba(236, 72, 153, 0.4); }
.pipeline-node.active.orange { border-color: var(--glow-orange); box-shadow: 0 0 24px rgba(249, 115, 22, 0.4); }
.pipeline-connector {
  width: 60px; height: 2px; background: rgba(255, 255, 255, 0.06);
  position: relative; flex-shrink: 0;
}
.pipeline-connector .connector-fill {
  position: absolute; top: 0; left: 0; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--glow-purple), var(--glow-pink));
  box-shadow: 0 0 8px var(--glow-purple);
  transition: width 0.5s ease;
}
.pipeline-connector.active .connector-fill { width: 100%; }
.pipeline-stat {
  position: absolute; top: -28px; left: 50%; transform: translateX(-50%);
  font-size: 0.75rem; font-weight: 700; color: var(--text-primary);
  white-space: nowrap; opacity: 0;
  transition: opacity 0.5s ease;
}
.pipeline-node.active .pipeline-stat { opacity: 1; }

/* ============================
   22. Scroll Reveal
   ============================ */
[data-reveal] {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].visible { opacity: 1; transform: translateY(0); }

/* ============================
   23. Responsive: Tablet (768px+)
   ============================ */
@media (min-width: 768px) {
  .nav-links { display: flex; }
  .mobile-menu-btn { display: none; }
  .hero h1 { font-size: 3rem; }
  .hero p.subtitle { font-size: 1.15rem; }
  .stage-title { font-size: 2.5rem; }
  .card-group { grid-template-columns: repeat(2, 1fr); }
  .module-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
  .pipeline-progress { display: block; }
  .counter-value { font-size: 5rem; }
}

/* ============================
   24. Responsive: Desktop (1024px+)
   ============================ */
@media (min-width: 1024px) {
  .hero h1 { font-size: 3.5rem; }
  .card-group { grid-template-columns: repeat(3, 1fr); }
  .module-grid { grid-template-columns: repeat(3, 1fr); }
  .services-grid { grid-template-columns: repeat(3, 1fr); }
  .counter-value { font-size: 5.5rem; }
}

/* ============================
   25. Mobile nav open state
   ============================ */
.nav-links.open {
  display: flex; flex-direction: column;
  position: absolute; top: 64px; left: 0; right: 0;
  background: var(--bg-deep); padding: 24px; gap: 16px;
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
