/* Mantener antes de sib-styles.css: el orden de cascada forma parte del diseño.
   Las reglas responsive siguen junto a sus grupos originales para conservar prioridades. */
:root {
    --font-interface: Arial, Helvetica, sans-serif;
    --font-display: "Video Pirate", sans-serif;
}

@font-face {
    font-family: 'Video Pirate';
    font-display: swap;
    src: url('../assets/VIDEO PIRATE.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-display: swap;
    font-family: Roboto;
    src: url(https://assets.brevo.com/font/Roboto/Latin/normal/normal/7529907e9eaf8ebb5220c5f9850e3811.woff2) format("woff2"), url(https://assets.brevo.com/font/Roboto/Latin/normal/normal/25c678feafdc175a70922a116c9be3e7.woff) format("woff")
}

@font-face {
    font-display: swap;
    font-family: Roboto;
    font-weight: 600;
    src: url(https://assets.brevo.com/font/Roboto/Latin/medium/normal/6e9caeeafb1f3491be3e32744bc30440.woff2) format("woff2"), url(https://assets.brevo.com/font/Roboto/Latin/medium/normal/71501f0d8d5aa95960f6475d5487d4c2.woff) format("woff")
}

@font-face {
    font-display: swap;
    font-family: Roboto;
    font-weight: 700;
    src: url(https://assets.brevo.com/font/Roboto/Latin/bold/normal/3ef7cf158f310cf752d5ad08cd0e7e60.woff2) format("woff2"), url(https://assets.brevo.com/font/Roboto/Latin/bold/normal/ece3a1d82f18b60bcce0211725c476aa.woff) format("woff")
}

/* =========================================================
   RESET
========================================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    background: #0a0a0a;
    font-family: var(--font-interface);
    overflow-x: hidden;
}

.material-symbols-outlined {
    font-variation-settings:
        'FILL'0,
        'wght'400,
        'GRAD'0,
        'opsz'24
}


/* =========================================================
   CONTENEDOR PRINCIPAL
========================================================= */

.tv-page {
    position: relative;
    z-index: 1;
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: clamp(20px, 4vw, 60px);
}


/* =========================================================
   SISTEMA TV + CONTROLES
========================================================= */

.tv-system {
    width: min(1100px, 100%);

    display: flex;
    align-items: center;
    justify-content: center;

    gap: clamp(20px, 4vw, 55px);
}


/* =========================================================
   TV
========================================================= */

.tv-wrapper {
    position: relative;

    width: min(760px, 75vw);
    aspect-ratio: 1058 / 969;

    flex-shrink: 1;

    transition:
        filter 0.35s ease,
        opacity 0.35s ease;
}


/* Imagen física de la televisión */

.tv-image {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: contain;

    display: block;

    z-index: 1;
}


/* =========================================================
   PANTALLA DE LA TV
========================================================= */

/*
    Esta es la parte importante.

    El contenido NO está dentro de tv.png.

    Es HTML colocado encima de la pantalla.
*/

.tv-screen {
    position: absolute;

    /*
        Estos valores son deliberadamente fáciles de ajustar.

        Si la pantalla de tu imagen real tiene otra posición,
        solamente modificas estos cuatro valores.
    */

    left: 6.81%;
    top: 7.74%;

    width: 86.39%;
    height: 70.69%;

    z-index: 2;

    overflow: hidden;

    background: #242424;

    /*
        Ligera curvatura para acercarse a una TV CRT.
    */
    border-radius: 2%;

    /*
        La pantalla se comporta como una superficie
        independiente de la TV.
    */

    transition:
        filter 0.35s ease,
        opacity 0.35s ease;
}


/* =========================================================
   CONTENIDO DE LOS CANALES
========================================================= */

.channel {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 8%;

    color: white;

    text-align: center;

    opacity: 0;
    visibility: hidden;

    transform: scale(0.98);

    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        visibility 0.25s ease;
}


.channel.active {
    opacity: 1;
    visibility: visible;

    transform: scale(1);
}


/* =========================================================
   CANAL 1
========================================================= */

.channel-title {
    font-family: var(--font-display);

    font-size: clamp(28px, 5vw, 58px);

    letter-spacing: 1px;

    margin-bottom: 8%;

    line-height: 1;
}


.link-list {
    display: flex;
    flex-direction: column;

    gap: clamp(12px, 2vw, 25px);

    align-items: center;
}


.tv-link {
    --link-color: black;
    color: white;

    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-decoration-color: var(--link-color);
    text-underline-offset: 5px;

    -webkit-text-stroke: 2px var(--link-color);
    paint-order: stroke fill;

    font-family: var(--font-display);

    font-size: clamp(20px, 3.2vw, 40px);

    line-height: 1;

    transition:
        transform 0.2s ease,
        opacity 0.2s ease,
        text-shadow 0.2s ease;
}

.tv-link--spotify {
    --link-color: #1db954;
}

.tv-link--apple-music {
    --link-color: #fa57c1;
}

.tv-link--instagram {
    --link-color: #a833d4;
}

.tv-link--youtube {
    --link-color: #ff0000;
}

.tv-link--tiktok {
    --link-color: #000000;
}

.tv-link iconify-icon {
    color: var(--link-color);
    -webkit-text-stroke: 0;
    vertical-align: middle;
}


/* Hover sencillo */

.tv-link:hover {
    transform: scale(1.08);

    opacity: 0.75;

    text-shadow:
        0 0 8px rgba(255, 255, 255, 0.6);
}


/* =========================================================
   CANAL 2
========================================================= */

.channel-2 .channel-title {
    margin-bottom: 8%;
}


/* =========================================================
   CONTROLES
========================================================= */

.controls {
    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 10px;

    flex-shrink: 0;
}


/* =========================================================
   BOTONES
========================================================= */

.control-button {
    width: clamp(52px, 7vw, 90px);
    aspect-ratio: 153 / 124;

    border: none;

    border-radius: 7px;

    background:
        linear-gradient(145deg,
            #777 0%,
            #333 45%,
            #111 100%);

    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.5);

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    color: white;

    transition:
        transform 0.15s ease,
        filter 0.15s ease,
        box-shadow 0.15s ease;
}


.control-button:hover {
    transform: scale(1.06);

    filter: brightness(1.2);

    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.6);
}


.control-button:active {
    transform: scale(0.95);
}


/* =========================================================
   POWER
========================================================= */

.power-icon {
    font-size: clamp(27px, 4vw, 42px);
    color: red;
    line-height: 1;

    transition:
        filter 0.25s ease,
        text-shadow 0.25s ease,
        opacity 0.25s ease;
}

.power-icon .material-symbols-outlined {
    display: block;
    font-size: clamp(36px, 5vw, 54px);
    line-height: 1;
    font-variation-settings: 'FILL'0, 'wght'400, 'GRAD'0, 'opsz'48;
}

.power-icon.on {
    text-shadow:
        0 0 4px red,
        0 0 10px red,
        0 0 18px rgba(255, 0, 0, 0.8);

    filter: brightness(1.4);

    opacity: 1;
}

.power-icon.off {
    text-shadow: none;

    filter: brightness(0.8);

    opacity: 0.75;
}


/* =========================================================
   FLECHAS
========================================================= */

.arrow {
    width: 0;
    height: 0;

    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
}


/* derecha */

.arrow-right {
    border-left: 27px solid white;
}


/* izquierda */

.arrow-left {
    border-right: 27px solid white;
}


/* =========================================================
   CH
========================================================= */

.channel-control {
    display: flex;

    align-items: center;

    gap: 12px;
}


.ch-text {
    color: white;

    font-family: var(--font-interface);

    font-size: clamp(14px, 2vw, 22px);
}


/* =========================================================
   TV APAGADA
========================================================= */

.tv-screen.off {
    filter: brightness(0);
}


/*
    Esto oscurece también el contenido HTML.

    La imagen y la pantalla desaparecen visualmente
    como una televisión apagada.
*/

.channel-1,
.channel-2 {
    isolation: isolate;
    overflow: hidden;
}

.channel-1 video,
.channel-2 video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    pointer-events: none;
}

.channel-1 .channel-title,
.channel-1 .link-list,
.channel-2 .link-list {
    position: relative;
    z-index: 1;
}

:where(.sib-form-message-panel) {
    display: none;
}

:where(.sib-form-message-panel .sib-notification__icon) {
    width: 20px;
    height: 20px;
}


#sib-container input:-ms-input-placeholder {
    font-family: Helvetica, sans-serif;
    text-align: left;
    color: #c0ccda;
}

#sib-container input::placeholder {
    font-family: Helvetica, sans-serif;
    text-align: left;
    color: #c0ccda;
}

