/**
 * animations.css — Keyframes, Transitions, Micro-Interactions & Accessibility
 * British restraint: silk-smooth, never ostentatious.
 */

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

@keyframes toast-enter {
  from {
    opacity: 0;
    transform: translateX(16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes toast-exit {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateX(24px) scale(0.95);
  }
}

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

@keyframes pulse-subtle {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

/* Micro-Interaction Classes */
.animate-fade-in {
  animation: fadeIn 220ms cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.pulse-status {
  animation: pulse-subtle 2.5s infinite ease-in-out;
}

/* Interactive Feedback — Restrained will-change */
.btn, .card-interactive, .header-nav-link, .drawer-nav-link {
  will-change: box-shadow, background-color;
}

/* Strict Accessibility: Reduced Motion */
@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;
  }
}
