/**
 * Apex Scroll Animations - Roveir-Style
 * Version: 2.4.0 - Fixed font rendering
 * GPU-accelerated, smooth animations
 */

/* PREVENT HORIZONTAL OVERFLOW */
html, body {
  overflow-x: hidden;
}

.wp-site-blocks, main, .entry-content {
  overflow-x: hidden;
}

/* ===== FIX FONT RENDERING ON ANIMATED ELEMENTS ===== */
.apex-animate,
.apex-animate * {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ===== BASE ANIMATION STATE ===== */
.apex-animate {
  opacity: 0;
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Visible state */
.apex-animate.is-visible {
  opacity: 1;
  transform: none !important;
}

/* ===== ANIMATION TYPES ===== */

/* Fade Up */
.apex-fade-up {
  transform: translateY(25px);
}
.apex-fade-up.is-visible {
  transform: translateY(0) !important;
}

/* Slide Left */
.apex-slide-left {
  transform: translateX(-35px);
}
.apex-slide-left.is-visible {
  transform: translateX(0) !important;
}

/* Slide Right */
.apex-slide-right {
  transform: translateX(35px);
}
.apex-slide-right.is-visible {
  transform: translateX(0) !important;
}

/* Scale Up */
.apex-scale-up {
  transform: scale(0.95);
}
.apex-scale-up.is-visible {
  transform: scale(1) !important;
}

/* Zoom In */
.apex-zoom-in {
  transform: scale(0.92);
}
.apex-zoom-in.is-visible {
  transform: scale(1) !important;
}

/* Explode */
.apex-explode {
  transform: scale(0.4);
}
.apex-explode.is-visible {
  transform: scale(1) !important;
}

/* Rise & Rotate - Simplified */
.apex-rise-rotate {
  transform: translateY(40px) scale(0.95);
}
.apex-rise-rotate.is-visible {
  transform: translateY(0) scale(1) !important;
}

/* ===== STAGGER DELAYS ===== */
.apex-delay-1 { transition-delay: 0.08s; }
.apex-delay-2 { transition-delay: 0.16s; }
.apex-delay-3 { transition-delay: 0.24s; }
.apex-delay-4 { transition-delay: 0.32s; }
.apex-delay-5 { transition-delay: 0.40s; }

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  .apex-animate {
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
  }
  
  .apex-fade-up { transform: translateY(20px); }
  .apex-slide-left { transform: translateX(-25px); }
  .apex-slide-right { transform: translateX(25px); }
  .apex-explode { transform: scale(0.5); }
  .apex-rise-rotate { transform: translateY(30px); }
  
  .apex-delay-1 { transition-delay: 0.06s; }
  .apex-delay-2 { transition-delay: 0.12s; }
  .apex-delay-3 { transition-delay: 0.18s; }
  .apex-delay-4 { transition-delay: 0.24s; }
  .apex-delay-5 { transition-delay: 0.30s; }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  .apex-animate {
    transition: opacity 0.3s ease-out;
    transform: none !important;
  }
}
