/* Presentación de Pasaporte — escenario 1920×1080 escalado al tamaño de la ventana */
:root {
  /* paleta de www.fabin.io (Mosaico); verde, ámbar y rojo son el semáforo del producto */
  --blanco: #FFFFFF;
  --hueso: #F3F6F8;
  --noche: #142B36;
  --tinta: #1E2326;
  --suave: #58595B;
  --gris2: #6E7072;
  --linea: #E1E6E9;
  --marco: #CBD5DA;
  --cian: #3E7A95;
  --azul: #74AEC5;
  --hielo: #BFDCE8;
  --verde: #0a5c2b;
  --verde-luz: #2E7D4F;
  --ambar: #ffc933;
  --rojo: #9b1008;
  --rojo-luz: #A8442F;
  --gris: #dfe3e8;
  --vidrio: #fff;
  --borde: var(--marco);
  color-scheme: light;
  --fuente: system-ui, -apple-system, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--hueso); color: var(--tinta); font-family: var(--fuente); overflow: hidden; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; }

#marco { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--hueso); }
#escenario { position: absolute; left: 50%; top: 50%; width: 1920px; height: 1080px; overflow: hidden; transform-origin: 0 0;
  background: var(--blanco); }

/* ---------- capas de parallax */
#capa-fondo, #capa-medio, #mundo, #hud { position: absolute; inset: 0; }
#capa-fondo .rejilla { position: absolute; inset: -20%; opacity: 0;
  -webkit-mask-image: radial-gradient(closest-side, #000 20%, transparent 85%); mask-image: radial-gradient(closest-side, #000 20%, transparent 85%);
  background-image: radial-gradient(var(--marco) 1.6px, transparent 1.8px); background-size: 46px 46px; }
