/* Presentación de Transporte — estética Mosaico de Faber Innovatio. Escenario 1920×1080 escalado a la ventana. */
@font-face { font-family: "Inter Tight"; font-weight: 300; font-display: swap; src: url(fuentes/inter-tight-300.woff2) format("woff2"); }
@font-face { font-family: "Inter Tight"; font-weight: 400; font-display: swap; src: url(fuentes/inter-tight-400.woff2) format("woff2"); }
@font-face { font-family: "Inter Tight"; font-weight: 500; font-display: swap; src: url(fuentes/inter-tight-500.woff2) format("woff2"); }
:root {
  --blanco: #FFFFFF;
  --hueso: #F3F6F8;
  --tinta: #1E2326;
  --gris: #58595B;
  --gris2: #6E7072;
  --linea: #E1E6E9;
  --azul: #3E7A95;
  --celeste: #74AEC5;
  --hielo: #BFDCE8;
  --noche: #142B36;
  --ok: #2E7D4F;
  --ok-f: #E3F1E8;
  --am: #8A5D00;
  --am-f: #F7EBCB;
  --no: #B23B2E;
  --no-f: #F8E2DF;
  --fuente: "Helvetica Neue", "Inter Tight", Helvetica, Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--hueso); color: var(--tinta); font-family: var(--fuente); font-weight: 400; overflow: hidden; -webkit-font-smoothing: antialiased; }
@supports (font: -apple-system-body) { body { font-weight: 300; } }
button { font: inherit; color: inherit; }

#marco { position: fixed; inset: 0; 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 { overflow: hidden; }
#capa-fondo .rejilla { position: absolute; inset: -20%; opacity: 0; z-index: 1;
  -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(--linea) 1.6px, transparent 1.8px); background-size: 46px 46px; }
#manchas { position: absolute; inset: 0; z-index: 0; }
#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; left: 0; top: 0; will-change: transform; }
#capa-medio .icono { color: var(--azul); }
.iso-svg { width: 100%; height: 100%; display: block; }
.cuadro-m.az { background: var(--azul); } .cuadro-m.ce { background: var(--celeste); } .cuadro-m.hi { background: var(--hielo); }
.cuadro-m.hueco { background: transparent; border: 3px solid var(--celeste); }
#mundo { transform-origin: 0 0; will-change: transform; }
.esc { position: absolute; width: 1920px; height: 1080px; display: none; }
.esc.vis { display: block; }
.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: .08em .04em .16em; margin: -.08em -.04em -.16em; }
.rev-in { display: inline-block; transform: translateY(115%); }
.titulo { font-size: 104px; font-weight: 300; letter-spacing: -.025em; line-height: 1.02; white-space: nowrap; }
.titulo-m { font-size: 66px; font-weight: 300; letter-spacing: -.02em; line-height: 1.1; white-space: nowrap; }
.titulo-s { font-size: 44px; font-weight: 300; letter-spacing: -.015em; line-height: 1.15; white-space: nowrap; }
.lema { font-size: 36px; font-weight: 300; color: var(--azul); line-height: 1.25; white-space: nowrap; }
.cuerpo { font-size: 28px; color: var(--gris); line-height: 1.35; }
.etq { font-size: 20px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--azul); white-space: nowrap; }
.etq .n { color: var(--celeste); margin-right: 14px; }
.azul { color: var(--azul); }

