/* =========================================================================
   animations.css
   --------------
   Subtle, restrained motion: scroll-triggered reveals and a couple of
   ambient/hover effects. Paired JS: js/scroll-animations.js toggles the
   `.is-visible` class using IntersectionObserver.
   ========================================================================= */

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children of a reveal group via inline --delay custom property */
[data-reveal] { transition-delay: var(--delay, 0s); }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Gentle floating animation for hero decorative glow (ambient, not attention-grabbing) */
@keyframes float-glow {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-16px, 18px); }
}

.hero::before {
  animation: float-glow 12s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .hero::before { animation: none; }
}

/* Fade-in for flash messages */
.alert {
  animation: fade-slide-in 0.5s ease;
}

@keyframes fade-slide-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
