/**
 * Marbl Waitlist Template — waitlist.css
 *
 * Universal waitlist/coming-soon layout. Consumes the canonical
 * marbl.css design system (colours, fonts, buttons, header, footer)
 * and adds ONLY the classes unique to the waitlist template.
 *
 * Prefix: .waitlist-* so there are no collisions with marbl.css
 * or the menu/hero components.
 *
 * Loaded AFTER marbl.css in the template HTML.
 *
 * (c) 2026 Marbl Codes
 */

/* ============================================================================
   Template-scoped overrides — darken the canonical charcoal family so body,
   scrollbar track, and any other marbl.css components using these vars
   pick up the darker tone. Template-scoped only — doesn't affect other
   Marbl sites. Candidate for canonical rollout (see memory note).
   ============================================================================ */
:root {
    --marbl-charcoal:         #0d0b0c;  /* was #161415 */
    --marbl-charcoal-light:   #110f10;  /* was #1a1918 (scrollbar track, borders) */
    --marbl-charcoal-lighter: #181617;  /* was #222120 (panels, cards) */
}
body {
    background: var(--marbl-charcoal);
}

/* ============================================================================
   Stage — main area between fixed header and footer
   ============================================================================ */
.waitlist-stage {
    position: relative;
    min-height: calc(100vh - 60px);
    padding-top: clamp(80px, 12vh, 120px);
    padding-bottom: clamp(32px, 5vh, 64px);
    padding-left: clamp(20px, 1.5625vw + 15px, 40px);
    padding-right: clamp(20px, 1.5625vw + 15px, 40px);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
}

/* Hero particle canvas — fills the stage, receives click + mousemove.
   The canvas itself is inserted inside this container by hero-particles.js.
   z-index 0 so the .waitlist-grid content cluster (z-index 1) sits in front. */
.waitlist-stage__hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: auto;
}
.waitlist-stage__hero-bg canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    cursor: pointer;
}

/* ============================================================================
   Content grid — bottom-left content, bottom-right social proof

   pointer-events: none on the grid itself so empty space passes clicks
   through to the particle canvas behind. Children re-enable their own
   pointer events so the form, links, and team circle still work.
   ============================================================================ */
.waitlist-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: clamp(24px, 3vw, 48px);
    align-items: end;
    max-width: var(--content-max, 1600px);
    width: 100%;
    margin: 0 auto;
    pointer-events: none;
}

.waitlist-content,
.waitlist-social {
    pointer-events: auto;
}

/* ============================================================================
   Left column — badge + title + subtitle + form
   ============================================================================ */
.waitlist-content {
    display: flex;
    flex-direction: column;
    gap: clamp(16px, 2vh, 24px);
    max-width: 640px;
}

