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

.phase-popup {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: grid;
    place-items: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 220ms ease, visibility 220ms ease;
}

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

.phase-popup__backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(0, 3, 9, 0.88);
    backdrop-filter: blur(14px);
    cursor: default;
}

.phase-popup__dialog {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(330px, 0.92fr);
    width: min(980px, 100%);
    max-height: calc(100vh - 40px);
    overflow: hidden;
    border: 1px solid rgba(67, 220, 255, 0.3);
    border-radius: 8px;
    background: #05080d;
    color: #f7fbff;
    box-shadow: 0 36px 120px rgba(0, 0, 0, 0.82), 0 0 54px rgba(48, 216, 255, 0.16), 0 0 0 1px rgba(129, 91, 255, 0.1);
    transform: translateY(18px) scale(0.98);
    transition: transform 260ms ease;
}

.phase-popup.is-visible .phase-popup__dialog {
    transform: translateY(0) scale(1);
}

.phase-popup__close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    background: rgba(2, 6, 12, 0.88);
    color: #fff;
    font-size: 18px;
}

.phase-popup__close:hover {
    border-color: #55e8ff;
    color: #55e8ff;
}

.phase-popup__visual {
    position: relative;
    min-height: 530px;
    overflow: hidden;
    background: #020407;
}

.phase-popup__visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 52%, #05080d 100%), linear-gradient(180deg, transparent 68%, rgba(5, 8, 13, 0.72) 100%);
    pointer-events: none;
}

.phase-popup__visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 56% center;
}

.phase-popup__signal {
    position: absolute;
    left: 24px;
    bottom: 22px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid rgba(93, 232, 255, 0.42);
    border-radius: 999px;
    background: rgba(3, 7, 12, 0.78);
    color: #83f0ff;
    font: 700 11px/1.2 "IBM Plex Mono", monospace;
    text-transform: uppercase;
}

.phase-popup__signal i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #65ffe0;
    box-shadow: 0 0 12px #65ffe0;
    animation: phasePulse 1.2s ease-in-out infinite;
}

.phase-popup__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 64px 42px 42px;
}

.phase-popup__eyebrow {
    color: #70eaff;
    font: 700 11px/1.3 "IBM Plex Mono", monospace;
    text-transform: uppercase;
}

.phase-popup__content h2 {
    margin: 12px 0 14px;
    color: #fff;
    font-size: clamp(34px, 4vw, 52px);
    line-height: 1.02;
    letter-spacing: 0;
}

.phase-popup__content h2 span {
    color: #73eaff;
    text-shadow: 0 0 26px rgba(73, 222, 255, 0.42);
}

.phase-popup__content > p {
    margin: 0 0 22px;
    color: #a9b5c6;
    font-size: 15px;
    line-height: 1.7;
}

.phase-popup__benefits {
    display: grid;
    gap: 10px;
}

.phase-popup__benefits span {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e8f7ff;
    font-size: 13px;
}

.phase-popup__benefits i {
    width: 18px;
    color: #69e6ff;
    text-align: center;
}

.phase-popup__actions {
    display: grid;
    gap: 10px;
    margin-top: 28px;
}

.phase-popup__cta,
.phase-popup__later {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    border-radius: 5px;
    font-weight: 800;
}

.phase-popup__cta {
    gap: 12px;
    padding: 0 22px;
    background: linear-gradient(90deg, #63dcff, #8390ff);
    color: #02060b;
    box-shadow: 0 0 28px rgba(69, 210, 255, 0.24);
}

.phase-popup__cta:hover {
    color: #02060b;
    transform: translateY(-1px);
}

.phase-popup__later {
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: transparent;
    color: #b7c2cf;
}

.phase-popup__content small {
    display: block;
    margin-top: 16px;
    color: #687588;
    font-size: 10px;
    line-height: 1.5;
}

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

@keyframes phasePulse {
    50% { opacity: 0.42; transform: scale(0.8); }
}

@media (max-width: 760px) {
    .phase-popup {
        padding: 10px;
    }

    .phase-popup__dialog {
        display: block;
        max-height: calc(100vh - 20px);
        overflow-y: auto;
    }

    .phase-popup__visual {
        min-height: 0;
        height: 220px;
    }

    .phase-popup__visual::after {
        background: linear-gradient(180deg, transparent 48%, #05080d 100%);
    }

    .phase-popup__visual img {
        object-position: 56% 45%;
    }

    .phase-popup__signal {
        left: 16px;
        bottom: 14px;
    }

    .phase-popup__content {
        padding: 22px 18px 24px;
    }

    .phase-popup__content h2 {
        margin-top: 9px;
        font-size: 34px;
    }

    .phase-popup__content > p {
        margin-bottom: 16px;
        font-size: 13px;
        line-height: 1.58;
    }

    .phase-popup__actions {
        margin-top: 20px;
    }
}

@media (max-width: 380px), (max-height: 700px) {
    .phase-popup__visual {
        height: 170px;
    }

    .phase-popup__content h2 {
        font-size: 29px;
    }

    .phase-popup__benefits {
        display: none;
    }

    .phase-popup__actions {
        margin-top: 16px;
    }

    .phase-popup__cta,
    .phase-popup__later {
        min-height: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .phase-popup,
    .phase-popup__dialog,
    .phase-popup__signal i {
        transition: none;
        animation: none;
    }
}
