/* ==========================================================================
   ROYAL ENGLISH SCHOOL - ANIMATIONS & TRANSITIONS
   Keyframes, Micro-interactions & Reduced Motion Support
   ========================================================================== */

/* Floating Academic Card Animation */
@keyframes floatAnim {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* WhatsApp / Call Pulse Glow */
@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    box-shadow: 0 0 0 16px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* Pop-In Reveal (bouncy scale entrance) */
@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  70% {
    opacity: 1;
    transform: scale(1.08);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Blinking Accent (attention flash) */
@keyframes blinkAccent {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.2;
  }
}

/* Subtle Red Line Pulse */
@keyframes redPulse {
  0% {
    opacity: 0.6;
    width: 40px;
  }
  50% {
    opacity: 1;
    width: 75px;
  }
  100% {
    opacity: 0.6;
    width: 40px;
  }
}

/* Fade Up Reveal */
.animate-fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-fade-up.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Fade In Scale */
.animate-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-scale.in-view {
  opacity: 1;
  transform: scale(1);
}

/* Stagger Delay Utility */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }

/* Image Hover Zoom Utility */
.img-zoom-hover {
  overflow: hidden;
}

.img-zoom-hover img {
  transition: transform 0.5s ease;
}

.img-zoom-hover:hover img {
  transform: scale(1.08);
}

/* Card Hover Elevation */
.card-hover-lift {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

/* ACCESSIBILITY: Reduced Motion Overrides */
@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;
  }

  .animate-fade-up,
  .animate-scale {
    opacity: 1 !important;
    transform: none !important;
  }

  .hero-floating-card,
  .floating-pulse {
    animation: none !important;
  }
}
