/* Presentación de Global — escenario 1920×1080 escalado a la ventana. Estética «Mosaico» de fabin.io
   (la misma del video de Campo): blanco, retícula de 60, acento azul, letra liviana, filetes, radio 0.
   Encima van capturas reales de la app (tema Océano) enmarcadas en navegador y teléfono. */
@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;
  --marco: #CBD5DA;
  --azul: #3E7A95;
  --celeste: #74AEC5;
  --hielo: #BFDCE8;
  --noche: #142B36;
  --alerta: #A8442F;   /* solo para «vencido» y «prohibido» */
  --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; }
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; background: var(--blanco); }

/* ---------- capas de parallax: retícula (lejos), mosaico (medio), escenas (frente) */
#capa-fondo, #capa-medio, #mundo, #hud { position: absolute; inset: 0; }
#capa-fondo .rejilla { position: absolute; left: -60px; top: -60px; width: 2160px; height: 1320px; opacity: .75;
  -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 .mancha { position: absolute; left: 0; top: 0; opacity: .32; will-change: transform; }
#capa-medio .deco { position: absolute; left: 0; top: 0; will-change: transform; }
#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 .03em .16em; margin: -.08em -.03em -.16em; }
.rev-in { display: inline-block; transform: translateY(115%); }
.titulo { font-size: 150px; font-weight: 300; letter-spacing: -.03em; line-height: 1; white-space: nowrap; }
.titulo-m { font-size: 76px; font-weight: 300; letter-spacing: -.02em; line-height: 1.08; white-space: nowrap; }
.titulo-s { font-size: 50px; font-weight: 300; letter-spacing: -.015em; line-height: 1.12; white-space: nowrap; }
.lema { font-size: 40px; font-weight: 300; color: var(--azul); white-space: nowrap; }
.cuerpo { font-size: 30px; color: var(--gris); line-height: 1.35; }
.etq { font-size: 21px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--gris2); white-space: nowrap; }
.cifra { font-size: 96px; font-weight: 300; color: var(--azul); letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- piezas */
.cuadro { background: var(--azul); }
.cuadro.c { background: var(--celeste); } .cuadro.h { background: var(--hielo); } .cuadro.g { background: var(--gris); } .cuadro.b { background: #fff; outline: 1px solid var(--marco); }
.iso-svg { width: 100%; height: 100%; display: block; }
.filete { height: 3px; background: var(--azul); transform-origin: 0 50%; }
.filete.t { background: var(--tinta); }
.picto svg, .icono svg { width: 100%; height: 100%; display: block; }
.icono svg { fill: currentColor; }
.ficha { background: #fff; border-top: 3px solid var(--azul); padding: 26px 30px; box-shadow: 0 0 0 1px var(--linea); }
.ficha .f-et { font-size: 18px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--gris2); }
.ficha .f-n { font-size: 64px; font-weight: 300; color: var(--azul); line-height: 1.1; margin-top: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ficha .f-d { font-size: 22px; color: var(--gris); margin-top: 4px; }
.chip { display: inline-flex; align-items: center; gap: 14px; padding: 14px 24px; background: #fff; box-shadow: 0 0 0 1px var(--marco); font-size: 26px; white-space: nowrap; }
.chip i { width: 14px; height: 14px; background: var(--celeste); flex: none; }
.chip.azul { background: var(--azul); color: #fff; box-shadow: none; } .chip.azul i { background: #fff; }
.chip.hielo { background: var(--hielo); box-shadow: none; }
.chip.alerta { color: var(--alerta); box-shadow: 0 0 0 2px var(--alerta); } .chip.alerta i { background: var(--alerta); }
.sello { padding: 8px 22px; border: 5px solid var(--alerta); color: var(--alerta); font-size: 34px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; background: rgba(255,255,255,.9); white-space: nowrap; }
.sello.azul { border-color: var(--azul); color: var(--azul); }
.raya-tachar { height: 6px; background: var(--alerta); transform-origin: 0 50%; }

/* ventana de navegador (estilo de las capturas de fabin.io) */
.ventana { background: #fff; box-shadow: 0 0 0 1px var(--marco), 0 30px 60px rgba(30, 35, 38, .08); overflow: hidden; }
.ventana .v-barra { height: 48px; display: flex; align-items: center; gap: 10px; padding: 0 18px; background: var(--hueso); border-bottom: 1px solid var(--linea); font-size: 18px; color: var(--gris2); }
.ventana .v-barra i { width: 12px; height: 12px; background: var(--azul); } .ventana .v-barra i:nth-child(2) { background: var(--celeste); } .ventana .v-barra i:nth-child(3) { background: var(--hielo); margin-right: 14px; }
.ventana .v-tit { position: absolute; left: 40px; top: 78px; font-size: 40px; font-weight: 300; white-space: nowrap; }
.ventana .v-sub { position: absolute; left: 40px; top: 132px; font-size: 20px; color: var(--gris2); white-space: nowrap; }

/* tabla suiza */
.tabla { position: absolute; left: 40px; right: 40px; border-top: 2px solid var(--tinta); font-size: 23px; }
.tf { position: relative; display: grid; align-items: center; height: 58px; border-bottom: 1px solid var(--linea); padding: 0; white-space: nowrap; background: #fff; }
.tf.enc { height: 48px; font-size: 15px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--gris2); }
.tf > span { overflow: hidden; text-overflow: ellipsis; padding: 0 10px; }
.tf .der { text-align: right; font-variant-numeric: tabular-nums; }
.tf.resalta { background: var(--hielo); }
.marca-col { position: absolute; background: rgba(191, 220, 232, .55); pointer-events: none; }

/* teléfono: marco rectangular de 1 px, como las capturas móviles del sitio */
.telefono { width: 400px; height: 800px; background: #fff; box-shadow: 0 0 0 1px var(--marco), 0 30px 60px rgba(30, 35, 38, .08); overflow: hidden; }
.telefono .t-barra { height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; font-size: 18px; font-weight: 500; border-bottom: 1px solid var(--linea); }
.telefono .t-barra .senal { display: flex; gap: 3px; align-items: flex-end; height: 18px; }
.telefono .t-barra .senal b { width: 5px; background: var(--tinta); }
.vista { position: absolute; left: 0; right: 0; top: 56px; bottom: 0; padding: 30px 28px; display: flex; flex-direction: column; gap: 18px; }
.vista .vt { font-size: 32px; font-weight: 300; }
.vista .vs { font-size: 19px; color: var(--gris2); }
.vista .qr { width: 220px; height: 220px; margin: 10px auto 0; padding: 14px; box-shadow: 0 0 0 1px var(--marco); position: relative; }
.vista .qr svg { width: 100%; height: 100%; display: block; }
.vista .scan { position: absolute; left: 6px; right: 6px; height: 3px; background: var(--azul); }
.vista .grande { font-size: 110px; font-weight: 300; text-align: center; color: var(--azul); font-variant-numeric: tabular-nums; line-height: 1; margin-top: 30px; }
.vista .boton { margin-top: auto; height: 64px; background: var(--azul); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 500; }
.vista .fila { display: flex; justify-content: space-between; font-size: 21px; border-bottom: 1px solid var(--linea); padding: 12px 0; }

/* mapa (vista aérea esquemática) */
.mapa { overflow: hidden; background: #DCE7DF; }
.parcela { position: absolute; }
.cuartel-et { font-size: 22px; font-weight: 500; color: #fff; background: var(--tinta); padding: 6px 12px; white-space: nowrap; }
svg.capa-svg { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }

/* calendario */
.cal { position: absolute; display: grid; grid-template-columns: repeat(7, 1fr); border-top: 2px solid var(--tinta); }
.cal .cd { position: relative; height: 104px; border-bottom: 1px solid var(--linea); border-right: 1px solid var(--linea); padding: 8px 10px; font-size: 18px; color: var(--gris2); }
.cal .cd.enc { height: 40px; font-size: 14px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.evento { position: absolute; height: 30px; padding: 0 10px; display: flex; align-items: center; font-size: 16px; font-weight: 500; white-space: nowrap; color: #fff; background: var(--azul); }
.evento.fr { background: var(--celeste); color: var(--tinta); }
.evento.ca { background: var(--hielo); color: var(--tinta); }

/* gráficos */
.barra-g { position: absolute; transform-origin: 50% 100%; background: var(--azul); }
.barra-g.h { background: var(--hielo); } .barra-g.c { background: var(--celeste); }
.eje { position: absolute; height: 2px; background: var(--tinta); }
.punto { width: 22px; height: 22px; background: var(--azul); }
.punto.c { background: var(--celeste); }

/* cursor */
.cursor { width: 46px; height: 46px; z-index: 50; }
.cursor svg { width: 100%; height: 100%; }

/* ---------- HUD */
#hud { pointer-events: none; }
#capitulo { position: absolute; left: 90px; top: 66px; display: flex; align-items: baseline; gap: 20px; font-size: 22px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--tinta); opacity: 0; }
#capitulo .num { color: var(--celeste); font-size: 22px; font-variant-numeric: tabular-nums; }
#capitulo .raya { position: absolute; left: 0; bottom: -16px; height: 2px; width: 100%; background: var(--azul); transform-origin: 0 50%; }
#hud .escalon { position: absolute; width: 30px; height: 30px; }
#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: 16px; }
#btn-inicio { width: 104px; height: 104px; 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: 50px; height: 50px; 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; letter-spacing: .04em; color: var(--gris2); text-align: center; padding: 6px 16px; background: rgba(255,255,255,.9); }
#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; }
#final[hidden] { display: none; }
.final-caja { text-align: center; background: #fff; padding: 26px 30px; box-shadow: 0 0 0 1px var(--marco); border-top: 3px solid var(--azul); }
.final-titulo { font-size: clamp(18px, 2.2vw, 28px); font-weight: 300; 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: 46px; padding: 0 20px; font-size: 14px; 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: 8px; padding: 8px 16px max(8px, env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .94); 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: 24px; height: 24px; fill: currentColor; }
#btn-cc { font-size: 13px; font-weight: 500; letter-spacing: .08em; }
#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: 7px; }
#barra .marcas i { position: absolute; top: 50%; width: 2px; height: 12px; margin: -6px 0 0 -1px; background: var(--celeste); 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: 500; padding: 6px 10px; pointer-events: none; }
@media (max-width: 560px) {
  #reloj { display: none; }
  #controles { gap: 2px; padding-left: 6px; padding-right: 6px; }
  #btn-inicio { width: 84px; height: 84px; }
}
@media (prefers-reduced-motion: reduce) { #btn-inicio { animation: none; } }

/* teléfono en vertical: el escenario queda chico y 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 + 16px); text-align: center; font-size: 17px; line-height: 1.4; 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); }
}

/* ============================================================ piezas propias de Global
   Capturas reales en tema Claridad, enmarcadas, etiquetas flotantes y el semáforo del tablero. */
:root { --verde: #3F8F5B; --ambar: #C7892F; --oceano: var(--hueso); }

/* ventana de navegador con una captura real adentro (puntos de posición cuadrados, como las de Campo) */
.nav { background: #fff; box-shadow: 0 0 0 1px var(--marco), 0 44px 90px rgba(20, 43, 54, .18); overflow: hidden; }
.nav .nav-barra { position: absolute; left: 0; right: 0; top: 0; height: 46px; display: flex; align-items: center; gap: 9px; padding: 0 18px; background: var(--hueso); border-bottom: 1px solid var(--linea); z-index: 2; }
.nav .nav-barra i { width: 12px; height: 12px; background: var(--azul); } .nav .nav-barra i:nth-child(2) { background: var(--celeste); } .nav .nav-barra i:nth-child(3) { background: var(--hielo); }
.nav .nav-host { margin-left: 12px; font-size: 18px; color: var(--gris2); }
.nav .nav-cuerpo { position: absolute; left: 0; right: 0; top: 46px; bottom: 0; overflow: hidden; background: var(--oceano); }
.nav .nav-cuerpo.claro { background: #fff; }
.nav .nav-cuerpo img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }

/* pantallas dibujadas en tema Claridad (formularios y firmas de Global) */
.gx { position: absolute; inset: 0; padding: 26px 40px; color: var(--tinta); overflow: hidden; background: linear-gradient(180deg, #fff, var(--hueso)); }
.gx-h { font-size: 36px; font-weight: 700; margin: 0 0 6px; }
.gx-sub { font-size: 21px; color: var(--gris2); margin: 0 0 20px; max-width: 920px; line-height: 1.3; }
.gx-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.gx-card { border: 1px solid var(--linea); border-radius: 14px; padding: 18px; background: #fff; box-shadow: 0 8px 20px rgba(20,43,54,.05); }
.gx-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.gx-code { font-size: 19px; font-weight: 700; color: var(--azul); }
.gx-ifa { font-size: 15px; color: var(--gris2); }
.gx-chip { margin-left: auto; font-size: 14px; padding: 2px 11px; border-radius: 20px; background: rgba(199,137,47,.16); color: var(--ambar); font-weight: 600; }
.gx-ct { font-size: 22px; font-weight: 600; line-height: 1.18; margin-bottom: 8px; }
.gx-meta { font-size: 16px; color: var(--gris2); line-height: 1.35; }
.gx-hash { font-size: 17px; color: var(--gris2); font-family: ui-monospace, monospace; margin: 4px 0 18px; word-break: break-all; padding: 13px 18px; border: 1px solid var(--linea); border-radius: 12px; background: #fff; }
.gx-table { width: 100%; border-collapse: collapse; font-size: 21px; background: #fff; border: 1px solid var(--linea); border-radius: 14px; overflow: hidden; }
.gx-table th { text-align: left; color: var(--gris2); font-weight: 600; font-size: 18px; padding: 12px 20px; border-bottom: 2px solid var(--linea); }
.gx-table td { padding: 13px 20px; border-bottom: 1px solid var(--linea); }
.gx-ok { color: var(--verde); font-weight: 600; }
.gx-pend { color: var(--ambar); font-weight: 600; }

/* teléfono con una captura móvil real (una pizca de redondeo: es un dispositivo) */
.fono { background: #0B1A22; border-radius: 34px; box-shadow: 0 0 0 2px #0B1A22, 0 0 0 4px var(--marco), 0 44px 90px rgba(20, 43, 54, .24); overflow: hidden; }
.fono .fono-cuerpo { position: absolute; left: 10px; right: 10px; top: 10px; bottom: 10px; border-radius: 24px; overflow: hidden; background: var(--oceano); }
.fono .fono-cuerpo img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }

/* etiqueta flotante (callout) sobre o junto a la captura */
.etiqueta { display: inline-flex; align-items: center; gap: 13px; padding: 13px 22px; background: #fff; box-shadow: 0 12px 34px rgba(20, 43, 54, .16), 0 0 0 1px var(--marco); font-size: 25px; white-space: nowrap; }
.etiqueta i.pt { width: 13px; height: 13px; background: var(--celeste); flex: none; }
.etiqueta .ic { width: 25px; height: 25px; flex: none; color: var(--azul); } .etiqueta .ic svg { width: 100%; height: 100%; fill: currentColor; display: block; }
.etiqueta.azul { background: var(--azul); color: #fff; box-shadow: 0 12px 34px rgba(20, 43, 54, .22); } .etiqueta.azul i.pt { background: #fff; } .etiqueta.azul .ic { color: #fff; }
.etiqueta.alerta { color: var(--alerta); box-shadow: 0 0 0 2px var(--alerta); } .etiqueta.alerta i.pt { background: var(--alerta); } .etiqueta.alerta .ic { color: var(--alerta); }
.etiqueta.ambar { color: var(--ambar); box-shadow: 0 0 0 2px var(--ambar); } .etiqueta.ambar i.pt { background: var(--ambar); } .etiqueta.ambar .ic { color: var(--ambar); }
.etiqueta.verde { color: var(--verde); box-shadow: 0 0 0 2px var(--verde); } .etiqueta.verde i.pt { background: var(--verde); } .etiqueta.verde .ic { color: var(--verde); }

/* escudo grande para la escena de reglas */
.escudo-g { color: var(--azul); } .escudo-g svg { width: 100%; height: 100%; fill: currentColor; display: block; }

/* contorno de resaltado (motor.js `contorno`/`trazar`): recuadro de luz que recorre la región de una captura.
   SIN estas reglas el <svg> queda en flujo (se va al origen de la escena = desalineado) y los paths se
   rellenan de negro por defecto (cuadros negros). fill:none + stroke, sin blur (rendimiento). */
.contorno { position: absolute; overflow: visible; pointer-events: none; }
.contorno path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.contorno .gl  { stroke-width: 11px; opacity: .13; }
.contorno .gl2 { stroke-width: 3.5px; opacity: .95; }
.contorno .nu  { stroke: #fff; stroke-width: 1px; opacity: .65; }

/* tablero de cumplimiento: filas con semáforo */
.tablero { background: #fff; box-shadow: 0 0 0 1px var(--linea), 0 30px 60px rgba(20, 43, 54, .10); }
.sem-fila { position: absolute; display: flex; align-items: center; gap: 20px; left: 30px; font-size: 26px; }
.sem-dot { width: 26px; height: 26px; border-radius: 50%; background: var(--linea); flex: none; }
/* OJO: el token de estado NO puede ser `a`/`v`/`c`… sueltos: `.a` es la clase base de los elementos de
   escena (position:absolute) y colisiona (el punto se volvía absoluto y saltaba al borde). Prefijo `sem-`. */
.sem-dot.sem-v { background: var(--verde); } .sem-dot.sem-a { background: var(--ambar); } .sem-dot.sem-r { background: var(--alerta); }