#sib-container textarea::placeholder {
    font-family: Helvetica, sans-serif;
    text-align: left;
    color: #c0ccda;
}


#sib-container a {
    text-decoration: underline;
    color: #2BB2FC;
}


/* Contenedor del newsletter */
.channel-3 {
    isolation: isolate;
    overflow: hidden;
}

#newsletterForm {
    max-height: 100%;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* Fondo visible antes y después del registro */
#exclusiveContent {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

#newsletterForm .sib-form {
    background-color: transparent;
}

#sib-container #EMAIL {
    color: #222222;
    -webkit-text-fill-color: #222222;
    caret-color: #222222;
    background-color: #ffffff;
}

#sib-container #EMAIL::placeholder {
    color: #687585;
    -webkit-text-fill-color: #687585;
}

/* Cuando se complete el registro */
.channel-3.unlocked #newsletterForm {
    display: none;
}

.channel-3.unlocked #exclusiveContent {
    display: block;
}

/* El video llena la pantalla */
#exclusiveContent video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}



/* =========================================================
   RESPONSIVE
========================================================= */


/* TABLET */

@media (max-width: 900px) {

    .tv-system {
        width: min(700px, 90vw);

        flex-direction: column;

        gap: 20px;
    }

    .tv-wrapper {
        width: min(700px, 90vw);
    }

    .controls {
        flex-direction: row;

        width: 100%;
    }

    .channel-control {
        gap: 8px;
    }
}


