/* ========== SCROLL REVEAL ANIMATIONS ========== */

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-32px);
  transition:
    opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.95);
  transition:
    opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Staggered children */
.stagger-children .reveal:nth-child(1) { transition-delay: 0ms; }
.stagger-children .reveal:nth-child(2) { transition-delay: 80ms; }
.stagger-children .reveal:nth-child(3) { transition-delay: 160ms; }
.stagger-children .reveal:nth-child(4) { transition-delay: 240ms; }
.stagger-children .reveal:nth-child(5) { transition-delay: 320ms; }
.stagger-children .reveal:nth-child(6) { transition-delay: 400ms; }
.stagger-children .reveal:nth-child(7) { transition-delay: 480ms; }
.stagger-children .reveal:nth-child(8) { transition-delay: 560ms; }

/* ========== HERO ENTRANCE ========== */

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroIconBounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(-5deg); }
}

.hero__icon {
  animation: heroFadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both,
             heroIconBounce 3s ease-in-out 1.5s infinite;
}

.hero__title {
  animation: heroFadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.35s both;
}

.hero__subtitle {
  animation: heroFadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.5s both;
}

/* ========== AMBIENT BACKGROUND ========== */

@keyframes ambientDrift {
  0%, 100% { transform: translate(-50%, 0) scale(1); }
  50% { transform: translate(-50%, -20px) scale(1.05); }
}

.hero__bg::before {
  animation: ambientDrift 12s ease-in-out infinite;
}

@keyframes ambientDriftAlt {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.6; }
  50% { transform: translate(20px, -15px) scale(1.08); opacity: 1; }
}

.hero__bg::after {
  animation: ambientDriftAlt 15s ease-in-out infinite;
}

/* ========== GRID LINE DECORATION ========== */

@keyframes gridPulse {
  0%, 100% { opacity: 0.03; }
  50% { opacity: 0.06; }
}

.hero__bg {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridPulse 8s ease-in-out infinite;
}

/* ========== NAVBAR ANIMATION ========== */

@keyframes navSlideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.navbar {
  animation: navSlideDown 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.1s both;
}

/* ========== PRISMATIC THUMBNAIL ANIMATIONS ========== */

@keyframes prismShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.cap-card:hover .cap-card__thumb {
  filter: brightness(1.15) saturate(1.2);
}

.cap-card__thumb {
  transition: filter 0.5s ease;
}

/* ========== MOBILE MENU ANIMATION ========== */

@keyframes mobileMenuIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.navbar__links.active {
  animation: mobileMenuIn 0.3s ease both;
}

.navbar__links.active li {
  animation: heroFadeIn 0.4s ease both;
}

.navbar__links.active li:nth-child(1) { animation-delay: 0.05s; }
.navbar__links.active li:nth-child(2) { animation-delay: 0.1s; }
.navbar__links.active li:nth-child(3) { animation-delay: 0.15s; }
.navbar__links.active li:nth-child(4) { animation-delay: 0.2s; }
.navbar__links.active li:nth-child(5) { animation-delay: 0.25s; }
