/* ================================================================
   Aurora Argentina – Estilos para imágenes de fondo y luciérnagas
   ================================================================ */

/* Imágenes de fondo */
.hero-bg-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 20%;
  opacity: 0;
  filter: saturate(1.1) brightness(0.85);
  transform: scale(1.03);
}

/* Ajuste de encuadre para celulares (retrato) */
@media (max-width: 768px) {
  /* Ajustar cada encuadre por separado: background-position: horizontal vertical */
  .hero-bg-layer:nth-child(1) {
    background-position: 68% 18%;
  }

  .hero-bg-layer:nth-child(2) {
    background-position: 52% 18%;
  }

  .hero-bg-layer:nth-child(3) {
    background-position: 52% 18%;
  }

  /* Baja un poco el título para acercarlo a los íconos sociales */
  .hero-container h1 {
    margin-top: 12px;
    transform: translateY(10px);
  }
}

/* Las imágenes se animan desde la carga inicial */
.hero-images-wrapper .hero-bg-layer {
  animation: heroCrossfade 18s ease-in-out infinite;
}

.hero-images-wrapper .hero-bg-layer:nth-child(1) { animation-delay: 0s; }
.hero-images-wrapper .hero-bg-layer:nth-child(2) { animation-delay: 6s; }
.hero-images-wrapper .hero-bg-layer:nth-child(3) { animation-delay: 12s; }

@keyframes heroCrossfade {
  0%   { opacity: 0; transform: scale(1.01); }
  10%  { opacity: 1; }
  33%  { opacity: 1; }
  43%  { opacity: 0; transform: scale(1.05); }
  100% { opacity: 0; }
}

/* Animación de la Flecha Handwriting */
@keyframes bounceSlow {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}

.animate-bounce-slow {
  animation: bounceSlow 3s ease-in-out infinite;
}

/* Luciérnagas */
.firefly {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #f7e6a8;
  box-shadow: 0 0 12px 3px rgba(247, 230, 168, 0.6);
  opacity: 0.6;
  animation: floatFirefly 8s ease-in-out infinite;
  z-index: 10;
}

@keyframes floatFirefly {
  0%, 100% { transform: translate(0, 0); opacity: 0.3; }
  50%      { transform: translate(12px, -20px); opacity: 0.9; }
}

.firefly.f1 { top: 22%; left: 18%; animation-duration: 7s; }
.firefly.f2 { top: 38%; left: 42%; animation-duration: 9s; animation-delay: 1s; }
.firefly.f3 { top: 58%; left: 68%; animation-duration: 8s; animation-delay: 2s; }
.firefly.f4 { top: 28%; left: 78%; animation-duration: 10s; animation-delay: 0.5s; }

/* Glow tenue con el mismo degradado del texto */
.title-glow {
  position: relative;
  display: inline-block;
}

.title-glow::before {
  content: attr(data-glow);
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--title-glow-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: blur(9px);
  opacity: 0.32;
  animation: titleGlowPulse 4s ease-in-out infinite;
  pointer-events: none;
}

.title-glow > span {
  position: relative;
  z-index: 1;
}

.title-glow-aurora {
  --title-glow-gradient: linear-gradient(to right, #00ff87, #60efff, #a78bfa);
}

.title-glow-argentina {
  --title-glow-gradient: linear-gradient(to right, #48a6ff, #fff, #64b4ff);
}

.title-glow-argentina::before {
  animation-delay: 1.4s;
}

@keyframes titleGlowPulse {
  0%, 100% { opacity: 0.24; filter: blur(8px); }
  50% { opacity: 0.42; filter: blur(11px); }
}

/* Efecto tap: luciérnagas / destellos cálidos al tocar */
.tap-spark {
  position: fixed;
  width: var(--spark-size, 6px);
  height: var(--spark-size, 6px);
  border-radius: 50%;
  background: #fff3c4;
  box-shadow:
    0 0 10px 2px rgba(247, 230, 168, 0.85),
    0 0 22px 6px rgba(216, 201, 154, 0.35);
  pointer-events: none;
  z-index: 50;
  transform: translate(-50%, -50%) scale(0.4);
  opacity: 0;
  will-change: transform, opacity;
  animation: tapSparkBurst var(--spark-duration, 750ms) cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes tapSparkBurst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.35);
  }
  20% {
    opacity: 0.95;
    transform: translate(calc(-50% + var(--dx, 0px) * 0.25), calc(-50% + var(--dy, -12px) * 0.25)) scale(1.15);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, -28px))) scale(0.15);
  }
}

@media (prefers-reduced-motion: reduce) {
  .title-glow::before {
    animation: none;
    opacity: 0.32;
    filter: blur(9px);
  }

  .tap-spark {
    display: none;
  }
}