/* =========================================================
   ARCHIVO 13 · INDEX
   ========================================================= */


/* =========================================================
   VARIABLES
   ========================================================= */

:root {
    --color-fondo: #020304;

    --color-texto: #ead9b7;
    --color-texto-suave: rgba(234, 217, 183, 0.72);

    --color-dorado: #c49a58;
    --color-dorado-claro: #e0bd7a;

    --transicion-rapida: 0.25s ease;
    --transicion-normal: 0.5s ease;

    --z-fondo: 1;
    --z-expedientes: 10;
    --z-tocadiscos: 20;
    --z-reproductor: 50;
    --z-modal: 100;
}


/* =========================================================
   RESET
   ========================================================= */

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

html {
    width: 100%;
    min-height: 100%;
}

body {
    width: 100%;
    min-height: 100vh;

    margin: 0;
    overflow: hidden;

    color: var(--color-texto);
    background: var(--color-fondo);

    font-family: Georgia, "Times New Roman", serif;
}

button,
input {
    font: inherit;
}

button {
    padding: 0;
    border: 0;
}

button,
input[type="range"] {
    cursor: pointer;
}

img {
    display: block;
    max-width: 100%;
}

[hidden] {
    display: none !important;
}


/* =========================================================
   ACCESIBILIDAD
   ========================================================= */

.visualmente-oculto {
    position: absolute;

    width: 1px;
    height: 1px;

    padding: 0;
    margin: -1px;

    overflow: hidden;

    clip: rect(0 0 0 0);
    clip-path: inset(50%);

    white-space: nowrap;

    border: 0;
}


/* =========================================================
   ESCENA PRINCIPAL

   Fondo original:
   1536 × 1024
   proporción 3 / 2
   ========================================================= */

.archivo {
    display: grid;
    place-items: center;

    width: 100vw;
    min-height: 100vh;

    overflow: hidden;

    background:
        radial-gradient(
            circle at center,
            #101015 0%,
            #040405 58%,
            #000 100%
        );
}

.archivo__escena {
    position: relative;

    width: min(100vw, 150vh);
    aspect-ratio: 3 / 2;

    overflow: hidden;

    isolation: isolate;

    background: #030405;
}


/* =========================================================
   FONDO
   ========================================================= */

.archivo__fondo {
    position: absolute;
    inset: 0;

    z-index: var(--z-fondo);

    width: 100%;
    height: 100%;

    object-fit: contain;

    pointer-events: none;
    user-select: none;
}


/* =========================================================
   EXPEDIENTES
   ========================================================= */

.archivo__expedientes {
    position: absolute;
    inset: 0;

    z-index: var(--z-expedientes);

    pointer-events: none;
}


/* ==========================
   ZONA INTERACTIVA
   ========================== */

.expediente {
    position: absolute;

    padding: 0;
    border: 0;

    background: transparent;

    pointer-events: auto;

    opacity: 0;

    transition:
        opacity var(--transicion-normal),
        background-color var(--transicion-normal),
        box-shadow var(--transicion-normal);
}


/* ==========================
   ARCHIVO I
   ========================== */

#expediente-1 {
    top: 28.2%;
    left: 62.1%;

    width: 4.4%;
    height: 12.5%;
}


/* ==========================
   ARCHIVO II
   ========================== */

#expediente-2 {
    top: 28.2%;
    left: 66.7%;

    width: 4.4%;
    height: 12.5%;
}


/* ==========================
   TEXTOS OCULTOS
   ========================== */

.expediente__numero,
.expediente__nombre,
.expediente__estado {
    position: absolute;

    width: 1px;
    height: 1px;

    padding: 0;
    margin: -1px;

    overflow: hidden;

    clip: rect(0 0 0 0);
    clip-path: inset(50%);

    white-space: nowrap;
}


/* ==========================
   BRILLO AL INTERACTUAR
   ========================== */

