/* KundliAI Landing Page - Layout & Responsive */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Ubuntu Condensed', 'Ubuntu', 'Noto Sans Devanagari', 'Noto Sans Tamil', 'Noto Sans Kannada', 'Noto Sans Telugu', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--cosmic-bg-start);
  background-image:
    radial-gradient(ellipse 70% 45% at 50% 0%, rgba(179, 102, 255, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse 50% 35% at 85% 30%, rgba(56, 189, 248, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 45% 30% at 15% 70%, rgba(240, 192, 64, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse 40% 30% at 70% 80%, rgba(45, 212, 168, 0.05) 0%, transparent 50%),
    linear-gradient(180deg, var(--cosmic-bg-start) 0%, var(--cosmic-bg-mid) 35%, var(--cosmic-bg-end) 70%, var(--cosmic-accent) 100%);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

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

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

/* ---- NAVBAR ---- */
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo span {
  background: linear-gradient(135deg, var(--accent-gold), #e8a040, var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s;
}

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

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

/* ---- HERO SECTION ---- */
.hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 1.5rem 3rem;
}

.hero-content {
  max-width: 700px;
}

.hero h1 {
  font-size: clamp(1.85rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--accent-gold) 0%, #e8a040 25%, var(--accent-purple) 60%, var(--accent-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-badge {
  margin-bottom: 1.5rem;
}

/* ---- SECTION LAYOUT ---- */
section {
  padding: 3.5rem 1.5rem;
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.section-header h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ---- FEATURE GRID ---- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.feature-card {
  position: relative;
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ---- HOW IT WORKS ---- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  counter-reset: step;
}

.step-card {
  text-align: center;
  counter-increment: step;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.step-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

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

/* ---- SIDDHAR PORTRAIT GALLERY ---- */
.siddhar-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.siddhar-portrait-card {
  text-align: center;
  padding: 1.5rem 1.25rem !important;
  transition: all 0.4s ease;
}

.siddhar-portrait-card:hover {
  transform: translateY(-4px);
}

.siddhar-portrait-card:hover .mandala-ring {
  transform: rotate(360deg);
}

.siddhar-portrait-card:hover .mandala-circle {
  box-shadow: 0 0 30px var(--mandala-glow, rgba(240, 192, 64, 0.25));
}

/* Mandala portrait circle */
.mandala-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.mandala-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.4s ease;
}

.mandala-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.15);
  transition: transform 1.5s ease;
}

.mandala-ring::before {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.mandala-ring::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* SVG sage portrait */
.siddhar-svg {
  width: 90%;
  height: 90%;
  z-index: 1;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.3));
}

/* Tight letter-spacing on headings */
h1, h2, h3 {
  letter-spacing: -0.02em;
}

/* Indian script font overrides */
.lang-chip[data-lang="hi"], [lang="hi"] { font-family: 'Noto Sans Devanagari', 'Ubuntu', sans-serif; }
.lang-chip[data-lang="ta"], [lang="ta"] { font-family: 'Noto Sans Tamil', 'Ubuntu', sans-serif; }
.lang-chip[data-lang="kn"], [lang="kn"] { font-family: 'Noto Sans Kannada', 'Ubuntu', sans-serif; }
.lang-chip[data-lang="te"], [lang="te"] { font-family: 'Noto Sans Telugu', 'Ubuntu', sans-serif; }

/* Active language button */
.lang-btn {
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
}
.lang-btn.active {
  background: var(--glass-bg-hover) !important;
  border-color: var(--accent-purple) !important;
  color: var(--accent-purple) !important;
}

/* Siddhar Tamil text */
.siddhar-tamil { font-family: 'Noto Sans Tamil', 'Ubuntu', sans-serif; }

/* Mandala color variants */
.mandala-gold {
  background: radial-gradient(circle, rgba(240, 192, 64, 0.2) 0%, rgba(240, 192, 64, 0.05) 70%, transparent 100%);
  --mandala-glow: rgba(240, 192, 64, 0.3);
}
.mandala-gold .mandala-ring { border-color: rgba(240, 192, 64, 0.25); }

.mandala-indigo {
  background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, rgba(99, 102, 241, 0.05) 70%, transparent 100%);
  --mandala-glow: rgba(99, 102, 241, 0.3);
}
.mandala-indigo .mandala-ring { border-color: rgba(99, 102, 241, 0.25); }

.mandala-ruby {
  background: radial-gradient(circle, rgba(220, 38, 38, 0.2) 0%, rgba(220, 38, 38, 0.05) 70%, transparent 100%);
  --mandala-glow: rgba(220, 38, 38, 0.3);
}
.mandala-ruby .mandala-ring { border-color: rgba(220, 38, 38, 0.25); }

.mandala-green {
  background: radial-gradient(circle, rgba(34, 197, 94, 0.2) 0%, rgba(34, 197, 94, 0.05) 70%, transparent 100%);
  --mandala-glow: rgba(34, 197, 94, 0.3);
}
.mandala-green .mandala-ring { border-color: rgba(34, 197, 94, 0.25); }

.mandala-violet {
  background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, rgba(139, 92, 246, 0.05) 70%, transparent 100%);
  --mandala-glow: rgba(139, 92, 246, 0.3);
}
.mandala-violet .mandala-ring { border-color: rgba(139, 92, 246, 0.25); }

.mandala-teal {
  background: radial-gradient(circle, rgba(20, 184, 166, 0.2) 0%, rgba(20, 184, 166, 0.05) 70%, transparent 100%);
  --mandala-glow: rgba(20, 184, 166, 0.3);
}
.mandala-teal .mandala-ring { border-color: rgba(20, 184, 166, 0.25); }

