/* ==========================================================================
   AD SOLACE HEALTHCARE — ANIMATIONS
   Keyframes + scroll-reveal utility classes (driven by IntersectionObserver
   in js/animations.js, which toggles the .is-visible class).
   ========================================================================== */

/* ---------- Scroll reveal base states ---------- */
[data-animate] {
  opacity: 0;
  transition: opacity 0.8s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)),
    transform 0.8s var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
  will-change: opacity, transform;
}

[data-animate].is-visible {
  opacity: 1;
  transform: none !important;
}

[data-animate="fade-up"] {
  transform: translateY(36px);
}

[data-animate="fade-in"] {
  transform: none;
}

[data-animate="slide-up"] {
  transform: translateY(64px);
}

[data-animate="slide-left"] {
  transform: translateX(56px);
}

[data-animate="slide-right"] {
  transform: translateX(-56px);
}

[data-animate="scale-in"] {
  transform: scale(0.9);
}

/* Stagger helper: children get incremental delay via inline style
   (set by JS: style="transition-delay: Nms") */

/* ---------- Image reveal (wipe) ---------- */
.reveal-media {
  position: relative;
  overflow: hidden;
}



.reveal-media.is-visible::after {
  transform: scaleX(0);
}

/* ---------- 3D hero orbit / float keyframes ---------- */
@keyframes spin-ring {
  from {
    transform: rotateX(72deg) rotateZ(0deg);
  }

  to {
    transform: rotateX(72deg) rotateZ(360deg);
  }
}

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

  50% {
    transform: translateY(-14px);
  }
}

@keyframes drift {
  0% {
    transform: translate(0, 0);
    opacity: 0;
  }

  10% {
    opacity: 0.6;
  }

  90% {
    opacity: 0.6;
  }

  100% {
    transform: translate(var(--dx, 40px), var(--dy, -120px));
    opacity: 0;
  }
}

@keyframes scroll-cue {
  0% {
    transform: scaleY(0);
    transform-origin: top;
    opacity: 0;
  }

  40% {
    transform: scaleY(1);
    transform-origin: top;
    opacity: 1;
  }

  60% {
    transform: scaleY(1);
    transform-origin: bottom;
    opacity: 1;
  }

  100% {
    transform: scaleY(0);
    transform-origin: bottom;
    opacity: 0;
  }
}

@keyframes pulse-pin {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.55);
  }

  70% {
    box-shadow: 0 0 0 14px rgba(34, 211, 238, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(34, 211, 238, 0);
  }
}

@keyframes pulse-wa {
  0% {
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.45), 0 0 0 0 rgba(37, 211, 102, 0.55);
  }

  70% {
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.45), 0 0 0 16px rgba(37, 211, 102, 0);
  }

  100% {
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.45), 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Hero load-in sequence (orchestrated, not scattered) */
.hero-eyebrow, .hero-content h1, .hero-content>p, .hero-ctas, .trust-strip {
  opacity: 0;
  animation: hero-in 0.9s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)) forwards;
}

.hero-content h1 {
  animation-delay: 0.12s;
}

.hero-content>p {
  animation-delay: 0.26s;
}

.hero-ctas {
  animation-delay: 0.38s;
}

.trust-strip {
  animation-delay: 0.5s;
}

@keyframes hero-in {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-visual {
  opacity: 0;
  animation: hero-in-visual 1.2s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)) 0.3s forwards;
}

@keyframes hero-in-visual {
  from {
    opacity: 0;
    transform: scale(0.88) translateY(14px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  [data-animate] {
    opacity: 1 !important;
    transform: none !important;
  }

  .hero-3d {
    transition: none !important;
  }
}