.waitlist-badge {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(243, 82, 39, 0.06);
    border: 1px solid rgba(243, 82, 39, 0.18);
    border-radius: 9999px;
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 9px;
    font-weight: var(--font-medium, 500);
    color: rgba(255, 255, 255, 0.75);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.waitlist-badge__dot {
    width: 4px;
    height: 4px;
    background: var(--marbl-ember, #f35227);
    border-radius: 50%;
    animation: waitlist-pulse-dot 2s ease-in-out infinite;
}

.waitlist-badge__count {
    font-weight: var(--font-bold, 700);
    color: var(--marbl-white, #ffffff);
}

@keyframes waitlist-pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 4px rgba(243, 82, 39, 0.2); }
    50%      { opacity: 0.6; box-shadow: 0 0 0 8px rgba(243, 82, 39, 0.05); }
}

/* ============================================================================
   Title — two-line headline, second line uses the Petrona italic accent
   font from marbl.codes/thou-art-that
   ============================================================================ */
.waitlist-title {
    font-family: var(--font-heading, 'Urbanist', sans-serif);
    font-size: clamp(44px, 6.2vw, 84px);
    font-weight: var(--font-extrabold, 800);
    line-height: 1.02;
    letter-spacing: -0.03em;
    color: var(--marbl-white, #ffffff);
    margin: 0;
}

.waitlist-title .highlight {
    display: block;
    font-family: 'Petrona', serif;
    font-style: italic;
    font-weight: 800;
    color: var(--marbl-ember, #f35227);
    letter-spacing: -0.02em;
}

.waitlist-subtitle {
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: clamp(14px, 1.1vw, 16px);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.7);
    max-width: 480px;
    margin: 0;
}

/* ============================================================================
   Form — dark inputs (separate), standalone ember button with dark text
   ============================================================================ */
.waitlist-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 560px;
}

.waitlist-form__message {
    padding: 10px 14px;
    border-radius: 12px;
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 13px;
    line-height: 1.5;
    display: none;
}
.waitlist-form__message.show { display: block; }
.waitlist-form__message.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}
.waitlist-form__message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}
.waitlist-form__message.info {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* Single row: [first name] [email] [submit]. Separate elements, on one line. */
.waitlist-form__row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.waitlist-form__input {
    flex: 1 1 140px;
    min-width: 0;
    padding: 12px 18px;
    background: #050405;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
    color: var(--marbl-white, #ffffff);
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.waitlist-form__input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}
.waitlist-form__input:focus {
    border-color: var(--marbl-ember, #f35227);
    background: #080607;
}

.waitlist-form__submit {
    flex: 0 0 auto;
    padding: 12px 24px;
    background: var(--marbl-ember, #f35227);
    color: #131112;          /* dark text on the ember pill */
    border: 0;
    border-radius: 9999px;
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 13px;
    font-weight: var(--font-bold, 700);
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease;
    white-space: nowrap;
}
.waitlist-form__submit:hover:not(:disabled) {
    transform: translateY(-1px);
    filter: brightness(1.08);
}
.waitlist-form__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.waitlist-form__note {
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    margin: 0;
}

/* Honeypot — visually hidden */
.waitlist-form__honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ============================================================================
   Right column — founder circle linked to LinkedIn, with custom tooltip
   ============================================================================ */
.waitlist-social {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding-bottom: 4px;
}

.waitlist-social__circle {
    position: relative;
    display: block;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    text-decoration: none;
}
.waitlist-social__circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.04);
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.waitlist-social__circle--link:hover img {
    transform: translateY(-2px);
    border-color: var(--marbl-ember, #f35227);
}
/* Custom tooltip — appears above the circle on hover */
.waitlist-social__tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    padding: 6px 12px;
    background: #1d1a1b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 11px;
    font-weight: var(--font-medium, 500);
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.waitlist-social__circle--link:hover .waitlist-social__tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============================================================================
   Accessibility
   ============================================================================ */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ============================================================================
   Responsive — on mobile, stack content first then particle hero below
   in its own dedicated block (not overlaid behind)
   ============================================================================ */
@media (max-width: 900px) {
    /* Stage becomes a natural flex column. Content first, hero second.
       No bottom padding — hero block runs flush to the footer. */
    .waitlist-stage {
        min-height: auto;
        padding-top: clamp(80px, 10vh, 100px);
        padding-bottom: 0;
        padding-left: 0;
        padding-right: 0;
        gap: 36px;
        justify-content: flex-start;
    }

    /* Re-apply horizontal padding ONLY to the grid content, not the hero-bg,
       so the particle area can go edge-to-edge. */
    .waitlist-grid {
        order: 1;
        grid-template-columns: 1fr;
        gap: 24px;
        position: relative;
        z-index: 1;
        padding-left: clamp(20px, 1.5625vw + 15px, 40px);
        padding-right: clamp(20px, 1.5625vw + 15px, 40px);
    }

    /* Particle hero: no longer absolute. Takes its own block, sits BELOW
       the content cluster via flex order. Touches the footer at the bottom.
       Height is generous so statue heads aren't clipped. */
    .waitlist-stage__hero-bg {
        position: relative;
        inset: auto;
        order: 2;
        width: 100%;
        height: 68vh;
        min-height: 440px;
        margin-bottom: 0;
    }

    /* Hide the founder profile cluster on mobile — particle hero is
       the focal point instead. */
    .waitlist-social {
        display: none;
    }

    /* Title pulls in a touch */
    .waitlist-title {
        font-size: clamp(40px, 8.5vw, 64px);
    }
}

@media (max-width: 600px) {
    .waitlist-stage {
        padding-top: 90px;
        gap: 28px;
    }
    .waitlist-grid {
        padding-left: 20px;
        padding-right: 20px;
    }

    .waitlist-form__row {
        flex-direction: column;
        align-items: stretch;
    }
    .waitlist-form__input {
        flex: 1 1 100%;
    }
    .waitlist-form__submit {
        width: 100%;
        text-align: center;
    }

    .waitlist-title {
        font-size: clamp(36px, 11vw, 52px);
    }

    .waitlist-subtitle {
        font-size: 13px;
    }

    .waitlist-stage__hero-bg {
        height: 62vh;
        min-height: 400px;
    }
}
