/* ==========================================================================
   BILLY PAGÁN · SITIO OFICIAL
   musica.css
   PÁGINA · MÚSICA
   ========================================================================== */


/* ==================================================
   PÁGINA MÚSICA · FONDO
================================================== */

.pagina-musica {
    position: relative;

    min-height: 100vh;

    color: var(--color-texto);

    background:
        url("../../images/fondos/escritorio/fondo-general-desktop.jpg")
        center center / cover
        no-repeat;

    background-attachment: fixed;
}


.pagina-musica::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.08),
            rgba(255, 255, 255, 0.02)
        );
}


.musica-hero {
    position: relative;
    z-index: 1;

    width: 100%;
    min-height: 100vh;
    padding-bottom: 60px;
}


/* ==================================================
   CONTENIDO MÚSICA
================================================== */

.musica-contenido {
    display: block;
    width: 100%;
}


/* ==================================================
   TÍTULO MÚSICA
================================================== */

.musica-titulo {
    padding: 40px 20px 30px;
    text-align: center;
}


.musica-titulo h1 {
    margin: 0;
    padding: 0;

    font-family: "Cormorant Garamond", serif;
    font-size: clamp(2rem, 4.5vw, 2.8rem);
    line-height: 0.96;
    font-weight: 500;
    letter-spacing: 0.04em;

    color: var(--color-texto);
    text-shadow: 0 0.08em 0 rgba(255, 255, 255, 0.12);
}


/* ==================================================
   DISCOGRAFÍA
================================================== */

.discografia {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px 100px;
}


/* ==================================================
   CARRUSEL
================================================== */

.discografia-carrusel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    margin: 20px auto 50px;

    overflow: hidden;
}


/*
   Zona visible del carrusel.
   Las portadas se posicionan mediante JavaScript.
*/

.discografia-portadas {
    position: relative;

    width: min(950px, calc(100% - 100px));
    height: 430px;

    overflow: hidden;
}


/* ==================================================
   PORTADAS
================================================== */

.disco-portada {
    position: absolute;
    top: 50%;
    left: 50%;

    width: 250px;

    cursor: pointer;

    text-align: center;

    opacity: 0;

    transform:
        translate(-50%, -50%)
        translateX(0)
        scale(0.72);

    transition:
        transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
        opacity 0.55s ease,
        filter 0.7s ease;

    will-change: transform, opacity;

    z-index: 1;
}


/*
   DISCO CENTRAL
*/

.disco-portada.posicion-central {
    opacity: 1;

    transform:
        translate(-50%, -50%)
        translateX(0)
        scale(1);

    z-index: 3;

    filter: none;
}


/*
   DISCO IZQUIERDO
*/

.disco-portada.posicion-izquierda {
    opacity: 0.42;

    transform:
        translate(-50%, -50%)
        translateX(-285px)
        scale(0.78);

    z-index: 2;

    filter: saturate(0.75) brightness(0.9);
}


/*
   DISCO DERECHO
*/

.disco-portada.posicion-derecha {
    opacity: 0.42;

    transform:
        translate(-50%, -50%)
        translateX(285px)
        scale(0.78);

    z-index: 2;

    filter: saturate(0.75) brightness(0.9);
}


/*
   PORTADAS FUERA DEL ÁREA VISIBLE
*/

.disco-portada.posicion-oculta-izquierda {
    opacity: 0;

    transform:
        translate(-50%, -50%)
        translateX(-560px)
        scale(0.65);

    z-index: 0;
}


.disco-portada.posicion-oculta-derecha {
    opacity: 0;

    transform:
        translate(-50%, -50%)
        translateX(560px)
        scale(0.65);

    z-index: 0;
}


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

.disco-portada img {
    display: block;

    width: 250px;
    height: 250px;

    object-fit: cover;

    border-radius: 8px;

    box-shadow:
        0 12px 35px rgba(0, 0, 0, 0.25);

    transition:
        box-shadow 0.7s ease,
        transform 0.25s ease;
}


