:root {
    --brand: #823a88;
    --brand-dark: #6a2a6f;
    --bg-deep: #0f172a;
    --bg-card: #1e293b;
    --border: #334155;
    --text-heading: #ffffff;
    --text-body: #cbd5e1;
    --text-muted: #94a3b8;
    --success-bg: rgba(16, 185, 129, 0.15);
    --success-border: #10b981;
    --success-text: #34d399;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
    background-color: var(--bg-deep); /* Eliminates white gap on elastic iOS scroll */
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-body);
    line-height: 1.6;
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic mobile viewport height */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-image: radial-gradient(var(--border) 1px, transparent 1px);
    background-size: 28px 24px;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-link img {
    display: block;
    width: 220px;
    height: auto;
}

.header-badge {
    background: rgba(130, 58, 136, 0.08);
    color: var(--brand);
    border: 1px solid rgba(130, 58, 136, 0.25);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Desktop Main Layout */
main {
    flex: 1;
    padding: 4rem 2rem;
    max-width: 1240px;
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.teaser-content h1 {
    color: var(--text-heading);
    font-size: clamp(2.2rem, 3.5vw, 2.8rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.teaser-content h1 span {
    color: #c084fc;
}

.teaser-content p.hero-sub {
    font-size: 1.05rem;
    color: var(--text-body);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Desktop 2-Column Feature Grid */
.feature-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 1.25rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

.feature-icon {
    background: rgba(130, 58, 136, 0.2);
    border: 1px solid rgba(130, 58, 136, 0.4);
    color: #d8b4fe;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.05rem;
}

.feature-text h4 {
    color: var(--text-heading);
    font-size: 0.98rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.feature-text p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 0;
    line-height: 1.4;
}

/* Form Card Desktop */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 40px rgba(130, 58, 136, 0.12);
    position: relative;
    scroll-margin-top: 100px;
}

.card h2 {
    color: var(--text-heading);
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-align: center;
}

.beta-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    text-align: left;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    position: relative;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-group input {
    width: 100%;
    min-height: 48px;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background-color: var(--bg-deep);
    color: #fff;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(130, 58, 136, 0.25);
}

/* Custom Select Dropdown Component */
.custom-select-trigger {
    width: 100%;
    min-height: 48px;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background-color: var(--bg-deep);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.custom-select-trigger:focus-visible {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(130, 58, 136, 0.25);
}

.custom-select-trigger:after {
    content: '';
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--text-muted);
    margin-left: 0.5rem;
    transition: transform 0.2s ease;
}

.custom-select-container.open .custom-select-trigger {
    border-color: var(--brand);
}

.custom-select-container.open .custom-select-trigger:after {
    transform: rotate(180deg);
}

.custom-select-options {
    display: none;
    opacity: 0;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #0f172a;
    border: 1px solid var(--border);
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 50;
    box-shadow: 0 20px 35px -5px rgba(0, 0, 0, 0.7);
    transition: opacity 0.15s ease-out;
}

.custom-select-container.open .custom-select-options {
    display: block;
    opacity: 1;
}

.custom-option {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    color: var(--text-body);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.custom-option:hover, 
.custom-option.selected, 
.custom-option.highlighted {
    background: var(--brand);
    color: #ffffff;
}

.custom-select-options::-webkit-scrollbar {
    width: 6px;
}
.custom-select-options::-webkit-scrollbar-track {
    background: #0f172a;
    border-radius: 4px;
}
.custom-select-options::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.btn-submit {
    background: var(--brand);
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    min-height: 48px;
    padding: 1rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    margin-top: 0.5rem;
    touch-action: manipulation;
}

.btn-submit:hover {
    background: var(--brand-dark);
    transform: translateY(-1px);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.success-box {
    display: none;
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    color: var(--success-text);
    padding: 1.5rem;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
}

.mobile-fab {
    display: none;
}

footer {
    text-align: center;
    padding: 2rem;
    font-size: 0.9rem;
    color: #94a3b8;
    border-top: 1px solid var(--border);
}

.footer-link {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s;
}

.footer-link:hover {
    opacity: 0.85;
}

/* Mobile Responsive Styling & FAB Floating Button */
@media (max-width: 960px) {
    main {
        display: flex;
        flex-direction: column;
        gap: 2.5rem;
        padding: 2.5rem 1.5rem;
    }

    .teaser-content {
        text-align: center;
    }

    .feature-list {
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
    }

    .feature-item {
        text-align: left;
    }

    .card {
        width: 100%;
        scroll-margin-top: 90px;
    }

    .mobile-fab {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        bottom: 1.5rem;
        right: 1.25rem;
        z-index: 999;
        background: var(--brand);
        color: #ffffff;
        font-weight: 700;
        font-size: 0.95rem;
        padding: 0.85rem 1.4rem;
        border-radius: 50px;
        border: 1px solid rgba(255, 255, 255, 0.25);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
        cursor: pointer;
        transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    /* Auto-hide class toggled by IntersectionObserver */
    .mobile-fab.is-hidden {
        opacity: 0;
        transform: translateY(20px);
        pointer-events: none;
    }

    .mobile-fab:active {
        transform: scale(0.95);
    }
}

@media (max-width: 640px) {
    .header-container { padding: 0 1.25rem; }
    .card { padding: 2rem 1.25rem; }
    .logo-link img { width: 180px; }
}