/* ============================================================
   EXIT-INTENT POPUP
   Split out of shared.css so only the page that actually has the
   popup markup ships these rules. Currently that is /mentorship.
   Markup lives in the page; behaviour in assets/js/exit-popup.js.
   ============================================================ */

/* ── Exit-intent popup ───────────────────────────────────── */
/* Markup lives in the page; behaviour in assets/js/exit-popup.js.
   Desktop only — the script never arms on touch devices. */
.exit-pop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(8, 4, 20, 0.62);
    backdrop-filter: blur(3px);
}
.exit-pop[data-open="true"] { display: flex; }

.exit-pop-card {
    position: relative;
    width: 100%;
    max-width: 470px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 34px 32px 26px;
    text-align: center;
    box-shadow: 0 24px 70px rgba(0,0,0,0.34);
    animation: exit-pop-in 0.24s ease-out;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}
@keyframes exit-pop-in {
    from { opacity: 0; transform: translateY(14px) scale(0.97); }
    to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .exit-pop-card { animation: none; }
}

/* top accent bar, same treatment as the hero CTA cards */
.exit-pop-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: linear-gradient(90deg, #6F00FF, #8B2FFF);
}

.exit-pop-close {
    position: absolute;
    top: 10px; right: 12px;
    width: 32px; height: 32px;
    display: grid;
    place-items: center;
    background: none;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    color: var(--white-dim);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}
.exit-pop-close:hover { background: var(--border); color: var(--white); }
.exit-pop-close:focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; }

.exit-pop-img {
    width: 168px;
    height: auto;
    margin: 2px auto 14px;
    display: block;
}

.exit-pop-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--purple);
    margin-bottom: 8px;
}

.exit-pop-card h2 {
    font-size: clamp(21px, 2.6vw, 26px);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--white);
    margin-bottom: 9px;
    text-wrap: balance;
}
.exit-pop-card h2 em { font-style: normal; color: var(--purple); }

.exit-pop-sub {
    font-size: 14px;
    line-height: 1.6;
    color: var(--white-muted);
    margin-bottom: 20px;
    text-wrap: pretty;
}

.exit-pop-form { display: flex; flex-direction: column; gap: 10px; }

.exit-pop-form .form-input {
    width: 100%;
    font-family: var(--font);
    font-size: 15px;
    padding: 13px 15px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--white);
}
.exit-pop-form .form-input::placeholder { color: var(--white-dim); }
.exit-pop-form .form-input:focus {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(111,0,255,0.14);
}
.exit-pop-form .form-input.error { border-color: var(--error); }

.exit-pop-err {
    font-size: 12px;
    color: var(--error);
    text-align: left;
    min-height: 15px;
    margin-top: -6px;
}

.exit-pop-btn {
    width: 100%;
    background: linear-gradient(135deg, #6F00FF 0%, #5500CC 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 15px 24px;
    cursor: pointer;
    box-shadow: 0 4px 26px rgba(111,0,255,0.28);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.exit-pop-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 32px rgba(111,0,255,0.38); }
.exit-pop-btn:disabled { opacity: 0.65; cursor: default; }
.exit-pop-btn:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }

.exit-pop-fine {
    font-size: 11px;
    color: var(--white-dim);
    margin-top: 12px;
}

.exit-pop-dismiss {
    display: inline-block;
    margin-top: 10px;
    background: none;
    border: none;
    font-family: var(--font);
    font-size: 12px;
    color: var(--white-dim);
    text-decoration: underline;
    cursor: pointer;
}
.exit-pop-dismiss:hover { color: var(--white-muted); }

.exit-pop-success { display: none; }
.exit-pop-success h2 { margin-bottom: 8px; }
.exit-pop[data-state="done"] .exit-pop-main    { display: none; }
.exit-pop[data-state="done"] .exit-pop-success { display: block; }

/* Never show on touch / small screens — the script also guards this,
   this is the belt-and-braces layer. */
@media (max-width: 767px), (hover: none), (pointer: coarse) {
    .exit-pop { display: none !important; }
}
