/* ═══════════════════════════════════════════════
   🌌 StellarMapAi — Premium Landing Page CSS
   ═══════════════════════════════════════════════ */

:root {
  --bg-primary: #07060e;
  --bg-secondary: #0d0b1a;
  --bg-card: rgba(15, 13, 30, 0.7);
  --border-glass: rgba(255, 255, 255, 0.06);
  --text-primary: #f0eef6;
  --text-secondary: rgba(240, 238, 246, 0.6);
  --accent-1: #a78bfa;
  --accent-2: #c084fc;
  --accent-3: #818cf8;
  --gradient-main: linear-gradient(135deg, #a78bfa 0%, #c084fc 50%, #f472b6 100%);
  --gradient-glow: linear-gradient(135deg, rgba(167,139,250,0.3), rgba(244,114,182,0.3));
  --shadow-glow: 0 0 60px rgba(167,139,250,0.15);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Starfield Canvas */
#starfield {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}

/* ─── Navbar ─── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 16px 0;
  background: rgba(7, 6, 14, 0.6);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
  transition: var(--transition);
}
.navbar.scrolled { background: rgba(7, 6, 14, 0.9); padding: 10px 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; text-decoration: none; color: var(--text-primary); }
.nav-logo-img { width: 36px; height: 36px; border-radius: 10px; }
.nav-logo-text { font-family: var(--font-heading); font-weight: 700; font-size: 1.2rem; }
.accent { background: var(--gradient-main); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-link { color: var(--text-secondary); text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: var(--transition); }
.nav-link:hover { color: var(--text-primary); }
.nav-cta {
  background: var(--gradient-main); color: #fff !important; padding: 8px 20px;
  border-radius: 100px; font-weight: 600;
  -webkit-text-fill-color: #fff;
}
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text-primary); margin: 5px 0; border-radius: 2px; transition: var(--transition); }

/* ─── Hero ─── */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  justify-content: center; padding: 120px 24px 80px; gap: 60px; max-width: 1200px; margin: 0 auto;
  z-index: 1;
}
.hero-glow { position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.4; pointer-events: none; }
.hero-glow-1 { width: 500px; height: 500px; background: rgba(167,139,250,0.2); top: -10%; left: -5%; }
.hero-glow-2 { width: 400px; height: 400px; background: rgba(244,114,182,0.15); bottom: 10%; right: -5%; }
.hero-glow-3 { width: 300px; height: 300px; background: rgba(129,140,248,0.15); top: 40%; left: 30%; }
.hero-content { flex: 1; max-width: 560px; z-index: 2; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(167,139,250,0.1); border: 1px solid rgba(167,139,250,0.2);
  padding: 6px 16px; border-radius: 100px; font-size: 0.85rem; color: var(--accent-1);
  font-weight: 500; margin-bottom: 24px;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-1); animation: pulse-dot 2s infinite; }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.hero-title { font-family: var(--font-heading); font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 800; line-height: 1.1; margin-bottom: 20px; }
.gradient-text { background: var(--gradient-main); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-subtitle { font-size: 1.1rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 32px; max-width: 480px; }
.hero-buttons { display: flex; gap: 16px; margin-bottom: 40px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px;
  border-radius: 100px; font-weight: 600; font-size: 0.95rem; text-decoration: none;
  transition: var(--transition); cursor: pointer; border: none;
}
.btn-primary {
  background: var(--gradient-main); color: #fff; box-shadow: 0 4px 24px rgba(167,139,250,0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(167,139,250,0.4); }
.btn-glass {
  background: rgba(255,255,255,0.05); color: var(--text-primary);
  border: 1px solid var(--border-glass); backdrop-filter: blur(10px);
}
.btn-glass:hover { background: rgba(255,255,255,0.1); }
.hero-stats { display: flex; align-items: center; gap: 24px; }
.stat-number { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; }
.stat-label { display: block; font-size: 0.8rem; color: var(--text-secondary); margin-top: 2px; }
.stat-divider { width: 1px; height: 36px; background: var(--border-glass); }

/* Phone Mockup */
.hero-phone { position: relative; flex-shrink: 0; z-index: 2; }
.phone-mockup {
  width: 280px; height: 580px; background: #1a1825; border-radius: 40px;
  border: 3px solid rgba(255,255,255,0.1); overflow: hidden; position: relative;
  box-shadow: 0 40px 80px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
}
.phone-notch {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 120px; height: 28px; background: #1a1825; border-radius: 0 0 20px 20px; z-index: 2;
}
.phone-screen { width: 100%; height: 100%; object-fit: cover; }
.phone-glow {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 350px; height: 650px; background: var(--gradient-glow);
  border-radius: 50%; filter: blur(80px); z-index: -1;
}

/* ─── Sections Common ─── */
.section-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.features, .screenshots, .testimonials { padding: 100px 0; position: relative; z-index: 1; }
.section-header { text-align: center; margin-bottom: 60px; }
.section-badge {
  display: inline-block; font-size: 0.85rem; color: var(--accent-1); font-weight: 500;
  background: rgba(167,139,250,0.1); border: 1px solid rgba(167,139,250,0.15);
  padding: 6px 16px; border-radius: 100px; margin-bottom: 16px;
}
.section-title { font-family: var(--font-heading); font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; margin-bottom: 12px; }
.section-subtitle { color: var(--text-secondary); font-size: 1.05rem; max-width: 500px; margin: 0 auto; }

/* ─── Features Grid ─── */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card {
  background: var(--bg-card); border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg); padding: 32px; transition: var(--transition);
  backdrop-filter: blur(10px);
}
.feature-card:hover { border-color: rgba(167,139,250,0.2); transform: translateY(-4px); box-shadow: var(--shadow-glow); }
.feature-icon {
  width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  background: rgba(167,139,250,0.08); color: var(--icon-color, var(--accent-1)); margin-bottom: 20px;
}
.feature-title { font-family: var(--font-heading); font-size: 1.15rem; font-weight: 700; margin-bottom: 10px; }
.feature-desc { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; }

/* ─── Screenshots Carousel ─── */
.screenshots { background: var(--bg-secondary); }
.screenshots-carousel { overflow: hidden; position: relative; }
.carousel-track { display: flex; gap: 32px; transition: transform 0.5s cubic-bezier(0.4,0,0.2,1); padding: 20px 0; }
.carousel-slide { flex: 0 0 220px; text-align: center; }
.screenshot-phone {
  width: 220px; height: 440px; background: #1a1825; border-radius: 30px;
  border: 2px solid rgba(255,255,255,0.08); overflow: hidden; position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4); transition: var(--transition);
}
.carousel-slide:hover .screenshot-phone { transform: scale(1.03); border-color: rgba(167,139,250,0.3); }
.screenshot-phone-notch {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 80px; height: 22px; background: #1a1825; border-radius: 0 0 14px 14px; z-index: 2;
}
.screenshot-phone img { width: 100%; height: 100%; object-fit: cover; }
.slide-label { font-size: 0.85rem; color: var(--text-secondary); margin-top: 14px; font-weight: 500; }
.carousel-controls { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 32px; }
.carousel-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border-glass);
  background: var(--bg-card); color: var(--text-primary); cursor: pointer; display: flex;
  align-items: center; justify-content: center; transition: var(--transition);
}
.carousel-btn:hover { border-color: var(--accent-1); background: rgba(167,139,250,0.1); }
.carousel-dots { display: flex; gap: 8px; }
.carousel-dot {
  width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.15);
  border: none; cursor: pointer; transition: var(--transition); padding: 0;
}
.carousel-dot.active { background: var(--accent-1); width: 24px; border-radius: 4px; }

