/* ========================================
   CIBERSEGURIDAD · ESCENARIO
======================================== */

html.ciber-activa {
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: none;
}

html.ciber-activa::-webkit-scrollbar {
    display: none;
}

body[data-tema="ciberseguridad"] {
    --fondo: #10171b;
    --acento: #9bd7dc;

    height: auto;
    overflow: visible;
}

body[data-tema="ciberseguridad"] .experiencia {
    display: block;

    height: auto;
    min-height: 100svh;

    padding: 0;
    overflow: visible;
}

body[data-tema="ciberseguridad"] .escena {
    display: block;

    width: 100%;
    max-width: none;
    height: auto;
    min-height: 0;

    margin: 0;
    padding: 0;
}

.ciber {
    position: relative;

    height: 220vh;
    height: 220svh;

    color: #edf3f5;
    text-align: left;

    --ciber-intro: 1;
    --ciber-cli: 0;
    --ciber-blur-intro: 0px;
    --ciber-blur-cli: 8px;
}

.ciber-escenario {
    position: sticky;
    top: 0;

    height: 100vh;
    height: 100dvh;

    overflow: hidden;
}

/* ========================================
   PRESENTACIÓN
======================================== */

.ciber-intro {
    position: absolute;
    inset: 0;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 45px clamp(24px, 7vw, 120px);

    text-align: center;
    overflow-y: auto;

    opacity: var(--ciber-intro);
    filter: blur(var(--ciber-blur-intro));

    will-change: opacity, filter;
}

.ciber-etiqueta {
    margin: 0 0 30px;

    color: #9bd7dc;

    font: 10px/1.6 monospace;
    letter-spacing: 3px;
}

.ciber-titulo {
    position: relative;

    width: 100%;
    max-width: 1100px;
    margin: 0;

    font-size: clamp(38px, 6vw, 86px);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -3px;
}

.ciber-titulo-base {
    display: block;
    opacity: 0;
}

.ciber-titulo-escrito {
    position: absolute;
    inset: 0;
}

.ciber-linea {
    display: block;
    min-height: 1.12em;
}

.ciber-acento {
    color: #9bd7dc;
}

.ciber-linea.escribiendo::after {
    content: "";

    display: inline-block;
    width: 3px;
    height: 0.75em;
    margin-left: 6px;

    background: #9bd7dc;
    vertical-align: -0.03em;
}

.ciber-explicacion {
    max-width: 780px;
    margin-top: 30px;

    color: #aab8c0;

    font-size: clamp(14px, 1.2vw, 17px);
    line-height: 1.85;
}

.ciber-explicacion p {
    margin: 0;
}

.ciber-explicacion p+p {
    margin-top: 16px;
}

.ciber-acciones {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px 28px;

    margin-top: 30px;
}

.ciber-entrar,
.ciber-volver,
.cli-accion {
    min-height: 44px;

    background: transparent;
    color: #afc2cb;
    border: 0;

    font: 11px/1.6 monospace;
    cursor: pointer;
}

.ciber-entrar {
    padding: 12px 18px;

    color: #b9e9ed;
    background: rgba(155, 215, 220, 0.04);

    border: 1px solid rgba(155, 215, 220, 0.25);
    border-radius: 5px;
}

.ciber-entrar:hover {
    background: rgba(155, 215, 220, 0.1);
}

.ciber-volver:hover,
.cli-accion:hover {
    color: #ffffff;
}

/* ========================================
   CLI A PANTALLA COMPLETA
======================================== */

.ciber-cli {
    position: absolute;
    inset: 0;

    min-width: 0;
    min-height: 0;

    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;

    background: #0e1419;

    opacity: var(--ciber-cli);
    filter: blur(var(--ciber-blur-cli));

    will-change: opacity, filter;
}

.ciber-escenario>[aria-hidden="true"] {
    pointer-events: none;
}

.cli-barra {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 20px;

    padding: 10px 28px;

    background: #141d25;
    border-bottom: 1px solid #27333e;
}

.cli-identidad {
    color: #9bd7dc;
    font: 11px monospace;
}

.cli-navegacion {
    display: flex;
    gap: 20px;
}

.cli-accion {
    padding: 4px 0;
    font-size: 10px;
}

/* Historial de salida */

.cli-salida {
    min-height: 0;

    padding: clamp(20px, 4vw, 60px);
    overflow-y: auto;

    scrollbar-width: thin;
    scrollbar-color: #34434d transparent;
}

.cli-bloque {
    margin-bottom: 24px;

    font: 13px/1.85 monospace;
    overflow-wrap: anywhere;
}

.cli-eco {
    margin: 0 0 9px;
    color: #9bd7dc;
}

.cli-respuesta {
    margin: 0;

    color: #b1c0cc;
    white-space: pre-wrap;
}

.cli-respuesta.error {
    color: #dfaa9f;
}

/* Sugerencias */

.cli-sugerencias {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    padding: 12px 28px;

    border-top: 1px solid #202c36;
}

.cli-sugerencia {
    min-height: 34px;
    padding: 6px 11px;

    background: #151f28;
    color: #a8c9d0;

    border: 1px solid #2a3945;
    border-radius: 4px;

    font: 10px monospace;
    cursor: pointer;
}

.cli-sugerencia:hover {
    border-color: #9bd7dc;
    color: #e5f6f7;
}

/* Línea de entrada */

.cli-formulario {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 18px 28px;

    background: #111a21;
    border-top: 1px solid #27333e;
}

.cli-prompt {
    flex-shrink: 0;

    color: #9bd7dc;
    font: 12px monospace;
}

.cli-entrada {
    width: 100%;
    min-width: 0;

    padding: 8px 0;

    background: transparent;
    color: #edf3f5;

    border: 0;
    border-radius: 0;
    outline: none;

    font: 13px monospace;
    caret-color: #9bd7dc;
}

.cli-entrada::placeholder {
    color: #657986;
}

.cli-formulario:focus-within {
    box-shadow: inset 0 2px #9bd7dc;
}

.cli-enviar {
    min-height: 38px;
    padding: 8px 12px;

    background: #20323d;
    color: #d0edf0;

    border: 1px solid #344c59;
    border-radius: 4px;

    font: 10px monospace;
    cursor: pointer;
}

.ciber button:focus-visible {
    outline: 2px solid #9bd7dc;
    outline-offset: 4px;
}

/* ========================================
   CELULARES
======================================== */

@media (max-width: 600px) {
    .ciber-intro {
        padding: 35px 24px;
    }

    .ciber-titulo {
        font-size: clamp(34px, 8.2vw, 50px);
        letter-spacing: -1.5px;
    }

    .ciber-etiqueta {
        font-size: 9px;
        letter-spacing: 2px;
    }

    .ciber-explicacion {
        font-size: 13px;
    }

    .cli-barra,
    .cli-sugerencias,
    .cli-formulario {
        padding-inline: 16px;
    }

    .cli-salida {
        padding: 24px 16px;
    }

    .cli-bloque {
        font-size: 11px;
    }

    .cli-prompt {
        font-size: 10px;
    }

    .cli-entrada {
        font-size: 16px;
    }

    .cli-navegacion {
        gap: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .ciber-intro,
    .ciber-cli {
        filter: none;
        will-change: auto;
    }
}