/* ---------- piezas */
.icono { display: flex; align-items: center; justify-content: center; }
.icono svg { width: 100%; height: 100%; fill: currentColor; display: block; }
.cuadro { background: var(--azul); }
.cuadro.ce { background: var(--celeste); } .cuadro.hi { background: var(--hielo); } .cuadro.hu { background: var(--hueso); }
.ficha { background: var(--blanco); border: 1px solid var(--linea); border-top: 4px solid var(--azul); }
.ficha .f-et { font-size: 18px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--gris2); display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.ficha .f-et svg { width: 22px; height: 22px; fill: var(--azul); flex: none; }
.kpi { padding: 26px 30px; }
.kpi .k-n { font-size: 72px; font-weight: 300; color: var(--azul); line-height: 1.05; margin-top: 12px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; white-space: nowrap; }
.kpi .k-de { font-size: 20px; color: var(--gris2); margin-top: 6px; white-space: nowrap; }
.pastilla { display: inline-flex; align-items: center; gap: 16px; padding: 18px 28px; font-size: 30px; font-weight: 400; background: var(--blanco); border: 1px solid var(--linea); border-left: 6px solid var(--azul); white-space: nowrap; color: var(--tinta); }
.pastilla svg { width: 36px; height: 36px; fill: var(--azul); flex: none; }
.chip { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; font-size: 22px; font-weight: 500; white-space: nowrap; }
.chip svg { width: 24px; height: 24px; fill: currentColor; }
.chip.ok { background: var(--ok-f); color: var(--ok); } .chip.am { background: var(--am-f); color: var(--am); } .chip.no { background: var(--no-f); color: var(--no); } .chip.az { background: var(--azul); color: #fff; }
.baldosa { background: var(--azul); color: #fff; display: flex; align-items: center; justify-content: center; }
.baldosa svg { width: 56%; height: 56%; fill: currentColor; }
.baldosa.ce { background: var(--celeste); } .baldosa.bl { background: var(--blanco); color: var(--azul); border: 1px solid var(--linea); }
.onda { position: absolute; left: 0; top: 0; width: 120px; height: 120px; border: 4px solid var(--azul); pointer-events: none; }
.linea { position: absolute; left: 0; top: 0; height: 3px; background: var(--azul); transform-origin: 0 50%; }
.linea.ce { background: var(--celeste); } .linea.no { background: var(--no); } .linea.am { background: #C99A2E; }

/* isotipo grande */
.iso-c { width: 120px; height: 120px; }
.iso-c.az { background: var(--azul); } .iso-c.ce { background: var(--celeste); }

/* ventana con captura real */
.ventana { position: absolute; left: 0; top: 0; overflow: hidden; background: var(--noche); border: 1px solid #c9d3d9; box-shadow: 0 12px 30px rgba(20, 43, 54, .08); }
.ventana .v-barra { position: absolute; left: 0; right: 0; top: 0; height: 40px; background: var(--hueso); border-bottom: 1px solid var(--linea); display: flex; align-items: center; gap: 8px; padding: 0 16px; font-size: 16px; color: var(--gris2); white-space: nowrap; overflow: hidden; }
.ventana .v-barra i { width: 12px; height: 12px; background: var(--linea); flex: none; }
.ventana .v-barra i:nth-child(1) { background: var(--azul); } .ventana .v-barra i:nth-child(2) { background: var(--celeste); } .ventana .v-barra i:nth-child(3) { background: var(--hielo); }
.ventana .v-barra span { margin-left: 14px; }
.ventana img { position: absolute; left: 0; top: 40px; width: 100%; height: auto; display: block; }
.ventana .v-tapa { position: absolute; inset: 0; background: var(--blanco); }

/* camión plano (lado) */
.camion svg { width: 100%; height: 100%; display: block; overflow: visible; }

/* formulario y filas */
.campo { position: absolute; left: 36px; right: 36px; height: 70px; border-bottom: 1px solid var(--linea); display: flex; align-items: center; }
.campo .c-et { width: 250px; font-size: 20px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--gris2); flex: none; }
.campo .c-v { font-size: 30px; color: var(--tinta); white-space: nowrap; overflow: hidden; }
.campo.falta { background: var(--no-f); }
.fila { position: absolute; left: 0; right: 0; height: 64px; display: flex; align-items: center; gap: 20px; padding: 0 26px; font-size: 26px; border-bottom: 1px solid var(--linea); white-space: nowrap; font-variant-numeric: tabular-nums; }
.fila .der { margin-left: auto; color: var(--gris); }
.fila .marca { width: 34px; height: 34px; flex: none; display: flex; align-items: center; justify-content: center; }
.fila .marca svg { width: 28px; height: 28px; }
.celda { position: absolute; width: 74px; height: 50px; background: var(--hueso); border: 1px solid var(--linea); }
.celda.pagada { background: var(--azul); border-color: var(--azul); }
.celda.atrasada { background: var(--am-f); border-color: #E5CF91; }
.celda.porvencer { background: var(--hielo); border-color: var(--hielo); }
.bocadillo { position: absolute; padding: 26px 32px; background: var(--noche); color: #fff; font-size: 32px; font-weight: 300; line-height: 1.35; width: 760px; }
.bocadillo::after { content: ""; position: absolute; left: 60px; bottom: -24px; border: 12px solid transparent; border-top-color: var(--noche); border-left-color: var(--noche); }
.sello { position: absolute; padding: 8px 20px; border: 4px solid var(--no); color: var(--no); font-size: 30px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; background: rgba(255,255,255,.92); white-space: nowrap; }
.sello.ok { border-color: var(--ok); color: var(--ok); }
.aviso { position: absolute; width: 700px; padding: 26px 30px; background: var(--blanco); border: 1px solid var(--linea); border-left: 8px solid var(--no); display: flex; gap: 22px; align-items: center; box-shadow: 0 8px 20px rgba(20,43,54,.07); }
.aviso .icono { width: 56px; height: 56px; color: var(--no); flex: none; }
.aviso b { display: block; font-size: 26px; font-weight: 500; } .aviso span { font-size: 22px; color: var(--gris); }
.aviso.az { border-left-color: var(--azul); } .aviso.az .icono { color: var(--azul); }

/* mapa */
.mapa { background: var(--hueso); border: 1px solid var(--linea); overflow: hidden; }
.mapa svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.punto { width: 34px; height: 34px; background: var(--azul); border: 5px solid #fff; box-shadow: 0 0 0 2px var(--azul); }
.lectura { padding: 10px 18px; background: var(--noche); color: #fff; font-size: 28px; font-weight: 400; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lectura.no { background: var(--no); }
.noche-capa { position: absolute; background: var(--noche); pointer-events: none; }

/* cuaderno */
.hoja { background: #FBFAF4; border: 1px solid #E4DFC8; }
.hoja svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.barrido { position: absolute; height: 6px; background: var(--azul); box-shadow: 0 0 0 6px rgba(62,122,149,.18); }

/* televisor */
.tv { background: var(--tinta); padding: 22px; }
.tv .tv-p { position: absolute; inset: 22px; background: var(--noche); overflow: hidden; }
.tv-k { position: absolute; width: 230px; height: 120px; padding: 14px 18px; background: #1d3a48; color: #fff; }
.tv-k b { display: block; font-size: 15px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.85); }
.tv-k span { display: block; font-size: 48px; font-weight: 300; margin-top: 6px; }
.tv-b { position: absolute; bottom: 20px; width: 34px; background: var(--celeste); }

/* ---------- HUD */
#hud { pointer-events: none; }
#capitulo { position: absolute; left: 90px; top: 70px; display: flex; align-items: baseline; gap: 18px; font-size: 24px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; opacity: 0; color: var(--tinta); }
#capitulo .num { color: var(--celeste); font-variant-numeric: tabular-nums; }
#capitulo .raya { position: absolute; left: 0; bottom: -18px; height: 3px; width: 100%; background: var(--azul); 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: 8vh; gap: 16px; }
#btn-inicio { width: 120px; height: 120px; border-radius: 50%; border: 0; cursor: pointer; background: var(--azul); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 10px rgba(62,122,149,.18); animation: latido 2.2s ease-in-out infinite; }
#btn-inicio svg { width: 58px; height: 58px; fill: currentColor; margin-left: 6px; }
#btn-inicio:focus-visible, #controles button:focus-visible, .btn-p:focus-visible, .btn-s:focus-visible, #barra:focus-visible { outline: 2px solid var(--azul); outline-offset: 3px; }
@keyframes latido { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.aviso-sonido { margin: 0; font-size: 15px; color: var(--gris); letter-spacing: .04em; text-align: center; padding: 6px 16px; background: rgba(255,255,255,.92); }
#portada.fuera { opacity: 0; pointer-events: none; transition: opacity .5s; }

#final { left: 0; right: 0; bottom: 0; display: flex; justify-content: center; padding: 26px 16px calc(80px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.94); border-top: 1px solid var(--linea); }
#final[hidden] { display: none; }
.final-caja { text-align: center; }
.final-titulo { font-size: clamp(18px, 2.2vw, 28px); font-weight: 300; margin: 0 0 16px; }
.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; font-size: 16px; font-weight: 500; text-decoration: none; cursor: pointer; }
.btn-p { background: var(--azul); color: #fff; border: 0; }
.btn-s { background: #fff; color: var(--azul); border: 1px solid var(--azul); }

#controles { left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 8px 16px max(8px, env(safe-area-inset-bottom));
  background: rgba(255,255,255,.95); border-top: 1px solid var(--linea); 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; 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-play { color: var(--azul) !important; }
#btn-cc { font-size: 14px; font-weight: 500; letter-spacing: .06em; }
#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: 4px; background: var(--linea); overflow: hidden; }
#barra .lleno { height: 100%; width: 0; background: var(--azul); }
#barra:hover .pista { height: 8px; }
#barra .marcas i { position: absolute; top: 50%; width: 3px; height: 12px; margin: -6px 0 0 -1.5px; background: var(--celeste); pointer-events: none; }
#barra .globo { position: absolute; bottom: 36px; transform: translateX(-50%); white-space: nowrap; background: var(--noche); color: #fff; font-size: 13px; font-weight: 500; padding: 6px 10px; pointer-events: none; width: auto; line-height: 1.2; }
@media (max-width: 560px) {
  #reloj { display: none; }
  #controles { gap: 4px; padding-left: 8px; padding-right: 8px; }
  #btn-inicio { width: 90px; height: 90px; }
}
@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: 400; line-height: 1.35; color: var(--tinta); }
  body.sin-cc #sub-movil { display: none; }
  #portada { justify-content: flex-start; padding-bottom: 0; padding-top: calc(50vh + 28.125vw + 24px); }
}
