/* ===================================================================
   KPAstro.ai Landing Page — Dark Modern Theme
   =================================================================== */

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

:root {
  --bg-primary: #0a0a1a;
  --bg-secondary: #111128;
  --bg-card: #161635;
  --bg-card-hover: #1c1c42;
  --purple: #7b1fa2;
  --purple-light: #ab47bc;
  --purple-glow: rgba(123, 31, 162, 0.3);
  --gold: #ffd54f;
  --text-primary: #e8e8f0;
  --text-secondary: #9999b8;
  --text-muted: #666688;
  --border: #2a2a4a;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--purple-light);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--gold);
}

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

/* --- Container --- */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Section spacing --- */
.section {
  padding: 100px 0;
}

.section-alt {
  background: var(--bg-secondary);
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 1.1rem;
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 60px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ===================================================================
   NAVBAR
   =================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: all 0.3s ease;
  background: transparent;
}

.navbar.scrolled {
  background: rgba(10, 10, 26, 0.95);
  backdrop-filter: blur(10px);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.nav-logo span {
  color: var(--purple-light);
}

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

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

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

.btn-nav {
  background: var(--purple);
  color: #fff !important;
  padding: 8px 24px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.btn-nav:hover {
  background: var(--purple-light);
  color: #fff !important;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ===================================================================
   HERO
   =================================================================== */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 120px 0 80px;
}

/* Starfield canvas */
#star-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Purple gradient glow */
.hero::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--purple-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-tagline {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--purple-light);
  margin-bottom: 20px;
  font-weight: 500;
}

.hero h1 {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--purple-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 24px;
  letter-spacing: 2px;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--purple);
  color: #fff;
  padding: 14px 36px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  background: var(--purple-light);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--purple-glow);
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  padding: 14px 36px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-secondary:hover {
  border-color: var(--purple);
  color: var(--text-primary);
}

/* ===================================================================
   STATS
   =================================================================== */
.stats {
  padding: 80px 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
  margin-bottom: 24px;
}

.stat-item {
  padding: 24px;
}

.stat-number {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--purple-light);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.stats-tagline {
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
  font-style: italic;
}

/* ===================================================================
   FEATURE SECTIONS (alternating layout)
   =================================================================== */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.feature-row.reverse {
  direction: rtl;
}

.feature-row.reverse > * {
  direction: ltr;
}

.feature-text h3 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.feature-text p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.7;
}

.feature-list {
  list-style: none;
  padding: 0;
}

.feature-list li {
  padding: 6px 0;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
}

.feature-list li::before {
  content: '◆';
  color: var(--purple-light);
  font-size: 0.6rem;
}

.feature-image {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  position: relative;
}

.feature-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feature-image .placeholder {
  padding: 40px;
  text-align: center;
  color: var(--text-muted);
}

/* ===================================================================
   LEARN & GROW (card grid)
   =================================================================== */
.learn-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.learn-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 28px;
  transition: all 0.3s;
}

.learn-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--purple);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(123, 31, 162, 0.15);
}

.learn-card-icon {
  font-size: 2rem;
  margin-bottom: 16px;
  display: block;
}

.learn-card h4 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.learn-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.learn-card .badge-soon {
  display: inline-block;
  background: var(--purple-glow);
  color: var(--purple-light);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 4px;
  margin-top: 12px;
}

/* ===================================================================
   HOW IT WORKS
   =================================================================== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  text-align: center;
}

.step {
  padding: 20px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--purple);
  color: var(--purple-light);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.step h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.step p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.step-arrow {
  color: var(--text-muted);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 20px;
}

/* ===================================================================
   CTA
   =================================================================== */
.cta {
  padding: 100px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--purple-glow) 0%, transparent 70%);
  pointer-events: none;
}

.cta-content {
  position: relative;
  z-index: 1;
}

.cta h2 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.cta p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 36px;
}

.cta .btn-primary {
  padding: 16px 48px;
  font-size: 1.1rem;
}

.cta-login {
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.cta-login a {
  color: var(--purple-light);
  font-weight: 600;
}

/* ===================================================================
   FOOTER
   =================================================================== */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

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

/* ===================================================================
   RESPONSIVE
   =================================================================== */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.2rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .hero-desc {
    font-size: 1rem;
  }

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

  .stat-number {
    font-size: 2rem;
  }

  .feature-row,
  .feature-row.reverse {
    grid-template-columns: 1fr;
    gap: 32px;
    direction: ltr;
  }

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

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .step-arrow {
    display: none;
  }

  .section {
    padding: 60px 0;
  }

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

  /* Mobile nav */
  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 10, 26, 0.98);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open {
    display: flex;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.8rem;
  }

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

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