.expediente:hover,
.expediente:focus-visible {
    opacity: 1;

    background: rgba(224, 189, 122, 0.035);

    box-shadow:
        inset 0 0 10px rgba(255, 218, 145, 0.10),
        0 0 7px rgba(224, 189, 122, 0.12);

    outline: none;
}


/* =========================================================
   TOCADISCOS

   tocadiscos.png es un recorte del objeto original.
   Se coloca encima de su posición exacta en archivo.png.
   ========================================================= */

.tocadiscos {
    position: absolute;

    z-index: var(--z-tocadiscos);

    /* Zona clicable: plato del tocadiscos */
    left: 34%;
    top: 67%;

    width: 14%;
    height: 8%;

    padding: 0;
    border: 0;

    background: transparent;

    cursor: pointer;
}


/* ==========================
   IMAGEN
   ========================== */

.tocadiscos__imagen {
    position: absolute;
    inset: 0;

    z-index: var(--z-tocadiscos);
    
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;

    pointer-events: none;
    user-select: none;

    filter:
        brightness(1.10)
        drop-shadow(0 0 5px rgba(255, 211, 121, 0.42))
        drop-shadow(0 0 13px rgba(214, 159, 72, 0.22));

    animation:
        respiracion-tocadiscos
        3.5s
        ease-in-out
        infinite;
}


/* ==========================
   LUMINOSIDAD PERMANENTE
   ========================== */

@keyframes respiracion-tocadiscos {

    0%,
    100% {
        filter:
            brightness(1.08)
            drop-shadow(
                0 0 4px
                rgba(255, 211, 121, 0.34)
            )
            drop-shadow(
                0 0 11px
                rgba(214, 159, 72, 0.18)
            );
    }

    50% {
        filter:
            brightness(1.15)
            drop-shadow(
                0 0 7px
                rgba(255, 220, 143, 0.58)
            )
            drop-shadow(
                0 0 17px
                rgba(214, 159, 72, 0.30)
            );
    }

}


/* ==========================
   HOVER
   ========================== */

.tocadiscos:hover .tocadiscos__imagen,
.tocadiscos:focus-visible .tocadiscos__imagen {
    filter:
        brightness(1.20)
        drop-shadow(
            0 0 9px
            rgba(255, 224, 153, 0.78)
        )
        drop-shadow(
            0 0 22px
            rgba(219, 167, 79, 0.42)
        );
}

.tocadiscos:focus-visible {
    outline: none;
}


/* ==========================
   MIENTRAS SUENA LA MÚSICA
   ========================== */

.tocadiscos--reproduciendo .tocadiscos__imagen {
    animation:
        tocadiscos-reproduciendo
        2.6s
        ease-in-out
        infinite;
}

@keyframes tocadiscos-reproduciendo {

    0%,
    100% {
        filter:
            brightness(1.12)
            drop-shadow(
                0 0 6px
                rgba(255, 218, 138, 0.46)
            )
            drop-shadow(
                0 0 15px
                rgba(215, 158, 69, 0.25)
            );
    }

    50% {
        filter:
            brightness(1.20)
            drop-shadow(
                0 0 10px
                rgba(255, 224, 154, 0.72)
            )
            drop-shadow(
                0 0 24px
                rgba(220, 169, 80, 0.38)
            );
    }

}


/* =========================================================
   REPRODUCTOR
   ========================================================= */

.reproductor {
    position: absolute;

    z-index: var(--z-reproductor);

    left: 19%;
    bottom: 8%;

    width: min(31%, 430px);

    padding: 1rem 1.15rem;

    color: var(--color-texto);

    background:
        linear-gradient(
            145deg,
            rgba(31, 20, 12, 0.97),
            rgba(11, 8, 6, 0.97)
        );

    border: 1px solid rgba(196, 154, 88, 0.55);
    border-radius: 5px;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.82),
        0 0 22px rgba(196, 154, 88, 0.12),
        inset 0 0 18px rgba(224, 189, 122, 0.05);

    backdrop-filter: blur(6px);
}


/* ==========================
   CABECERA
   ========================== */

