/* ===========================
   NEUROREAD — ANIMATIONS
   =========================== */

/* ── Keyframes ── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(32px); }
  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); }
}

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

@keyframes twinkle {
  0%, 100% { opacity: .35; transform: scale(1); }
  50%       { opacity: .7;  transform: scale(1.25); }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(107,63,160,.4); }
  70%       { box-shadow: 0 0 0 12px rgba(107,63,160,0); }
}

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

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

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

/* ── Slide in on scroll (reveal classes) ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-36px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(36px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Staggered children animation */
.services-grid .service-card,
.why-grid .why-card,
.testimonials-grid .testimonial-card,
.contact-grid .contact-card {
  transition-delay: 0s;
}
.services-grid .service-card:nth-child(1) { transition-delay: .05s; }
.services-grid .service-card:nth-child(2) { transition-delay: .10s; }
.services-grid .service-card:nth-child(3) { transition-delay: .15s; }
.services-grid .service-card:nth-child(4) { transition-delay: .20s; }
.services-grid .service-card:nth-child(5) { transition-delay: .25s; }
.services-grid .service-card:nth-child(6) { transition-delay: .30s; }
.services-grid .service-card:nth-child(7) { transition-delay: .35s; }
.services-grid .service-card:nth-child(8) { transition-delay: .40s; }
.services-grid .service-card:nth-child(9) { transition-delay: .45s; }

.why-grid .why-card:nth-child(1) { transition-delay: .05s; }
.why-grid .why-card:nth-child(2) { transition-delay: .10s; }
.why-grid .why-card:nth-child(3) { transition-delay: .15s; }
.why-grid .why-card:nth-child(4) { transition-delay: .20s; }
.why-grid .why-card:nth-child(5) { transition-delay: .25s; }
.why-grid .why-card:nth-child(6) { transition-delay: .30s; }

.contact-grid .contact-card:nth-child(1) { transition-delay: .05s; }
.contact-grid .contact-card:nth-child(2) { transition-delay: .10s; }
.contact-grid .contact-card:nth-child(3) { transition-delay: .15s; }
.contact-grid .contact-card:nth-child(4) { transition-delay: .20s; }
.contact-grid .contact-card:nth-child(5) { transition-delay: .25s; }
.contact-grid .contact-card:nth-child(6) { transition-delay: .30s; }

/* Floating animation for educator avatar */
.educator-avatar { animation: float 4s ease-in-out infinite; }

/* Rainbow section badge shimmer */
.section-badge {
  background-size: 200% 200%;
  animation: rainbowShift 4s ease infinite;
  background-image: linear-gradient(135deg, #6B3FA0, #29B6F6, #6B3FA0, #FF7043, #6B3FA0);
}

/* Pulse effect on CTA buttons in view */
.nav-cta { animation: pulse 2.5s ease infinite; }

/* Hero entrance animation */
.slide.active .slide-content > * {
  animation: fadeInUp .8s ease both;
}
.slide.active .slide-content > *:nth-child(1) { animation-delay: .1s; }
.slide.active .slide-content > *:nth-child(2) { animation-delay: .2s; }
.slide.active .slide-content > *:nth-child(3) { animation-delay: .3s; }
.slide.active .slide-content > *:nth-child(4) { animation-delay: .4s; }
.slide.active .slide-content > *:nth-child(5) { animation-delay: .5s; }
.slide.active .slide-content > *:nth-child(6) { animation-delay: .6s; }