/* MOVIL */

@media (max-width: 600px) {

    .tv-page {
        padding: 20px 12px;
    }

    .tv-system {
        width: 100%;

        gap: 18px;
    }

    .tv-wrapper {
        width: 100%;
    }

    .controls {
        gap: 8px;
    }

    .control-button {
        width: 58px;
    }

    .arrow-right {
        border-left-width: 21px;
        border-top-width: 12px;
        border-bottom-width: 12px;
    }

    .arrow-left {
        border-right-width: 21px;
        border-top-width: 12px;
        border-bottom-width: 12px;
    }

    .ch-text {
        font-size: 14px;
    }

}


/* =========================================================
   MOVIL MUY PEQUEÑO
========================================================= */

@media (max-width: 380px) {

    .control-button {
        width: 50px;
    }

    .channel-title {
        margin-bottom: 6%;
    }

    .link-list {
        gap: 9px;
    }

    .tv-link {
        font-size: 20px;
    }

}

/* Selector de contenido: columna en escritorio, fila en móvil. */
.remote-controls {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.content-controls {
    position: absolute;
    left: calc(100% + 14px);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.content-controls[hidden] {
    display: none;
}

.content-button {
    width: 48px;
    height: 44px;
    aspect-ratio: auto;
    border: 1px solid #777;
    border-radius: 8px;
    background: linear-gradient(145deg, #555, #252525 55%, #111);
    color: #ffe84a;
    font-family: var(--font-interface);
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 1px 3px #000;
}

.content-button[aria-pressed="true"] {
    border-color: #ffe84a;
    background: linear-gradient(145deg, #71652c, #302b17 55%, #18160d);
    box-shadow: inset 0 1px 2px #ffffff40, 0 0 8px #ffe84a40;
}

.content-button:focus-visible {
    outline: 2px solid #ffe84a;
    outline-offset: 3px;
}

.newsletter-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

#exclusiveContent img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

#exclusiveContent [hidden] {
    display: none;
}

.content-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    padding: 8%;
    background: #171717;
    color: #fff;
    font-family: Arial, sans-serif;
}

@media (max-width: 900px) {
    .remote-controls {
        width: 100%;
    }

    .content-controls {
        left: 50%;
        top: calc(100% + 14px);
        transform: translateX(-50%);
        flex-direction: row;
        gap: clamp(4px, 1vw, 8px);
    }

    .content-button {
        width: clamp(40px, 7vw, 48px);
    }
}

#pageBackground {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

#pageBackground video,
#pageBackground img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    display: block;
}

#pageBackground[hidden],
#pageBackground [hidden] {
    display: none;
}

