/* ═══════════════════════════════════════════════════════════════
   COSMOS — Animations Stylesheet
   All keyframe animations and entrance effects
═══════════════════════════════════════════════════════════════ */

/* ── Starfield & Cosmic effects ── */
@keyframes nebula-drift {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, -20px) scale(1.08); }
}

@keyframes star-pulse {
  0%, 100% { opacity: 1; filter: drop-shadow(0 0 6px var(--clr-neon)); }
  50%       { opacity: 0.7; filter: drop-shadow(0 0 14px var(--clr-neon)); }
}

@keyframes orbit-rotate {
  from { transform: translateY(-50%) rotateX(70deg) rotateY(15deg) rotateZ(0deg); }
  to   { transform: translateY(-50%) rotateX(70deg) rotateY(15deg) rotateZ(360deg); }
}

/* ── Planet / Floating Elements ── */
@keyframes planet-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}

@keyframes planet-orbit {
  from { transform: rotate(0deg) translateX(180px) rotate(0deg); }
  to   { transform: rotate(360deg) translateX(180px) rotate(-360deg); }
}

/* ── Hero Text Entrance ── */
@keyframes hero-fade-up {
  0% {
    opacity: 0;
    transform: translateY(40px);
    filter: blur(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* ── Scroll Indicator ── */
@keyframes scroll-pulse {
  0%, 100% { opacity: 0.4; transform: translateX(-50%) translateY(0); }
  50%       { opacity: 1;   transform: translateX(-50%) translateY(8px); }
}

/* ── Neon Glow Pulse ── */
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(79, 143, 255, 0.4), 0 0 60px rgba(79, 143, 255, 0.15); }
  50%       { box-shadow: 0 0 35px rgba(79, 143, 255, 0.7), 0 0 90px rgba(79, 143, 255, 0.3); }
}

/* ── Shooting Star ── */
@keyframes shooting-star {
  0% {
    transform: translateX(0) translateY(0) rotate(-45deg);
    opacity: 1;
  }
  100% {
    transform: translateX(-600px) translateY(600px) rotate(-45deg);
    opacity: 0;
  }
}

/* ── Shimmer / Skeleton ── */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* ── Timeline Dot Pulse ── */
@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(79, 143, 255, 0.2), 0 0 20px rgba(79, 143, 255, 0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(79, 143, 255, 0.1), 0 0 40px rgba(79, 143, 255, 0.6); }
}

/* ── Gradient Shift ── */
@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Fade In ── */
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Scale In ── */
@keyframes scale-in {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── Cursor Pulse ── */
@keyframes cursor-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50%       { transform: translate(-50%, -50%) scale(1.2); }
}

/* ── Hero Entrance Sequence ── */
.animate-reveal:nth-child(1) { animation: hero-fade-up 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s both; }
.animate-reveal:nth-child(2) { animation: hero-fade-up 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.4s both; }
.animate-reveal:nth-child(3) { animation: hero-fade-up 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.6s both; }
.animate-reveal:nth-child(4) { animation: hero-fade-up 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.8s both; }
.animate-reveal:nth-child(5) { animation: hero-fade-up 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1.0s both; }

/* ── Timeline dots pulse continuously ── */
.timeline-dot {
  animation: dot-pulse 3s ease-in-out infinite;
}

/* ── Gradient Text Animation ── */
.gradient-text {
  background-size: 200% 200%;
  animation: gradient-shift 4s ease infinite;
}

/* ── Button Hover Glow Pulse ── */
.btn-primary {
  animation: glow-pulse 3s ease-in-out infinite;
}
.btn-primary:hover {
  animation: none; /* Stop pulse on hover, handled by :hover styles */
}

/* ── Page Load Fade ── */
body {
  animation: fade-in 0.5s ease both;
}

/* ── Staggered card reveal animations (via IntersectionObserver classes) ── */
.reveal-card:nth-child(1).visible { transition-delay: 0s; }
.reveal-card:nth-child(2).visible { transition-delay: 0.08s; }
.reveal-card:nth-child(3).visible { transition-delay: 0.16s; }
.reveal-card:nth-child(4).visible { transition-delay: 0.24s; }
.reveal-card:nth-child(5).visible { transition-delay: 0.32s; }
.reveal-card:nth-child(6).visible { transition-delay: 0.40s; }

/* ── Feature item stagger ── */
.feature-item.visible { animation: hero-fade-up 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) var(--delay, 0s) both; }

/* ── Gallery reveal stagger ── */
.gallery-item.visible { transition-delay: var(--delay, 0s); }
