/* ============================================
   HT PILATES - Scroll Animations
   ============================================ */

/* --- Reveal Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.reveal--left {
  opacity: 0;
  transform: translateX(-40px);
}

.reveal--left.reveal--visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal--right {
  opacity: 0;
  transform: translateX(40px);
}

.reveal--right.reveal--visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal--scale {
  opacity: 0;
  transform: scale(0.95);
}

.reveal--scale.reveal--visible {
  opacity: 1;
  transform: scale(1);
}

/* Staggered delays for grid items */
.reveal--delay-1 { transition-delay: 0.1s; }
.reveal--delay-2 { transition-delay: 0.2s; }
.reveal--delay-3 { transition-delay: 0.3s; }
.reveal--delay-4 { transition-delay: 0.4s; }
.reveal--delay-5 { transition-delay: 0.5s; }

/* --- Hero Entrance --- */
@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hero__badge {
  animation: heroFadeUp 0.8s ease-out 0.2s both;
}

.hero__title {
  animation: heroFadeUp 0.8s ease-out 0.4s both;
}

.hero__subtitle {
  animation: heroFadeUp 0.8s ease-out 0.6s both;
}

.hero__cta {
  animation: heroFadeUp 0.8s ease-out 0.8s both;
}

.hero__awards {
  animation: heroFadeIn 1s ease-out 1.2s both;
}

.hero__scroll {
  animation: heroFadeIn 1s ease-out 1.5s both;
}

/* --- Counter Animation --- */
@keyframes countPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.trust-bar__number--animating {
  animation: countPulse 0.3s ease;
}

/* --- Gold Line Decoration --- */
@keyframes lineExpand {
  from { width: 0; }
  to { width: 60px; }
}

.section__header::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: var(--color-gold);
  margin: var(--space-lg) auto 0;
  animation: lineExpand 0.6s ease-out;
}

.reveal .section__header::after {
  width: 0;
}

.reveal--visible .section__header::after {
  animation: lineExpand 0.6s ease-out 0.3s both;
}

/* --- Card Hover Shimmer --- */
@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 200%; }
}

.service-card::after,
.pricing-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(26, 138, 138, 0.04), transparent);
  pointer-events: none;
}

.service-card:hover::after,
.pricing-card:hover::after {
  animation: shimmer 0.8s ease;
}

/* --- Testimonial Transition --- */
@keyframes testimonialIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.testimonial-card--active {
  animation: testimonialIn 0.5s ease;
}

/* --- Pulse for WhatsApp --- */
@keyframes whatsappPulse {
  0% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4); }
  50% { box-shadow: 0 4px 30px rgba(37, 211, 102, 0.6), 0 0 0 10px rgba(37, 211, 102, 0.1); }
  100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4); }
}

.whatsapp-float {
  animation: whatsappPulse 3s ease-in-out infinite;
}

/* --- Cart Badge Pop --- */
@keyframes badgePop {
  0% { transform: scale(0); }
  60% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.cart-btn__badge--pop {
  animation: badgePop 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

/* --- Reduce motion for accessibility --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}
