/* ==========================================================================
   Clínica Aurora Odontologia — animations.css
   Animações de entrada, keyframes e respeito a prefers-reduced-motion.
   ========================================================================== */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(.94); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

@keyframes pulseRing {
  0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, .45); }
  70%  { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

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

/* --------------------------------------------------------------------------
   Reveal-on-scroll (acionado via IntersectionObserver no main.js)
   -------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal="fade"] { transform: none; }
[data-reveal].is-visible[data-reveal-delay="1"] { transition-delay: .1s; }
[data-reveal].is-visible[data-reveal-delay="2"] { transition-delay: .2s; }
[data-reveal].is-visible[data-reveal-delay="3"] { transition-delay: .3s; }
[data-reveal].is-visible[data-reveal-delay="4"] { transition-delay: .4s; }
[data-reveal].is-visible[data-reveal-delay="5"] { transition-delay: .5s; }

/* Hero elements */
.hero-content { animation: fadeInUp .8s cubic-bezier(.22,.61,.36,1) both; }
.hero-media { animation: fadeIn 1s ease .2s both; }
.floating-card.card-rating { animation: fadeInUp .8s ease .4s both, float 5s ease-in-out 1.2s infinite; }
.floating-card.card-humanized { animation: fadeInUp .8s ease .6s both, float 6s ease-in-out 1.4s infinite; }

/* WhatsApp float pulse */
.whatsapp-float { animation: pulseRing 2.6s infinite; }

/* Modal */
.modal-overlay.is-open .modal-box { animation: scaleIn .3s ease both; }

/* Loading spinner (formulário) */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}

/* Accordion icon rotation already handled em style.css via transition */

/* --------------------------------------------------------------------------
   Acessibilidade — prefers-reduced-motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
  .floating-card,
  .whatsapp-float {
    animation: none !important;
  }
}
