/* ============================================================
   ZENIT — Animaciones Dinámicas y Efectos Visuales
   ------------------------------------------------------------
   Archivo 100% modular e independiente.
   Para eliminar cualquier animación, simplemente borra o
   comenta la sección correspondiente en este archivo.
   No alterará la funcionalidad ni el diseño base de la página.
   ============================================================ */


/* ============================================================
   1. SCROLL REVEAL — Aparición suave al hacer scroll
   ============================================================ */
.anim-reveal {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.anim-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Entrada desde la izquierda */
.anim-reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.anim-reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Entrada desde la derecha */
.anim-reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.anim-reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Entrada con zoom sutil */
.anim-reveal-scale {
  opacity: 0;
  transform: scale(0.93);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.anim-reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Retardos escalonados para grids o listas */
.anim-delay-1 { transition-delay: 0.1s; }
.anim-delay-2 { transition-delay: 0.2s; }
.anim-delay-3 { transition-delay: 0.3s; }
.anim-delay-4 { transition-delay: 0.4s; }
.anim-delay-5 { transition-delay: 0.5s; }


/* ============================================================
   2. HERO ENTRANCE — Animación fluida de carga en el Hero
   ============================================================ */
@keyframes heroFadeUp {
  0% {
    opacity: 0;
    transform: translateY(28px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.anim-hero-badge {
  animation: heroFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both;
}

.anim-hero-title {
  animation: heroFadeUp 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.18s both;
}

.anim-hero-subtitle {
  animation: heroFadeUp 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.32s both;
}

.anim-hero-cta {
  animation: heroFadeUp 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.45s both;
}

.anim-hero-formats {
  animation: heroFadeUp 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.58s both;
}


/* ============================================================
   3. FLOAT — Flotación suave y orgánica para elementos destacados
   ============================================================ */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}

.anim-float {
  animation: float 4.5s ease-in-out infinite;
}

.anim-float-slow {
  animation: float 6.5s ease-in-out infinite;
}

.anim-float-delayed {
  animation: float 4.5s ease-in-out 1.2s infinite;
}


/* ============================================================
   4. CARD HOVER LIFT — Elevación y brillo al pasar el cursor
   ============================================================ */
.anim-card-hover {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s ease,
              border-color 0.35s ease;
  will-change: transform, box-shadow;
}

.anim-card-hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45),
              0 0 25px rgba(0, 102, 255, 0.18);
}


/* ============================================================
   5. ICON SPIN HOVER — Rotación e impulso en íconos
   ============================================================ */
.anim-icon-hover {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.anim-icon-hover:hover {
  transform: rotate(6deg) scale(1.1);
}


/* ============================================================
   6. SHIMMER — Reflejo de luz continuo en botones CTA
   ============================================================ */
@keyframes shimmerPass {
  0%   { transform: translateX(-120%); }
  60%, 100% { transform: translateX(140%); }
}

.anim-shimmer {
  position: relative;
  overflow: hidden;
}

.anim-shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.16) 50%,
    transparent 100%
  );
  transform: translateX(-120%) skewX(-20deg);
  animation: shimmerPass 4s ease-in-out infinite;
  pointer-events: none;
}


/* ============================================================
   7. GLOW PULSE — Pulso luminoso continuo (Azul y Cian)
   ============================================================ */
@keyframes glowPulseBlue {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 102, 255, 0.25); }
  50%      { box-shadow: 0 0 38px rgba(0, 102, 255, 0.5); }
}

.anim-glow-pulse {
  animation: glowPulseBlue 3.2s ease-in-out infinite;
}

@keyframes glowPulseCyan {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 229, 255, 0.2); }
  50%      { box-shadow: 0 0 35px rgba(0, 229, 255, 0.45); }
}

.anim-glow-pulse-cyan {
  animation: glowPulseCyan 3.2s ease-in-out infinite;
}


/* ============================================================
   8. COUNTER REVEAL & GLOW — Animación de números que suben
   ============================================================ */
@keyframes counterFinishGlow {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 0px transparent);
  }
  50% {
    transform: scale(1.06);
    filter: drop-shadow(0 0 18px rgba(0, 229, 255, 0.65));
  }
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 0px transparent);
  }
}

