/* =========================================================================
   WAITLIST MODAL — Glassmorphic signup modal triggered from hero CTAs.
   ========================================================================= */

/* ── Backdrop ─────────────────────────────────────────────────────── */

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 900;
    background: rgba(10, 7, 5, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease-smooth);
}

.modal-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

/* ── Modal Card ───────────────────────────────────────────────────── */

.modal-card {
    position: relative;
    width: 100%;
    max-width: 480px;
    padding: clamp(2rem, 5vw, 3rem);
    text-align: center;
    transform: translateY(24px) scale(0.97);
    transition: transform 0.35s var(--ease-out-expo);
    /* glass class provides bg/border/blur */
    /* Dark glass card — override body's dark text with light */
    color: var(--clr-text-light);
}

.modal-backdrop.is-open .modal-card {
    transform: translateY(0) scale(1);
}

/* ── Close Button ─────────────────────────────────────────────────── */

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2rem;
    height: 2rem;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    cursor: pointer;
    color: var(--clr-text-light);
    font-size: 1.1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 2;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

/* ── Mascot ───────────────────────────────────────────────────────── */

.modal-mascot {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 12px rgba(244, 123, 37, 0.3));
}

/* ── Title & Subtitle ─────────────────────────────────────────────── */

.modal-card h2 {
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.modal-card .modal-sub {
    font-size: 0.9rem;
    opacity: 0.65;
    margin-bottom: 1.75rem;
}

/* ── Platform Toggle ──────────────────────────────────────────────── */

.platform-toggle {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.platform-label {
    font-size: 0.75rem;
    opacity: 0.55;
    margin-bottom: 0.6rem;
    display: block;
    text-align: center;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.platform-btn {
    border: 1.5px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--radius-pill);
    padding: 0.45rem 1rem;
    font-family: var(--font-primary);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--clr-text-light);
    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease;
}

.platform-btn:hover {
    border-color: var(--clr-primary);
    background: rgba(244, 123, 37, 0.08);
}

.platform-btn.is-selected {
    background: var(--clr-primary);
    border-color: var(--clr-primary);
    color: #fff;
    box-shadow: var(--shadow-orange-glow);
}

/* ── Turnstile Widget ─────────────────────────────────────────────── */

.turnstile-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 1.25rem;
    min-height: 65px;
}

/* ── Form within modal ────────────────────────────────────────────── */

.modal-card .input-wrap {
    margin-bottom: 1.25rem;
}

/* Input text stays dark — it sits on the light input background */
.modal-card .input-wrap input[type="email"] {
    color: var(--clr-text-dark);
}

/* ── Success State ────────────────────────────────────────────────── */

.modal-success {
    display: none;
    padding: 0.5rem 0;
}

.modal-success.is-visible {
    display: block;
}

.modal-success .success-mascot {
    width: 72px;
    height: 72px;
    object-fit: contain;
    margin-bottom: 1rem;
    animation: bounceIn 0.5s var(--ease-bounce) forwards;
}

.modal-success p {
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.85;
}

.modal-form-content.hidden {
    display: none;
}

/* ── Responsive ───────────────────────────────────────────────────── */

@media (max-width: 500px) {
    .platform-toggle {
        flex-wrap: wrap;
    }

    .platform-btn {
        flex: 1;
        min-width: 5rem;
    }

    .turnstile-wrap {
        min-height: 120px;
    }
}
