/* =============================================================
   Orion DS — Animation System
   Entrance animations, hover effects, transitions
   All respect prefers-reduced-motion
   ============================================================= */

/* --- Entrance Animations (used with scroll-reveal JS) --- */

[data-reveal] {
  opacity: 0;
  will-change: opacity, transform;
  transition-property: opacity, transform, filter;
  transition-duration: var(--duration-entrance);
  transition-timing-function: var(--easing-out);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
  filter: none;
}

/* Stagger delay via data attribute */
[data-reveal-delay="100"] { transition-delay: 100ms; }
[data-reveal-delay="200"] { transition-delay: 200ms; }
[data-reveal-delay="300"] { transition-delay: 300ms; }
[data-reveal-delay="400"] { transition-delay: 400ms; }
[data-reveal-delay="500"] { transition-delay: 500ms; }

/* Animation types */
[data-reveal="fade-in"] {
  /* opacity only — no transform */
}

[data-reveal="fade-up"] {
  transform: translateY(1.25rem);
}

[data-reveal="fade-down"] {
  transform: translateY(-1.25rem);
}

[data-reveal="fade-left"] {
  transform: translateX(-1.25rem);
}

[data-reveal="fade-right"] {
  transform: translateX(1.25rem);
}

[data-reveal="scale-in"] {
  transform: scale(0.95);
}

[data-reveal="slide-up"] {
  transform: translateY(2rem);
}

[data-reveal="blur-in"] {
  filter: blur(8px);
}

/* --- Hover Effect Utilities --- */

.hover-lift {
  transition: transform var(--duration-normal) var(--easing-default),
              box-shadow var(--duration-normal) var(--easing-default);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.hover-glow {
  transition: box-shadow var(--duration-normal) var(--easing-default);
}

.hover-glow:hover {
  box-shadow: var(--shadow-glow-lime);
}

.hover-scale {
  transition: transform var(--duration-normal) var(--easing-default);
}

.hover-scale:hover {
  transform: scale(1.02);
}

.hover-border-accent {
  transition: border-color var(--duration-normal) var(--easing-default);
}

.hover-border-accent:hover {
  border-color: var(--border-accent);
}

.hover-bg-shift {
  transition: background-color var(--duration-normal) var(--easing-default);
}

.hover-bg-shift:hover {
  background-color: var(--surface-raised);
}

/* --- Shimmer Loading Animation --- */

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.shimmer {
  background: linear-gradient(
    90deg,
    var(--surface-subtle) 25%,
    var(--surface-raised) 50%,
    var(--surface-subtle) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

/* --- Marquee Animation (for LogoBar) --- */

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee {
  display: flex;
  overflow: hidden;
}

.marquee__track {
  display: flex;
  animation: marquee 30s linear infinite;
}

.marquee:hover .marquee__track {
  animation-play-state: paused;
}

/* --- Pulse Animation (for notifications, live indicators) --- */

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* --- Spin Animation (for loading spinners) --- */

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spin {
  animation: spin 1s linear infinite;
}

/* --- Reduced Motion — MANDATORY --- */

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }

  .hover-lift:hover,
  .hover-scale:hover {
    transform: none !important;
  }

  .shimmer {
    animation: none !important;
  }

  .marquee__track {
    animation: none !important;
  }

  .pulse {
    animation: none !important;
  }

  .spin {
    animation: none !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
