/* ==========================================================================
   Intranet Palmeras del Llano — estética de televisor / monitor CRT
   ========================================================================== */

:root {
    --brand: #04463a;
    --brand-hi: #0b6b58;
    --accent: #CF7606;
    --accent-hi: #f2a443;
    --white: #ffffff;

    --bg: #0a3a30;
    --ink: #ffffff;
    --ink-dim: rgba(255, 255, 255, .72);
    --ink-faint: rgba(255, 255, 255, .5);
    --line: rgba(255, 255, 255, .14);

    --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
    --sans: "Space Grotesk", system-ui, sans-serif;
    --serif: "Instrument Serif", Georgia, serif;

    --gutter: clamp(16px, 3vw, 44px);
    --ease: cubic-bezier(.22, .8, .2, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    background: #000;
    color: var(--ink);
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}

a { color: inherit; text-decoration: none; }

button { font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; }

kbd {
    font: inherit;
    border: 1px solid var(--line);
    padding: 1px 6px;
}

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }

/* --- Pantalla y transición de TV ----------------------------------------- */

.screen {
    position: relative;
    height: 100dvh;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 50% 45%, rgba(26, 138, 112, .55), transparent 65%),
        radial-gradient(ellipse at 85% 100%, rgba(207, 118, 6, .14), transparent 50%),
        var(--bg);
    transform-origin: 50% 50%;
}

html.is-bw .screen { filter: grayscale(1) contrast(1.1); }

.tv-on .screen { animation: tv-on .8s var(--ease) backwards; }
.tv-off .screen { animation: tv-off .5s cubic-bezier(.7, 0, .9, .4) forwards; }

@keyframes tv-on {
    0%   { transform: scale(.02, .003); filter: brightness(10); }
    25%  { transform: scale(1, .003); filter: brightness(7); }
    60%  { transform: scale(1, 1.02); filter: brightness(1.8) saturate(1.6); }
    100% { transform: none; filter: none; }
}

@keyframes tv-off {
    0%   { transform: none; filter: none; }
    50%  { transform: scale(1, .003); filter: brightness(7); }
    100% { transform: scale(0, .003); filter: brightness(12); }
}

/* --- HUD ------------------------------------------------------------------ */

.hud {
    position: absolute;
    left: 0; right: 0;
    z-index: 30;
    padding: var(--gutter);
    pointer-events: none;
    text-shadow: -1px 0 rgba(207, 118, 6, .55), 1px 0 rgba(11, 160, 130, .45);
}

.hud a, .hud button { pointer-events: auto; }

.hud--top {
    top: 0;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
    gap: 16px;
}

.hud__left { display: flex; gap: 22px; align-items: center; padding-top: 6px; }

.timecode { font-variant-numeric: tabular-nums; }

.rec { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-dim); }

.rec i {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    animation: blink 1.2s steps(1) infinite;
}

.brand { display: flex; flex-direction: column; gap: 4px; text-shadow: none; }

.brand__logo { display: block; width: clamp(120px, 11vw, 168px); height: auto; }

.brand__sub {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    font-size: 10px;
    color: var(--ink-dim);
    border-top: 1px solid var(--ink-faint);
    padding-top: 4px;
}

.hud__nav { display: flex; gap: clamp(14px, 3vw, 44px); justify-self: end; padding-top: 6px; }

.hud__nav a { color: var(--ink-dim); transition: color .2s; }
.hud__nav a:hover,
.hud__nav a.is-active { color: var(--ink); }
.hud__nav a.is-active::before { content: "■ "; color: var(--accent); }

.hud--bottom { bottom: 0; display: flex; flex-direction: column; gap: 14px; }

.hud__row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    color: var(--ink-dim);
}

.hud__row > :last-child { text-align: right; }

.hud__btn {
    justify-self: start;
    background: none;
    border: 0;
    padding: 0;
    color: var(--ink-dim);
    cursor: pointer;
}

