/* ============================================================
   NWC Main Site — Animations
   animations.css: keyframes, AOS overrides, entrance effects
   ============================================================ */

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

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(8px); }
}

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

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(60,123,252,0.2); }
  50%       { box-shadow: 0 0 40px rgba(60,123,252,0.45), 0 0 60px rgba(42,167,255,0.15); }
}

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

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

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

@keyframes scale-up {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

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

@keyframes shimmer {
  from { background-position: -200% center; }
  to   { background-position: 200% center; }
}

/* ─── Hero Entrance Animations ─── */
.hero-animate-1 {
  animation: fade-up 0.7s ease both;
  animation-delay: 0.1s;
}

.hero-animate-2 {
  animation: fade-up 0.7s ease both;
  animation-delay: 0.25s;
}

.hero-animate-3 {
  animation: fade-up 0.7s ease both;
  animation-delay: 0.4s;
}

.hero-animate-4 {
  animation: fade-up 0.7s ease both;
  animation-delay: 0.55s;
}

.hero-animate-5 {
  animation: fade-up 0.7s ease both;
  animation-delay: 0.7s;
}

/* ─── Animated Gradient Text ─── */
.text-gradient-animated {
  background: linear-gradient(135deg, #3C7BFC, #2AA7FF, #5B9BFF, #3C7BFC);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 4s ease infinite;
}

/* ─── Float Animation (visual elements) ─── */
.float { animation: float 4s ease-in-out infinite; }
.float-delayed { animation: float 4s ease-in-out infinite; animation-delay: 1.5s; }

/* ─── Pulse Glow ─── */
.pulse-glow { animation: pulse-glow 3s ease-in-out infinite; }

/* ─── AOS (Animate on Scroll) Overrides ─── */
[data-aos] {
  pointer-events: none;
}

[data-aos].aos-animate {
  pointer-events: auto;
}

[data-aos="fade-up"] {
  transform: translateY(40px);
  opacity: 0;
  transition-property: transform, opacity;
}

[data-aos="fade-up"].aos-animate {
  transform: translateY(0);
  opacity: 1;
}

[data-aos="fade-right"] {
  transform: translateX(-40px);
  opacity: 0;
  transition-property: transform, opacity;
}

[data-aos="fade-right"].aos-animate {
  transform: translateX(0);
  opacity: 1;
}

[data-aos="fade-left"] {
  transform: translateX(40px);
  opacity: 0;
  transition-property: transform, opacity;
}

[data-aos="fade-left"].aos-animate {
  transform: translateX(0);
  opacity: 1;
}

[data-aos="zoom-in"] {
  transform: scale(0.9);
  opacity: 0;
  transition-property: transform, opacity;
}

[data-aos="zoom-in"].aos-animate {
  transform: scale(1);
  opacity: 1;
}

[data-aos="fade-in"] {
  opacity: 0;
  transition-property: opacity;
}

[data-aos="fade-in"].aos-animate {
  opacity: 1;
}

/* ─── Shimmer Loading Effect ─── */
.shimmer {
  background: linear-gradient(
    90deg,
    var(--bg-card) 25%,
    var(--bg-tint) 50%,
    var(--bg-card) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* ─── Stagger children ─── */
.stagger-children > *:nth-child(1) { transition-delay: 0ms; }
.stagger-children > *:nth-child(2) { transition-delay: 75ms; }
.stagger-children > *:nth-child(3) { transition-delay: 150ms; }
.stagger-children > *:nth-child(4) { transition-delay: 225ms; }
.stagger-children > *:nth-child(5) { transition-delay: 300ms; }
.stagger-children > *:nth-child(6) { transition-delay: 375ms; }
.stagger-children > *:nth-child(7) { transition-delay: 450ms; }
.stagger-children > *:nth-child(8) { transition-delay: 525ms; }

/* ─── Page transition ─── */
.page-enter {
  animation: fade-up 0.5s ease both;
}

/* ─── Spin Slow (decorative icons) ─── */
.spin-slow {
  animation: spin-slow 20s linear infinite;
}

/* ─── Reduce Motion ─── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .marquee-track {
    animation: none;
  }
}
