:root {
    --lead-funnel-bg: rgba(11, 17, 24, 0.72);
    --lead-funnel-panel: #f7f1e7;
    --lead-funnel-panel-strong: #fffdf8;
    --lead-funnel-ink: #1c2430;
    --lead-funnel-muted: #667287;
    --lead-funnel-line: rgba(28, 36, 48, 0.12);
    --lead-funnel-accent: #0f5b5f;
    --lead-funnel-accent-soft: rgba(15, 91, 95, 0.1);
    --lead-funnel-gold: #bf9b5f;
    --lead-funnel-shadow: 0 28px 80px rgba(6, 12, 20, 0.24);
}

body.lead-funnel-open {
    overflow: hidden;
}

.lead-funnel-modal[hidden] {
    display: none;
}

.lead-funnel-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
}

.lead-funnel-modal__backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top left, rgba(191, 155, 95, 0.22), transparent 32%),
        linear-gradient(135deg, rgba(11, 17, 24, 0.88), rgba(11, 17, 24, 0.72));
    backdrop-filter: blur(14px);
}

.lead-funnel-modal__dialog {
    position: relative;
    width: min(980px, calc(100vw - 28px));
    max-height: calc(100vh - 28px);
    margin: 14px auto;
    padding: 34px;
    overflow: auto;
    border-radius: 28px;
    background:
        linear-gradient(145deg, rgba(255, 253, 248, 0.98), rgba(247, 241, 231, 0.98)),
        var(--lead-funnel-panel);
    box-shadow: var(--lead-funnel-shadow);
    color: var(--lead-funnel-ink);
}

.lead-funnel-modal__close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    border: 1px solid var(--lead-funnel-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--lead-funnel-ink);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.lead-funnel-modal__close:hover,
.lead-funnel-modal__close:focus-visible {
    background: #fff;
    transform: scale(1.04);
}

.lead-funnel-modal__header {
    width: 100%;
    max-width: none;
    padding-right: 72px;
    text-align: center;
}

.lead-funnel-modal__eyebrow,
.lead-funnel-success__eyebrow,
.lead-funnel-step__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    color: var(--lead-funnel-accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.lead-funnel-modal__header h2,
.lead-funnel-step__copy h3,
.lead-funnel-success h3 {
    margin: 0;
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(2rem, 3vw, 3.1rem);
    line-height: 1.05;
}

.lead-funnel-modal__header h2,
.lead-funnel-modal__subtitle {
    width: 100%;
    max-width: none;
}

.lead-funnel-modal__subtitle,
.lead-funnel-step__copy p,
.lead-funnel-success p {
    margin: 12px 0 0;
    color: var(--lead-funnel-muted);
    font-size: 1rem;
    line-height: 1.65;
}

.lead-funnel-progress {
    margin: 28px 0 10px;
}

.lead-funnel-progress__bar {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(28, 36, 48, 0.08);
}

.lead-funnel-progress__fill {
    display: block;
    width: 16.666%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--lead-funnel-gold), var(--lead-funnel-accent));
    transition: width 0.28s ease;
}

.lead-funnel-progress__meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    color: var(--lead-funnel-muted);
    font-size: 0.92rem;
}

.lead-funnel-form {
    min-height: 460px;
}

.lead-funnel-step {
    display: none;
    padding-top: 20px;
}

.lead-funnel-step.is-active {
    display: block;
}

.lead-funnel-step__copy {
    max-width: 760px;
    margin-bottom: 22px;
}

.lead-funnel-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.lead-funnel-option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    min-height: 140px;
    padding: 22px;
    border: 1px solid rgba(15, 91, 95, 0.14);
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 250, 242, 0.95)),
        #fff;
    color: var(--lead-funnel-ink);
    text-align: left;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.lead-funnel-option:hover,
.lead-funnel-option:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(15, 91, 95, 0.3);
    box-shadow: 0 14px 34px rgba(15, 91, 95, 0.08);
}

.lead-funnel-option.is-selected {
    border-color: rgba(15, 91, 95, 0.55);
    background:
        linear-gradient(180deg, rgba(15, 91, 95, 0.12), rgba(191, 155, 95, 0.09)),
        var(--lead-funnel-panel-strong);
    box-shadow: 0 16px 36px rgba(15, 91, 95, 0.11);
}

.lead-funnel-option__title {
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.35;
}

.lead-funnel-option__description {
    color: var(--lead-funnel-muted);
    font-size: 0.94rem;
    line-height: 1.55;
}

.lead-funnel-step__actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
}

.lead-funnel-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.lead-funnel-nav:hover,
.lead-funnel-nav:focus-visible {
    transform: translateY(-1px);
}

.lead-funnel-nav--primary {
    background: linear-gradient(135deg, var(--lead-funnel-accent), #0c474a);
    color: #fff;
    box-shadow: 0 14px 28px rgba(15, 91, 95, 0.22);
}

.lead-funnel-nav--ghost {
    background: rgba(255, 255, 255, 0.76);
    border-color: var(--lead-funnel-line);
    color: var(--lead-funnel-ink);
}

.lead-funnel-step--contact .lead-funnel-step__copy {
    margin-bottom: 20px;
}

.lead-funnel-contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.lead-funnel-step .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lead-funnel-step .form-group-full {
    grid-column: 1 / -1;
}

.lead-funnel-step label {
    font-size: 0.92rem;
    font-weight: 600;
}

.lead-funnel-step input,
.lead-funnel-step textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(28, 36, 48, 0.14);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.84);
    color: var(--lead-funnel-ink);
    font: inherit;
}

.lead-funnel-step input:focus,
.lead-funnel-step textarea:focus {
    outline: none;
    border-color: rgba(15, 91, 95, 0.44);
    box-shadow: 0 0 0 4px rgba(15, 91, 95, 0.08);
}

.lead-funnel-step textarea {
    resize: vertical;
}

.lead-funnel-step .checkbox-group {
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    margin-top: 12px;
}

.lead-funnel-step .checkbox-group input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    padding: 0;
}

.lead-funnel-step .checkbox-group label {
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--lead-funnel-muted);
}

.lead-funnel-step .checkbox-group a {
    color: var(--lead-funnel-accent);
    text-decoration: none;
}

.lead-funnel-step .cf-turnstile {
    margin-top: 10px;
}

.lead-funnel-form__error {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(167, 42, 42, 0.08);
    color: #7b2020;
    font-size: 0.94rem;
}

.lead-funnel-success[hidden] {
    display: none;
}

.lead-funnel-success {
    max-width: 620px;
    padding: 34px 0 10px;
}

.lead-funnel-success .lead-funnel-nav {
    margin-top: 24px;
}

.lead-page-actions,
.hero-cta--diagnostic {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.lead-page-actions .btn,
.hero-cta--diagnostic .btn {
    min-width: 220px;
    justify-content: center;
}

@media (max-width: 820px) {
    .lead-funnel-modal__dialog {
        width: calc(100vw - 18px);
        max-height: calc(100vh - 18px);
        margin: 9px auto;
        padding: 24px 18px 22px;
        border-radius: 24px;
    }

    .lead-funnel-modal__header {
        padding-right: 32px;
    }

    .lead-funnel-progress__meta,
    .lead-funnel-step__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .lead-funnel-options,
    .lead-funnel-contact-grid {
        grid-template-columns: 1fr;
    }

    .lead-funnel-option {
        min-height: 0;
    }

    .lead-page-actions .btn,
    .hero-cta--diagnostic .btn {
        width: 100%;
    }
}
