/* ============================================================
   RAA ENTERPRISE — Animation Keyframes & Utilities
   ============================================================ */

/* --- AOS Custom Animations --- */
[data-aos="fade-up"] {
  transform: translateY(40px);
  opacity: 0;
  transition-property: transform, opacity;
}

[data-aos="fade-up"].aos-animate {
  transform: translateY(0);
  opacity: 1;
}

[data-aos="fade-right"] {
  transform: translateX(-40px);
  opacity: 0;
  transition-property: transform, opacity;
}

[data-aos="fade-right"].aos-animate {
  transform: translateX(0);
  opacity: 1;
}

[data-aos="fade-left"] {
  transform: translateX(40px);
  opacity: 0;
  transition-property: transform, opacity;
}

[data-aos="fade-left"].aos-animate {
  transform: translateX(0);
  opacity: 1;
}

[data-aos="zoom-in"] {
  transform: scale(0.9);
  opacity: 0;
  transition-property: transform, opacity;
}

[data-aos="zoom-in"].aos-animate {
  transform: scale(1);
  opacity: 1;
}

/* --- Floating animation --- */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
}

.animate-float {
  animation: float 4s ease-in-out infinite;
}

/* --- Gradient shift --- */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.animate-gradient {
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
}

/* --- Slide in from left --- */
@keyframes slideInLeft {
  from {
    transform: translateX(-60px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* --- Slide in from right --- */
@keyframes slideInRight {
  from {
    transform: translateX(60px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* --- Slide in from bottom --- */
@keyframes slideInUp {
  from {
    transform: translateY(60px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* --- Scale in --- */
@keyframes scaleIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* --- Text reveal --- */
@keyframes textReveal {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

.text-reveal {
  animation: textReveal 0.8s var(--ease-out) forwards;
}

/* --- Line draw --- */
@keyframes drawLine {
  from {
    stroke-dashoffset: 1000;
  }
  to {
    stroke-dashoffset: 0;
  }
}

/* --- Dash animation for map routes --- */
@keyframes dashMove {
  to {
    stroke-dashoffset: -20;
  }
}

/* --- Dot pulse on map --- */
@keyframes dotPulse {
  0%, 100% {
    r: 4;
    opacity: 1;
  }
  50% {
    r: 7;
    opacity: 0.6;
  }
}

/* --- Counter pop --- */
@keyframes counterPop {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

/* --- Truck move --- */
@keyframes truckMove {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

/* --- Icon bounce --- */
@keyframes iconBounce {
  0%, 100% { transform: translateY(0); }
  25% { transform: translateY(-5px); }
  75% { transform: translateY(3px); }
}

/* --- Spin slow --- */
@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.animate-spin-slow {
  animation: spinSlow 20s linear infinite;
}

/* --- Glow effect on hover --- */
.hover-glow {
  transition: box-shadow var(--transition-base);
}

.hover-glow:hover {
  box-shadow: 0 0 40px rgba(196, 30, 58, 0.15), 0 8px 32px rgba(10, 22, 40, 0.1);
}

/* --- Staggered children --- */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
}

.stagger-children.animated > *:nth-child(1) { animation: slideInUp 0.5s var(--ease-out) 0.0s forwards; }
.stagger-children.animated > *:nth-child(2) { animation: slideInUp 0.5s var(--ease-out) 0.1s forwards; }
.stagger-children.animated > *:nth-child(3) { animation: slideInUp 0.5s var(--ease-out) 0.2s forwards; }
.stagger-children.animated > *:nth-child(4) { animation: slideInUp 0.5s var(--ease-out) 0.3s forwards; }
.stagger-children.animated > *:nth-child(5) { animation: slideInUp 0.5s var(--ease-out) 0.4s forwards; }
.stagger-children.animated > *:nth-child(6) { animation: slideInUp 0.5s var(--ease-out) 0.5s forwards; }
.stagger-children.animated > *:nth-child(7) { animation: slideInUp 0.5s var(--ease-out) 0.6s forwards; }
.stagger-children.animated > *:nth-child(8) { animation: slideInUp 0.5s var(--ease-out) 0.7s forwards; }

/* --- Parallax layers --- */
.parallax-layer {
  will-change: transform;
  transition: transform 0.1s linear;
}

/* --- Cursor glow --- */
.cursor-glow {
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 30, 58, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 9;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
  opacity: 0;
}

.cursor-glow.active {
  opacity: 1;
}

/* --- Image reveal mask --- */
@keyframes imageMask {
  from {
    clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
  }
  to {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
}

.image-reveal {
  animation: imageMask 0.8s var(--ease-out) forwards;
}

/* --- SVG map animations --- */
.map-state {
  transition: all 0.3s ease;
  cursor: pointer;
}

.map-state:hover {
  filter: brightness(1.2);
  transform-origin: center;
}

.map-route-line {
  stroke-dasharray: 8 4;
  animation: dashMove 0.8s linear infinite;
}

.map-city-dot {
  transition: all 0.3s ease;
  cursor: pointer;
}

.map-city-dot:hover {
  r: 6;
  fill: var(--color-red);
}

/* --- Smooth reveal for sections --- */
.section-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s var(--ease-out);
}

.section-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