.reproductor__cabecera {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 1rem;

    margin-bottom: 0.8rem;
}

.reproductor__etiqueta {
    margin: 0;

    color: var(--color-texto-suave);

    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.reproductor__cerrar {
    width: 28px;
    height: 28px;

    color: rgba(234, 217, 183, 0.72);
    background: transparent;

    font-size: 1.35rem;
    line-height: 1;

    transition:
        color var(--transicion-rapida),
        transform var(--transicion-rapida);
}

.reproductor__cerrar:hover,
.reproductor__cerrar:focus-visible {
    color: var(--color-dorado-claro);

    transform: scale(1.1);

    outline: none;
}


/* ==========================
   INFORMACIÓN
   ========================== */

.reproductor__informacion {
    display: flex;
    align-items: baseline;
    justify-content: space-between;

    gap: 1rem;
}

.reproductor__titulo {
    margin: 0;

    font-size: clamp(0.9rem, 1.25vw, 1.1rem);
    font-style: italic;
}

.reproductor__contador {
    margin: 0;

    color: var(--color-texto-suave);

    font-size: 0.72rem;
}


/* ==========================
   CONTROLES
   ========================== */

.reproductor__controles {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 1rem;

    margin-top: 1rem;
}

.reproductor__control {
    display: grid;
    place-items: center;

    width: 34px;
    height: 34px;

    color: var(--color-texto);
    background: rgba(196, 154, 88, 0.08);

    border: 1px solid rgba(196, 154, 88, 0.35);
    border-radius: 50%;

    font-size: 1.25rem;

    transition:
        background-color var(--transicion-rapida),
        border-color var(--transicion-rapida),
        box-shadow var(--transicion-rapida),
        transform var(--transicion-rapida);
}

.reproductor__control--principal {
    width: 42px;
    height: 42px;

    font-size: 1rem;
}

.reproductor__control:hover,
.reproductor__control:focus-visible {
    background: rgba(196, 154, 88, 0.22);

    border-color: rgba(224, 189, 122, 0.75);

    box-shadow:
        0 0 12px rgba(224, 189, 122, 0.25);

    transform: scale(1.08);

    outline: none;
}


/* ==========================
   BARRA DE PROGRESO
   ========================== */

.reproductor__progreso {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;

    gap: 0.55rem;

    margin-top: 1rem;
}

.reproductor__tiempo {
    color: var(--color-texto-suave);

    font-size: 0.68rem;

    font-variant-numeric: tabular-nums;
}

.reproductor__barra {
    width: 100%;

    accent-color: var(--color-dorado);
}

/* =========================================================
   CONTROL DE VOLUMEN
   ========================================================= */

.reproductor__volumen {
    display: flex;
    align-items: center;

    gap: 0.65rem;

    margin-top: 0.85rem;
}

.reproductor__volumen-icono {
    flex-shrink: 0;

    color: var(--color-texto-suave);

    font-size: 0.82rem;
    line-height: 1;
}

.reproductor__volumen-barra {
    width: 100%;
    height: 4px;

    accent-color: var(--color-dorado);

    cursor: pointer;
}


/* =========================================================
   MODAL DEL ARCHIVO BLOQUEADO
   ========================================================= */

.bloqueo {
    position: fixed;
    inset: 0;

    z-index: var(--z-modal);

    display: grid;
    place-items: center;

    padding: 2rem;

    background:
        radial-gradient(
            circle at center,
            rgba(19, 15, 12, 0.45) 0%,
            rgba(0, 0, 0, 0.88) 72%
        );

    backdrop-filter: blur(5px);
}


/* ==========================
   CONTENIDO
   ========================== */

.bloqueo__contenido {
    position: relative;

    width: min(90vw, 690px);

    padding: clamp(2rem, 5vw, 3.4rem);

    color: var(--color-texto);

    background:
        linear-gradient(
            145deg,
            rgba(35, 24, 16, 0.97),
            rgba(11, 8, 7, 0.98)
        );

    border: 1px solid rgba(196, 154, 88, 0.5);
    border-radius: 6px;

    box-shadow:
        0 20px 70px rgba(0, 0, 0, 0.9),
        0 0 35px rgba(196, 154, 88, 0.14),
        inset 0 0 30px rgba(224, 189, 122, 0.045);

    text-align: center;

    animation:
        aparecer-bloqueo
        0.7s
        ease
        forwards;
}

@keyframes aparecer-bloqueo {

    from {
        opacity: 0;

        transform:
            scale(0.94)
            translateY(12px);
    }

    to {
        opacity: 1;

        transform:
            scale(1)
            translateY(0);
    }

}


/* ==========================
   BOTÓN CERRAR
   ========================== */

.bloqueo__cerrar {
    position: absolute;

    top: 0.85rem;
    right: 1rem;

    width: 34px;
    height: 34px;

    color: rgba(234, 217, 183, 0.62);
    background: transparent;

    font-size: 1.6rem;
    line-height: 1;

    transition:
        color var(--transicion-rapida),
        transform var(--transicion-rapida);
}

.bloqueo__cerrar:hover,
.bloqueo__cerrar:focus-visible {
    color: var(--color-dorado-claro);

    transform: scale(1.1);

    outline: none;
}


/* ==========================
   TEXTOS
   ========================== */

.bloqueo__archivo {
    margin: 0 0 0.9rem;

    color: var(--color-dorado);

    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.24em;
}

.bloqueo__titulo {
    margin: 0;

    color: #f0dfbd;

    font-size: clamp(1.65rem, 4vw, 2.7rem);
    font-weight: normal;
    line-height: 1.15;
}

.bloqueo__texto {
    width: min(100%, 510px);

    margin: 1.25rem auto 0;

    color: var(--color-texto-suave);

    font-size: clamp(0.9rem, 2vw, 1.1rem);
    line-height: 1.6;
}


/* =========================================================
   CUENTA ATRÁS
   ========================================================= */

.cuenta-atras {
    display: flex;
    align-items: flex-start;
    justify-content: center;

    gap: clamp(0.25rem, 1vw, 0.75rem);

    margin-top: 2.4rem;
}

.cuenta-atras__unidad {
    display: flex;
    flex-direction: column;
    align-items: center;

    min-width: clamp(52px, 11vw, 92px);
}

.cuenta-atras__numero {
    color: var(--color-dorado-claro);

    font-size: clamp(1.5rem, 4vw, 2.7rem);
    line-height: 1;

    font-variant-numeric: tabular-nums;

    text-shadow:
        0 0 10px
        rgba(224, 189, 122, 0.2);
}

.cuenta-atras__nombre {
    margin-top: 0.45rem;

    color: rgba(234, 217, 183, 0.58);

    font-size: clamp(0.52rem, 1.2vw, 0.72rem);

    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.cuenta-atras__separador {
    margin-top: 0.08rem;

    color: rgba(196, 154, 88, 0.55);

    font-size: clamp(1.35rem, 3.5vw, 2.3rem);
}


/* ==========================
   FECHA DE APERTURA
   ========================== */

.bloqueo__fecha {
    margin: 2rem 0 0;

    color: rgba(234, 217, 183, 0.52);

    font-size: 0.78rem;
    font-style: italic;
}


/* =========================================================
   PANTALLAS PEQUEÑAS
   ========================================================= */

@media (max-width: 700px) {

    .reproductor {
        left: 50%;
        bottom: 4%;

        width: min(88%, 420px);

        transform: translateX(-50%);
    }


    .bloqueo {
        padding: 1rem;
    }


    .bloqueo__contenido {
        padding:
            2.8rem
            1.25rem
            2rem;
    }


    .cuenta-atras {
        gap: 0.15rem;
    }


    .cuenta-atras__unidad {
        min-width: 54px;
    }

}


/* =========================================================
   MOVIMIENTO REDUCIDO
   ========================================================= */

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

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;

        transition-duration: 0.01ms !important;
    }

}