/* static/css/visual_fx.css - soporte de efectos avanzados (Fase 11) */

/* Capa de fondo del hero: canvas WebGL (vacio/oculto hasta que monta Vanta) */
#hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;                 /* fade-in al activarse */
  transition: opacity 1.2s ease;
  pointer-events: none;       /* el canvas interno re-habilita el puntero */
}
#hero-canvas.fx-active { opacity: 1; }
#hero-canvas canvas { pointer-events: auto; display: block; }

/* Fallback liviano SIEMPRE presente como capa base (no-WebGL / mobile / reduced-motion) */
.hero-gradient-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(135deg, #0a0e1a, #121829, #1a2236, #0a0e1a);
  background-size: 400% 400%;
  animation: ia-gradient-pan 18s ease-in-out infinite;
}
@keyframes ia-gradient-pan {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Viñeta para contraste del texto del hero sobre la malla */
#home::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;                 /* sobre el canvas(0), bajo el texto(2) */
  pointer-events: none;
  background: radial-gradient(ellipse at 28% 42%,
    rgba(10, 14, 26, 0.0) 0%,
    rgba(10, 14, 26, 0.55) 68%,
    rgba(10, 14, 26, 0.88) 100%);
}

/* Núcleo Three.js en la sección de tecnologías */
#tech-core-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
  pointer-events: none;
}
#tech-core-canvas.fx-active { opacity: 0.9; }

/* Respeto estricto de reduced-motion: nada se mueve */
@media (prefers-reduced-motion: reduce) {
  .hero-gradient-fallback { animation: none; }
  #hero-canvas, #tech-core-canvas { transition: none; }
}
