/* ═════════ Free-trial popup + form states (loads AFTER style.css) ═════════ */
html.lead-lock {
    overflow: hidden;
}

.lead-dialog {
    width: min(880px, calc(100vw - 28px));
    max-height: calc(100vh - 28px);
    max-height: calc(100dvh - 28px);
    padding: 0;
    border: 0;
    border-radius: 24px;
    overflow: auto;
    background: #fff;
    color: var(--dark-text, #1f2937);
    box-shadow: 0 40px 90px rgba(3, 30, 145, .35);
}

.lead-dialog::backdrop {
    background: rgba(6, 18, 51, .62);
    backdrop-filter: blur(4px);
}

.lead-dialog[open] {
    animation: leadIn .4s cubic-bezier(.2, .7, .2, 1);
}

.lead-dialog[open]::backdrop {
    animation: leadFade .3s ease;
}

@keyframes leadIn {
    from {
        opacity: 0;
        transform: translateY(24px) scale(.97);
    }
}

@keyframes leadFade {
    from {
        opacity: 0;
    }
}

.lead-shell {
    display: grid;
    grid-template-columns: 5fr 6fr;
    min-height: 460px;
}

/* left panel */
.lead-side {
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: 44px 36px;
    background: #0a1f44;
}

.lead-side::after {
    content: '';
    position: absolute;
    width: 280px;
    height: 280px;
    right: -110px;
    bottom: -110px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.08);
}

.lead-side>* {
    position: relative;
    z-index: 1;
}

.lead-side h3 {
    color: #fff;
    font-size: 1.7rem;
    line-height: 1.15;
    font-weight: 800;
    margin: 0 0 22px;
}

.lead-side ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
}

.lead-side li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    color: #d6e4ff;
    font-size: .95rem;
    line-height: 1.5;
}

.lead-side li i {
    flex: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(2, 186, 251, .25);
    color: #7fdcff;
    font-size: .7rem;
    margin-top: 1px;
}

/* right panel */
.lead-main {
    position: relative;
    padding: 44px 40px 36px;
}

.lead-x {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: #eef3fc;
    color: #475569;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    transition: background .2s;
}

.lead-x:hover {
    background: #dbe6fb;
}

.lead-main h4 {
    font-weight: 800;
    font-size: 1.4rem;
    margin: 0 0 6px;
}

.lead-sub {
    color: #64748b;
    font-size: .94rem;
    margin: 0 0 22px;
}

.lead-field {
    margin-bottom: 14px;
}

.lead-field label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: #334155;
}

.lead-field input,
.lead-field textarea {
    width: 100%;
    border: 1.5px solid var(--line, #dbe6fb);
    border-radius: 10px;
    padding: 12px 14px;
    font: inherit;
    font-size: .96rem;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}

.lead-field textarea {
    min-height: 84px;
    resize: vertical;
}

.lead-field input:focus,
.lead-field textarea:focus {
    outline: 0;
    border-color: var(--blue, #0251fb);
    box-shadow: 0 0 0 .2rem rgba(2, 81, 251, .15);
}

.lead-field.bad input,
.lead-field.bad textarea {
    border-color: #dc2626;
}

.lead-err {
    display: none;
    color: #dc2626;
    font-size: .78rem;
    margin-top: 5px;
}

.lead-field.bad .lead-err {
    display: block;
}

.lead-hp {
    position: absolute !important;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.lead-form-error {
    display: none;
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: .86rem;
    margin: 4px 0 12px;
}

.lead-form-error.show {
    display: block;
}

.lead-submit {
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    background: var(--blue, #0251fb);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background-color .2s, transform .2s, box-shadow .2s;
}

.lead-submit:hover {
    background: #013ec4;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(2, 81, 251, .25);
}

.lead-submit:disabled {
    opacity: .75;
    cursor: progress;
    transform: none;
    box-shadow: none;
}

.lead-spin {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    animation: leadSpin .7s linear infinite;
}

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

.lead-note {
    text-align: center;
    color: #94a3b8;
    font-size: .78rem;
    margin: 12px 0 0;
}

/* thank-you state (popup + contact form) */
.lead-done {
    display: none;
    text-align: center;
    padding: 28px 8px;
}

.lead-done.show {
    display: block;
    animation: leadIn .5s cubic-bezier(.2, .7, .2, 1);
}

.lead-check {
    width: 76px;
    height: 76px;
    margin: 0 auto 18px;
}

.lead-check circle {
    fill: none;
    stroke: var(--blue, #0251fb);
    stroke-width: 3;
    stroke-dasharray: 176;
    stroke-dashoffset: 176;
}

.lead-check path {
    fill: none;
    stroke: var(--cyan, #02bafb);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
}

.lead-done.show .lead-check circle {
    animation: leadDraw .7s ease forwards;
}

.lead-done.show .lead-check path {
    animation: leadDraw .45s ease .55s forwards;
}

@keyframes leadDraw {
    to {
        stroke-dashoffset: 0;
    }
}

.lead-done h4 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.lead-done p {
    color: #64748b;
    margin: 0 auto 20px;
    max-width: 24rem;
}

.lead-done .lead-submit {
    width: auto;
    padding: 0 32px;
    height: 46px;
}

.lead-link {
    background: none;
    border: 0;
    color: var(--blue, #0251fb);
    font-weight: 600;
    cursor: pointer;
    padding: 6px;
}

.lead-link:hover {
    text-decoration: underline;
}

/* contact form: invalid + sending state reuse the same look */
.contact-form-card .is-invalid {
    border-color: #dc2626 !important;
}

.contact-form-card .lead-form-error {
    margin-top: 0;
}

@media (max-width: 767px) {
    .lead-dialog {
        border-radius: 20px;
    }

    .lead-shell {
        grid-template-columns: 1fr;
        min-height: 0;
        position: relative;
    }

    .lead-main {
        position: static;
    }

    .lead-side {
        padding: 22px 24px;
    }

    .lead-side::after,
    .lead-side ul {
        display: none;
    }

    .lead-side h3 {
        font-size: 1.25rem;
        margin: 0;
        padding-right: 36px;
    }

    .lead-main {
        padding: 24px 22px 26px;
    }

    .lead-x {
        top: 12px;
        right: 12px;
        background: rgba(255, 255, 255, .2);
        color: #fff;
    }
}

@media (prefers-reduced-motion: reduce) {

    .lead-dialog[open],
    .lead-dialog[open]::backdrop,
    .lead-done.show {
        animation: none;
    }

    .lead-check circle,
    .lead-check path {
        stroke-dashoffset: 0;
        animation: none !important;
    }
}