/* =========================================================
   CENTUAL PREMIUM - 06 ANIMATIONS
   Scroll Reveals, Transitions, Keyframes
   ========================================================= */

/* ========================================
   SCROLL REVEAL - Elementos con [data-scroll]
   Content is VISIBLE by default for graceful degradation.
   GSAP handles animations when loaded.
   ======================================== */
[data-scroll] {
  /* Content visible by default - GSAP will animate when available */
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity var(--transition-slower) var(--ease-out),
              transform var(--transition-slower) var(--ease-out);
}

/* When JS is enabled and GSAP loads, it controls animations directly.
   This class is kept for potential CSS-only fallback usage */
[data-scroll].is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ========================================
   VIDEO SCROLL EFFECTS
   ======================================== */
.video-scroll-zoom {
  transform: scale(1);
  transition: transform 0.1s linear;
}

/* Se controla vía JavaScript con GSAP ScrollTrigger */

/* ========================================
   STAGGERED ANIMATIONS
   ======================================== */
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }

/* ========================================
   KEYFRAME ANIMATIONS
   ======================================== */

/* Fade In */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Slide Up */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scale In */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Logo Breathing */
@keyframes logoBreathe {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

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

/* Shimmer Effect */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.shimmer {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 100%
  );
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
}

/* Pulse */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ========================================
   LOADING STATES
   ======================================== */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--centual-subtle) 25%,
    rgba(240, 240, 245, 0.5) 50%,
    var(--centual-subtle) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
}

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

/* ========================================
   ENTRANCE ANIMATIONS
   ======================================== */
.animate-fadeIn {
  animation: fadeIn 0.6s var(--ease-out) forwards;
}

.animate-slideUp {
  animation: slideUp 0.8s var(--ease-out) forwards;
}

.animate-scaleIn {
  animation: scaleIn 0.6s var(--ease-bounce) forwards;
}

/* ========================================
   PARALLAX (Controlado por JS)
   ======================================== */
[data-parallax] {
  will-change: transform;
}

/* ========================================
   REDUCED MOTION
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-scroll] {
    opacity: 1 !important;
    transform: none !important;
  }
}
