/* ============================================
   AGENDA MÍSTICA — Landing Page Styles
   ============================================ */

/* --- PARALLAX MULTI-CAPA (Pure CSS 3D) --- */
.parallax-wrapper {
  perspective: 1px;
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.parallax-layer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.parallax-layer--far {
  transform: translateZ(-3px) scale(4);
  z-index: 1;
}

.parallax-layer--mid {
  transform: translateZ(-1.5px) scale(2.5);
  z-index: 2;
}

.parallax-layer--near {
  transform: translateZ(-0.5px) scale(1.5);
  z-index: 3;
}

.parallax-layer--base {
  transform: translateZ(0);
  z-index: 4;
  pointer-events: auto;
}

.hero-section {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Hero background layers */
.hero-bg-stars {
  position: absolute;
  inset: 0;
  background: url('../images/hero-bg.svg') no-repeat center bottom / cover;
  background-color: #0B0720;
}

.hero-bg-moon {
  position: absolute;
  width: 400px;
  height: 400px;
  top: 5%;
  right: 10%;
  background: radial-gradient(circle at 40% 40%, rgba(245,240,255,0.4) 0%, rgba(212,168,67,0.15) 40%, transparent 70%);
  border-radius: 50%;
  filter: blur(4px);
  opacity: 0.5;
  box-shadow: 0 0 80px 40px rgba(212, 168, 67, 0.15);
  pointer-events: none;
}

.hero-bg-mountains {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40vh;
  background: linear-gradient(0deg, #0B0720 0%, transparent 100%);
  pointer-events: none;
}

/* --- GLASSMORPHISM --- */
.glass {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-strong {
  background: rgba(45, 27, 105, 0.3);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(212, 168, 67, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* --- GLOW EFFECTS --- */
.glow-gold {
  box-shadow: 0 0 20px rgba(212, 168, 67, 0.15), 0 0 40px rgba(212, 168, 67, 0.05);
}

.glow-gold-hover:hover {
  box-shadow: 0 0 30px rgba(212, 168, 67, 0.3), 0 0 60px rgba(212, 168, 67, 0.1);
  transition: all 0.4s ease;
}

.text-glow {
  text-shadow: 0 0 20px rgba(212, 168, 67, 0.3), 0 0 40px rgba(212, 168, 67, 0.1);
}

/* --- SECTION TRANSITIONS --- */
.section-hidden {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.section-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.stagger-children.section-visible > * {
  opacity: 1;
  transform: translateY(0);
}

.stagger-children.section-visible > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.section-visible > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.section-visible > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.section-visible > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.section-visible > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children.section-visible > *:nth-child(6) { transition-delay: 0.6s; }
.stagger-children.section-visible > *:nth-child(7) { transition-delay: 0.7s; }
.stagger-children.section-visible > *:nth-child(8) { transition-delay: 0.8s; }

/* --- MOON PHASE CARDS --- */
.phase-card {
  position: relative;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.phase-card:hover {
  transform: translateY(-8px) scale(1.02);
}

.phase-card .phase-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(212, 168, 67, 0.1), transparent 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.phase-card:hover .phase-glow {
  opacity: 1;
}

.phase-card .phase-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, opacity 0.3s ease;
  opacity: 0;
}

.phase-card.active .phase-detail,
.phase-card:hover .phase-detail {
  max-height: 200px;
  opacity: 1;
}

/* Moons SVG animation */
.moon-icon {
  filter: drop-shadow(0 0 8px rgba(212, 168, 67, 0.3));
  transition: filter 0.4s ease;
}

.phase-card:hover .moon-icon {
  filter: drop-shadow(0 0 15px rgba(212, 168, 67, 0.6));
}

/* --- NUMBER FLIP CARDS --- */
.flip-card {
  perspective: 1000px;
  height: 180px;
  cursor: pointer;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.flip-card-front {
  background: linear-gradient(135deg, rgba(45, 27, 105, 0.6), rgba(26, 16, 64, 0.8));
  border: 1px solid rgba(212, 168, 67, 0.2);
}

.flip-card-back {
  background: linear-gradient(135deg, rgba(212, 168, 67, 0.15), rgba(45, 27, 105, 0.6));
  border: 1px solid rgba(212, 168, 67, 0.3);
  transform: rotateY(180deg);
}

/* --- PLAN CARDS --- */
.plan-card {
  transition: all 0.4s ease;
  position: relative;
}

.plan-card:hover {
  transform: translateY(-10px);
}

.plan-card.popular {
  transform: scale(1.05);
  border-color: rgba(212, 168, 67, 0.5);
  box-shadow: 0 0 40px rgba(212, 168, 67, 0.15), 0 0 80px rgba(212, 168, 67, 0.05);
}

.plan-card.popular:hover {
  transform: scale(1.07);
}

.popular-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #D4A843, #F59E0B);
  color: #0B0720;
  padding: 4px 20px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
}

/* --- PRICING TOGGLE --- */
.pricing-toggle {
  position: relative;
  width: 60px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.pricing-toggle .toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, #D4A843, #F59E0B);
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.pricing-toggle.active .toggle-knob {
  transform: translateX(28px);
}

.pricing-toggle.active {
  background: rgba(212, 168, 67, 0.3);
}

/* --- TESTIMONIAL CAROUSEL --- */
.testimonial-card {
  min-width: 100%;
  transition: transform 0.5s ease;
}

.testimonial-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- SECTION BACKGROUND IMAGES --- */
.bg-img {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* --- PARTICLES (stars) --- */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9998;
}

/* --- DECORATIVE DIVIDER --- */
.divider-mystic {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 168, 67, 0.4), transparent);
  margin: 2rem auto;
  max-width: 300px;
}

.divider-mystic-wide {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 168, 67, 0.3), transparent);
  margin: 3rem auto;
  max-width: 80%;
}

/* Shooting stars */
.shooting-star {
  position: absolute;
  width: 100px;
  height: 1px;
  background: linear-gradient(90deg, rgba(245, 240, 255, 0.8), transparent);
  animation: shoot 4s linear infinite;
  opacity: 0;
}

.shooting-star:nth-child(1) { top: 15%; left: 80%; animation-delay: 0s; }
.shooting-star:nth-child(2) { top: 25%; left: 50%; animation-delay: 2s; }
.shooting-star:nth-child(3) { top: 10%; left: 30%; animation-delay: 4s; }

.shooting-star::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 3px;
  height: 3px;
  background: rgba(245, 240, 255, 0.9);
  border-radius: 50%;
}

@keyframes shoot {
  0% { transform: translateX(0) translateY(0); opacity: 0; }
  5% { opacity: 1; }
  15% { opacity: 1; }
  20% { transform: translateX(-200px) translateY(100px); opacity: 0; }
  100% { opacity: 0; }
}

/* Responsive moon */
@media (max-width: 768px) {
  .hero-bg-moon {
    width: 250px;
    height: 250px;
    right: 0;
    left: 50%;
    transform: translateX(-50%);
    top: 2%;
  }
  .parallax-layer--far {
    transform: translateZ(-2px) scale(3);
  }
  .parallax-layer--mid {
    transform: translateZ(-1px) scale(2);
  }
  .plan-card.popular {
    transform: scale(1);
  }
  .plan-card.popular:hover {
    transform: scale(1.02);
  }
  .flip-card {
    height: 150px;
  }
}

@media (max-width: 480px) {
  .hero-bg-moon {
    width: 180px;
    height: 180px;
  }
  .flip-card {
    height: 130px;
  }
}
