.home-popup[hidden] {
    display: none;
}

.home-popup {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 20px;
}

.home-popup-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 18, 45, 0.62);
    backdrop-filter: blur(3px);
    animation: homePopupFade .25s ease both;
}

.home-popup-card {
    position: relative;
    width: min(560px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 40px 90px -30px rgba(7, 18, 45, 0.7);
    animation: homePopupIn .3s cubic-bezier(.22, 1, .36, 1) both;
}

.home-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #0d2456;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 18px -8px rgba(0, 0, 0, 0.5);
}

.home-popup-close:hover,
.home-popup-close:focus-visible {
    background: #0d2456;
    color: #fff;
}

.home-popup-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 60vh;
    object-fit: cover;
    border-radius: 24px 24px 0 0;
}

.home-popup-copy {
    padding: 24px 26px 28px;
}

.home-popup-copy h2 {
    margin: 0 0 10px;
    padding-right: 28px;
    color: #0d2456;
    font-family: Manrope, Inter, sans-serif;
    font-size: clamp(22px, 3vw, 28px);
    font-weight: 800;
    line-height: 1.15;
}

.home-popup-text {
    color: #43536e;
    font-size: 15.5px;
    line-height: 1.65;
}

.home-popup-text > :first-child {
    margin-top: 0;
}

.home-popup-text p,
.home-popup-text ul,
.home-popup-text ol {
    margin: 0 0 12px;
}

.home-popup-text ul,
.home-popup-text ol {
    padding-left: 22px;
}

.home-popup-text a {
    color: #245db5;
    text-decoration: underline;
}

.home-popup-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    padding: 12px 24px;
    border-radius: 999px;
    background: #0d2456;
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    transition: transform .2s ease, background-color .2s ease;
}

.home-popup-button:hover,
.home-popup-button:focus-visible {
    transform: translateY(-2px);
    background: #245db5;
}

body.home-popup-open {
    overflow: hidden;
}

@keyframes homePopupFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes homePopupIn {
    from { opacity: 0; transform: translateY(18px) scale(.97); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .home-popup-backdrop,
    .home-popup-card {
        animation: none;
    }
}

@media (max-width: 520px) {
    .home-popup {
        padding: 12px;
    }

    .home-popup-copy {
        padding: 20px 18px 22px;
    }
}
