/* ============================================================
   ANIMATIONS — Amare Auto Spa
   ============================================================ */

/* ══════════════════════════════════════════
   BASE KEYFRAMES
══════════════════════════════════════════ */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ══════════════════════════════════════════
   SCROLL REVEAL CLASSES
   Trigger: add .is-visible via IntersectionObserver
══════════════════════════════════════════ */

/* Fade */
.reveal-fade {
  opacity: 0;
  transition:
    opacity 0.7s var(--ease-out-expo),
    transform 0.7s var(--ease-out-expo);
  transition-delay: var(--delay, 0s);
}

.reveal-fade.is-visible {
  opacity: 1;
}

/* Up */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.75s var(--ease-out-expo),
    transform 0.75s var(--ease-out-expo);
  transition-delay: var(--delay, 0s);
}

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

/* Left */
.reveal-left {
  opacity: 0;
  transform: translateX(-48px);
  transition:
    opacity 0.8s var(--ease-out-expo),
    transform 0.8s var(--ease-out-expo);
  transition-delay: var(--delay, 0s);
}

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

/* Right */
.reveal-right {
  opacity: 0;
  transform: translateX(48px);
  transition:
    opacity 0.8s var(--ease-out-expo),
    transform 0.8s var(--ease-out-expo);
  transition-delay: var(--delay, 0s);
}

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

/* ══════════════════════════════════════════
   HERO ACCENT PULSE (line 2 glow)
══════════════════════════════════════════ */
@keyframes accentPulse {
  0%, 100% { text-shadow: 0 0 24px rgba(220,30,30,0.4), 0 0 60px rgba(220,30,30,0.15); }
  50%       { text-shadow: 0 0 48px rgba(220,30,30,0.65), 0 0 100px rgba(220,30,30,0.3); }
}

.hero-title-line2 {
  animation: accentPulse 4s ease-in-out 1.5s infinite,
             fadeInUp 0.75s 0.5s var(--ease-out-expo) both;
}

/* ══════════════════════════════════════════
   COUNTER ANIMATION CLASS (applied by JS)
══════════════════════════════════════════ */
.counting {
  display: inline-block;
  animation: none;
}

/* ══════════════════════════════════════════
   REDUCED MOTION PREFERENCE
══════════════════════════════════════════ */
@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;
  }

  .reveal-fade,
  .reveal-up,
  .reveal-left,
  .reveal-right {
    opacity: 1 !important;
    transform: none !important;
  }
}
