/* Etapa EFECTOS · Animaciones del panel de marca en el inicio de sesión.
   Colores: --c1, --c2, --c3 (paleta). Velocidad: --fx-v (0.6 rápida, 1 normal, 1.6 lenta).
   Con "reducir movimiento" todo queda quieto. */

.fx { position: absolute; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; --fx-v: 1; }
.fx span { position: absolute; display: block; }
.fx-a { animation-timing-function: ease-in-out; animation-iteration-count: infinite; }

/* Aurora */
.fx--aurora .fx-blob { width: 70%; height: 70%; border-radius: 50%; filter: blur(60px); opacity: .7; }
.fx--aurora .fx-b1 { left: -10%; top: -10%; background: var(--c1); animation: fx-blob1 calc(14s * var(--fx-v)) ease-in-out infinite; }
.fx--aurora .fx-b2 { left: 0; top: 0; background: var(--c2); animation: fx-blob2 calc(18s * var(--fx-v)) ease-in-out infinite; }
.fx--aurora .fx-b3 { left: 0; top: 0; background: var(--c3); animation: fx-blob3 calc(22s * var(--fx-v)) ease-in-out infinite; }
@keyframes fx-blob1 { 0%, 100% { transform: translate(-10%, -10%) scale(1); } 50% { transform: translate(25%, 20%) scale(1.25); } }
@keyframes fx-blob2 { 0%, 100% { transform: translate(30%, 40%) scale(1.1); } 50% { transform: translate(-15%, 5%) scale(.9); } }
@keyframes fx-blob3 { 0%, 100% { transform: translate(10%, 70%) scale(.9); } 50% { transform: translate(45%, 35%) scale(1.2); } }

/* Rejilla */
.fx--rejilla .fx-horizonte { left: 0; right: 0; top: 38%; height: 2px; background: var(--c1); box-shadow: 0 0 30px 8px var(--c1); }
.fx--rejilla .fx-piso { left: -50%; right: -50%; bottom: -10%; height: 60%; opacity: .55; transform: perspective(420px) rotateX(62deg); transform-origin: bottom;
    background-image: linear-gradient(var(--c2) 2px, transparent 2px), linear-gradient(90deg, var(--c2) 2px, transparent 2px); background-size: 48px 48px;
    animation: fx-piso calc(1.6s * var(--fx-v)) linear infinite; }
@keyframes fx-piso { from { background-position: 0 0, 0 0; } to { background-position: 0 48px, 0 0; } }

/* Reflectores */
.fx--reflectores .fx-haz { bottom: -5%; width: 34%; height: 130%; transform-origin: 50% 100%; filter: blur(6px); opacity: .55;
    background: linear-gradient(0deg, color-mix(in srgb, var(--c1) 70%, transparent), color-mix(in srgb, var(--c1) 20%, transparent) 55%, transparent 90%);
    clip-path: polygon(46% 100%, 54% 100%, 100% 0, 0 0); }
.fx--reflectores .fx-h1 { left: 4%; animation: fx-haz1 calc(9s * var(--fx-v)) ease-in-out infinite; }
.fx--reflectores .fx-h2 { right: 4%; animation: fx-haz2 calc(11s * var(--fx-v)) ease-in-out infinite; }
@keyframes fx-haz1 { 0%, 100% { transform: rotate(-28deg); } 50% { transform: rotate(12deg); } }
@keyframes fx-haz2 { 0%, 100% { transform: rotate(26deg); } 50% { transform: rotate(-14deg); } }

/* Película */
.fx--pelicula .fx-fuga { border-radius: 50%; filter: blur(50px); animation: fx-fuga calc(5s * var(--fx-v)) ease-in-out infinite; }
.fx--pelicula .fx-f1 { left: -10%; top: 10%; width: 60%; height: 50%; background: var(--c2); }
.fx--pelicula .fx-f2 { right: -15%; bottom: 0; width: 55%; height: 45%; background: var(--c1); animation-delay: -2s; }
.fx--pelicula .fx-cinta { top: 0; bottom: 0; width: 34px; background-color: #050505; background-repeat: repeat-y; background-position-x: 10px; background-size: 14px 64px;
    background-image: linear-gradient(transparent 0 14px, color-mix(in srgb, var(--c1) 40%, transparent) 14px 30px, transparent 30px 64px);
    animation: fx-cinta calc(1.2s * var(--fx-v)) linear infinite; }
.fx--pelicula .fx-izq { left: 0; border-right: 1px solid color-mix(in srgb, var(--c1) 25%, transparent); }
.fx--pelicula .fx-der { right: 0; border-left: 1px solid color-mix(in srgb, var(--c1) 25%, transparent); }
@keyframes fx-fuga { 0%, 100% { opacity: .25; } 40% { opacity: .7; } 60% { opacity: .4; } }
@keyframes fx-cinta { from { background-position-y: 0; } to { background-position-y: 64px; } }

/* Luces (bokeh) */
.fx--luces .fx-luz { border-radius: 50%; filter: blur(2px); opacity: 0; animation: fx-sube calc(var(--d, 12s) * var(--fx-v)) linear infinite; }
@keyframes fx-sube { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: .8; } 100% { transform: translateY(-120vh); opacity: 0; } }

/* Holograma */
.fx--holograma .fx-lineas { inset: 0; background: repeating-linear-gradient(0deg, color-mix(in srgb, var(--c2) 18%, transparent) 0 2px, transparent 2px 8px);
    animation: fx-lineas calc(2s * var(--fx-v)) linear infinite; }
