/* VN 2026-10-28: capa «futuro»: cursor propio, barra de progreso tricolor, botones magnéticos con onda, esquinas HUD en tarjetas,
   títulos que se «decodifican», rejilla neón en los encabezados y barrido de luz al entrar. Todo se apaga con «reducir movimiento»;
   el cursor y el magnetismo solo con mouse (nunca en táctil) y nunca en el panel. */

/* ---------- barra de progreso de lectura (tricolor) ---------- */
.fx-progreso { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 9999; pointer-events: none; transform-origin: 0 50%; transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, #ffd21f 0 33.3%, #3346ff 33.3% 66.6%, #ef2b4a 66.6%); box-shadow: 0 0 12px rgba(255, 210, 31, .6); }

/* ---------- cursor ---------- */
html.fx-cursor, html.fx-cursor *:not(input):not(textarea):not(select):not([contenteditable]):not(iframe) { cursor: none !important; } /* también tapa la mano de --cur-mano */
html.fx-cursor input, html.fx-cursor textarea, html.fx-cursor select, html.fx-cursor [contenteditable] { cursor: text; }
.fx-punto, .fx-aro { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 10000; border-radius: 50%; will-change: transform; }
.fx-punto { width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; background: #ffd21f; box-shadow: 0 0 0 2px #060914, 0 0 10px #ffd21f, 0 0 22px rgba(255, 210, 31, .5); } /* borde oscuro: se ve también sobre botones amarillos */
.fx-aro { width: 32px; height: 32px; margin: -16px 0 0 -16px; border: 1.5px solid rgba(91, 107, 255, .85); box-shadow: 0 0 18px rgba(51, 70, 255, .45), inset 0 0 12px rgba(51, 70, 255, .25);
  transition: width .25s cubic-bezier(.2, .8, .2, 1), height .25s cubic-bezier(.2, .8, .2, 1), margin .25s cubic-bezier(.2, .8, .2, 1), border-color .2s, background .2s; display: grid; place-items: center; }
.fx-aro b { font: 700 9px/1 var(--mono, monospace); letter-spacing: .18em; color: #fff; opacity: 0; transition: opacity .2s; }
.fx-aro.sobre { width: 46px; height: 46px; margin: -23px 0 0 -23px; border: 2px solid #fff; background: rgba(51, 70, 255, .12); box-shadow: 0 0 0 1.5px rgba(6, 9, 20, .85), inset 0 0 0 1.5px rgba(6, 9, 20, .85), 0 0 22px rgba(51, 70, 255, .55); }
.fx-aro.ver { width: 58px; height: 58px; margin: -29px 0 0 -29px; background: rgba(51, 70, 255, .28); backdrop-filter: blur(2px); }
.fx-aro.ver b { opacity: 1; }
.fx-aro.texto { width: 4px; height: 26px; margin: -13px 0 0 -2px; border-radius: 2px; }
.fx-aro.click { transform-origin: center; }
.fx-chispa { position: fixed; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; pointer-events: none; z-index: 10000; background: var(--c, #ffd21f);
  box-shadow: 0 0 8px var(--c, #ffd21f); animation: fx-chispa .6s cubic-bezier(.2, .8, .2, 1) forwards; }
@keyframes fx-chispa { to { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }
:root[data-theme="light"] .fx-aro { border-color: rgba(51, 70, 255, .9); }

/* ---------- botones: borde de luz que gira + onda al hacer clic ---------- */
.btn-primario, .btn-azul, .btn-discord, .btn-verde { isolation: isolate; }
.btn-primario::marker { content: none; }
@property --fx-giro { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.btn-primario:hover, .btn-azul:hover, .btn-discord:hover {
  outline: 2px solid transparent; outline-offset: 0;
  background-image: linear-gradient(var(--fx-bg, transparent), var(--fx-bg, transparent)), conic-gradient(from var(--fx-giro), #ffd21f, #3346ff, #ef2b4a, #ffd21f);
  background-origin: border-box; background-clip: padding-box, border-box; border-color: transparent; animation: fx-giro 2.4s linear infinite; }
.btn-primario { --fx-bg: var(--amarillo); }
.btn-azul, .btn-discord { --fx-bg: var(--azul); }
@keyframes fx-giro { to { --fx-giro: 360deg; } }
.fx-onda { position: absolute; border-radius: 50%; pointer-events: none; transform: scale(0); background: radial-gradient(circle, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 70%);
  animation: fx-onda .6s ease-out forwards; z-index: -1; }
.btn { isolation: isolate; }
@keyframes fx-onda { to { transform: scale(2.6); opacity: 0; } }
.fx-magnetico { transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .2s, filter .2s !important; }

/* ---------- tarjetas: esquinas de HUD al pasar el mouse ---------- */
.fx-esq { position: absolute; inset: 6px; pointer-events: none; z-index: 3; opacity: 0; transition: opacity .25s, inset .3s cubic-bezier(.2, .8, .2, 1);
  background:
    linear-gradient(#ffd21f, #ffd21f) top left / 16px 2px, linear-gradient(#ffd21f, #ffd21f) top left / 2px 16px,
    linear-gradient(#ffd21f, #ffd21f) top right / 16px 2px, linear-gradient(#ffd21f, #ffd21f) top right / 2px 16px,
    linear-gradient(#ffd21f, #ffd21f) bottom left / 16px 2px, linear-gradient(#ffd21f, #ffd21f) bottom left / 2px 16px,
    linear-gradient(#ffd21f, #ffd21f) bottom right / 16px 2px, linear-gradient(#ffd21f, #ffd21f) bottom right / 2px 16px;
  background-repeat: no-repeat; filter: drop-shadow(0 0 4px rgba(255, 210, 31, .8)); }
.tarjeta-enlace:hover .fx-esq, .tarjeta-enlace:focus-visible .fx-esq { opacity: 1; inset: 3px; }
.tarjeta-enlace:hover { box-shadow: 0 18px 50px rgba(0, 0, 0, .45), 0 0 0 1px rgba(91, 107, 255, .35), 0 0 34px rgba(51, 70, 255, .18); }
.tarjeta-enlace .img { transition: transform .6s cubic-bezier(.2, .8, .2, 1), filter .4s; }
.tarjeta-enlace:hover .img { transform: scale(1.05); filter: saturate(1.15) brightness(1.05); }

/* ---------- encabezados de página: rejilla neón en perspectiva + línea de escaneo ---------- */
.cabecera-pagina { position: relative; overflow: hidden; }
.fx-rejilla, .fx-escaneo { display: block; }
.fx-rejilla { content: ""; position: absolute; left: -10%; right: -10%; bottom: -1px; height: 70%; pointer-events: none; z-index: 0;
  background-image: linear-gradient(rgba(91, 107, 255, .35) 1px, transparent 1px), linear-gradient(90deg, rgba(91, 107, 255, .35) 1px, transparent 1px);
  background-size: 54px 54px; transform: perspective(420px) rotateX(62deg); transform-origin: 50% 100%;
  mask-image: linear-gradient(to top, #000 0%, transparent 85%); -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 85%);
  animation: fx-rejilla 6s linear infinite; opacity: .55; }
@keyframes fx-rejilla { to { background-position: 0 54px, 0 0; } }
.fx-escaneo { content: ""; position: absolute; left: 0; right: 0; height: 120px; top: -120px; pointer-events: none; z-index: 0;
  background: linear-gradient(to bottom, transparent, rgba(255, 210, 31, .07), transparent); animation: fx-escaneo 7s ease-in-out infinite; }
@keyframes fx-escaneo { 0%, 15% { top: -120px; } 60%, 100% { top: 100%; } }
.cabecera-pagina > :not(.fx-rejilla):not(.fx-escaneo) { position: relative; z-index: 1; }
:root[data-theme="light"] .fx-rejilla { opacity: .25; }
.antetitulo::after { content: "_"; margin-left: 2px; animation: fx-cursor-txt 1s steps(1) infinite; }
@keyframes fx-cursor-txt { 50% { opacity: 0; } }

/* ---------- títulos que se decodifican ---------- */
.fx-deco { font-variant-ligatures: none; }
.fx-deco .fx-ch { color: #ffd21f; text-shadow: 0 0 10px rgba(255, 210, 31, .7); }

/* ---------- barrido de luz al entrar (una vez por visita) ---------- */
.fx-barrido { position: fixed; inset: 0; z-index: 9998; pointer-events: none; overflow: hidden; }
.fx-barrido::before { content: ""; position: absolute; left: 0; right: 0; height: 2px; top: 0; background: linear-gradient(90deg, transparent, #ffd21f 20%, #3346ff 50%, #ef2b4a 80%, transparent);
  box-shadow: 0 0 24px 6px rgba(51, 70, 255, .45); animation: fx-baja 1.1s cubic-bezier(.6, 0, .2, 1) forwards; }
.fx-barrido::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(6, 9, 20, .0), rgba(6, 9, 20, .55)); animation: fx-aclara 1.1s ease forwards; }
@keyframes fx-baja { to { top: 100%; } }
@keyframes fx-aclara { from { opacity: 1; } to { opacity: 0; } }

/* ---------- menú: el subrayado de animaciones.css pasa a tricolor con brillo ---------- */
.nav-links a::after { background: linear-gradient(90deg, #ffd21f, #3346ff, #ef2b4a); box-shadow: 0 0 8px rgba(51, 70, 255, .7); }

/* ---------- foco de teclado con neón (accesible y con estilo) ---------- */
:focus-visible { outline: 2px solid #ffd21f !important; outline-offset: 3px; box-shadow: 0 0 0 6px rgba(255, 210, 31, .18); }

@media (prefers-reduced-motion: reduce) {
  .fx-rejilla, .fx-escaneo, .antetitulo::after, .fx-barrido { animation: none !important; display: none; }
}
.fx-aro.texto { opacity: 0 !important; } /* en campos de texto queda el cursor normal de escribir */
