/*!
 * BetterYou Co — Animations
 * -----------------------------------------------------------------------
 * Keyframes + a couple of standalone motion utilities not already
 * covered by component hover states. Scroll-triggered reveals are
 * handled by AOS (vendor/aos) via data-aos="..." attributes in markup;
 * this file supplies the brand's own easing/duration so AOS's defaults
 * are overridden to match tokens.css, plus a few bespoke effects.
 * -----------------------------------------------------------------------
 */

@keyframes by-fade-in-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes by-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes by-scale-in {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes by-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes by-pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(82, 124, 49, 0.35); }
  100% { box-shadow: 0 0 0 14px rgba(82, 124, 49, 0); }
}

.by-anim-float { animation: by-float 5s ease-in-out infinite; }
.by-anim-fade-in { animation: by-fade-in var(--by-duration-slow) var(--by-ease) both; }

/* Simple entrance for elements not using AOS (e.g. dynamically inserted) */
.by-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--by-duration-slow) var(--by-ease),
              transform var(--by-duration-slow) var(--by-ease);
}
.by-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger helper — pair with .by-reveal children, set via inline style
   `--by-delay` or these preset classes */
.by-delay-1 { transition-delay: 80ms; }
.by-delay-2 { transition-delay: 160ms; }
.by-delay-3 { transition-delay: 240ms; }
.by-delay-4 { transition-delay: 320ms; }

/* Number/score count-up target (JS toggles this on when animating) */
.by-count-up { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .by-anim-float,
  .by-anim-fade-in { animation: none !important; }
  .by-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
