/* PANTALLA — el escenario (1920×1080 escalado sin deformarse), las transiciones, los efectos (radar, vibración, foco)
 * y el HUD. Los colores y la tipografía de cada presentación viven en su deck.css (variables en #escenario). */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #000; }
body.quieto, body.quieto * { cursor: none !important; }

#escenario {
  position: fixed; left: 50%; top: 50%; width: 1920px; height: 1080px; margin: -540px 0 0 -960px;
  transform-origin: 50% 50%; overflow: hidden; contain: layout paint;
  background: var(--fondo, #0d0f11); color: var(--tinta, #eceae5);
}
#fondo, #diapos, #capa-fx, #negro { position: absolute; inset: 0; }
#fondo { pointer-events: none; z-index: 0; }
#diapos { z-index: 1; }
.diapo { position: absolute; inset: 0; will-change: transform, opacity; transform-origin: 50% 50%; }
#capa-fx { pointer-events: none; z-index: 20; }
#negro { background: #000; opacity: 0; pointer-events: none; transition: opacity .5s ease; z-index: 40; }
#negro.si { opacity: 1; }
/* El puntero del control remoto: un punto láser que sigue el dedo; la transición suaviza los saltos de la red. */
#puntero { position: absolute; z-index: 35; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, #fff 0 18%, #ff5a3c 30%, rgba(255, 70, 40, .55) 55%, rgba(255, 70, 40, 0) 72%);
  box-shadow: 0 0 26px 8px rgba(255, 70, 40, .45); opacity: 0; transform: scale(.4);
  transition: left .14s linear, top .14s linear, opacity .25s ease, transform .25s ease; }
#puntero.si { opacity: 1; transform: scale(1); }
/* El lápiz del control: trazos de marcador sobre la diapositiva (bajo el puntero). */
#tinta { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 34; pointer-events: none; overflow: visible; }
#tinta polyline { fill: none; stroke-width: 11; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .55)); }

/* El cromo: marca, número y avance; se queda quieto mientras las diapositivas transicionan. */
#cromo { position: absolute; inset: 0; pointer-events: none; z-index: 10; transition: opacity .7s ease; }
#cromo.oculto { opacity: 0; }
#cromo .c-marca, #cromo .c-num { position: absolute; top: 50px; font: 600 18px/1 var(--f-m, ui-monospace, monospace); letter-spacing: .2em; text-transform: uppercase; color: var(--humo, #8a8d91); }
#cromo .c-marca { left: 120px; }
#cromo .c-num { right: 120px; letter-spacing: .12em; }
#cromo .c-num b { color: var(--tinta, #eceae5); font-weight: 600; }
#cromo .c-barra { position: absolute; left: 120px; right: 120px; bottom: 50px; height: 2px; background: var(--linea, #2a3037); overflow: hidden; }
#cromo .c-barra i { position: absolute; inset: 0; background: var(--acento, #e6b450); transform-origin: 0 50%; transform: scaleX(0); transition: transform 1s cubic-bezier(.16, 1, .3, 1); }

/* Un paso aplicado «al instante» (al saltar, al volver o al recargar): sin transiciones. */
.sin-anim, .sin-anim * { transition: none !important; }

/* ---------------------------------------------------------------- efectos */
.fx-radar { position: absolute; width: 0; height: 0; }
.fx-radar i {
  position: absolute; left: 0; top: 0; width: var(--r); height: var(--r); margin: calc(var(--r) / -2) 0 0 calc(var(--r) / -2);
  border-radius: 50%; border: 3px solid var(--c); box-shadow: 0 0 24px var(--c), inset 0 0 18px color-mix(in srgb, var(--c) 35%, transparent);
  opacity: 0; animation: fx-onda 1.9s cubic-bezier(.15, .6, .3, 1) var(--d, 0s) var(--veces, 2) both;
}
.fx-radar b {
  position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--c);
  box-shadow: 0 0 0 7px color-mix(in srgb, var(--c) 28%, transparent), 0 0 36px var(--c);
  animation: fx-nucleo var(--dur, 4s) ease-out both;
}
.fx-radar s { /* la cruz de mira */
  position: absolute; left: calc(var(--r) * -.62); top: -1px; width: calc(var(--r) * 1.24); height: 2px;
  background: linear-gradient(90deg, transparent, var(--c) 30%, transparent 46%, transparent 54%, var(--c) 70%, transparent);
  opacity: 0; animation: fx-mira var(--dur, 4s) ease-out both;
}
.fx-radar s + s { transform: rotate(90deg); }
@keyframes fx-onda { 0% { transform: scale(.12); opacity: .95; } 65% { opacity: .38; } 100% { transform: scale(1.3); opacity: 0; } }
@keyframes fx-nucleo { 0% { transform: scale(0); } 10% { transform: scale(1.5); } 22% { transform: scale(1); } 88% { opacity: 1; } 100% { opacity: 0; transform: scale(.6); } }
@keyframes fx-mira { 0% { opacity: 0; scale: 1.6; } 14% { opacity: .9; scale: 1; } 80% { opacity: .7; } 100% { opacity: 0; } }

