
/* TIPOGRAFÍA ORIGINAL */

@font-face {
    font-family: 'HelveticaLocal';
    src: url('HelveticaNeue-Light_0.otf') format('opentype');
    font-weight: 300;
    font-display: swap;
}

/* PALETA DE COLORES */

:root {
    --fondo: #e5e8cd;
    --celeste: #87b5ff;
    --verde: #1b7765;
    --texto: #171717;
}

/* CONFIGURACIÓN GENERAL */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--fondo);
    color: var(--texto);
    font-family: 'HelveticaLocal', Helvetica, Arial, sans-serif;
    font-weight: 300;
    overflow-x: hidden;
}

/* PRIMERA PANTALLA */

.hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    background: var(--fondo);
    overflow: hidden;
}

/* FRANJA SUPERIOR */

.franja {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 11.1%;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
}

.franja div {
    background: var(--celeste);
    transform-origin: top;
}

.franja div:nth-child(2),
.franja div:nth-child(5) {
    background: var(--verde);
}

/* BIOGRAFÍA */

.biografia {
    position: absolute;
    top: 41.2%;
    left: 12.6%;
    width: 24.8%;
    font-size: clamp(16px, 1.63vw, 34px);
    line-height: 1.21;
    letter-spacing: -0.035em;
    z-index: 2;
}

/* LOGO BRI SANTOS */

.logo {
    position: absolute;
    top: 31.9%;
    left: 41.7%;
    width: 30.9%;
    z-index: 3;
}

.logo img {
    display: block;
    width: 100%;
    height: auto;
}

/* FOTOGRAFÍA */

.retrato {
    position: absolute;
    top: 39.8%;
    left: 68.55%;
    width: 18.4%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    z-index: 1;
}

.retrato img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ANIMACIÓN DE BLOQUES */

