/* VN 2026-10-22: efectos modernos (aurora, brillo que sigue al mouse, inclinación, estrellas, brillo en botones).
   Se apagan con «reducir movimiento» (regla global de sitio.css) y en pantallas táctiles lo pesado no corre. */

/* ---------- fondo aurora (detrás de todo, muy suave) ---------- */
body::before {
  content: ""; position: fixed; inset: -20vmax; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40vmax 30vmax at 15% 20%, rgba(51, 70, 255, .16), transparent 60%),
    radial-gradient(35vmax 28vmax at 85% 15%, rgba(239, 43, 74, .10), transparent 60%),
    radial-gradient(38vmax 30vmax at 60% 90%, rgba(255, 210, 31, .07), transparent 60%);
  filter: blur(20px); animation: aurora 38s ease-in-out infinite alternate;
}
@keyframes aurora {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(4vmax, -3vmax, 0) rotate(8deg); }
  100% { transform: translate3d(-3vmax, 2vmax, 0) rotate(-6deg); }
}
:root[data-theme="light"] body::before { opacity: .55; }
body { position: relative; isolation: isolate; }

/* ---------- barra con vidrio al bajar ---------- */
.nav.con-sombra { backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); }

/* ---------- tarjetas: brillo que sigue al mouse + borde de luz ---------- */
.tarjeta, .caja, .tarjeta-enlace { position: relative; }
.fx-luz::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(91, 107, 255, .16), transparent 45%);
}
.fx-luz::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s; padding: 1px;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 210, 31, .55), rgba(91, 107, 255, .35) 40%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.fx-luz:hover::after, .fx-luz:hover::before { opacity: 1; }
.fx-tilt { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0)); transition: transform .25s cubic-bezier(.2, .8, .2, 1); will-change: transform; }
.fx-tilt:hover { --ty: -3px; }

/* ---------- botones: destello que cruza ---------- */
.btn-primario, .btn-azul, .btn-discord, .btn-verde { position: relative; overflow: hidden; }
.btn-primario::after, .btn-azul::after, .btn-discord::after, .btn-verde::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent); transform: skewX(-20deg);
}
.btn-primario:hover::after, .btn-azul:hover::after, .btn-discord:hover::after, .btn-verde:hover::after { animation: destello .75s ease; }
@keyframes destello { to { left: 130%; } }

/* ---------- títulos de la portada con brillo ---------- */
.heroe h1 {
  background: linear-gradient(100deg, var(--texto) 35%, var(--amarillo) 50%, var(--texto) 65%); background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: titulo-brillo 7s ease-in-out infinite;
}
@keyframes titulo-brillo { 0%, 60% { background-position: 100% 0; } 100% { background-position: -150% 0; } }

/* ---------- estrellas de la portada (canvas) ---------- */
.fx-estrellas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; opacity: .75; mix-blend-mode: screen; }

/* ---------- contadores ---------- */
[data-contar] { font-variant-numeric: tabular-nums; }

/* ---------- detalles ---------- */
::selection { background: rgba(255, 210, 31, .35); color: inherit; }
html { scrollbar-color: var(--linea-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--azul), var(--linea-2)); border-radius: 10px; border: 2px solid var(--noche); }
::-webkit-scrollbar-track { background: transparent; }
img { transition: filter .3s; }

@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
  .fx-tilt { transform: none !important; }
  .fx-estrellas { display: none; }
}