.anim-counter {
  opacity: 0;
  transform: translateY(14px) scale(0.94);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.3s ease;
  display: inline-block;
  will-change: transform, opacity;
}

.anim-counter.visible {
  opacity: 1 !important;
  transform: translateY(0) scale(1);
}

.anim-counter.anim-counter-finish {
  opacity: 1 !important;
  animation: counterFinishGlow 0.6s ease-out;
}

.anim-card-hover:hover .anim-counter.visible {
  transform: scale(1.04);
  filter: drop-shadow(0 0 14px rgba(0, 229, 255, 0.4));
}


/* ============================================================
   9. BORDER GLOW SWEEP — Borde con gradiente vivo
   ============================================================ */
@keyframes borderGlowGradient {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.anim-border-glow {
  position: relative;
}

.anim-border-glow::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    rgba(0, 102, 255, 0.5),
    rgba(0, 229, 255, 0.6),
    rgba(0, 102, 255, 0.5)
  );
  background-size: 200% 100%;
  animation: borderGlowGradient 4.5s linear infinite;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.anim-border-glow:hover::before {
  opacity: 1;
}


/* ============================================================
   10. GRADIENT TEXT SHIFT — Gradiente en movimiento para textos
   ============================================================ */
@keyframes textGradientMove {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.anim-gradient-text {
  background-size: 200% 200%;
  animation: textGradientMove 5s ease infinite;
}


/* ============================================================
   11. AMBIENT GLOW BREATHING — Respiración del resplandor superior
   ============================================================ */
@keyframes ambientBreathe {
  0%, 100% {
    opacity: 0.65;
    transform: translate(-50%, 0) scale(1);
  }
  50% {
    opacity: 0.9;
    transform: translate(-50%, -8px) scale(1.04);
  }
}

.radial-glow-top {
  animation: ambientBreathe 7s ease-in-out infinite;
}


/* ============================================================
   12. BOTÓN CLIC MICRO-INTERACCIÓN
   ============================================================ */
button:active {
  transform: scale(0.97) !important;
  transition: transform 0.1s ease !important;
}


/* ============================================================
   13. CARRUSEL INFINITO DE INTEGRACIONES (MARQUEE)
   Mantiene todos los logos en una sola fila en cualquier resolución
   con ventana acotada a ~5 elementos y desvanecimiento simétrico.
   ============================================================ */
.marquee-container {
  --fade-dist: 45px;
  position: relative;
  width: 100%;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
  display: flex;
  user-select: none;
  padding: 0.75rem 0;
  mask-image: linear-gradient(
    to right,
    transparent 0,
    black var(--fade-dist),
    black calc(100% - var(--fade-dist)),
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0,
    black var(--fade-dist),
    black calc(100% - var(--fade-dist)),
    transparent 100%
  );
}

@media (min-width: 768px) {
  .marquee-container {
    --fade-dist: 70px;
    max-width: 820px;
  }
}

.marquee-track {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  width: max-content;
  animation: marqueeScroll 24s linear infinite;
  will-change: transform;
}

.marquee-track:hover {
  animation-play-state: paused;
}

.marquee-group {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 2.25rem;
  padding-right: 2.25rem;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .marquee-group {
    gap: 3.25rem;
    padding-right: 3.25rem;
  }
}

.marquee-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: default;
}

.marquee-item:hover {
  transform: scale(1.08);
}

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


/* ============================================================
   14. ACCESIBILIDAD — PREFERS-REDUCED-MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .anim-reveal,
  .anim-reveal-left,
  .anim-reveal-right,
  .anim-reveal-scale,
  .anim-counter {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
    animation: none !important;
  }

  .anim-float,
  .anim-float-slow,
  .anim-float-delayed,
  .anim-gradient-text,
  .anim-glow-pulse,
  .anim-glow-pulse-cyan,
  .anim-shimmer::after,
  .anim-border-glow::before,
  .radial-glow-top,
  .marquee-track {
    animation: none !important;
  }

  .anim-hero-title,
  .anim-hero-subtitle,
  .anim-hero-cta,
  .anim-hero-badge,
  .anim-hero-formats {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