/* ─── Testimonials ─── */
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.testimonial-card {
  background: var(--bg-card); border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg); padding: 32px; backdrop-filter: blur(10px);
  transition: var(--transition);
}
.testimonial-card:hover { border-color: rgba(167,139,250,0.2); }
.testimonial-stars { color: #fbbf24; font-size: 1rem; margin-bottom: 16px; letter-spacing: 2px; }
.testimonial-text { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.7; margin-bottom: 20px; font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.author-avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--gradient-main);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1rem;
}
.author-name { display: block; font-weight: 600; font-size: 0.9rem; }
.author-sign { font-size: 0.8rem; color: var(--text-secondary); }

/* ─── Download CTA ─── */
.download {
  padding: 100px 0; position: relative; z-index: 1; text-align: center;
  background: var(--bg-secondary);
}
.download-glow {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 600px; height: 400px; background: var(--gradient-glow); filter: blur(120px);
  border-radius: 50%; pointer-events: none;
}
.download-content { position: relative; z-index: 2; }
.download-logo { width: 100px; height: 100px; border-radius: 24px; margin-bottom: 24px; box-shadow: var(--shadow-glow); }
.download-buttons { display: flex; justify-content: center; gap: 16px; margin: 32px 0; flex-wrap: wrap; }
.store-btn {
  display: flex; align-items: center; gap: 12px; padding: 14px 28px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm); text-decoration: none; color: var(--text-primary);
  transition: var(--transition); backdrop-filter: blur(10px);
}
.store-btn:hover { border-color: var(--accent-1); background: rgba(167,139,250,0.1); transform: translateY(-2px); }
.store-label { display: block; font-size: 0.7rem; color: var(--text-secondary); text-align: left; }
.store-name { display: block; font-weight: 700; font-size: 1.05rem; text-align: left; }
.download-platforms { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--text-secondary); font-size: 0.9rem; }
.dot { opacity: 0.3; }

/* ─── Footer ─── */
.footer { padding: 60px 0 30px; border-top: 1px solid var(--border-glass); position: relative; z-index: 1; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-heading); font-weight: 700; font-size: 1.1rem; margin-bottom: 12px; }
.footer-logo-img { width: 32px; height: 32px; border-radius: 8px; }
.footer-desc { color: var(--text-secondary); font-size: 0.85rem; line-height: 1.6; max-width: 280px; }
.footer-links-group h4 { font-family: var(--font-heading); font-size: 0.9rem; font-weight: 600; margin-bottom: 16px; }
.footer-links-group a { display: block; color: var(--text-secondary); text-decoration: none; font-size: 0.85rem; margin-bottom: 10px; transition: var(--transition); }
.footer-links-group a:hover { color: var(--accent-1); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; border-top: 1px solid var(--border-glass);
  color: var(--text-secondary); font-size: 0.8rem;
}
.footer-made { color: var(--accent-1); }

/* ─── Animations ─── */
.animate-on-scroll { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }

/* ─── Responsive ─── */
@media (max-width: 968px) {
  .hero { flex-direction: column; text-align: center; padding-top: 100px; gap: 40px; }
  .hero-subtitle { margin: 0 auto 32px; }
  .hero-buttons { justify-content: center; }
  .hero-stats { justify-content: center; }
  .features-grid, .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: rgba(7,6,14,0.95); padding: 20px; gap: 16px; border-bottom: 1px solid var(--border-glass); backdrop-filter: blur(20px); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .features-grid, .testimonials-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 2.2rem; }
  .phone-mockup { width: 240px; height: 500px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .carousel-slide { flex: 0 0 180px; }
  .screenshot-phone { width: 180px; height: 360px; }
}
