/* Animaciones: reveal on-scroll, cursor personalizado, punto pulsante, línea de scroll */

/* ---------- Reveal on-scroll (usada por reveal.js) ---------- */
.fade-up-hidden {
  opacity: 0;
  transform: translateY(24px);
}

.animate-fade-up {
  animation: fadeUp 0.7s ease forwards;
}

@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(24px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Punto pulsante (badge del hero) ---------- */
.pulse-dot {
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.3);
  }
}

/* ---------- Línea del indicador de scroll ---------- */
.scroll-indicator::after {
  content: "";
  display: block;
  width: 1px;
  background: hsl(var(--white));
  animation: scroll-line 2s ease-in-out infinite;
}

@keyframes scroll-line {
  0% {
    height: 0;
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  100% {
    height: 40px;
    opacity: 0;
  }
}

/* ---------- Textura de ruido sutil sobre las secciones ---------- */
.section {
  isolation: isolate;
}

.section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
}

.section > .container {
  position: relative;
  z-index: 1;
}

/* ---------- Cursor personalizado (solo escritorio, activado por cursor.js) ---------- */
.cursor-dot,
.cursor-ring {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  will-change: transform;
}

.cursor-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: hsl(var(--accent));
}

.cursor-ring {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid hsl(var(--accent) / 0.5);
}

body.has-custom-cursor {
  cursor: none;
}

body.has-custom-cursor .cursor-dot,
body.has-custom-cursor .cursor-ring {
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .fade-up-hidden {
    opacity: 1;
    transform: none;
  }

  .animate-fade-up,
  .pulse-dot,
  .scroll-indicator::after {
    animation: none;
  }
}