#dvdScreensaver {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: #000;
}

#pageBackground #dvdScreensaverLogo {
    position: absolute;
    inset: auto;
    top: 0;
    left: 0;
    width: 200px;
    max-width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
    will-change: transform;
}

.tv-off #nextChannel,
.tv-off #previousChannel,
.tv-off #powerButton {
    filter: brightness(0.5);
    box-shadow: inset 0 1px 2px #ffffff20, 0 2px 4px #0008;
}

.tv-off #nextChannel,
.tv-off #previousChannel {
    cursor: default;
}

.tv-off #nextChannel:hover,
.tv-off #previousChannel:hover {
    transform: none;
}

/* Capa oscura mientras está activo el newsletter. */
.channel-3::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(0, 0, 0, 0.7);
    pointer-events: none;
}

.channel-3.unlocked::before {
    display: none;
}

#newsletterForm .sib-form-block,
#newsletterForm label,
#newsletterForm .sib-form-message-panel__inner-text {
    color: #fff !important;
}

#newsletterForm .consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}

#newsletterConsent {
    appearance: none;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    margin: 0;
    border: 1px solid #aaa;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

#newsletterConsent:checked {
    background: #fff;
    box-shadow: inset 0 0 0 4px #222;
}

#newsletterConsent:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

#newsletterForm .privacy-link {
    font-size: 12px;
    text-align: left;
    margin: 12px 0;
    color: #fff;
}

#sib-container .privacy-link a {
    color: #fff;
    text-decoration: underline;
}

#newsletterSubscribe:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

@media (max-width: 600px) {
    .channel-3 {
        padding: 3%;
    }

    #newsletterForm .sib-form {
        padding: 0;
    }

    #newsletterForm #sib-container {
        width: 100%;
        padding: 6px;
    }

    #newsletterForm .sib-form-block {
        padding-left: 0;
        padding-right: 0;
    }

    #sib-form>div {
        padding-top: 4px !important;
        padding-bottom: 4px !important;
    }

    #newsletterForm .newsletter-heading {
        font-size: 22px !important;
        line-height: 1.2;
    }

    #newsletterForm .newsletter-description {
        font-size: 12px !important;
        line-height: 1.35;
        margin-top: 4px !important;
    }

    #newsletterForm .entry__label {
        font-size: 13px !important;
        margin-bottom: 4px;
    }

    #newsletterForm .entry__field {
        margin-top: 0;
    }

    #sib-container #EMAIL {
        font-size: 16px;
        min-height: 40px;
    }

    #newsletterForm .consent-label {
        font-size: 12px;
        line-height: 1.35;
        gap: 8px;
    }

    #newsletterForm .privacy-link {
        font-size: 11px;
        line-height: 1.35;
        margin: 8px 0;
    }

    #newsletterForm .newsletter-actions {
        gap: 6px;
    }

    #newsletterSubscribe {
        min-height: 40px;
        padding: 8px 10px;
        font-size: 13px !important;
    }
}