/* Omni Resume — motion tokens & helpers
   Respects prefers-reduced-motion: reduce. */

/* Honor reduced motion preference globally */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Fade in */
@keyframes omni-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Fade + rise */
@keyframes omni-fade-rise {
  from { opacity: 0; transform: translate3d(0, 12px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* Slide in from end */
@keyframes omni-slide-in-end {
  from { transform: translate3d(100%, 0, 0); }
  to   { transform: translate3d(0, 0, 0); }
}

/* Slide in from start */
@keyframes omni-slide-in-start {
  from { transform: translate3d(-100%, 0, 0); }
  to   { transform: translate3d(0, 0, 0); }
}

/* Scale in (used for modal / dialog) */
@keyframes omni-scale-in {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

/* Spin (loading) */
@keyframes omni-spin {
  to { transform: rotate(360deg); }
}

/* Pulse (subtle attention) */
@keyframes omni-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}

/* Shimmer (skeletons) */
@keyframes omni-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Progress bar indeterminate */
@keyframes omni-progress-indeterminate {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* --- Utility animation classes --- */
.animate-fade-in   { animation: omni-fade-in var(--duration-normal) var(--ease-standard) both; }
.animate-fade-rise { animation: omni-fade-rise var(--duration-slow) var(--ease-decelerate) both; }
.animate-scale-in  { animation: omni-scale-in var(--duration-normal) var(--ease-emphasized) both; }
.animate-spin      { animation: omni-spin 1s linear infinite; }
.animate-pulse     { animation: omni-pulse 1.6s ease-in-out infinite; }

/* Stagger helper — apply nth-child delays for list of children */
.stagger > * { animation: omni-fade-rise var(--duration-slow) var(--ease-decelerate) both; }
.stagger > *:nth-child(1) { animation-delay: 0ms; }
.stagger > *:nth-child(2) { animation-delay: 60ms; }
.stagger > *:nth-child(3) { animation-delay: 120ms; }
.stagger > *:nth-child(4) { animation-delay: 180ms; }
.stagger > *:nth-child(5) { animation-delay: 240ms; }
.stagger > *:nth-child(6) { animation-delay: 300ms; }
.stagger > *:nth-child(7) { animation-delay: 360ms; }
.stagger > *:nth-child(8) { animation-delay: 420ms; }

/* Reduced-motion overrides for these utility classes */
@media (prefers-reduced-motion: reduce) {
  .animate-fade-in,
  .animate-fade-rise,
  .animate-scale-in,
  .animate-spin,
  .animate-pulse,
  .stagger > * {
    animation: none !important;
  }
}