.disco-portada:hover img {
    transform: translateY(-2px);
}


.disco-portada.posicion-central img {
    box-shadow:
        0 20px 45px rgba(0, 0, 0, 0.28);
}


/* ==================================================
   TÍTULO
================================================== */

.disco-portada-titulo {
    margin-top: 15px;

    text-align: center;

    font-family: "Cormorant Garamond", serif;
    font-size: clamp(1.1rem, 1.8vw, 1.3rem);
    line-height: 1.2;
    letter-spacing: 0.05em;

    transition:
        opacity 0.5s ease,
        transform 0.6s ease;
}


.disco-portada-anio {
    display: block;

    margin-top: 4px;

    font-family: "Montserrat", sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.15em;

    opacity: 0.65;

    transition:
        opacity 0.5s ease;
}


/*
   Los datos de las portadas laterales
   se muestran ligeramente atenuados.
*/

.disco-portada.posicion-izquierda .disco-portada-titulo,
.disco-portada.posicion-derecha .disco-portada-titulo {
    opacity: 0.7;
}


.disco-portada.posicion-izquierda .disco-portada-anio,
.disco-portada.posicion-derecha .disco-portada-anio {
    opacity: 0.4;
}


/* ==================================================
   HOVER SOBRE PORTADAS LATERALES
================================================== */

.disco-portada.posicion-izquierda:hover,
.disco-portada.posicion-derecha:hover {
    opacity: 0.75;
}


/* ==================================================
   FLECHAS
================================================== */

.discografia-flecha {
    position: absolute;
    top: 50%;
    z-index: 10;

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

    width: 45px;
    height: 45px;

    padding: 0;

    border: none;
    background: transparent;

    color: var(--color-texto);

    font-family: "Cormorant Garamond", serif;
    font-size: 3rem;
    font-weight: 400;
    line-height: 1;

    cursor: pointer;

    transform: translateY(-50%);

    opacity: 0.8;

    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        text-shadow 0.25s ease;
}


.discografia-flecha:hover {
    opacity: 0.5;

    transform:
        translateY(-50%)
        scale(1.08);

    text-shadow: 0 0.1em 0.4em rgba(0, 0, 0, 0.12);
}


.discografia-flecha:focus-visible {
    outline: 1px solid currentColor;
    outline-offset: 4px;
}


.discografia-flecha-anterior {
    left: 0;
}


.discografia-flecha-siguiente {
    right: 0;
}


/* ==================================================
   INFORMACIÓN DEL DISCO
================================================== */

.disco-informacion {
    max-width: 900px;
    margin: 0 auto 60px;
    padding: 35px 24px;

    border-top: 1px solid rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);

    background: rgba(255, 255, 255, 0.06);

    text-align: center;

    opacity: 1;
    transform: translateY(0);

    transition:
        opacity 0.35s ease,
        transform 0.45s ease;
}


.disco-informacion.cambiando {
    opacity: 0;
    transform: translateY(12px);
}


.disco-informacion h2 {
    margin: 0;

    font-family: "Cormorant Garamond", serif;
    font-size: clamp(2rem, 3.5vw, 2.7rem);
    font-weight: 500;
    letter-spacing: 0.04em;
}


.disco-informacion-meta {
    margin-top: 8px;

    font-family: "Montserrat", sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;

    opacity: 0.65;
}


.disco-informacion-descripcion {
    max-width: 700px;

    margin: 25px auto 0;

    font-family: "Montserrat", sans-serif;
    font-size: 0.9rem;
    line-height: 1.8;
    font-weight: 300;
}


.disco-creditos-generales {
    max-width: 700px;

    margin: 30px auto 0;

    text-align: left;
}


.disco-creditos-generales h3 {
    margin-bottom: 15px;

    font-family: "Cormorant Garamond", serif;
    font-size: 1.5rem;
    font-weight: 500;
}


.disco-creditos-generales p {
    margin: 5px 0;

    font-family: "Montserrat", sans-serif;
    font-size: 0.78rem;
    line-height: 1.7;
}


