/* Lead Form Premium Dark Theme */
:root {
    --bg: #07080d;
    --bg-soft: #0d0f18;
    --surface: rgba(17, 19, 28, 0.86);
    --surface-2: rgba(24, 27, 39, 0.82);
    --border: rgba(255, 255, 255, 0.10);
    --border-strong: rgba(255, 255, 255, 0.16);
    --text-primary: #f5f7fb;
    --text-secondary: #c2c9d6;
    --text-muted: #8c94a4;
    --primary: #00f0ff;
    --accent: #7c5cff;
    --success: #00ff88;
    --secondary: #ff4d8d;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    --glow-primary: 0 0 0 1px rgba(0, 240, 255, 0.15), 0 0 24px rgba(0, 240, 255, 0.14);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text-primary);
    background:
        radial-gradient(circle at top left, rgba(0, 240, 255, 0.06), transparent 35%),
        radial-gradient(circle at top right, rgba(124, 92, 255, 0.08), transparent 30%),
        linear-gradient(180deg, #080913 0%, #06070b 100%);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.container {
    width: min(1160px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 56px;
}

.form-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(18, 20, 31, 0.92), rgba(10, 11, 18, 0.96));
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
    padding: 30px;
}

.form-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.06), transparent 18%);
    pointer-events: none;
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.16);
    color: var(--primary);
    flex: 0 0 auto;
}

.logo-icon svg {
    width: 22px;
    height: 22px;
    display: block;
}

.message {
    border-radius: 16px;
    padding: 18px 18px 16px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.message strong {
    display: inline-block;
    margin-bottom: 4px;
}

.message ul {
    margin: 10px 0 0 18px;
    color: var(--text-secondary);
}

.message-error {
    background: rgba(255, 77, 141, 0.10);
    border-color: rgba(255, 77, 141, 0.28);
}

.message-success {
    background: rgba(0, 255, 136, 0.10);
    border-color: rgba(0, 255, 136, 0.28);
}

.wizard-steps {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 26px;
}

.wizard-step-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: all .2s ease;
}

.wizard-step-tab.active {
    color: #041018;
    border-color: transparent;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 10px 24px rgba(0, 240, 255, 0.18);
}

.wizard-step-tab.completed {
    color: var(--success);
    background: rgba(0, 255, 136, 0.10);
    border-color: rgba(0, 255, 136, 0.24);
}

[data-wizard-step][hidden] {
    display: none !important;
}

.lead-form-honeypot {
    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;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.section-intro {
    margin: -4px 0 20px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    max-width: 68ch;
}

/* Form Groups */
.form-grid {
    display: grid;
    gap: 24px;
}

.form-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 20px;
}

.form-span-2 {
    grid-column: 1 / -1;
}

.profile-choice {
    padding: 22px 24px 24px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 18px;
    background: rgba(15, 18, 27, 0.55);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.profile-choice-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 440px);
    gap: 24px;
    align-items: center;
}

.profile-choice-copy {
    min-width: 0;
    padding-right: 8px;
}

.profile-choice .form-label {
    margin-bottom: 8px;
}

.profile-choice-note {
    margin: 0;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
    max-width: 36ch;
}

.profile-choice-control {
    width: 100%;
    justify-self: end;
}

.profile-choice select {
    width: 100%;
    max-width: none;
    min-height: 58px;
}

.form-grid--two .form-group {
    margin-bottom: 0;
}

.form-grid--two .form-group .input-wrapper,
.form-grid--two .form-group input,
.form-grid--two .form-group textarea,
.form-grid--two .form-group select {
    height: 100%;
}

.form-grid--two .form-group textarea {
    min-height: 150px;
}

.form-grid--two .form-group select {
    min-height: 56px;
}

.form-group {
    margin-bottom: 28px;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.form-label .required {
    color: var(--secondary);
    margin-left: 4px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    transition: all 0.3s ease;
    pointer-events: none;
}

.input-icon svg,
.option-icon svg,
.resource-icon svg,
.ai-resource-title-icon svg,
.logo-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

#lead-theme-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.counter-label svg,
.spots-left svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    display: block;
}

input[type="text"],
input[type="tel"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 16px 16px 16px 48px;
    background: rgba(26, 26, 37, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 12px;
    font-size: 15px;
    color: var(--text-primary);
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
    box-sizing: border-box;
}

textarea {
    padding: 16px;
    min-height: 120px;
    resize: vertical;
}

select {
    padding-left: 16px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23a0a0b0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 20px;
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.10), var(--glow-primary);
}

input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    opacity: 1;
    color: var(--primary);
}

/* Radio & Checkbox Cards */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.option-card {
    position: relative;
}

.option-card input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.option-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    background: rgba(26, 26, 37, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 100%;
}

.option-label:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.option-card input:checked + .option-label {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.10), rgba(124, 92, 255, 0.10));
    border-color: var(--primary);
    box-shadow: var(--glow-primary);
}

.option-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.option-card input:checked + .option-label .option-icon {
    transform: scale(1.08);
}

.option-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.45;
}

.option-card input:checked + .option-label .option-text {
    color: var(--text-primary);
}

