/* ===== ANIMATIONS CSS – AMIVILLE MARKETING ===== */

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.4,0,0.2,1), transform 0.65s cubic-bezier(0.4,0,0.2,1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal:nth-child(4) { transition-delay: 0.24s; }
.reveal:nth-child(5) { transition-delay: 0.32s; }
.reveal:nth-child(6) { transition-delay: 0.40s; }

/* Counter animation */
@keyframes countUp { from { opacity: 0; } to { opacity: 1; } }
.stat__number { animation: countUp 0.5s ease forwards; }

/* Floating WhatsApp entrance */
.whatsapp-float {
  animation: waBounceIn 1s cubic-bezier(0.34,1.56,0.64,1) 2s both;
}
@keyframes waBounceIn {
  from { transform: scale(0) rotate(-30deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Nav hamburger open state */
.nav__hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav__hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* Smooth image load */
img { transition: opacity 0.3s ease; }
img[loading="lazy"] { opacity: 0; }
img.loaded { opacity: 1; }

/* Card hover glow for service cards */
.service-card:hover .service-card__icon,
.pain__card:hover .pain__icon { transform: scale(1.15); transition: transform 0.3s ease; }

/* Pulse badge dot */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.75); }
}

/* Gradient text shimmer on hero */
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* Button ripple on click */
.btn { position: relative; overflow: hidden; }
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.18);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}
.btn:active::after { transform: scaleX(1); }
