/* ==========================================================================
   animations.css — keyframes and motion utilities
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {

  .fade-in-up {
    animation: fadeInUp var(--dur-slow) var(--ease-out) both;
  }

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

  @keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
  }

  @keyframes spin {
    to { transform: rotate(360deg); }
  }

  @keyframes ripple {
    to { transform: scale(3); opacity: 0; }
  }

  /* Sun icon: slow ambient rotation of rays */
  .sun-rays {
    transform-origin: 50px 50px;
    animation: sunSpin 22s linear infinite;
  }
  @keyframes sunSpin {
    to { transform: rotate(360deg); }
  }

  /* Cloud icons: gentle drift */
  .wicon-cloudy, .wicon-partly-day, .wicon-partly-night,
  .wicon-fog, .wicon-drizzle, .wicon-rain, .wicon-snow, .wicon-thunder {
    animation: cloudDrift 6s ease-in-out infinite;
  }
  @keyframes cloudDrift {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(3px); }
  }

  /* Rain drops falling */
  .rain-drop path {
    animation: dropFall 900ms ease-in infinite;
  }
  .rain-drop path:nth-child(2) { animation-delay: 150ms; }
  .rain-drop path:nth-child(3) { animation-delay: 300ms; }
  .rain-drop path:nth-child(4) { animation-delay: 450ms; }
  @keyframes dropFall {
    0% { opacity: 0; transform: translateY(-4px); }
    40% { opacity: 1; }
    100% { opacity: 0; transform: translateY(6px); }
  }

  /* Snow flakes drifting */
  .snow-flake circle {
    animation: flakeDrift 2.4s ease-in-out infinite;
  }
  .snow-flake circle:nth-child(2) { animation-delay: 300ms; }
  .snow-flake circle:nth-child(3) { animation-delay: 600ms; }
  @keyframes flakeDrift {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50% { transform: translateY(3px); opacity: 1; }
  }

  /* Lightning bolt flicker */
  .bolt {
    animation: boltFlicker 2.2s ease-in-out infinite;
  }
  @keyframes boltFlicker {
    0%, 100% { opacity: 1; }
    92% { opacity: 1; }
    94% { opacity: 0.2; }
    96% { opacity: 1; }
    98% { opacity: 0.3; }
  }

  /* Page-load orchestration for the hero */
  .hero-container > .search-bar {
    animation: fadeInUp var(--dur-slow) var(--ease-out) both;
  }

}

/* Respect reduced motion: strip everything down to instant/opacity-only */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
