/* ========================================================
   ADMASS STEEL - ANIMATIONS STYLESHEET
   Subtle, precision-engineered industrial motions
   IntersectionObserver controlled with prefers-reduced-motion
   ======================================================== */

/* Base initial states for elements to animate into view */
.reveal {
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-fade-up {
  transform: translateY(32px);
}

.reveal-fade-in {
  transform: scale(0.97);
}

.reveal-slide-left {
  transform: translateX(-40px);
}

.reveal-slide-right {
  transform: translateX(40px);
}

/* Active visible state when in viewport */
.reveal.is-visible {
  opacity: 1;
  transform: translate(0) scale(1);
}

/* Stagger delays for children */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }
.delay-600 { transition-delay: 600ms; }

/* Subtle Blue Light Sweep on Hero & Highlights */
.light-sweep {
  position: relative;
  overflow: hidden;
}

.light-sweep::before {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 210, 255, 0.12) 50%,
    transparent 100%
  );
  transform: skewX(-25deg);
  animation: sweepAnim 8s infinite ease-in-out;
  pointer-events: none;
}

@keyframes sweepAnim {
  0%, 70% { left: -150%; }
  100% { left: 200%; }
}

/* Pulse Glow for Status / Points */
.pulse-glow {
  animation: pulseGlow 2.5s infinite;
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(0, 102, 214, 0.4);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(0, 102, 214, 0);
  }
}

/* Shimmer Loading State for Form Submissions */
.shimmer-loading {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

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

/* Spinning Loader */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0, 102, 214, 0.2);
  border-top-color: var(--admass-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

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

/* Respect Prefers 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;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