.hud__btn:hover,
.hud__btn[aria-pressed="true"] { color: var(--ink); }

/* --- Cinta de noticias ---------------------------------------------------- */

.ticker {
    margin: 0 calc(var(--gutter) * -1);
    overflow: hidden;
    white-space: nowrap;
    border-block: 1px solid var(--line);
    background: rgba(4, 70, 58, .35);
    padding: 6px 0;
    pointer-events: auto;
}

.ticker__track {
    display: inline-flex;
    animation: ticker 45s linear infinite;
}

.ticker:hover .ticker__track { animation-play-state: paused; }

.ticker__group { display: inline-flex; gap: 18px; padding-right: 18px; }

.ticker__sep { color: var(--accent); }

@keyframes ticker { to { transform: translateX(-50%); } }

/* --- Esfera (portada) ------------------------------------------------------ */

.watch {
    position: absolute;
    inset: 0;
    touch-action: none;
    cursor: grab;
    user-select: none;
}

.watch.is-dragging { cursor: grabbing; }

.watch {
    background: radial-gradient(circle at 50% 50%, rgba(40, 160, 130, .3), rgba(11, 107, 88, .12) 28%, transparent 45%);
}

.watch__wire {
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
}

.watch__stage { position: absolute; inset: 0; }

.watch__stage { perspective-origin: 50% 50%; }

.watch__globe,
.watch__ring {
    position: absolute;
    left: 50%; top: 50%;
    width: 0; height: 0;
    transform-style: preserve-3d;
}

.watch__ring span {
    position: absolute;
    left: 0; top: 0;
    text-align: center;
    font-family: var(--serif);
    line-height: 1;
    letter-spacing: 0;
    color: #fff;
    text-shadow: 0 0 14px rgba(255, 255, 255, .45);
    backface-visibility: visible;
    pointer-events: none;
}

.watch__help {
    position: absolute;
    top: calc(var(--gutter) + 104px);
    left: 0; right: 0;
    margin: 0;
    text-align: center;
    color: var(--ink-faint);
    pointer-events: none;
    z-index: 20;
}

.watch__label {
    position: absolute;
    left: 50%;
    bottom: calc(var(--gutter) + 82px);
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 14px;
    background: rgba(4, 52, 43, .9);
    border: 1px solid var(--line);
    white-space: nowrap;
    z-index: 20;
    pointer-events: none;
}

.watch__label [data-label-ch] { color: var(--accent); }

.watch__label strong {
    font-family: var(--sans);
    font-weight: 500;
    font-size: 15px;
    letter-spacing: -.01em;
    text-transform: none;
}

.watch__label.is-glitch { animation: glitch .25s steps(2) 1; }

/* --- Tarjetas de la esfera ------------------------------------------------ */

.tile {
    position: absolute;
    left: 0; top: 0;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 3px;
    container-type: inline-size;
    backface-visibility: hidden;
    background: #0b1d19;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .1);
    -webkit-user-drag: none;
}

.tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(255, 255, 255, .16), transparent 40%);
    pointer-events: none;
}

.tile--mod { display: flex; flex-direction: column; cursor: pointer; }

.tile.is-active {
    box-shadow: 0 0 0 2px var(--accent), 0 0 28px rgba(207, 118, 6, .5);
}

/* tarjetas de foto (galería) */
.tile--foto {
    display: block;
    padding: 0;
    border: 0;
    cursor: pointer;
    background: #0b1d19;
}

.tile--foto img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.tile__caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 8cqw 5cqw 4cqw;
    font-size: 4.6cqw;
    text-align: left;
    color: #fff;
    background: linear-gradient(transparent, rgba(0, 0, 0, .8));
    opacity: 0;
    transition: opacity .3s;
}

.tile--foto.is-active .tile__caption { opacity: 1; }

/* tarjetas de desarrollos: barra de ventana + captura de pantalla */
.tile--dev {
    display: block;
    padding: 0;
    border: 0;
    cursor: pointer;
    background: var(--brand);
    color: #fff;
}

