/* Cofinix AI homepage popup — wide layout */
.cfx-popup {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cfx-popup.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.cfx-popup__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(5px);
}

.cfx-popup__shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: min(1100px, 96vw);
    max-height: min(92vh, 820px);
    border-radius: 18px;
    border: 1px solid rgba(167, 139, 250, 0.35);
    background:
        radial-gradient(ellipse 90% 60% at 50% -20%, rgba(124, 58, 237, 0.35), transparent),
        linear-gradient(180deg, #0a1024 0%, #0c1228 55%, #070b1a 100%);
    color: #e2e8f0;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
    overflow: hidden;
}

.cfx-popup__scroll {
    max-height: min(92vh, 820px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.5rem 1.75rem 1.25rem;
    -webkit-overflow-scrolling: touch;
}

.cfx-popup__close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    z-index: 2;
    width: 2.35rem;
    height: 2.35rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.9);
    color: #fff;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}

.cfx-popup__close:hover {
    background: rgba(124, 58, 237, 0.55);
    transform: scale(1.05);
}

.cfx-popup__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-right: 2.5rem;
}

.cfx-popup__brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.cfx-popup__logo {
    height: 2rem;
    width: auto;
}

.cfx-popup__brand-text {
    font-size: 1.15rem;
    font-weight: 600;
    color: #fff;
}

.cfx-popup__brand-text strong {
    background: linear-gradient(135deg, #a78bfa, #38bdf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cfx-popup__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(234, 88, 12, 0.22), rgba(245, 158, 11, 0.12));
    border: 1px solid rgba(251, 191, 36, 0.35);
    font-size: 0.62rem;
    line-height: 1.3;
    color: #fde68a;
}

.cfx-popup__badge strong {
    color: #fff;
    letter-spacing: 0.03em;
}

.cfx-popup__badge-flag {
    font-size: 1rem;
}

.cfx-popup__main {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 1.25rem;
}

.cfx-popup__title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 0.6rem;
    color: #cbd5e1;
}

.cfx-popup__title span {
    display: block;
    font-size: 1.45rem;
    font-weight: 800;
    color: #fff;
    margin-top: 0.25rem;
}

.cfx-popup__lead {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(226, 232, 240, 0.88);
    margin: 0 0 1rem;
}

.cfx-popup__lead em {
    font-style: normal;
    color: #fb923c;
    font-weight: 700;
}

.cfx-popup__features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.cfx-popup__features li {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
}

.cfx-popup__icon {
    flex-shrink: 0;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #fff;
}

.cfx-popup__icon--purple { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.cfx-popup__icon--blue { background: linear-gradient(135deg, #2563eb, #38bdf8); }
.cfx-popup__icon--green { background: linear-gradient(135deg, #059669, #34d399); }

.cfx-popup__features strong {
    display: block;
    font-size: 0.8rem;
    color: #fff;
    margin-bottom: 0.1rem;
}

.cfx-popup__features p {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.45;
    color: #94a3b8;
}

.cfx-popup__visual {
    width: 100%;
    min-width: 0;
}

.cfx-popup__hero-img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    object-fit: cover;
}

.cfx-popup__cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 1rem 1.15rem;
    margin-bottom: 0.85rem;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.22), rgba(59, 130, 246, 0.12));
    border: 1px solid rgba(167, 139, 250, 0.3);
}

.cfx-popup__cta-eyebrow {
    margin: 0 0 0.2rem;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #e9d5ff;
}

.cfx-popup__cta-sub {
    margin: 0;
    font-size: 0.78rem;
    color: #cbd5e1;
}

.cfx-popup__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 1.2rem;
    border-radius: 10px;
    background: linear-gradient(135deg, #7c3aed, #6366f1);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.cfx-popup__btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(124, 58, 237, 0.5);
    color: #fff;
}

.cfx-popup__highlights {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.55rem;
    margin-bottom: 0.65rem;
}

.cfx-popup__highlights article {
    text-align: center;
    padding: 0.55rem 0.35rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.cfx-popup__highlights i {
    display: block;
    font-size: 0.9rem;
    color: #a78bfa;
    margin-bottom: 0.25rem;
}

.cfx-popup__highlights strong {
    display: block;
    font-size: 0.62rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.25;
}

.cfx-popup__foot {
    margin: 0;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: #fcd34d;
}

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

@media (max-width: 768px) {
    .cfx-popup {
        padding: 0.5rem;
        align-items: flex-end;
    }

    .cfx-popup__shell {
        max-width: 100%;
        border-radius: 16px 16px 12px 12px;
    }

    .cfx-popup__main {
        grid-template-columns: 1fr;
    }

    .cfx-popup__visual {
        order: -1;
    }

    .cfx-popup__top {
        padding-right: 2.25rem;
    }

    .cfx-popup__cta {
        flex-direction: column;
        text-align: center;
    }

    .cfx-popup__btn {
        width: 100%;
        justify-content: center;
    }

    .cfx-popup__highlights {
        grid-template-columns: repeat(2, 1fr);
    }
}
