/* ==========================================================================
   SWEENEY & BEVERLY LIFE CELEBRATION SERVICES
   GLOBAL DESIGN SYSTEM: ANIMATIONS & MICRO-INTERACTIONS
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. SCROLL REVEAL UTILITY CLASSES
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Horizontal Reveals */
.reveal-left {
  opacity: 0;
  transform: translateX(-35px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-right {
  opacity: 0;
  transform: translateX(35px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* --------------------------------------------------------------------------
   2. KEYFRAME ANIMATIONS
   -------------------------------------------------------------------------- */
@keyframes floatGentle {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes candleFlicker {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    filter: drop-shadow(0 0 6px rgba(255, 180, 50, 0.8));
  }
  25% {
    opacity: 0.85;
    transform: scale(0.97) skewX(-1deg);
    filter: drop-shadow(0 0 4px rgba(255, 160, 40, 0.6));
  }
  50% {
    opacity: 0.95;
    transform: scale(1.03) skewX(1deg);
    filter: drop-shadow(0 0 8px rgba(255, 190, 60, 0.9));
  }
  75% {
    opacity: 0.9;
    transform: scale(0.98);
    filter: drop-shadow(0 0 5px rgba(255, 170, 45, 0.7));
  }
}

@keyframes pulseGold {
  0% {
    box-shadow: 0 0 0 0 rgba(196, 154, 69, 0.4);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(196, 154, 69, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(196, 154, 69, 0);
  }
}

.pulse-gold {
  animation: pulseGold 2.5s infinite;
}

.float-gentle {
  animation: floatGentle 5s ease-in-out infinite;
}

.candle-glow {
  animation: candleFlicker 1.8s infinite ease-in-out;
}

/* --------------------------------------------------------------------------
   3. ACCESSIBILITY / PREFERS 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;
  }
  
  .reveal,
  .reveal-left,
  .reveal-right {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
