/* ============================================================
   CUSTOMER SERVICE AFRICA — ANIMATIONS v1.1
   ============================================================ */

/* ─── HERO PAGE ENTRANCE ─────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}

.hero-anim-1 { animation: fadeUp 700ms cubic-bezier(0.16,1,0.3,1) both; animation-delay:  80ms; }
.hero-anim-2 { animation: fadeUp 700ms cubic-bezier(0.16,1,0.3,1) both; animation-delay: 200ms; }
.hero-anim-3 { animation: fadeUp 700ms cubic-bezier(0.16,1,0.3,1) both; animation-delay: 340ms; }
.hero-anim-4 { animation: fadeUp 700ms cubic-bezier(0.16,1,0.3,1) both; animation-delay: 480ms; }
.hero-anim-5 { animation: fadeUp 700ms cubic-bezier(0.16,1,0.3,1) both; animation-delay: 620ms; }

/* Page main fade in */
main { animation: fadeUp 500ms cubic-bezier(0.16,1,0.3,1) both; }

/* ─── SCROLL REVEAL ──────────────────────────────────────── */
/* Applied by IntersectionObserver in main.js */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity  700ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Stagger — children animate in sequence */
.stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity  600ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.stagger.is-visible > *:nth-child(1)  { opacity: 1; transform: none; transition-delay:   0ms; }
.stagger.is-visible > *:nth-child(2)  { opacity: 1; transform: none; transition-delay:  80ms; }
.stagger.is-visible > *:nth-child(3)  { opacity: 1; transform: none; transition-delay: 160ms; }
.stagger.is-visible > *:nth-child(4)  { opacity: 1; transform: none; transition-delay: 240ms; }
.stagger.is-visible > *:nth-child(5)  { opacity: 1; transform: none; transition-delay: 320ms; }
.stagger.is-visible > *:nth-child(6)  { opacity: 1; transform: none; transition-delay: 400ms; }
.stagger.is-visible > *:nth-child(7)  { opacity: 1; transform: none; transition-delay: 480ms; }
.stagger.is-visible > *:nth-child(8)  { opacity: 1; transform: none; transition-delay: 560ms; }
.stagger.is-visible > *:nth-child(n+9){ opacity: 1; transform: none; transition-delay: 640ms; }

/* ─── RING FLOAT ─────────────────────────────────────────── */
@keyframes ring-float {
  0%,100% { opacity: 0.07; transform: translateY(-50%) scale(1); }
  50%      { opacity: 0.12; transform: translateY(-50%) scale(1.04); }
}

/* ─── MARQUEE ────────────────────────────────────────────── */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ─── SPIN (button loading) ──────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── PULSE (live dot) ───────────────────────────────────── */
@keyframes pulse-anim {
  0%,100% { box-shadow: 0 0 0 0 rgba(217,50,10,0.5); }
  60%      { box-shadow: 0 0 0 7px rgba(217,50,10,0); }
}

/* ─── COUNTDOWN FLIP ─────────────────────────────────────── */
@keyframes flip {
  0%   { transform: perspective(300px) rotateX(0deg); }
  40%  { transform: perspective(300px) rotateX(-12deg); }
  100% { transform: perspective(300px) rotateX(0deg); }
}

.tick { animation: flip 280ms ease-out; }

/* ─── REDUCE 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 > * {
    opacity: 1 !important;
    transform: none !important;
  }
}