.animar .franja div {
    animation: bloques 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.franja div:nth-child(1) { animation-delay: 0.05s; }
.franja div:nth-child(2) { animation-delay: 0.15s; }
.franja div:nth-child(3) { animation-delay: 0.25s; }
.franja div:nth-child(4) { animation-delay: 0.35s; }
.franja div:nth-child(5) { animation-delay: 0.45s; }
.franja div:nth-child(6) { animation-delay: 0.55s; }

@keyframes bloques {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}

/* ANIMACIÓN DE BIOGRAFÍA */

.animar .biografia p {
    animation: aparecer 1.2s ease both;
}

.animar .biografia p:nth-child(1) {
    animation-delay: 0.65s;
}

.animar .biografia p:nth-child(2) {
    animation-delay: 0.95s;
}

@keyframes aparecer {
    from {
        opacity: 0;
        transform: translateY(25px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ANIMACIÓN DEL LOGO */

.animar .logo {
    animation: entradaLogo 1.4s
        cubic-bezier(0.22, 1, 0.36, 1) 0.4s both;
}

@keyframes entradaLogo {
    from {
        opacity: 0;
        transform: translateX(-65px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* REVELADO DE LA FOTOGRAFÍA */

.animar .retrato {
    animation: revelarFoto 1.4s
        cubic-bezier(0.22, 1, 0.36, 1) 0.6s both;
}

@keyframes revelarFoto {
    from {
        clip-path: inset(100% 0 0 0);
    }
    to {
        clip-path: inset(0 0 0 0);
    }
}

/* PANTALLAS DE FORMATO MENOS PANORÁMICO */

@media (min-width: 901px) and (max-aspect-ratio: 4/3) {

    .biografia {
        font-size: clamp(16px, 1.8vw, 26px);
        width: 29%;
        left: 8%;
    }

}

/* VERSIÓN PARA TABLETS Y CELULARES */

@media (max-width: 900px),
       (min-width: 901px) and (max-height: 600px) {

    .hero {
        min-height: 100svh;
        display: flex;
        flex-direction: column;
        padding: 120px 7% 65px;
    }

    .franja {
        height: 65px;
    }

    .logo {
        position: relative;
        top: auto;
        left: auto;
        width: 85%;
        order: 1;
        margin-bottom: -25px;
    }

    .retrato {
        position: relative;
        top: auto;
        left: auto;
        width: 65%;
        align-self: flex-end;
        order: 2;
    }

    .biografia {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        font-size: clamp(20px, 3.5vw, 27px);
        line-height: 1.25;
        margin-top: 40px;
        order: 3;
    }

}

/* ACCESIBILIDAD */

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

    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }

}


/* =====================================
   SEGUNDA SECCIÓN — LIBRO
===================================== */

/* TIPOGRAFÍAS */

@font-face {
    font-family: 'NeueHaas';
    src: url('NeueHaasDisplayMediu.ttf') format('truetype');
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: 'NeueHaas';
    src: url('NeueHaasDisplayRoman.ttf') format('truetype');
    font-weight: 400;
    font-display: swap;
}

/* COLORES DEL LIBRO */

:root {
    --libro-morado: #553e6a;
    --libro-amarillo: #F5D44A;
    --libro-crema: #FFF8D7;
}

/* CONTENEDOR PRINCIPAL */

.seccion-libro {
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    background: var(--libro-morado);
    color: var(--libro-amarillo);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;

    --parallax: 0px;
}

/* COMPOSICIÓN */

.libro-contenido {
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
}

/* TEXTO SUPERIOR */

.libro-subtitulo {
    position: absolute;
    top: 16.2%;
    left: 0;
    width: 100%;

    font-family: 'NeueHaas', Helvetica, sans-serif;
    font-weight: 500;
    font-size: clamp(19px, 1.8vw, 40px);
    line-height: 1.1;
    letter-spacing: -0.03em;
    text-align: center;

    transform: translateY(
        calc(var(--parallax) * 0.35)
    );

    will-change: transform;
}

/* LOGO ORIGINAL DEL LIBRO */

.libro-logo {
    position: absolute;
    top: 22.8%;
    left: 9%;
    width: 80%;

    transform: translateY(
        calc(var(--parallax) * 0.85)
    );

    will-change: transform;
}

.libro-logo img {
    display: block;
    width: 100%;
    height: auto;
}

/* POSICIÓN DEL BOTÓN */

.libro-accion {
    position: absolute;
    top: 75%;
    left: 0;
    width: 100%;
    text-align: center;

    transform: translateY(
        calc(var(--parallax) * 0.45)
    );

    will-change: transform;
}

/* DISEÑO DEL BOTÓN */

.libro-boton {
    background: var(--libro-crema);
    color: var(--libro-morado);

    font-family: 'NeueHaas', Helvetica, sans-serif;
    font-weight: 400;
    font-size: clamp(20px, 1.8vw, 36px);
    letter-spacing: -0.025em;

    border: 0;
    border-radius: 0;
    padding: 0.3em 0.45em;

    transition:
        background-color 0.35s ease,
        color 0.35s ease,
        transform 0.35s ease;
}

/* ESTADO TEMPORAL SIN ACCIÓN */

.libro-boton:disabled {
    opacity: 1;
    cursor: default;
}

/* HOVER PARA CUANDO ACTIVEMOS EL BOTÓN */

.libro-boton:not(:disabled):hover {
    background: var(--libro-amarillo);
    color: var(--libro-morado);
    transform: scale(1.05);
}

/* =====================================
   ANIMACIONES DE ENTRADA
===================================== */

.seccion-libro.preparada .libro-subtitulo,
.seccion-libro.preparada .libro-logo,
.seccion-libro.preparada .libro-accion {
    opacity: 0;
}

.seccion-libro.visible .libro-subtitulo {
    animation: libroAparecer 1s ease both;
}

.seccion-libro.visible .libro-logo {
    animation: libroRevelar 1.5s
        cubic-bezier(0.22, 1, 0.36, 1)
        0.15s both;
}

.seccion-libro.visible .libro-accion {
    animation: libroAparecer 1s
        ease 0.55s both;
}

@keyframes libroAparecer {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes libroRevelar {
    from {
        opacity: 0;
        clip-path: inset(100% 0 0 0);
    }

    to {
        opacity: 1;
        clip-path: inset(0 0 0 0);
    }
}

/* =====================================
   TABLETS Y CELULARES
===================================== */

@media (max-width: 900px),
       (max-height: 600px),
       (max-aspect-ratio: 4/3) {

    .libro-contenido {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;

        gap: clamp(35px, 6vh, 70px);
        padding: 70px 6%;
    }

    .libro-subtitulo {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        font-size: clamp(20px, 3.5vw, 30px);
    }

    .libro-logo {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
    }

    .libro-accion {
        position: relative;
        top: auto;
        left: auto;
    }

    .libro-boton {
        font-size: clamp(20px, 3vw, 28px);
    }
}

/* ACCESIBILIDAD */

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

    .libro-subtitulo,
    .libro-logo,
    .libro-accion {
        transform: none !important;
        opacity: 1 !important;
        clip-path: none !important;
        animation: none !important;
    }
}


/* =====================================
   LIBRO — VERSIÓN PARA CELULARES
===================================== */

.libro-logo picture {
    display: block;
    width: 100%;
}

@media (max-width: 600px) {

    .seccion-libro {
        min-height: 100svh;
        background: #553e6a;
    }

    .libro-contenido {
        position: relative;
        display: grid;

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

        align-items: center;
        justify-items: center;

        width: 100%;
        min-height: 100svh;

        padding: 15svh 5% 18svh;
        gap: 4svh;
    }

    /* TEXTO SUPERIOR */

    .libro-subtitulo {
        position: relative;
        top: auto;
        left: auto;

        width: 100%;

        font-family: 'NeueHaas', sans-serif;
        font-weight: 500;
        font-size: clamp(14px, 3.7vw, 24px);
        letter-spacing: -0.03em;
        line-height: 1.15;
        text-align: center;
    }

    /* LOGO VERTICAL */

    .libro-logo {
        position: relative;
        top: auto;
        left: auto;

        width: 100%;
        min-height: 0;
    }

    .libro-logo img {
        display: block;

        width: 100%;
        height: auto;
        max-height: 48svh;

        object-fit: contain;
    }

    /* POSICIÓN DEL BOTÓN */

    .libro-accion {
        position: relative;
        top: auto;
        left: auto;

        width: 100%;
        margin-top: 3svh;

        text-align: center;
    }

    /* BOTÓN */

    .libro-boton {
        font-family: 'NeueHaas', sans-serif;
        font-weight: 400;
        font-size: clamp(20px, 5.4vw, 32px);

        background: var(--libro-crema);
        color: var(--libro-morado);

        line-height: 1.1;
        letter-spacing: -0.025em;

        padding: 0.3em 0.4em;

        border: none;
        border-radius: 0;
    }
}


/* AUMENTAR LOGO VERTICAL EN CELULARES */

@media (max-width: 600px) {

    .libro-logo {
        width: 110%;
        max-width: none;
        flex-shrink: 0;
    }

    .libro-logo img {
        width: 100%;
        height: auto;
        max-height: 54svh;
        object-fit: contain;
    }

}

/* =====================================
   BOTÓN ACTIVO DEL LIBRO
===================================== */

.libro-boton,
.libro-boton:visited {
    display: inline-block;
    text-decoration: none;
    cursor: pointer;
    font-weight: 400;
    background: var(--libro-crema);
    color: var(--libro-morado);
}

/* EFECTO HOVER */

.libro-boton:not(:disabled):hover {
    background: var(--libro-amarillo);
    color: var(--libro-morado);
    font-weight: 500;
    text-decoration: none;
    transform: scale(1.05);
}

/* EFECTO AL HACER CLIC */

.libro-boton:active {
    transform: scale(0.97);
}