/* Section Divider */
.section-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 36px 0 20px;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* AI Resources Section */
.ai-resources {
    background: rgba(10, 10, 15, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 16px;
    padding: 28px;
    margin: 32px 0;
    position: relative;
    overflow: hidden;
}

.ai-resources::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
}

.ai-resources-title {
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-resource-title-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex: 0 0 auto;
}

.ai-resource-title-icon svg {
    width: 20px;
    height: 20px;
}

.ai-resources-title span {
    font-size: 20px;
}
.resource-cards {
    display: grid;
    gap: 12px;
}

.resource-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(26, 26, 37, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 12px;
    color: inherit;
    transition: all 0.3s ease;
}

.resource-card:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
}

.resource-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.16);
    flex: 0 0 auto;
    color: var(--primary);
}

.resource-info h4 {
    margin: 0 0 4px;
    font-size: 15px;
}

.resource-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.4;
}

/* Submission Counter */
.submission-counter {
    background: linear-gradient(180deg, rgba(0, 240, 255, 0.06), rgba(124, 92, 255, 0.04));
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 28px;
    box-shadow: var(--shadow);
}

.counter-header,
.counter-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}

.counter-header {
    margin-bottom: 12px;
}

.counter-label {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.counter-label svg {
    width: 16px;
    height: 16px;
    color: var(--primary);
}

.counter-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.counter-value span {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
}

.progress-bar-container {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-bar-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.22);
}

.counter-footer {
    color: var(--text-muted);
    font-size: 13px;
}

.spots-left {
    color: var(--success);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.spots-left svg {
    width: 14px;
    height: 14px;
    color: var(--success);
}

/* Wizard Navigation */
.wizard-nav {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    margin: 28px 0 8px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
}

.wizard-nav .submit-btn {
    flex: 0 0 auto;
    min-width: 156px;
}

.submit-btn {
    appearance: none;
    border: 0;
    border-radius: 12px;
    min-height: 48px;
    padding: 0 18px;
    font-weight: 700;
    color: #041018;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 12px 28px rgba(0, 240, 255, 0.18);
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 36px rgba(0, 240, 255, 0.24);
}

.submit-btn[data-wizard-prev] {
    color: var(--text-primary);
    background: #64748b;
    box-shadow: none;
}

.submit-btn[hidden] {
    display: none !important;
}

.lead-form-theme-slot {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 2147483640;
}

html[data-theme="light"] body.lead-theme {
    --bg: #f5f7fb;
    --bg-soft: #eef1f7;
    --surface: rgba(255, 255, 255, 0.92);
    --surface-2: rgba(248, 250, 252, 0.96);
    --border: rgba(15, 23, 42, 0.1);
    --border-strong: rgba(15, 23, 42, 0.16);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    color: var(--text-primary);
    background:
        radial-gradient(circle at top left, rgba(0, 240, 255, 0.08), transparent 35%),
        radial-gradient(circle at top right, rgba(124, 92, 255, 0.06), transparent 30%),
        linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

html[data-theme="light"] body.lead-theme .form-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
    border-color: var(--border);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] body.lead-theme input,
html[data-theme="light"] body.lead-theme select,
html[data-theme="light"] body.lead-theme textarea {
    background: #fff;
    border-color: rgba(15, 23, 42, 0.12);
    color: var(--text-primary);
}

.footer {
    margin-top: 36px;
    padding: 28px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary);
}

/* Small helper for title areas if present */
.title,
.form-title {
    margin: 0 0 12px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.subtitle,
.form-subtitle {
    margin: 0 0 24px;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 640px) {
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    .container {
        width: min(100%, calc(100% - 24px));
        padding: 20px 0 40px;
    }

    .form-card {
        width: 100%;
        max-width: 100%;
        padding: 24px 18px;
        border-radius: 20px;
    }

    .form-grid--two,
    .options-grid {
        grid-template-columns: 1fr;
    }

    .form-span-2 {
        grid-column: auto;
    }

    input, textarea, select {
        max-width: 100%;
        width: 100%;
    }

    .submit-btn {
        width: 100%;
        max-width: 100%;
    }

    .profile-choice-layout {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .profile-choice {
        padding: 20px 18px 22px;
    }

    .wizard-nav {
        justify-content: stretch;
    }

    .wizard-nav .submit-btn {
        min-width: 0;
        flex: 1 1 0;
    }

    .title,
    .form-title {
        font-size: 24px;
    }

    .option-label {
        flex-direction: row;
        text-align: left;
        padding: 16px;
    }

    .resource-card:hover {
        transform: translateX(4px);
    }

    .progress-bar .step {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .wizard-step-tab {
        font-size: 12px;
        padding: 6px 12px;
    }

    .submission-counter {
        padding: 16px 18px;
        margin-bottom: 24px;
    }

    .counter-header,
    .counter-footer {
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }

    .counter-value {
        font-size: 20px;
    }

    .footer {
        margin-top: 30px;
        padding-top: 24px;
        padding-left: 8px;
        padding-right: 8px;
    }

    .footer-links {
        gap: 16px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: var(--bg);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