.fx--holograma .fx-barrido { top: 0; bottom: 0; width: 30%; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--c1) 22%, transparent), transparent);
    animation: fx-barrido calc(6s * var(--fx-v)) ease-in-out infinite; }
.fx--holograma .fx-anillo { left: 50%; top: 45%; border-radius: 50%; transform: translate(-50%, -50%); }
.fx--holograma .fx-a1 { width: 420px; height: 420px; border: 1px solid color-mix(in srgb, var(--c1) 30%, transparent); box-shadow: 0 0 40px color-mix(in srgb, var(--c1) 15%, transparent); }
.fx--holograma .fx-a2 { width: 280px; height: 280px; border: 1px dashed color-mix(in srgb, var(--c2) 40%, transparent); }
@keyframes fx-lineas { from { background-position: 0 0; } to { background-position: 0 40px; } }
@keyframes fx-barrido { 0% { transform: translateX(-120%) skewX(-20deg); } 100% { transform: translateX(420%) skewX(-20deg); } }

/* Glitch */
.fx--glitch { background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px); background-size: 100% 4px; }
.fx--glitch .fx-barra { left: 0; right: 0; opacity: 0; animation: fx-glitch calc(3.2s * var(--fx-v)) steps(1) infinite; }
.fx--glitch .fx-g1 { top: 22%; height: 18px; background: color-mix(in srgb, var(--c1) 55%, transparent); }
.fx--glitch .fx-g2 { top: 48%; height: 8px; background: color-mix(in srgb, var(--c2) 65%, transparent); animation-delay: -1.1s; }
.fx--glitch .fx-g3 { top: 71%; height: 26px; background: color-mix(in srgb, var(--c3) 50%, transparent); animation-delay: -2s; }
@keyframes fx-glitch { 0%, 86%, 100% { transform: translateX(0); opacity: 0; } 88% { transform: translateX(-14px); opacity: .9; } 91% { transform: translateX(10px); opacity: .7; } 94% { transform: translateX(-4px); opacity: .9; } }

/* Proyector */
.fx--proyector .fx-cono { inset: 0; background: linear-gradient(225deg, color-mix(in srgb, var(--c1) 40%, transparent), color-mix(in srgb, var(--c1) 10%, transparent) 45%, transparent 75%);
    clip-path: polygon(96% 6%, 100% 12%, 0 100%, 0 30%); animation: fx-parpadeo calc(.9s * var(--fx-v)) steps(3) infinite; }
.fx--proyector .fx-lampara { right: 5%; top: 6%; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 0 40px 18px var(--c1); }
.fx--proyector .fx-polvo { width: 3px; height: 3px; border-radius: 50%; background: #fff; opacity: 0; animation: fx-polvo calc(var(--d, 6s) * var(--fx-v)) linear infinite; }
@keyframes fx-parpadeo { 0%, 100% { opacity: .55; } 45% { opacity: .75; } 50% { opacity: .4; } 55% { opacity: .7; } }
@keyframes fx-polvo { 0% { transform: translate(0, 0); opacity: 0; } 20% { opacity: .8; } 100% { transform: translate(-60px, 40px); opacity: 0; } }

/* Estrellas */
.fx--estrellas .fx-estrella { width: 2px; height: 2px; border-radius: 50%; background: #fff; animation: fx-titila calc(var(--d, 3s) * var(--fx-v)) ease-in-out infinite; }
.fx--estrellas .fx-grande { width: 3px; height: 3px; box-shadow: 0 0 6px var(--c1); }
.fx--estrellas .fx-fugaz { top: 8%; right: -5%; width: 120px; height: 2px; border-radius: 2px; opacity: 0;
    background: linear-gradient(90deg, transparent, var(--c1)); box-shadow: 0 0 8px var(--c1); animation: fx-fugaz calc(7s * var(--fx-v)) ease-out infinite; }
@keyframes fx-titila { 0%, 100% { opacity: .15; } 50% { opacity: 1; } }
@keyframes fx-fugaz { 0% { transform: translate(0, 0); opacity: 0; } 5% { opacity: 1; } 25% { transform: translate(-420px, 260px); opacity: 0; } 100% { opacity: 0; } }

/* Lema: brillo que recorre las letras y glitch */
.fx-lema { background-image: linear-gradient(90deg, currentColor, var(--c1), var(--c2), currentColor); background-size: 200% 100%;
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: fx-texto calc(6s * var(--fx-v)) linear infinite; }
.fx-rgb { animation: fx-rgb calc(3.2s * var(--fx-v)) steps(1) infinite; }
@keyframes fx-texto { from { background-position: 0% 50%; } to { background-position: 200% 50%; } }
@keyframes fx-rgb { 0%, 88%, 100% { text-shadow: none; } 90% { text-shadow: -3px 0 #FF2E88, 3px 0 #00D1FF; } 93% { text-shadow: 2px 0 #FF2E88, -2px 0 #00D1FF; } }

/* Indicador de la esquina (REC / fecha) */
.emc-marca__cabecera { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; width: 100%; }
.emc-marca__indicador { display: inline-flex; align-items: center; gap: 8px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .78rem; white-space: nowrap; }
.emc-marca__punto { width: 9px; height: 9px; border-radius: 99px; background: #FF3B5C; box-shadow: 0 0 10px #FF3B5C; animation: fx-rec 1.2s steps(1) infinite; }
@keyframes fx-rec { 0%, 49% { opacity: 1; } 50%, 100% { opacity: .15; } }

@media (prefers-reduced-motion: reduce) {
    .fx *, .fx-lema, .fx-rgb, .emc-marca__punto { animation: none !important; }
}
