@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=Playfair+Display:wght@400;500;600&display=swap');

:root {
    --fondo: #f3efe7;
    --tinta: #292722;
    --secundario: #777064;
    --papel: #e5ded1;
    --pintura: #c5a17e;
}

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

body {
    background: var(--fondo);
    color: var(--tinta);
    font-family: 'DM Sans', sans-serif;
}

.hall {
    max-width: 1440px;
    min-height: 100vh;
    margin: auto;
    padding: 65px 7%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.presentacion {
    max-width: 760px;
    margin: 0 auto 65px;
    text-align: center;
}

.identidad {
    font-size: 12px;
    letter-spacing: 5px;
    margin-bottom: 27px;
    color: var(--secundario);
}

.presentacion h1 {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: clamp(42px, 5vw, 68px);
    line-height: 1.12;
    margin-bottom: 25px;
}

.introduccion {
    color: var(--secundario);
    font-size: 16px;
    line-height: 1.8;
}

.espacios {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.espacio {
    min-height: 390px;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 42px;
    overflow: hidden;
    text-decoration: none;
    color: white;
    transition: transform 0.35s ease;
}

.espacio:hover {
    transform: translateY(-5px);
}

.literatura {
    background:
        linear-gradient(0deg, rgba(20,18,16,.88), rgba(20,18,16,.12)),
        linear-gradient(135deg, #6d6255, #b5a58e);
}

.pintura {
    background:
        linear-gradient(0deg, rgba(20,18,16,.85), rgba(20,18,16,.08)),
        linear-gradient(135deg, #a75e3f, #d5aa79);
}

.contenido-espacio {
    max-width: 390px;
}

.numero {
    display: block;
    font-size: 12px;
    letter-spacing: 3px;
    margin-bottom: 20px;
    opacity: .8;
}

.contenido-espacio h2 {
    font-family: 'Playfair Display', serif;
    font-size: 43px;
    font-weight: 400;
    margin-bottom: 13px;
}

.contenido-espacio p {
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255,255,255,.88);
    margin-bottom: 27px;
}

.entrada {
    display: inline-block;
    font-size: 12px;
    letter-spacing: 1px;
    padding-bottom: 7px;
    border-bottom: 1px solid rgba(255,255,255,.7);
}

.pie {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 55px;
    color: var(--secundario);
    font-size: 10px;
    letter-spacing: 2px;
}

.pie a {
    color: inherit;
    text-decoration: none;
    letter-spacing: 0;
    font-size: 12px;
}

@media (max-width: 760px) {
    .hall {
        padding: 55px 6%;
    }

    .presentacion {
        margin-bottom: 42px;
    }

    .espacios {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .espacio {
        min-height: 310px;
        padding: 30px;
    }

    .contenido-espacio h2 {
        font-size: 36px;
    }

    .pie {
        margin-top: 35px;
    }
}

/* Ajustes de identidad y composición del hall */

.hall {
    min-height: 100vh;
    height: 100svh;
    padding: 28px 7% 20px;
    justify-content: space-between;
}

.presentacion {
    margin: 0 auto 20px;
}

.identidad {
    font-size: clamp(25px, 3.2vw, 40px);
    font-weight: 500;
    letter-spacing: 5px;
    margin-bottom: 2px;
    color: var(--tinta);
}

.apellido {
    font-size: 22px;
    letter-spacing: 5px;
    color: #a49d91;
    margin-bottom: 13px;
}

.presentacion h1 {
    font-size: clamp(22px, 2.3vw, 30px);
    line-height: 1.2;
    margin-bottom: 0;
    font-weight: 400;
}

.espacios {
    flex: 1;
    min-height: 0;
    max-height: 430px;
}

.espacio {
    min-height: 0;
    height: 100%;
}

.pie {
    margin-top: 16px;
}

@media (max-width: 760px) {
    .hall {
        height: auto;
        min-height: 100svh;
        padding: 30px 6% 20px;
    }

    .presentacion {
        margin-bottom: 25px;
    }

    .identidad {
        font-size: 27px;
    }

    .presentacion h1 {
        font-size: 23px;
    }

    .espacios {
        flex: initial;
        max-height: none;
    }

    .espacio {
        min-height: 240px;
    }

    .pie {
        margin-top: 20px;
    }
}


/* Retrato central y alineación de las dos ventanas */
.espacios {
    position: relative;
}

.contenido-espacio {
    max-width: 42%;
    position: relative;
    z-index: 2;
}

.pintura .contenido-espacio {
    margin-left: auto;
    text-align: right;
}

.retrato-central {
    position: absolute;
    z-index: 3;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    height: 100%;
    width: auto;
    max-width: 32%;
    object-fit: contain;
    pointer-events: none;
}

@media (max-width: 760px) {
    .contenido-espacio {
        max-width: 100%;
    }

    .retrato-central {
        position: relative;
        display: block;
        left: auto;
        top: auto;
        transform: none;
        width: min(72%, 260px);
        height: auto;
        max-width: none;
        margin: -8px auto;
        grid-column: 1;
    }
}
