/* ==========================================================================
   CMR International School — Animations v3.0
   Keyframes and entrance animation helpers
   ========================================================================== */

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

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

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

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes slideInTop {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

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

@keyframes lineGrow {
  from { width: 0; }
  to   { width: 100%; }
}

@keyframes bgSlide {
  0%, 100% { transform: scale(1.05); }
  50%       { transform: scale(1); }
}

@keyframes ringPulse {
  0%   { transform: scale(1);   opacity: 0.6; }
  100% { transform: scale(1.8); opacity: 0; }
}

@keyframes gradientShift {
  0%   { background-position: 0%   50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0%   50%; }
}

@keyframes wordReveal {
  from { opacity: 0; transform: translateY(100%); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   HERO ENTRANCE ANIMATIONS
   -------------------------------------------------------------------------- */
.hero-animate .hero-badge      { animation: fadeInUp 0.6s var(--ease-out) 0.1s both; }
.hero-animate .hero-title      { animation: fadeInUp 0.8s var(--ease-out) 0.25s both; }
.hero-animate .hero-desc       { animation: fadeInUp 0.7s var(--ease-out) 0.45s both; }
.hero-animate .hero-actions    { animation: fadeInUp 0.7s var(--ease-out) 0.6s both; }
.hero-animate .hero-stats      { animation: fadeInUp 0.7s var(--ease-out) 0.75s both; }
.hero-animate .hero-visual     { animation: fadeIn 1s var(--ease-out) 0.3s both; }
.hero-animate .hero-img-secondary { animation: fadeInLeft 0.8s var(--ease-out) 0.6s both; }
.hero-animate .hero-img-tertiary  { animation: fadeInLeft 0.8s var(--ease-out) 0.75s both; }
.hero-animate .hero-pill       { animation: fadeIn 0.6s var(--ease-out) 1s both; }

/* --------------------------------------------------------------------------
   TICKER ANIMATION
   -------------------------------------------------------------------------- */
@keyframes tickerScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* --------------------------------------------------------------------------
   LOADING SKELETON
   -------------------------------------------------------------------------- */
.skeleton {
  background: linear-gradient(90deg, var(--clr-gray-100) 25%, var(--clr-gray-50) 50%, var(--clr-gray-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

/* --------------------------------------------------------------------------
   DECORATIVE RING ANIMATION
   -------------------------------------------------------------------------- */
.ring-pulse::before, .ring-pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid currentColor;
  animation: ringPulse 2s ease-out infinite;
}
.ring-pulse::after { animation-delay: 1s; }

/* --------------------------------------------------------------------------
   COUNTER ELEMENT
   -------------------------------------------------------------------------- */
[data-count] { display: inline-block; }

/* --------------------------------------------------------------------------
   SECTION ENTRANCE DELAYS
   -------------------------------------------------------------------------- */
.delay-100 { transition-delay: 100ms !important; }
.delay-200 { transition-delay: 200ms !important; }
.delay-300 { transition-delay: 300ms !important; }
.delay-400 { transition-delay: 400ms !important; }
.delay-500 { transition-delay: 500ms !important; }
.delay-600 { transition-delay: 600ms !important; }

/* --------------------------------------------------------------------------
   REDUCED MOTION
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .stagger-children > * {
    opacity: 1 !important;
    transform: none !important;
  }
  .ticker-track {
    animation-duration: 40s !important;
    animation-iteration-count: infinite !important;
  }
}