/* ==================================================
   BOTÓN TIENDA
================================================== */

.disco-tienda {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-top: 30px;
    padding: 12px 28px;

    border: 1px solid currentColor;
    border-radius: 999px;

    text-decoration: none;

    font-family: "Montserrat", sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease;
}


.disco-tienda:hover {
    background: currentColor;
    color: white;
    transform: translateY(-1px);
}


/* ==================================================
   TRACKLIST
================================================== */

.disco-tracklist {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 0 10px;

    background: rgba(255, 255, 255, 0.03);

    animation:
        aparecerContenido 0.55s ease both;
}


.disco-tracklist h2 {
    margin-bottom: 25px;

    font-family: "Cormorant Garamond", serif;
    font-size: 2rem;
    font-weight: 500;
}


.track {
    display: grid;

    grid-template-columns: 45px 1fr auto;
    gap: 20px;

    align-items: start;

    min-height: 65px;
    padding: 15px 0;

    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}


.track-numero {
    font-family: "Montserrat", sans-serif;
    font-size: 0.7rem;

    opacity: 0.5;

    padding-top: 2px;
}


.track-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}


.track-titulo {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.3rem;
    font-weight: 500;
}


.track-detalles {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;

    font-family: "Montserrat", sans-serif;
    font-size: 0.7rem;

    opacity: 0.7;
}


.track-duracion {
    display: block;
}


.track-duracion::before {
    content: "• ";
    margin-right: 6px;
}


.track-autor {
    display: block;
}


.track-autor::before {
    content: "Autor: ";
    font-weight: 500;
}


.track-opciones {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;

    justify-content: flex-end;
}


.track-opcion {
    padding: 5px 0;

    border: none;
    background: transparent;

    font-family: "Montserrat", sans-serif;
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;

    cursor: pointer;

    opacity: 0.6;

    transition:
        opacity 0.2s ease;
}


.track-opcion:hover {
    opacity: 1;
}


/* ==================================================
   PANEL DE CANCIÓN
================================================== */

.cancion-panel {
    position: relative;

    max-width: 900px;

    margin: 70px auto 0;
    padding: 45px;

    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.08);

    animation:
        aparecerPanel 0.5s ease both;
}


.cancion-panel-cerrar {
    position: absolute;

    top: 15px;
    right: 20px;

    border: none;
    background: transparent;

    font-size: 1.8rem;
    font-weight: 300;

    cursor: pointer;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}


.cancion-panel-cerrar:hover {
    opacity: 0.55;

    transform: rotate(90deg);
}


.cancion-panel-cabecera {
    margin-bottom: 30px;
}


.cancion-panel-numero {
    display: block;

    margin-bottom: 5px;

    font-family: "Montserrat", sans-serif;
    font-size: 0.65rem;
    letter-spacing: 0.15em;

    opacity: 0.55;
}


.cancion-panel-cabecera h2 {
    margin: 0;

    font-family: "Cormorant Garamond", serif;
    font-size: 2.5rem;
    font-weight: 500;
}


/* ==================================================
   MENÚ DE CANCIÓN
================================================== */

.cancion-panel-menu {
    display: flex;
    gap: 25px;

    margin-bottom: 30px;

    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}


.cancion-panel-opcion {
    padding: 12px 0;

    border: none;
    border-bottom: 1px solid transparent;

    background: transparent;

    font-family: "Montserrat", sans-serif;
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;

    cursor: pointer;

    opacity: 0.6;

    transition:
        opacity 0.2s ease,
        border-color 0.2s ease;
}


.cancion-panel-opcion:hover {
    opacity: 0.8;
}


.cancion-panel-opcion.activo {
    opacity: 1;
    border-bottom-color: currentColor;
}


/* ==================================================
   LETRA
================================================== */

.letra-contenido {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.2rem;
    line-height: 2;

    animation:
        aparecerContenido 0.4s ease both;
}


.letra-contenido p {
    margin: 0 0 20px 0;

    white-space: pre-line;
}