.tile--dev .tile__bar {
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 1;
    background: var(--brand);
    border-bottom-color: rgba(255, 255, 255, .12);
}

.tile--dev img {
    position: absolute;
    top: 8cqw; left: 0;
    width: 100%;
    height: calc(100% - 8cqw);
    object-fit: cover;
    pointer-events: none;
}

.tile--dev .tile__caption {
    display: flex;
    flex-direction: column;
    gap: 1.4cqw;
    padding-top: 14cqw;
    font-family: var(--sans);
    font-size: 4.2cqw;
    line-height: 1.25;
    letter-spacing: 0;
    text-transform: none;
    background: linear-gradient(transparent, rgba(2, 30, 25, .9) 65%);
    opacity: 1;
}

.tile--dev .tile__caption strong { font-size: 8cqw; font-weight: 700; letter-spacing: -.03em; line-height: 1; }

.tile--dev[data-pendiente] .tile__caption { color: var(--accent-hi); }
.tile--dev[data-pendiente] .tile__caption strong { color: #fff; }

.tile--v0 { background: #f4f1ea; color: var(--brand); }
.tile--v1 { background: var(--brand); color: #fff; }
.tile--v2 { background: var(--accent); color: #fff; }

.tile__bar {
    display: flex;
    align-items: center;
    gap: 1.6cqw;
    padding: 2.4cqw 3.5cqw;
    font-size: 3.4cqw;
    background: rgba(0, 0, 0, .08);
    border-bottom: 1px solid rgba(0, 0, 0, .1);
}

.tile__bar i { width: 2.2cqw; height: 2.2cqw; border-radius: 50%; background: currentColor; opacity: .35; }
.tile__bar b { margin-left: auto; font-weight: 500; }

.tile__screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 2.6cqw;
    padding: 5cqw 6cqw 6cqw;
    background-image:
        linear-gradient(rgba(127, 127, 127, .12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(127, 127, 127, .12) 1px, transparent 1px);
    background-size: 8cqw 8cqw;
}

.tile__eyebrow { font-size: 3.6cqw; opacity: .7; }

.tile__title {
    font-family: var(--sans);
    font-weight: 700;
    font-size: 10.5cqw;
    line-height: .95;
    letter-spacing: -.04em;
    text-transform: none;
}

.tile__desc {
    font-family: var(--sans);
    font-size: 4.4cqw;
    line-height: 1.3;
    letter-spacing: 0;
    text-transform: none;
    opacity: .85;
}

.tile__tags { font-size: 3.4cqw; opacity: .65; }

/* Tarjetas decorativas (las genera intranet.js) */

.tile--decor { pointer-events: none; }

.tile--barras {
    background:
        linear-gradient(90deg, #fff 0 14.28%, #f2a443 0 28.57%, #CF7606 0 42.85%, #6e8f2a 0 57.14%, #0b6b58 0 71.42%, #04463a 0 85.71%, #021f1a 0) top / 100% 72% no-repeat,
        linear-gradient(90deg, #04463a 0 25%, #fff 0 50%, #CF7606 0 75%, #000 0) bottom / 100% 28% no-repeat;
}

.d-graf {
    position: absolute;
    inset: 14% 8% 22%;
    display: flex;
    align-items: flex-end;
    gap: 4%;
    border-bottom: 1px solid rgba(255, 255, 255, .4);
}

.d-graf i { flex: 1; background: linear-gradient(var(--accent-hi), var(--accent)); }
.d-graf i:nth-child(3n) { background: #fff; }

.d-cap { position: absolute; left: 8%; bottom: 7%; font-size: 6cqw; color: var(--ink-dim); }

.tile--grafico { background: var(--brand); }

.tile--fecha { background: #f4f1ea; color: var(--brand); }

.d-fecha {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.d-fecha b { font-family: var(--serif); font-weight: 400; font-size: 46cqw; line-height: .85; }
.d-fecha span { font-size: 8cqw; color: var(--accent); }

.tile--palma { background: linear-gradient(180deg, var(--brand), #021f1a); }
.tile--palma svg { position: absolute; inset: 8%; width: 84%; height: 84%; }

.tile--ui { background: #fff; }

.d-ui { position: absolute; inset: 10%; display: flex; flex-direction: column; gap: 6%; }
.d-ui i { display: block; height: 7%; background: rgba(4, 70, 58, .25); }
.d-ui i:first-child { width: 70%; height: 11%; background: var(--brand); }
.d-ui i.box { flex: 1; height: auto; background: linear-gradient(135deg, var(--accent), var(--accent-hi)); }
.d-ui i.w60 { width: 60%; }

.tile--grilla {
    background:
        linear-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px) 0 0 / 12.5% 16.6%,
        linear-gradient(90deg, rgba(255, 255, 255, .12) 1px, transparent 1px) 0 0 / 12.5% 16.6%,
        #021f1a;
}

.d-dot {
    position: absolute;
    left: 58%; top: 44%;
    width: 7cqw; height: 7cqw;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 2cqw rgba(207, 118, 6, .3);
}

.d-coord { position: absolute; left: 8%; bottom: 8%; font-size: 6cqw; color: var(--ink-dim); }

.tile--sigla {
    background: var(--accent);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.d-sigla b { font-family: var(--sans); font-size: 34cqw; letter-spacing: -.06em; line-height: .9; }
.d-sigla span { display: block; text-align: center; font-size: 7cqw; }

/* --- Página de módulo ------------------------------------------------------ */

.module {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    width: min(920px, 100% - var(--gutter) * 2);
    margin: 0 auto;
    padding: 120px 0 110px;
    overflow-y: auto;
}

.module__back { color: var(--ink-dim); align-self: flex-start; }
.module__back:hover { color: var(--ink); }

.module__meta { margin: 0; color: var(--accent); }

.module__title {
    margin: 0;
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(52px, 10vw, 140px);
    line-height: .9;
    letter-spacing: -.02em;
    text-transform: none;
    text-shadow: 0 0 30px rgba(255, 255, 255, .35);
}

.module__desc {
    margin: 0;
    max-width: 52ch;
    font-family: var(--sans);
    font-size: 18px;
    line-height: 1.45;
    letter-spacing: 0;
    text-transform: none;
    color: rgba(255, 255, 255, .82);
}

.module__tags { margin: 0; color: var(--ink-dim); }

.module__signal {
    position: relative;
    aspect-ratio: 16 / 6;
    border: 1px solid var(--line);
    overflow: hidden;
}

.module__bars { position: absolute; inset: 0; display: flex; }
.module__bars i { flex: 1; }
.module__bars i:nth-child(1) { background: #fff; }
.module__bars i:nth-child(2) { background: #f2a443; }
.module__bars i:nth-child(3) { background: #CF7606; }
.module__bars i:nth-child(4) { background: #6e8f2a; }
.module__bars i:nth-child(5) { background: #0b6b58; }
.module__bars i:nth-child(6) { background: #04463a; }
.module__bars i:nth-child(7) { background: #021f1a; }

.module__nosignal {
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 22px;
    background: #000;
    text-align: center;
}

.module__nosignal strong { font-size: 18px; animation: blink 1.6s steps(1) infinite; }
.module__nosignal span { color: var(--ink-dim); }

/* --- Visor de fotos (se enciende como un televisor) ------------------------ */

.visor {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 90px 80px;
    background: rgba(2, 8, 6, .96);
    opacity: 0;
    transition: opacity .3s;
}

.visor[hidden] { display: none; }
.visor.is-open { opacity: 1; }

.visor__frame {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 100%;
    transform: scale(1, .004);
    filter: brightness(6);
    transition: transform .45s var(--ease), filter .45s var(--ease);
}

.visor.is-open .visor__frame { transform: none; filter: none; }

.visor__frame img {
    display: block;
    max-width: min(100%, 1400px);
    max-height: calc(100dvh - 240px);
    object-fit: contain;
    border: 1px solid var(--line);
    box-shadow: 0 0 0 2px var(--accent), 0 0 40px rgba(207, 118, 6, .35);
}

.visor__frame figcaption { display: flex; gap: 14px; align-items: baseline; }
.visor__frame figcaption span { color: var(--accent); }

.visor__frame figcaption strong {
    font-family: var(--sans);
    font-weight: 500;
    font-size: 18px;
    letter-spacing: -.01em;
    text-transform: none;
}

.visor__close,
.visor__nav {
    position: absolute;
    background: rgba(0, 0, 0, .6);
    border: 1px solid var(--line);
    color: var(--ink);
    cursor: pointer;
}

.visor__close { top: var(--gutter); right: var(--gutter); padding: 8px 12px; }

.visor__nav {
    top: 50%;
    width: 48px; height: 48px;
    transform: translateY(-50%);
    font-size: 18px;
}

.visor__nav--prev { left: var(--gutter); }
.visor__nav--next { right: var(--gutter); }

.visor__close:hover,
.visor__nav:hover { border-color: var(--accent); color: var(--accent); }

code {
    font-family: var(--mono);
    font-size: .85em;
    padding: 2px 6px;
    background: rgba(255, 255, 255, .08);
}

/* --- Arranque ---------------------------------------------------------------- */

/* div.boot: la clase "boot" también está en <html> mientras carga; ".boot" sola ocultaba toda la página */
div.boot { display: none; }

/* z-index por debajo de los efectos de pantalla (90+): el intro también se ve "en el televisor" */
html.boot div.boot {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    flex-direction: column;
    background: #000;
    overflow: hidden;
}

.boot__progress {
    height: 2px;
    background: rgba(255, 255, 255, .12);
}

.boot__progress i {
    display: block;
    height: 100%;
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent);
    transform: scaleX(0);
    transform-origin: left;
}

/* --- Intro en video (primera visita de la sesión) --- */

.boot__video,
.boot__hud,
.boot__skip { display: none; }

html.boot--video .boot__bars { visibility: hidden; }

html.boot--video .boot__video {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.1) contrast(1.05);
}

/* viñeta + degradado inferior para que el texto se lea sobre el video */
html.boot--video .boot::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(transparent 55%, rgba(0, 0, 0, .75)),
        radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, .55));
    pointer-events: none;
}

html.boot--video .boot__progress,
html.boot--video .boot__info { position: relative; z-index: 3; }

html.boot--video .boot__hud {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
}

.boot__tl {
    position: absolute;
    top: var(--gutter);
    left: var(--gutter);
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #fff;
}

.boot__tl .rec { color: #fff; }

.boot__tr {
    position: absolute;
    top: var(--gutter);
    right: var(--gutter);
    margin: 0;
    display: grid;
    gap: 4px;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.boot__tr div { display: flex; justify-content: flex-end; gap: 12px; }
.boot__tr dt { color: var(--ink-dim); }
.boot__tr dd { margin: 0; min-width: 9ch; color: #fff; }

/* mira: cuatro esquinas que se cierran sobre el objetivo */
.boot__reticle {
    position: absolute;
    left: 50%; top: 50%;
    width: clamp(120px, 16vw, 220px);
    aspect-ratio: 1;
    transform: translate(-50%, -50%) scale(1.5);
    opacity: .7;
    transition: transform 1.4s var(--ease), opacity .4s;
}

.boot__reticle i {
    position: absolute;
    width: 22%; height: 22%;
    border: 0 solid #fff;
}

.boot__reticle i:nth-child(1) { top: 0; left: 0; border-width: 2px 0 0 2px; }
.boot__reticle i:nth-child(2) { top: 0; right: 0; border-width: 2px 2px 0 0; }
.boot__reticle i:nth-child(3) { bottom: 0; left: 0; border-width: 0 0 2px 2px; }
.boot__reticle i:nth-child(4) { bottom: 0; right: 0; border-width: 0 2px 2px 0; }

.boot__reticle::before,
.boot__reticle::after {
    content: "";
    position: absolute;
    background: rgba(255, 255, 255, .6);
}

.boot__reticle::before { left: 50%; top: 38%; bottom: 38%; width: 1px; }
.boot__reticle::after { top: 50%; left: 38%; right: 38%; height: 1px; }

html.boot--colombia .boot__reticle { transform: translate(-50%, -50%) scale(1); opacity: 1; }
html.boot--colombia .boot__reticle i { border-color: var(--accent-hi); }

html.boot--fijado .boot__reticle {
    transform: translate(-50%, -50%) scale(2.6);
    opacity: 0;
}

.boot__fase {
    position: absolute;
    left: 50%;
    top: calc(50% + clamp(80px, 10vw, 140px));
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: opacity .4s;
}

.boot__fase strong {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(30px, 4.4vw, 60px);
    line-height: 1;
    letter-spacing: 0;
    text-transform: none;
    color: #fff;
}

.boot__fase span { color: var(--accent-hi); }
.boot__fase span::before { content: "▸ "; }

html.boot--colombia .boot__fase strong { color: #fff; text-shadow: 0 0 24px rgba(226, 138, 23, .7), 0 1px 3px #000; }

html.boot--fijado .boot__fase { opacity: 0; }

/* el logo aparece con glitch al llegar a la planta */
.boot__marca {
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0;
    filter: drop-shadow(0 4px 24px rgba(0, 0, 0, .7));
}

.boot__marca img { width: clamp(220px, 30vw, 420px); height: auto; }

.boot__marca span {
    padding: 4px 14px;
    color: #fff;
    background: rgba(4, 70, 58, .85);
    border: 1px solid rgba(255, 255, 255, .2);
    letter-spacing: .3em;
}

html.boot--fijado .boot__marca { animation: marca-in .9s steps(1) forwards, marca-flota 6s ease-in-out .9s infinite; }

@keyframes marca-in {
    0%   { opacity: 0; }
    10%  { opacity: 1; transform: translate(-48%, -50%) skewX(-12deg); filter: drop-shadow(-6px 0 0 #CF7606) drop-shadow(6px 0 0 #0ba082); }
    20%  { opacity: 0; }
    30%  { opacity: 1; transform: translate(-52%, -49%) skewX(8deg); filter: drop-shadow(4px 0 0 #CF7606) drop-shadow(-4px 0 0 #0ba082); }
    45%  { opacity: .4; transform: translate(-50%, -50%); }
    55%, 100% { opacity: 1; transform: translate(-50%, -50%); filter: drop-shadow(0 4px 24px rgba(0, 0, 0, .7)); }
}

@keyframes marca-flota {
    50% { transform: translate(-50%, -52%); }
}

html.boot--video .boot__skip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: absolute;
    z-index: 3;
    left: 50%;
    top: var(--gutter);
    transform: translateX(-50%);
    padding: 6px 12px;
    background: rgba(0, 0, 0, .35);
    border: 1px solid rgba(255, 255, 255, .25);
    cursor: pointer;
}

.boot__skip:hover { background: rgba(207, 118, 6, .6); }

/* salida: el intro se apaga como un televisor */
html.boot--saliendo .boot { animation: tv-off .5s cubic-bezier(.7, 0, .9, .4) forwards; }

.boot__bars { flex: 1; display: flex; }
.boot__bars i { flex: 1; }
.boot__bars i:nth-child(1) { background: #fff; }
.boot__bars i:nth-child(2) { background: #f2a443; }
.boot__bars i:nth-child(3) { background: #CF7606; }
.boot__bars i:nth-child(4) { background: #6e8f2a; }
.boot__bars i:nth-child(5) { background: #0b6b58; }
.boot__bars i:nth-child(6) { background: #04463a; }
.boot__bars i:nth-child(7) { background: #021f1a; }

.boot__info {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    padding: var(--gutter);
    color: var(--ink-dim);
}

.boot__status { display: inline-flex; align-items: center; gap: 8px; color: #fff; }

.boot__status i {
    width: 8px; height: 14px;
    background: var(--accent);
    animation: blink .8s steps(1) infinite;
}

/* visitas repetidas en la sesión: sin barras de color, solo el estado sobre negro */
html.boot--rapido .boot__bars { visibility: hidden; }

.boot__count {
    font-family: var(--sans);
    font-weight: 700;
    font-size: clamp(56px, 12vw, 160px);
    line-height: .8;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

/* --- Efectos de pantalla ------------------------------------------------- */

.fx-noise,
.fx-scanlines,
.fx-roll,
.fx-crt {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

/* textura de ruido generada una vez; se desplaza con transform (sin repintar) */
.fx-noise {
    z-index: 90;
    inset: -160px;
    opacity: .045;
    animation: grain .4s steps(4) infinite;
    transition: opacity .08s;
}

.fx-noise.is-burst { opacity: .3; }

@keyframes grain {
    0%   { transform: translate(0, 0); }
    25%  { transform: translate(-53px, 31px); }
    50%  { transform: translate(37px, -71px); }
    75%  { transform: translate(-89px, -17px); }
    100% { transform: translate(0, 0); }
}

.fx-scanlines {
    z-index: 91;
    background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .1) 0 1px, transparent 1px 3px);
    animation: flicker 7s infinite;
}

.fx-roll {
    z-index: 92;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .035) 50%, transparent);
    height: 22vh;
    animation: roll 9s linear infinite;
}

/* marco curvo de televisor */
.fx-crt {
    z-index: 93;
    inset: 8px;
    border-radius: 34px / 42px;
    box-shadow:
        0 0 0 60px #000,
        inset 0 0 0 1px rgba(255, 255, 255, .06),
        inset 0 0 120px 10px rgba(0, 0, 0, .4);
}

.fx-crt::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(ellipse at 20% 10%, rgba(255, 255, 255, .05), transparent 45%);
}

@keyframes blink { 50% { opacity: 0; } }

@keyframes flicker {
    0%, 95%, 100% { opacity: 1; }
    96% { opacity: .6; }
    97% { opacity: 1; }
    98% { opacity: .75; }
}

@keyframes roll {
    from { transform: translateY(-25vh); }
    to { transform: translateY(105vh); }
}

@keyframes glitch {
    0% { transform: translateX(-50%) skewX(-12deg); filter: hue-rotate(90deg); }
    50% { transform: translateX(calc(-50% + 4px)) skewX(8deg); }
    100% { transform: translateX(-50%); }
}

/* --- Responsive ------------------------------------------------------------ */

@media (max-width: 860px) {
    .hud--top { grid-template-columns: 1fr auto; }
    .hud__left { display: none; }
    .brand { justify-self: start; }
    .hud__nav { gap: 14px; }
    .hud__row { grid-template-columns: 1fr 1fr; }
    .hud__row > :nth-child(3) { display: none; }
    .watch__help { display: none; }
}

@media (max-width: 720px) {
    .visor { padding: 80px 16px 90px; }
    .visor__nav { top: auto; bottom: var(--gutter); transform: none; }
}

@media (max-width: 560px) {
    .hud--top { grid-template-columns: 1fr; }
    .hud__nav { justify-self: start; }
    .watch__label kbd { display: none; }

    /* intro en celular: el botón de saltar baja (arriba no cabe junto al HUD) y sin tecla Esc */
    html.boot--video .boot__skip { top: auto; bottom: 96px; padding: 10px 18px; }
    .boot__skip kbd,
    .module__back kbd { display: none; }
    .boot__tl > span:last-child { max-width: 16ch; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition-duration: .01ms !important;
    }
}