.fx-marco {
  position: absolute; border: 3px solid var(--c); border-radius: 16px;
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--c) 18%, transparent), 0 0 46px color-mix(in srgb, var(--c) 70%, transparent);
  animation: fx-marco 1.6s ease-out both;
}
@keyframes fx-marco { 0% { opacity: 0; transform: scale(1.1); } 14% { opacity: 1; transform: scale(1); } 30% { transform: scale(1.025); } 45% { transform: scale(1); } 72% { opacity: 1; } 100% { opacity: 0; } }

.fx-foco {
  position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease;
  background: radial-gradient(ellipse var(--rx) var(--ry) at var(--x) var(--y), transparent 0 62%, rgba(4, 5, 6, .84) 100%);
}
.fx-foco.si { opacity: 1; }

/* ---------------------------------------------------------------- HUD y avisos (fuera del escenario: tamaño real) */
#hud {
  position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; gap: 12px; align-items: center;
  padding: 9px 13px; border-radius: 12px; background: rgba(13, 15, 17, .9); border: 1px solid #2a3037;
  color: #c3c0b9; font: 600 13px/1 "IBM Plex Mono", ui-monospace, monospace; opacity: 0; transition: opacity .4s; pointer-events: none;
}
#hud.ver { opacity: 1; }
#hud[hidden] { display: none; }
#hud .punto { width: 9px; height: 9px; border-radius: 50%; background: #93c2a2; box-shadow: 0 0 10px #93c2a2; }
#hud .punto.sondeo { background: #e6b450; box-shadow: 0 0 10px #e6b450; }
#hud .punto.off { background: #e07a64; box-shadow: 0 0 10px #e07a64; }
#hud kbd { border: 1px solid #3a4148; border-bottom-width: 2px; border-radius: 5px; padding: 2px 6px; color: #eceae5; font: inherit; }
#aviso {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 61; padding: 12px 18px; border-radius: 12px;
  background: rgba(13, 15, 17, .92); border: 1px solid #2a3037; color: #eceae5; font: 500 15px/1.3 "Public Sans", system-ui, sans-serif;
  transition: opacity .5s, transform .5s; pointer-events: none;
}
#aviso.fuera { opacity: 0; transform: translate(-50%, 12px); }
#aviso b { color: #e6b450; }
/* Sin @media (prefers-reduced-motion): la animación es el contenido, y muchas computadoras de oficina la traen apagada
 * de fábrica (Windows «Mostrar animaciones»), con lo que el público se quedaría sin efectos. */

/* ---------------------------------------------------------------- pantalla genérica (/pr/pantalla): código y QR */
body.kiosco, body.kiosco * { cursor: none !important; }
#hud .ctl { color: #e6b450; }
#espera {
  position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; justify-content: center; gap: 3vmin;
  padding: 6vmin 8vw; background: #0d0f11 radial-gradient(ellipse at 20% 0%, rgba(230, 180, 80, .12), transparent 60%);
  color: #eceae5; font-family: "Public Sans", system-ui, sans-serif;
}
#espera[hidden] { display: none; }
#espera.sobre { background: rgba(8, 9, 10, .94); }
#espera .e-marca { font: 600 max(14px, 1.5vmin)/1 "IBM Plex Mono", ui-monospace, monospace; letter-spacing: .24em; text-transform: uppercase; color: #e6b450; }
#espera h1 { margin: 0; font: 800 clamp(30px, 6vmin, 76px)/1.05 Sora, "Public Sans", system-ui, sans-serif; letter-spacing: -.01em; }
#espera .e-cuerpo { display: flex; gap: 6vw; align-items: center; justify-content: space-between; }
#espera .e-cuerpo > div:first-child { flex: 1 1 0; min-width: 0; }
#espera .e-codigo { flex: 0 0 auto; }
#espera .e-cuerpo p { margin: 0 0 1.4vmin; font-size: clamp(17px, 2.6vmin, 30px); line-height: 1.35; color: #c3c0b9; max-width: 30em; }
#espera .e-cuerpo b { color: #eceae5; }
#espera .e-o { color: #8a8d91 !important; }
#espera .e-codigo { display: flex; flex-direction: column; align-items: center; gap: 1.6vmin; }
#espera .e-codigo > b { font: 600 clamp(48px, 11vmin, 150px)/1 "IBM Plex Mono", ui-monospace, monospace; letter-spacing: .08em; color: #e6b450; text-shadow: 0 0 40px rgba(230, 180, 80, .25); }
#espera .e-codigo small { font-size: clamp(13px, 1.9vmin, 22px); color: #8a8d91; }
#espera .e-qr { width: clamp(120px, 22vmin, 260px); padding: 10px; background: #fff; border-radius: 12px; }
#espera .e-qr svg { display: block; width: 100%; height: auto; }
#espera .e-pie { margin: 0; min-height: 1.2em; font-size: clamp(13px, 1.9vmin, 22px); color: #e07a64; }
@media (max-aspect-ratio: 1/1) { #espera .e-cuerpo { flex-direction: column; align-items: flex-start; } }
