/* ========================================
   Keyframe Animations
   ======================================== */

/* Hero orb floating */
@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(60px, -40px) scale(1.1); }
  66% { transform: translate(-30px, 50px) scale(0.95); }
}

@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-50px, 30px) scale(0.9); }
  66% { transform: translate(40px, -60px) scale(1.05); }
}

@keyframes orbFloat3 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; }
  50% { transform: translate(-50%, -50%) scale(1.3); opacity: 0.15; }
}

/* Avatar ring gradient rotation */
@keyframes ringRotate {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Scroll indicator pulse */
@keyframes scrollPulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0.3; transform: scaleY(0.6); }
}

/* Fade in up — scroll reveal base */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Timeline dot pulse */
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(124, 58, 237, 0); }
}


/* ========================================
   Scroll-triggered Animation Classes
   ======================================== */

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays via CSS custom property */
.animate-on-scroll[style*="--delay: 1"] { transition-delay: 0.08s; }
.animate-on-scroll[style*="--delay: 2"] { transition-delay: 0.16s; }
.animate-on-scroll[style*="--delay: 3"] { transition-delay: 0.24s; }
.animate-on-scroll[style*="--delay: 4"] { transition-delay: 0.32s; }
.animate-on-scroll[style*="--delay: 5"] { transition-delay: 0.40s; }
.animate-on-scroll[style*="--delay: 6"] { transition-delay: 0.48s; }
.animate-on-scroll[style*="--delay: 7"] { transition-delay: 0.56s; }


/* ========================================
   Mobile Menu Link Stagger
   ======================================== */

.mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.10s; }
.mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.20s; }
.mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }
.mobile-menu.open .mobile-link:nth-child(6) { transition-delay: 0.30s; }

.mobile-link {
  transition: opacity 0.4s, transform 0.4s, color 0.2s;
}


/* ========================================
   Active dot pulse
   ======================================== */

.timeline-dot.active {
  animation: dotPulse 2.5s ease-in-out infinite;
}


/* ========================================
   Reduced Motion
   ======================================== */

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

  .animate-on-scroll {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}