/* Siddhar card text */
.siddhar-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.1rem;
}

.siddhar-tamil {
  font-size: 1rem;
  color: var(--accent-gold);
  margin-bottom: 0.4rem;
  font-weight: 500;
}

.siddhar-title {
  font-size: 0.8rem;
  color: var(--accent-purple);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.siddhar-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ---- FREE PRICING HERO ---- */
.free-hero-card {
  box-shadow: 0 8px 40px rgba(20, 184, 166, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.free-feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.4rem 0.9rem;
  background: rgba(20, 184, 166, 0.08);
  border: 1px solid rgba(20, 184, 166, 0.15);
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* ---- PRICING ---- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.pricing-card {
  text-align: center;
}

.pricing-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.pricing-amount {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 1rem 0;
}

.pricing-amount .currency {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-secondary);
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  text-align: left;
}

.pricing-features li {
  padding: 0.4rem 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.pricing-features li::before {
  content: '✓ ';
  color: var(--accent-teal);
}

/* ---- LANGUAGES ---- */
.lang-grid {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.lang-chip {
  padding: 0.5rem 1.25rem;
  font-size: 1rem;
}

/* ---- FOOTER ---- */
footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.85rem;
}

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

/* ---- LOADING SPINNER ---- */
.loading-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-spinner-lg {
  width: 40px;
  height: 40px;
  border-width: 4px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---- MOBILE NAV OVERLAY ---- */
.nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
}

.nav-overlay.active {
  display: block;
}

/* ---- RESPONSIVE ---- */

/* Large desktop (1440px+) */
@media (min-width: 1440px) {
  .hero-content {
    max-width: 800px;
  }
}

/* Tablet landscape (1024px) */
@media (max-width: 1024px) {
  .feature-grid,
  .siddhar-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .pricing-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* iPad portrait (768px) */
@media (max-width: 768px) {
  .pricing-grid {
    grid-template-columns: 1fr !important;
  }

  section {
    padding: 2.5rem 1.5rem;
  }

  .siddhar-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .glass-card-lg {
    padding: 2rem;
  }
}

/* Mobile (640px) */
@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: 280px;
    flex-direction: column;
    background: rgba(5, 5, 16, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    z-index: 200;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }

  .nav-links.active {
    display: flex;
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 1.1rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
  }

  .nav-toggle {
    display: block;
    z-index: 201;
    min-height: 44px;
    min-width: 44px;
  }

  .feature-grid,
  .steps-grid,
  .pricing-grid {
    grid-template-columns: 1fr !important;
  }

  .siddhar-gallery {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .siddhar-portrait-card {
    padding: 1.25rem 0.75rem !important;
  }

  .mandala-circle {
    width: 72px;
    height: 72px;
  }

  .mandala-icon {
    font-size: 1.8rem;
  }

  .siddhar-name {
    font-size: 1rem;
  }

  .siddhar-desc {
    font-size: 0.78rem;
  }

  .free-feature-pill {
    font-size: 0.75rem;
    padding: 0.3rem 0.7rem;
    white-space: normal;
    text-align: center;
  }

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

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

  section {
    padding: 2rem 1.25rem;
  }

  .glass-card-lg {
    padding: 1.5rem;
  }

  /* Touch target minimums */
  .glass-btn {
    min-height: 44px;
    padding: 0.75rem 1.5rem;
  }

  .lang-chip {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  footer a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0;
  }

  /* Form grids stack on mobile */
  .form-grid {
    grid-template-columns: 1fr !important;
  }

  /* Timing columns stack on mobile */
  .timing-columns {
    grid-template-columns: 1fr !important;
  }
}

/* Small phones (480px) */
@media (max-width: 480px) {
  .siddhar-gallery {
    grid-template-columns: 1fr;
  }

  .pricing-amount {
    font-size: 2rem;
  }

  .lang-chip {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
  }

  .siddhar-portrait-card {
    padding: 1rem 0.5rem !important;
  }
}

/* ---- REDUCED MOTION ---- */
@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .glass,
  .glass:hover {
    transform: none !important;
    transition: background 0.2s ease, border-color 0.2s ease !important;
  }

  .glass-btn,
  .glass-btn:hover {
    transform: none !important;
  }

  .siddhar-portrait-card,
  .siddhar-portrait-card:hover {
    transform: none !important;
  }

  .mandala-ring {
    transition: none !important;
  }

  .loading-spinner {
    animation: none !important;
    border-top-color: var(--accent-gold);
    opacity: 0.7;
  }
}

/* ---- NAV LANGUAGE PILLS ---- */
.nav-lang {
  display: flex;
  gap: 0.25rem;
  margin-right: 0.75rem;
}
.lang-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: var(--text-tertiary);
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  white-space: nowrap;
}
.lang-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}
.lang-pill.active {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.3);
  color: var(--accent-purple);
  font-weight: 600;
}
@media (max-width: 640px) {
  .nav-lang {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    justify-content: center;
    padding: 0.5rem;
    background: rgba(5, 5, 16, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 100;
    gap: 0.5rem;
  }
  .lang-pill {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    min-height: 36px;
    display: flex;
    align-items: center;
  }
}

/* ---- SUBPAGE HERO ---- */
.subpage-hero {
  padding-top: 5rem !important;
  padding-bottom: 2rem !important;
}

/* ---- FOOTER GRID ---- */
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: left;
  max-width: 1200px;
  margin: 0 auto 2rem;
  padding: 0 1.5rem;
}

.footer-grid h4 {
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
}

.footer-grid li {
  margin-bottom: 0.5rem;
}

.footer-grid a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.3s;
}

.footer-grid a:hover {
  color: var(--accent-gold);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
