/**
 * DaysAndDates.com - Modern Animation & Micro-Interaction Engine
 * Ultra-smooth, 60fps GPU-accelerated transitions (transform & opacity only)
 * Includes scroll-driven reveals, stagger delays, ambient glow, and hover micro-motion
 */

/* ==========================================================================
   Keyframes
   ========================================================================== */

/* Live pulse ping for status dots & map pins */
@keyframes pingRing {
  0% {
    transform: scale(0.9);
    opacity: 0.9;
  }
  70% {
    transform: scale(2.2);
    opacity: 0;
  }
  100% {
    transform: scale(2.4);
    opacity: 0;
  }
}

@keyframes pulseLive {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  }
  50% {
    transform: scale(1.15);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
}

@keyframes pulseGold {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 0 7px rgba(245, 158, 11, 0);
  }
}

/* Subtle floating for celestial badges & decorative cards */
@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(0.8deg);
  }
}

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

/* Luminous border shimmer effect */
@keyframes borderGlow {
  0%, 100% {
    border-color: rgba(79, 70, 229, 0.2);
    box-shadow: 0 0 15px rgba(79, 70, 229, 0.08);
  }
  50% {
    border-color: rgba(255, 208, 26, 0.35);
    box-shadow: 0 0 25px rgba(255, 208, 26, 0.15);
  }
}

/* Metallic shimmer sweep on premium pill tags */
@keyframes shimmerSweep {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Rotate for celestial orbits */
@keyframes rotateSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   Scroll-Driven Reveal System
   ========================================================================== */

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

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

/* Stagger Delay Hierarchy for Card Grids */
.stagger-1 { transition-delay: 60ms !important; }
.stagger-2 { transition-delay: 130ms !important; }
.stagger-3 { transition-delay: 200ms !important; }
.stagger-4 { transition-delay: 270ms !important; }
.stagger-5 { transition-delay: 340ms !important; }
.stagger-6 { transition-delay: 410ms !important; }

/* Scale Up Reveal */
.reveal-scale {
  opacity: 0;
  transform: scale(0.92) translateY(20px);
  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-scale.is-revealed {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* ==========================================================================
   Modern Micro-Interactions & Hover Dynamics
   ========================================================================== */

/* Tactile button press */
.btn-press {
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.btn-press:active {
  transform: scale(0.96) !important;
}

/* Floating Elements */
.animate-float {
  animation: floatSlow 7s ease-in-out infinite;
}

.animate-float-gentle {
  animation: floatGentle 4.5s ease-in-out infinite;
}

.animate-spin-slow {
  animation: rotateSlow 28s linear infinite;
}

/* Live Pulse Rings */
.live-pulse-ring {
  position: relative;
  display: inline-flex;
}

.live-pulse-ring::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--brand-accent, #ffd01a);
  opacity: 0.7;
  animation: pingRing 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* Shimmer Tag Badge */
.badge-shimmer {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.35) 50%, rgba(255, 255, 255, 0.1) 100%);
  background-size: 200% 100%;
  animation: shimmerSweep 3.5s infinite;
}

/* Progress bar fill transition */
.progress-animated {
  transition: width 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Reduced Motion Accessibility (WCAG 2.2 AAA)
   ========================================================================== */
@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,
  .reveal-scale {
    opacity: 1 !important;
    transform: none !important;
  }
}