#manchas .mancha { position: absolute; width: 900px; height: 900px; border-radius: 50%; opacity: .45; will-change: transform;
  background: radial-gradient(closest-side, var(--c, #BFDCE8), transparent); }
#capa-medio .deco { position: absolute; will-change: transform; opacity: .7; color: var(--azul); }
#capa-medio .deco svg { width: 100%; height: 100%; display: block; }
#mundo { transform-origin: 0 0; will-change: transform; }
.esc { position: absolute; width: 1920px; height: 1080px; display: none; }
.esc.vis { display: block; }
.esc * { will-change: auto; }
.a { position: absolute; left: 0; top: 0; transform-origin: 50% 50%; }

/* ---------- textos revelados desde una máscara */
.rev { display: inline-block; overflow: hidden; vertical-align: top; padding: .06em .04em .14em; margin: -.06em -.04em -.14em; }
.rev-in { display: inline-block; transform: translateY(115%); }
.titulo { font-size: 92px; font-weight: 800; letter-spacing: -.02em; line-height: 1.04; }
.titulo-m { font-size: 64px; font-weight: 800; letter-spacing: -.015em; line-height: 1.08; }
.titulo-s { font-size: 44px; font-weight: 750; letter-spacing: -.01em; line-height: 1.12; }
.cuerpo { font-size: 30px; color: var(--suave); font-weight: 500; line-height: 1.3; }
.etq { font-size: 22px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--cian); }
.brillo { background: linear-gradient(90deg, var(--tinta) 0%, var(--cian) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- sable láser */
.sable { position: absolute; left: 0; top: 0; height: 12px; border-radius: 6px; transform-origin: 0 50%; pointer-events: none;
  background: var(--sc, var(--cian));
  box-shadow: 0 0 10px 1px color-mix(in srgb, var(--sc, var(--cian)) 35%, transparent); }
.sable::after { content: ""; position: absolute; right: -14px; top: 50%; width: 28px; height: 28px; margin-top: -14px; border-radius: 50%;
  background: radial-gradient(closest-side, var(--sc, var(--cian)), color-mix(in srgb, var(--sc, var(--cian)) 40%, transparent) 55%, transparent); opacity: var(--punta, 1); }
.destello { position: absolute; width: 360px; height: 360px; margin: -180px 0 0 -180px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--sc, var(--cian)) 40%, transparent), color-mix(in srgb, var(--sc, var(--cian)) 15%, transparent) 45%, transparent 70%); }
svg.contorno { position: absolute; overflow: visible; pointer-events: none; }
svg.contorno .gl { fill: none; stroke-width: 18; stroke-opacity: .12; stroke-linecap: round; }
svg.contorno .gl2 { fill: none; stroke-width: 6; stroke-opacity: .9; stroke-linecap: round; }
svg.contorno .nu { fill: none; stroke: #fff; stroke-width: 1.5; stroke-linecap: round; }

/* ---------- objetos */
.vidrio { background: var(--vidrio); border: 1.5px solid var(--borde); border-radius: 28px;
  box-shadow: 0 30px 60px rgba(30,35,38,.08); }
.icono { display: flex; align-items: center; justify-content: center; }
.icono svg { width: 100%; height: 100%; fill: currentColor; display: block; }
.pastilla { display: inline-flex; align-items: center; gap: 12px; padding: 14px 26px; border-radius: 999px; font-size: 28px; font-weight: 700;
  background: #fff; border: 1.5px solid var(--borde); white-space: nowrap; }
.pastilla svg { width: 34px; height: 34px; fill: currentColor; }

/* tarjeta NFC */
.tarjeta { width: 856px; height: 540px; border-radius: 40px; overflow: hidden; color: #fff;
  background: radial-gradient(120% 140% at 0% 0%, #5B93AB 0%, var(--cian) 38%, #24505F 75%, var(--noche) 100%);
  box-shadow: 0 50px 120px rgba(20,43,54,.28), inset 0 0 0 2px rgba(255,255,255,.16), inset 0 2px 0 rgba(255,255,255,.3); }
.tarjeta::before { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.18) 45%, transparent 60%);
  transform: translateX(var(--reflejo, -60%)); }
.tarjeta .t-logo { position: absolute; left: 56px; top: 50px; display: flex; align-items: center; gap: 16px; font-size: 40px; font-weight: 800; letter-spacing: .02em; }
.tarjeta .t-logo .icono { width: 54px; height: 54px; color: var(--hielo); }
.tarjeta .chip { position: absolute; left: 60px; top: 170px; width: 118px; height: 90px; border-radius: 16px;
  background: linear-gradient(135deg, #f6dc8a, #c99a32 55%, #f1d27c); box-shadow: inset 0 0 0 2px rgba(80,50,0,.35); }
.tarjeta .chip::before { content: ""; position: absolute; inset: 18px 30px; border: 2px solid rgba(80,50,0,.45); border-radius: 8px; }
.tarjeta .nfc { position: absolute; left: 205px; top: 178px; width: 74px; height: 74px; color: rgba(255,255,255,.85); }
.tarjeta .t-nom { position: absolute; left: 60px; top: 330px; font-size: 46px; font-weight: 800; }
.tarjeta .t-car { position: absolute; left: 60px; top: 392px; font-size: 28px; color: var(--hielo); font-weight: 600; }
.tarjeta .t-emp { position: absolute; left: 60px; top: 448px; font-size: 24px; color: #A9CBDA; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; }
.tarjeta .qr { position: absolute; right: 56px; top: 150px; width: 250px; height: 250px; background: #fff; border-radius: 18px; padding: 16px; }
.tarjeta .qr svg { width: 100%; height: 100%; display: block; }
.tarjeta .t-url { position: absolute; right: 56px; top: 420px; width: 250px; text-align: center; font-size: 17px; color: var(--hielo); letter-spacing: .02em; }

/* teléfono */
.telefono { width: 400px; height: 820px; border-radius: 64px; padding: 16px; background: linear-gradient(145deg, #2c3442, #0d1118);
  box-shadow: 0 50px 110px rgba(30,35,38,.14), inset 0 0 0 2px rgba(255,255,255,.12), inset 0 0 0 9px #05070a; }
.telefono .pantalla { position: relative; width: 100%; height: 100%; border-radius: 50px; overflow: hidden; background: #0b1220; }
.telefono .isla { position: absolute; left: 50%; top: 14px; width: 110px; height: 32px; margin-left: -55px; border-radius: 20px; background: #000; z-index: 5; }
.vista { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 60px 26px 30px; gap: 12px; }
.vista.n { background: var(--gris); color: #1E2326; }
.vista.v { background: var(--verde); color: #fff; }
.vista.am { background: var(--ambar); color: #1d1400; }
.vista.r { background: var(--rojo); color: #fff; }
.vista.os { background: #F3F6F8; color: #1E2326; justify-content: flex-start; text-align: left; align-items: stretch; }
.vista .ico { width: 120px; height: 120px; border: 8px solid currentColor; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.vista .ico svg { width: 70px; height: 70px; fill: currentColor; }
.vista .pal { font-size: 34px; font-weight: 850; text-transform: uppercase; letter-spacing: .02em; line-height: 1.05; margin: 8px 0 0; }
.vista .sub { font-size: 19px; font-weight: 650; margin: 0; line-height: 1.25; }
.vista hr { width: 86%; border: 0; border-top: 2px solid currentColor; opacity: .45; margin: 8px 0; }
.vista .quien { font-size: 24px; font-weight: 800; margin: 0; }
.vista .det { font-size: 18px; margin: 0; opacity: .92; }

/* ventana de escritorio (oficina) */
.ventana { border-radius: 26px; overflow: hidden; background: #F3F6F8; color: #1E2326; box-shadow: 0 60px 140px rgba(30,35,38,.14); }
.ventana .v-barra { height: 64px; display: flex; align-items: center; gap: 14px; padding: 0 26px; background: #fff; border-bottom: 1px solid #E1E6E9; font-size: 22px; font-weight: 700; }
.ventana .v-barra .pto { width: 14px; height: 14px; border-radius: 50%; background: #dfe3e8; }
.kpi { position: absolute; width: 300px; height: 150px; border-radius: 18px; padding: 18px 22px; background: #fff; border: 2px solid #E1E6E9; color: #1E2326; }
.kpi .k-et { font-size: 17px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; display: flex; gap: 8px; align-items: center; }
.kpi .k-et svg { width: 22px; height: 22px; fill: currentColor; }
.kpi .k-n { font-size: 58px; font-weight: 850; line-height: 1.05; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi .k-de { font-size: 17px; color: #58595B; }
.kpi.ok { border-color: #b9dcc6; background: #f4fbf6; } .kpi.ok .k-n { color: var(--verde); }
.kpi.am { border-color: #f1d98c; background: #fffaea; } .kpi.am .k-n { color: #8a5a00; }
.kpi.no { border-color: #ecb4ae; background: #fff4f3; } .kpi.no .k-n { color: var(--rojo); }
.fila-et { position: absolute; font-size: 18px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #58595B; }

/* documentos */
.doc { width: 420px; height: 150px; border-radius: 20px; padding: 22px 26px; background: #F3F6F8; color: #1E2326; box-shadow: 0 24px 60px rgba(30,35,38,.14); }
.doc .d-n { font-size: 28px; font-weight: 800; }
.doc .d-f { font-size: 21px; color: #58595B; margin-top: 8px; }
.sello { position: absolute; padding: 6px 18px; border: 5px solid var(--rojo-luz); color: var(--rojo-luz); border-radius: 12px; font-size: 30px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; background: rgba(255,255,255,.85); }
.chip-doc { position: absolute; padding: 12px 20px; border-radius: 14px; font-size: 23px; font-weight: 700; background: #fff; color: #1E2326; white-space: nowrap; box-shadow: 0 12px 30px rgba(30,35,38,.14); }
.col-nivel { position: absolute; width: 470px; height: 560px; border-radius: 30px; padding: 30px; }
.col-nivel .cn-t { font-size: 40px; font-weight: 850; display: flex; gap: 14px; align-items: center; }
.col-nivel .cn-t svg { width: 44px; height: 44px; fill: currentColor; }
.col-nivel .cn-d { font-size: 22px; opacity: .85; margin-top: 8px; line-height: 1.3; }

/* aviso (toast) */
.aviso { position: absolute; width: 640px; padding: 24px 28px; border-radius: 22px; background: #fff; color: #1E2326; display: flex; gap: 20px; align-items: center;
  box-shadow: 0 30px 80px rgba(30,35,38,.14); border-left: 12px solid var(--rojo-luz); }
.aviso .icono { width: 60px; height: 60px; color: var(--rojo-luz); flex: none; }
.aviso b { display: block; font-size: 26px; } .aviso span { font-size: 21px; color: #58595B; }

/* bitácora */
.bit { position: absolute; width: 760px; height: 78px; border-radius: 16px; background: #fff; border: 1.5px solid var(--borde);
  display: flex; align-items: center; gap: 22px; padding: 0 26px; font-size: 25px; }
.bit .icono { width: 40px; height: 40px; color: var(--cian); }
.bit time { margin-left: auto; color: var(--suave); font-variant-numeric: tabular-nums; }

/* teclado PIN */
.tecla { position: absolute; width: 92px; height: 72px; border-radius: 18px; background: #fff; border: 2px solid #CBD5DA; color: #1E2326; font-size: 32px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.punto-pin { position: absolute; width: 26px; height: 26px; border-radius: 50%; border: 3px solid #1E2326; }
.punto-pin.on { background: #1E2326; }

/* cursor */
.cursor { width: 46px; height: 46px; z-index: 50; }
.cursor svg { width: 100%; height: 100%; filter: drop-shadow(0 4px 6px rgba(30,35,38,.14)); }
.onda { position: absolute; width: 140px; height: 140px; margin: -70px 0 0 -70px; border-radius: 50%; border: 5px solid var(--cian); }

/* rasgos sueltos */
.anillo { position: absolute; border-radius: 50%; border: 4px solid var(--cian); }
.haz { position: absolute; height: 6px; border-radius: 3px; transform-origin: 0 50%;
  background: linear-gradient(90deg, transparent, var(--cian) 30%, var(--azul) 50%, var(--cian) 70%, transparent); }
.paquete { width: 520px; height: 76px; border-radius: 40px; background: #fff; border: 2px solid var(--cian); display: flex; align-items: center; gap: 14px; padding: 0 26px;
  font-size: 25px; font-weight: 650; color: var(--tinta); box-shadow: 0 10px 30px rgba(62,122,149,.16); white-space: nowrap; }
.paquete .icono { width: 34px; height: 34px; color: var(--cian); }
.nodo-et { position: absolute; font-size: 26px; font-weight: 700; color: var(--suave); text-align: center; width: 360px; letter-spacing: .02em; }
.marca-ok { width: 46px; height: 46px; border-radius: 50%; background: var(--verde-luz); color: #fff; display: flex; align-items: center; justify-content: center; }
.marca-ok svg { width: 30px; height: 30px; fill: currentColor; }
.marca-no { width: 46px; height: 46px; border-radius: 50%; background: var(--rojo-luz); color: #fff; display: flex; align-items: center; justify-content: center; }
.marca-no svg { width: 30px; height: 30px; fill: currentColor; }
.tachado { position: absolute; height: 8px; border-radius: 4px; background: var(--rojo-luz); transform-origin: 0 50%; }
.caract { position: absolute; width: 400px; height: 300px; border-radius: 30px; padding: 34px; }
.caract .icono { width: 70px; height: 70px; color: var(--cian); }
.caract .c-t { font-size: 34px; font-weight: 800; margin-top: 20px; line-height: 1.12; }
.caract .c-d { font-size: 22px; color: var(--suave); margin-top: 10px; line-height: 1.3; }

/* ---------- HUD */
#hud { pointer-events: none; }
#capitulo { position: absolute; left: 80px; top: 64px; display: flex; align-items: baseline; gap: 18px; font-size: 26px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--tinta); opacity: 0; }
#capitulo .num { color: var(--cian); font-variant-numeric: tabular-nums; }
#capitulo .raya { position: absolute; left: 0; bottom: -16px; height: 4px; width: 100%; border-radius: 2px; background: var(--cian); transform-origin: 0 50%; }
#subtitulo { position: absolute; left: 0; right: 0; bottom: 70px; text-align: center; transition: opacity .25s; }
#subtitulo span { display: inline-block; max-width: 1400px; padding: 14px 30px; border-radius: 16px; background: rgba(30, 35, 38, .9); font-size: 38px; font-weight: 600; line-height: 1.3; color: #fff; }
#subtitulo span:empty { display: none; }
body.sin-cc #subtitulo { opacity: 0; }

/* ---------- interfaz del reproductor */
.capa-ui { position: fixed; z-index: 10; }
#portada { inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 9vh; gap: 18px; background: linear-gradient(transparent 55%, rgba(243,246,248,.8)); }
#btn-inicio { width: 120px; height: 120px; border-radius: 50%; border: 0; cursor: pointer; background: var(--cian); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 10px rgba(62,122,149,.18), 0 20px 50px rgba(62,122,149,.3); animation: latido 2.2s ease-in-out infinite; }
#btn-inicio svg { width: 58px; height: 58px; fill: currentColor; margin-left: 8px; }
@keyframes latido { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
.aviso-sonido { margin: 0; font-size: 15px; color: var(--gris2); letter-spacing: .04em; text-align: center; padding: 0 16px; }
#portada.fuera { opacity: 0; pointer-events: none; transition: opacity .5s; }

#final { inset: 0; display: flex; align-items: flex-end; justify-content: center; padding: 0 16px 15vh; background: linear-gradient(transparent 50%, rgba(243,246,248,.85)); }
#final[hidden] { display: none; }
.final-caja { text-align: center; }
.final-titulo { font-size: clamp(18px, 2.4vw, 30px); font-weight: 750; margin: 0 0 18px; }
.final-botones { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn-p, .btn-s { display: inline-flex; align-items: center; min-height: 48px; padding: 0 24px; border-radius: 999px; font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn-p { background: var(--cian); color: #fff; border: 0; }
.btn-s { background: #fff; color: var(--cian); border: 1.5px solid var(--cian); }

#controles { left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 10px 16px max(10px, env(safe-area-inset-bottom));
  background: linear-gradient(transparent, rgba(255,255,255,.92)); transition: opacity .35s; }
body.oculto #controles { opacity: 0; }
body.oculto { cursor: none; }
body.inicio #controles { opacity: 0; pointer-events: none; }
#controles button { flex: none; width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--tinta); }
#controles button:hover { background: var(--hueso); }
#controles button svg { width: 26px; height: 26px; fill: currentColor; }
#btn-cc { font-size: 14px; font-weight: 800; letter-spacing: .04em; }
#btn-cc[aria-pressed="false"] { opacity: .45; }
.ico-pausa, .ico-mudo { display: none; }
body.tocando .ico-play { display: none; } body.tocando .ico-pausa { display: inline; }
body.mudo .ico-son { display: none; } body.mudo .ico-mudo { display: inline; }
#reloj { flex: none; font-size: 13px; color: var(--gris2); font-variant-numeric: tabular-nums; }
#barra { position: relative; flex: 1; min-width: 60px; height: 32px; cursor: pointer; display: flex; align-items: center; }
#barra .pista { width: 100%; height: 5px; border-radius: 3px; background: var(--linea); overflow: hidden; }
#barra .lleno { height: 100%; width: 0; background: var(--cian); }
#barra:hover .pista { height: 8px; }
#barra .marcas i { position: absolute; top: 50%; width: 3px; height: 11px; margin: -5.5px 0 0 -1.5px; border-radius: 2px; background: var(--azul); pointer-events: none; }
#barra .globo { position: absolute; bottom: 34px; transform: translateX(-50%); white-space: nowrap; background: var(--tinta); color: #fff; font-size: 13px; font-weight: 700; padding: 6px 10px; border-radius: 8px; pointer-events: none; }
@media (max-width: 560px) {
  #reloj { display: none; }
  #controles { gap: 4px; padding-left: 8px; padding-right: 8px; }
  #btn-inicio { width: 92px; height: 92px; }
}
@media (prefers-reduced-motion: reduce) { #btn-inicio { animation: none; } }

/* teléfono en vertical: el escenario queda chico, los subtítulos van fuera, legibles */
#sub-movil { display: none; }
@media (orientation: portrait) and (max-width: 820px) {
  #subtitulo { display: none; }
  #sub-movil { display: block; left: 16px; right: 16px; top: calc(50% + 28.125vw + 14px); text-align: center; font-size: 17px; font-weight: 600; line-height: 1.35; color: var(--tinta); }
  body.sin-cc #sub-movil { display: none; }
  #portada { justify-content: center; padding-bottom: 0; padding-top: calc(56.25vw + 40px); }
}
