/* ==========================================================================
   KP New Website Popup – Frontend Styles
   Fullscreen bg image behind overlay, no close button.
   ========================================================================== */

/* ---------- Overlay ---------- */
.kp-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.65);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex;
    align-items: safe center;
    justify-content: center;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 40px 16px;
}

/* Fullscreen background image variant */
.kp-popup-overlay--has-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #0d1c38;
}

.kp-popup-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

/* Kill page scroll when popup is open */
html.kp-popup-open,
html.kp-popup-open body,
html.lenis.kp-popup-open,
html.lenis.kp-popup-open body {
    overflow: hidden !important;
    height: 100% !important;
}

.kp-popup-overlay {
    isolation: isolate;
    touch-action: auto !important;
}

/* ---------- Popup container ---------- */
.kp-popup {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 35.125rem;
    flex-shrink: 0;
    box-sizing: border-box;
    position: relative;
    animation: kpPopupSlideIn 0.35s ease forwards;
}

@keyframes kpPopupSlideIn {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

/* ---------- Body ---------- */
.kp-popup__body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background-color: #0d1c38;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    padding: 0;
    min-height: 0;
}

/* ---------- Content area ---------- */
.kp-popup__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px;
    padding: 48px 48px 64px;
    width: 100%;
}

/* ---------- Text block ---------- */
.kp-popup__text-block {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}

/* ---------- Heading ---------- */
.kp-popup__heading {
    color: #ffffff;
    text-align: center;
    font-family: "sofia-pro", sans-serif;
    font-size: 48px;
    line-height: 1.2;
    font-weight: 400;
    margin: 0;
    padding: 0;
    text-transform: none;
}

/* ---------- Description ---------- */
.kp-popup__description {
    color: #ffffff;
    text-align: center;
    font-family: "acumin-pro", sans-serif;
    font-size: 20px;
    line-height: 1.5;
    font-weight: 400;
}

.kp-popup__description p {
    margin: 0 0 1em;
}

.kp-popup__description p:last-child {
    margin-bottom: 0;
}

/* ---------- Actions ---------- */
.kp-popup__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

/* ---------- CTA Button ---------- */
.kp-popup__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 56px;
    padding: 16px 32px;
    background: #ffffff;
    color: #0d1c38 !important;
    font-family: "acumin-pro", sans-serif;
    font-size: 16px;
    line-height: 150%;
    font-weight: 400;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.kp-popup__button:hover,
.kp-popup__button:focus-visible,
.kp-popup__button:active {
    background: rgba(255, 255, 255, 0.85);
    color: #0d1c38 !important;
    text-decoration: none !important;
}

.kp-popup__button-arrow {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.kp-popup__button:hover .kp-popup__button-arrow,
.kp-popup__button:focus-visible .kp-popup__button-arrow {
    transform: translateX(4px);
}

.kp-popup__button-arrow svg {
    width: 8px;
    height: auto;
    display: block;
}

/* ---------- Secondary link ---------- */
.kp-popup__secondary-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    font-family: "acumin-pro", sans-serif;
    font-size: 16px;
    line-height: 150%;
    font-weight: 400;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.kp-popup__secondary-link:hover,
.kp-popup__secondary-link:focus-visible {
    opacity: 0.75;
    color: #ffffff;
}

.kp-popup__secondary-link:hover .kp-popup__button-arrow,
.kp-popup__secondary-link:focus-visible .kp-popup__button-arrow {
    transform: translateX(4px);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Tablet */
@media (max-width: 768px) {
    .kp-popup {
        max-width: 100%;
    }

    .kp-popup__content {
        padding: 32px 24px 40px;
        gap: 32px;
    }

    .kp-popup__heading {
        font-size: 32px;
    }

    .kp-popup__description {
        font-size: 16px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .kp-popup-overlay {
        padding: 24px 16px;
    }

    .kp-popup__content {
        padding: 24px 16px 32px;
        gap: 24px;
    }

    .kp-popup__heading {
        font-size: 26px;
    }

    .kp-popup__description {
        font-size: 15px;
    }

    .kp-popup__button {
        height: 48px;
        padding: 12px 24px;
        font-size: 15px;
        width: 100%;
    }

    .kp-popup__body {
        padding: 0;
    }

    .kp-popup[data-mobile-image="hide"] .kp-popup__body {
        background-image: none !important;
    }
}
