/* ============================================
   Express Engineering Solutions — Animations
   Phase 1: Hero + Navigation Animations
   ============================================ */

/* ---------- Keyframes ---------- */
@keyframes orbFloat {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(12px, -20px) scale(1.03);
  }
  66% {
    transform: translate(-8px, 10px) scale(0.98);
  }
}

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

@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
  }
  50% {
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.4);
  }
}

@keyframes cardShine {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes floating {
  0%, 100% {
    transform: translate(var(--px-x, 0), var(--px-y, 0));
  }
  50% {
    transform: translate(var(--px-x, 0), calc(var(--px-y, 0px) - 12px));
  }
}

@keyframes gradientPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.7;
  }
}

@keyframes pulseDot {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.2);
  }
}

@keyframes rippleEffect {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes shapeFloat1 {
  0%, 100% {
    transform: rotate(15deg) translateY(0);
  }
  50% {
    transform: rotate(15deg) translateY(-20px);
  }
}

@keyframes shapeFloat2 {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}

@keyframes shapeFloat3 {
  0%, 100% {
    transform: rotate(-20deg) translateY(0);
  }
  50% {
    transform: rotate(-20deg) translateY(-18px);
  }
}

@keyframes marqueeScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes markerPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.4;
  }
  50% {
    transform: scale(2);
    opacity: 0;
  }
}

/* ---------- Scroll Reveal Classes ---------- */
.fade-up,
.fade-left,
.fade-right,
.zoom-in {
  opacity: 0;
}

.fade-up.is-visible {
  animation: fadeUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.fade-left.is-visible {
  animation: fadeLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.fade-right.is-visible {
  animation: fadeRight 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.zoom-in.is-visible {
  animation: zoomIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Stagger delays via data attribute */
[data-delay="100"].is-visible { animation-delay: 0.1s; }
[data-delay="150"].is-visible { animation-delay: 0.15s; }
[data-delay="200"].is-visible { animation-delay: 0.2s; }
[data-delay="250"].is-visible { animation-delay: 0.25s; }
[data-delay="300"].is-visible { animation-delay: 0.3s; }
[data-delay="350"].is-visible { animation-delay: 0.35s; }
[data-delay="400"].is-visible { animation-delay: 0.4s; }
[data-delay="450"].is-visible { animation-delay: 0.45s; }
[data-delay="500"].is-visible { animation-delay: 0.5s; }

/* Initial hidden state for delayed elements */
.fade-up[data-delay],
.fade-left[data-delay],
.fade-right[data-delay],
.zoom-in[data-delay] {
  opacity: 0;
}

/* ---------- Floating Animation ---------- */
.floating {
  animation: floating 4s ease-in-out infinite;
}

.floating--delay {
  animation-delay: 1s;
}

.floating--delay-2 {
  animation-delay: 2s;
}

/* ---------- Hero Shape Animations ---------- */
.hero__shape--1 {
  animation: shapeFloat1 6s ease-in-out infinite;
}

.hero__shape--2 {
  animation: shapeFloat2 5s ease-in-out infinite;
  animation-delay: 0.5s;
}

.hero__shape--3 {
  animation: shapeFloat3 7s ease-in-out infinite;
  animation-delay: 1s;
}

/* Card shine on hover — applied via premium.css parent */
.premium-shine {
  position: relative;
  overflow: hidden;
}

.premium-shine::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  pointer-events: none;
}

.premium-shine:hover::after {
  animation: cardShine 0.8s ease;
}

/* ---------- 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;
  }

  .fade-up,
  .fade-left,
  .fade-right,
  .zoom-in {
    opacity: 1;
  }

  .marquee__track {
    animation: none;
  }

  .global__marker::after {
    animation: none;
    opacity: 0.2;
  }
}
