/* START: Esperit popup */
.esperit-popup {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .4s ease, visibility 0s linear .4s;
}

.esperit-popup.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity .4s ease, visibility 0s linear 0s;
}

.esperit-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    cursor: pointer;
}

/* Caja: todas las medidas en cqw (% del ancho de la caja) para clavar el diseño */
.esperit-popup__box {
    position: relative;
    container-type: inline-size;
    width: min(1100px, 100%);
    max-height: 100%;
    overflow-y: auto;
    background: var(--white);
    color: var(--black);
    font-family: var(--family);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4.4cqw 6cqw 3.2cqw;
    transform: translateY(20px);
    transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}

.esperit-popup.is-open .esperit-popup__box {
    transform: none;
}

.esperit-popup__close {
    position: absolute;
    top: 1.8cqw;
    right: 1.8cqw;
    width: 4.4cqw;
    height: 4.4cqw;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.esperit-popup__close svg {
    display: block;
    width: 100%;
    height: 100%;
    stroke: var(--black);
    stroke-width: 1.5;
    vector-effect: non-scaling-stroke;
    fill: none;
}

.esperit-popup__close svg path {
    vector-effect: non-scaling-stroke;
}

/* Logo */
.esperit-popup__logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}

.esperit-popup__logo img {
    display: block;
    width: 23cqw;
    height: auto;
}

.esperit-popup__logo-name {
    font-family: "EsperitRoca", var(--family);
    font-size: 3cqw;
    text-transform: uppercase;
}

.esperit-popup__logo-sub {
    margin-top: .6cqw;
    font-size: .8cqw;
    text-transform: uppercase;
    letter-spacing: .02em;
}

/* Contenido */
.esperit-popup__content {
    margin: 4.5cqw 0 5cqw;
}

.esperit-popup__subtitle {
    font-size: 2.7cqw;
    line-height: 1.2;
    margin-bottom: 1.2cqw;
}

.esperit-popup__title {
    font-weight: inherit;
    font-size: 6.2cqw;
    line-height: 1.12;
    text-transform: uppercase;
    letter-spacing: -.005em;
}

.esperit-popup__title u,
.esperit-popup__title span {
    display: block;
}

.esperit-popup__title u {
    text-decoration-line: underline;
    text-decoration-thickness: .1em;
    text-decoration-thickness: max(2px, .06em);
    text-underline-offset: .1em;
}

/* Botón */
.esperit-popup__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 29cqw;
    padding: 1.7cqw 3.5cqw;
    border: 1px solid var(--black);
    color: var(--black);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 2.6cqw;
    line-height: 1;
    transition: background-color .3s ease, color .3s ease;
}

.esperit-popup__button:hover,
.esperit-popup__button:focus-visible {
    background: var(--black);
    color: var(--white);
}

.esperit-popup__button-short {
    display: none;
}

/* Móvil: formato vertical (ref. 1600×2000) */
@media (max-width: 767px) {
    .esperit-popup__box {
        width: 100%;
        min-height: min(125vw, 100%);
        padding: 11cqw 6cqw 13cqw;
        justify-content: space-between;
    }

    .esperit-popup__close {
        top: 4.3cqw;
        right: 4cqw;
        width: 7.8cqw;
        height: 7.8cqw;
    }

    .esperit-popup__logo img {
        width: 40cqw;
    }

    .esperit-popup__logo-name {
        font-size: 5.3cqw;
    }

    .esperit-popup__logo-sub {
        margin-top: 1.4cqw;
        font-size: 1.4cqw;
    }

    .esperit-popup__content {
        margin: 10cqw 0;
    }

    .esperit-popup__subtitle {
        font-size: 4.4cqw;
        margin-bottom: 4.5cqw;
    }

    .esperit-popup__title {
        font-size: 9.8cqw;
        line-height: 1.13;
    }

    .esperit-popup__button {
        min-width: 51cqw;
        padding: 3.4cqw 4cqw;
        font-size: 4.4cqw;
    }

    .esperit-popup__button-long {
        display: none;
    }

    .esperit-popup__button-short {
        display: inline;
    }
}

html.esperit-popup-lock,
html.esperit-popup-lock body {
    overflow: hidden;
}
/* END: Esperit popup */
