/* ============================================
   ANIMATIONS — AOS overrides, custom effects
   ============================================ */

/* --- Fade animations (work with AOS library) --- */
[data-aos="fade-up"] {
  transform: translateY(30px);
  opacity: 0;
  transition-property: transform, opacity;
}

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

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

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

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

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

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

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

/* --- Counter animation --- */
.counter-animated {
  display: inline-block;
}

/* --- Stagger children --- */
.stagger-children > *:nth-child(1) { transition-delay: 0ms; }
.stagger-children > *:nth-child(2) { transition-delay: 100ms; }
.stagger-children > *:nth-child(3) { transition-delay: 200ms; }
.stagger-children > *:nth-child(4) { transition-delay: 300ms; }
.stagger-children > *:nth-child(5) { transition-delay: 400ms; }
.stagger-children > *:nth-child(6) { transition-delay: 500ms; }

/* --- Floating effect for decorative elements --- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.float { animation: float 6s ease-in-out infinite; }
.float--delay-1 { animation-delay: -1s; }
.float--delay-2 { animation-delay: -2s; }
.float--delay-3 { animation-delay: -3s; }

/* --- Gradient text shimmer --- */
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.text-shimmer {
  background: linear-gradient(90deg, var(--nd-gold-400) 0%, var(--nd-gold-200) 25%, var(--nd-gold-400) 50%, var(--nd-gold-200) 75%, var(--nd-gold-400) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}

/* --- Reveal line under headings --- */
.reveal-line {
  position: relative;
  display: inline-block;
}

.reveal-line::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--color-accent);
  border-radius: 2px;
  transition: width var(--duration-slow) var(--ease-out);
}

.reveal-line.aos-animate::after,
.reveal-line:hover::after {
  width: 60px;
}

/* --- Image reveal clip --- */
@keyframes clip-reveal {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

.img-reveal {
  clip-path: inset(0 100% 0 0);
}

.img-reveal.aos-animate {
  animation: clip-reveal 0.8s var(--ease-out) forwards;
}

/* --- Marquee text for decorative banners --- */
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}

.marquee__track {
  display: inline-flex;
  animation: marquee 30s linear infinite;
}

.marquee__item {
  padding: 0 var(--space-3xl);
  font-family: var(--font-display);
  font-size: var(--fs-4xl);
  font-weight: var(--fw-extrabold);
  color: rgba(74,173,228,0.15);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  white-space: nowrap;
}

/* --- Scroll progress indicator --- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  z-index: calc(var(--z-nav) + 1);
  transition: width 100ms linear;
}

/* --- Parallax on mobile: disable fixed bg --- */
@media (max-width: 768px) {
  .parallax-section__bg {
    background-attachment: scroll;
  }
}

/* --- Prefers reduced motion override --- */
@media (prefers-reduced-motion: reduce) {
  [data-aos] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .float { animation: none; }
  .text-shimmer { animation: none; }
  .marquee__track { animation: none; }
  .scroll-progress { transition: none; }
}
