/* === Keyframe Animations === */

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-8px);
  }
  60% {
    transform: translateX(-50%) translateY(-4px);
  }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 8px var(--accent-glow);
  }
  50% {
    box-shadow: 0 0 20px var(--accent-glow), 0 0 40px rgba(74, 158, 255, 0.15);
  }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === Scroll-Driven Wipe Animation === */
/* Handled entirely by JS (scroll-wipe.js) for reliable sticky-container support */

/* === Intersection Observer reveal animations === */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.card-grid .card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.card-grid .card.visible {
  opacity: 1;
  transform: translateY(0);
}

.card-grid .card:nth-child(1) { transition-delay: 0s; }
.card-grid .card:nth-child(2) { transition-delay: 0.1s; }
.card-grid .card:nth-child(3) { transition-delay: 0.2s; }
.card-grid .card:nth-child(4) { transition-delay: 0.3s; }
.card-grid .card:nth-child(5) { transition-delay: 0.4s; }

/* === Hover Effects === */
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(74, 158, 255, 0.05), transparent);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.card {
  position: relative;
}

.card:hover::before {
  opacity: 1;
}

/* === Nav link active indicator === */
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-blue);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.nav-links a {
  position: relative;
}

.nav-links a.active::after {
  transform: scaleX(1);
}