.letra-contenido p:last-child {
    margin-bottom: 0;
}


/* ==================================================
   ACORDES
================================================== */

.acordes-contenido {
    font-family: "Courier New", monospace;
    font-size: 0.95rem;
    line-height: 1.9;

    white-space: pre-wrap;

    animation:
        aparecerContenido 0.4s ease both;
}


.acorde {
    font-weight: 700;
    color: var(--color-texto);
}


/* ==================================================
   CRÉDITOS DE CANCIÓN
================================================== */

.creditos-cancion {
    font-family: "Montserrat", sans-serif;
    font-size: 0.8rem;
    line-height: 1.9;

    animation:
        aparecerContenido 0.4s ease both;
}


.creditos-cancion p {
    margin: 0 0 10px 0;

    padding-left: 20px;
}


.creditos-cancion p:last-child {
    margin-bottom: 0;
}


/* ==================================================
   ANIMACIONES GENERALES
================================================== */

@keyframes aparecerContenido {

    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}


@keyframes aparecerPanel {

    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}


/* ==================================================
   ACCESIBILIDAD · REDUCIR MOVIMIENTO
================================================== */

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

    .disco-portada,
    .disco-portada img,
    .disco-portada-titulo,
    .disco-portada-anio,
    .disco-informacion,
    .discografia-flecha,
    .cancion-panel,
    .letra-contenido,
    .acordes-contenido,
    .creditos-cancion {
        transition: none !important;
        animation: none !important;
    }

}


/* ==================================================
   RESPONSIVE
================================================== */

@media (max-width: 900px) {

    .discografia-portadas {
        width: calc(100% - 90px);
    }

    .disco-portada.posicion-izquierda {
        transform:
            translate(-50%, -50%)
            translateX(-230px)
            scale(0.72);
    }

    .disco-portada.posicion-derecha {
        transform:
            translate(-50%, -50%)
            translateX(230px)
            scale(0.72);
    }

}


@media (max-width: 700px) {

    .musica-titulo {
        padding: 35px 15px 25px;
    }

    .musica-titulo h1 {
        font-size: clamp(1.8rem, 4.5vw, 2.5rem);
    }

    .discografia {
        padding-left: 15px;
        padding-right: 15px;
    }


    .discografia-carrusel {
        margin-top: 20px;
    }


    .discografia-portadas {
        width: calc(100% - 55px);
        height: 350px;
    }


    .disco-portada {
        width: 220px;
    }


    .disco-portada img {
        width: 220px;
        height: 220px;
    }


    .disco-portada.posicion-izquierda {
        transform:
            translate(-50%, -50%)
            translateX(-180px)
            scale(0.68);
    }


    .disco-portada.posicion-derecha {
        transform:
            translate(-50%, -50%)
            translateX(180px)
            scale(0.68);
    }


    .disco-portada.posicion-oculta-izquierda {
        transform:
            translate(-50%, -50%)
            translateX(-360px)
            scale(0.6);
    }


    .disco-portada.posicion-oculta-derecha {
        transform:
            translate(-50%, -50%)
            translateX(360px)
            scale(0.6);
    }


    .disco-portada-titulo {
        font-size: 1.08rem;
    }


    .discografia-flecha {
        width: 30px;
        height: 40px;

        font-size: 2.3rem;
    }


    .disco-informacion {
        margin-bottom: 45px;
        padding: 30px 10px;
    }


    .disco-informacion h2 {
        font-size: 2rem;
    }


    .disco-informacion-descripcion {
        padding: 0 10px;
    }


    .track {
        grid-template-columns: 35px 1fr;
        gap: 12px;
    }


    .track-opciones {
        grid-column: 1 / -1;
        margin-top: 8px;
        justify-content: flex-start;
    }


    .cancion-panel {
        padding: 30px 20px;
    }


    .cancion-panel-cabecera h2 {
        font-size: 2rem;
    }


    .cancion-panel-menu {
        gap: 18px;
        overflow-x: auto;
    }

}
