/* ==========================================================================
   INFORMATION TECHNOLOGY DEPARTMENT - GOVERNMENT OF GILGIT-BALTISTAN
   Keyframes & Dynamic Animations (WCAG 2.1 AA Compliant - prefers-reduced-motion respected)
   ========================================================================== */

/* Keyframe Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseEmerald {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

@keyframes pulseGold {
  0% {
    box-shadow: 0 0 0 0 rgba(201, 151, 56, 0.6);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(201, 151, 56, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(201, 151, 56, 0);
  }
}

@keyframes floatGentle {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes glowBorder {
  0%, 100% {
    border-color: rgba(201, 151, 56, 0.4);
  }
  50% {
    border-color: rgba(16, 185, 129, 0.8);
  }
}

/* Scroll Reveal Classes (Driven by IntersectionObserver in animations.js) */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger Children Animations */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.reveal-stagger.in-view > *:nth-child(1) { transition-delay: 0.05s; opacity: 1; transform: translateY(0); }
.reveal-stagger.in-view > *:nth-child(2) { transition-delay: 0.12s; opacity: 1; transform: translateY(0); }
.reveal-stagger.in-view > *:nth-child(3) { transition-delay: 0.19s; opacity: 1; transform: translateY(0); }
.reveal-stagger.in-view > *:nth-child(4) { transition-delay: 0.26s; opacity: 1; transform: translateY(0); }
.reveal-stagger.in-view > *:nth-child(5) { transition-delay: 0.33s; opacity: 1; transform: translateY(0); }
.reveal-stagger.in-view > *:nth-child(6) { transition-delay: 0.40s; opacity: 1; transform: translateY(0); }

.floating-mesh-element {
  animation: floatGentle 5s ease-in-out infinite;
}

.glowing-card {
  animation: glowBorder 4s ease-in-out infinite;
}

/* Accessibility: Respect Reduced Motion Settings */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
  }
  .reveal-stagger > * {
    opacity: 1 !important;
    transform: none !important;
  }
}
