/* ==========================================================================
   LEAD FORM — Multi-Step (integrated into landing page)
   All classes prefixed with .lf- to avoid conflicts
   ========================================================================== */

/* --- Wrapper --- */
.lead-form-wrapper {
    display: flex;
    justify-content: center;
    padding: 1rem 0 2rem;
}

/* --- Form shell --- */
.lead-form {
    width: 100%;
    max-width: 480px;
    min-height: 560px;
    background: #FFFFFF;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(27,27,31,0.06), 0 12px 32px rgba(27,27,31,0.04);
    border: 1px solid #E8E5DF;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.lead-form::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary, #2563EB), #F97316);
    z-index: 10;
    border-radius: 20px 20px 0 0;
}

/* --- Header / Progress --- */
.lf-header {
    padding: 1.5rem 1.75rem 0;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.lf-progress-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.65rem;
}

.lf-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.28rem 0.7rem;
    background: #F5F2ED;
    border-radius: 100px;
    font-family: 'Outfit', 'Sora', sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    color: #8A8A95;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.lf-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary, #2563EB);
    animation: lf-pulse 2s ease infinite;
}

@keyframes lf-pulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.3); }
}

.lf-step-text {
    font-family: 'Outfit', 'Sora', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary, #2563EB);
    letter-spacing: 0.3px;
}

.lf-track {
    width: 100%;
    height: 3px;
    background: #EDE9E1;
    border-radius: 100px;
    overflow: hidden;
}

.lf-bar {
    height: 100%;
    width: 25%;
    background: linear-gradient(90deg, var(--primary, #2563EB), #F97316);
    border-radius: 100px;
    transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
}

.lf-bar::after {
    content: '';
    position: absolute;
    right: 0; top: -1px;
    width: 5px; height: 5px;
    background: #F97316;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(249,115,22,0.4);
}

/* --- Steps container --- */
.lf-steps {
    flex: 1;
    position: relative;
    overflow: hidden;
    min-height: 400px;
}

.lf-step {
    position: absolute;
    inset: 0;
    padding: 1.5rem 1.75rem 1rem;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateX(50px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1), transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.lf-step.is-active {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

.lf-step.exit-prev {
    opacity: 0;
    transform: translateX(-50px) scale(0.98);
}

/* --- Step typography --- */
.lf-heading {
    font-family: 'Outfit', 'Sora', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1B1B1F;
    letter-spacing: -0.03em;
    line-height: 1.25;
    margin-bottom: 0.25rem;
}

.lf-desc {
    font-size: 0.85rem;
    color: #8A8A95;
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

/* --- Option cards --- */
.lf-choices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: auto;
}

.lf-choice {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 0.85rem;
    background: #FFFFFF;
    border: 1.5px solid #E8E5DF;
    border-radius: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, transform 0.12s ease;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.lf-choice input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.lf-emoji {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: #F5F2ED;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.lf-text {
    font-family: 'Outfit', 'Sora', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: #4A4A52;
    line-height: 1.25;
    transition: color 0.2s ease;
}

.lf-radio {
    position: absolute;
    top: 8px; right: 8px;
    width: 15px; height: 15px;
    border-radius: 50%;
    border: 1.5px solid #E8E5DF;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lf-radio::after {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: white;
    transform: scale(0);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lf-choice:hover {
    border-color: #D4D0C8;
    background: #F5F2ED;
}

.lf-choice:active { transform: scale(0.97); }

.lf-choice.is-selected {
    border-color: var(--primary, #2563EB);
    box-shadow: 0 0 0 2px var(--primary, #2563EB), 0 4px 16px rgba(37,99,235,0.08);
    background: rgba(37,99,235,0.04);
}

.lf-choice.is-selected .lf-emoji { background: rgba(37,99,235,0.08); }
.lf-choice.is-selected .lf-text { color: var(--primary, #2563EB); }

.lf-choice.is-selected .lf-radio {
    background: var(--primary, #2563EB);
    border-color: var(--primary, #2563EB);
}

.lf-choice.is-selected .lf-radio::after { transform: scale(1); }

.lf-choice:focus-visible { outline: 2px solid var(--primary, #2563EB); outline-offset: 2px; }

/* --- Staggered card animation --- */
.lf-step.is-active .lf-choice { animation: lf-card-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) both; }

/* Single-column layout for offer cards */
.lf-choices-single { grid-template-columns: 1fr; }

.lf-choice-wide { padding: 1rem 1.1rem; }

.lf-choice-detail {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    flex: 1;
}

.lf-price {
    font-family: 'Outfit', 'Sora', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary, #2563EB);
    opacity: 0.8;
}
.lf-step.is-active .lf-choice:nth-child(1) { animation-delay: 0.05s; }
.lf-step.is-active .lf-choice:nth-child(2) { animation-delay: 0.08s; }
.lf-step.is-active .lf-choice:nth-child(3) { animation-delay: 0.11s; }
.lf-step.is-active .lf-choice:nth-child(4) { animation-delay: 0.14s; }
.lf-step.is-active .lf-choice:nth-child(5) { animation-delay: 0.17s; }
.lf-step.is-active .lf-choice:nth-child(6) { animation-delay: 0.20s; }

@keyframes lf-card-in {
    from { opacity: 0; transform: translateY(10px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- Input fields (Step 4) --- */
.lf-fields {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: auto;
}

.lf-field {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.lf-label {
    font-family: 'Outfit', 'Sora', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: #4A4A52;
    letter-spacing: 0.02em;
}

.lf-optional {
    font-weight: 400;
    color: #B5B5BF;
    font-size: 0.7rem;
}

.lf-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #FAF8F5;
    border: 1.5px solid #E8E5DF;
    border-radius: 10px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.92rem;
    color: #1B1B1F;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    -webkit-appearance: none;
}

.lf-input::placeholder { color: #B5B5BF; }

.lf-input:focus {
    border-color: var(--primary, #2563EB);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
    background: #FFFFFF;
}

.lf-input.has-error {
    border-color: #B91C1C;
    box-shadow: 0 0 0 3px rgba(185,28,28,0.08);
}

.lf-error {
    font-size: 0.68rem;
    font-weight: 500;
    color: #B91C1C;
    min-height: 0.85rem;
    opacity: 0;
    transform: translateY(-3px);
    transition: all 0.2s ease;
}

.lf-error.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered input animation */
.lf-step.is-active .lf-field { animation: lf-card-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) both; }
.lf-step.is-active .lf-field:nth-child(1) { animation-delay: 0.03s; }
.lf-step.is-active .lf-field:nth-child(2) { animation-delay: 0.06s; }
.lf-step.is-active .lf-field:nth-child(3) { animation-delay: 0.09s; }
.lf-step.is-active .lf-field:nth-child(4) { animation-delay: 0.12s; }
.lf-step.is-active .lf-field:nth-child(5) { animation-delay: 0.15s; }

/* Textarea */
.lf-textarea {
    resize: vertical;
    min-height: 70px;
    max-height: 140px;
    line-height: 1.5;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* --- Footer buttons --- */
.lf-footer {
    padding: 0.75rem 1.75rem 1.25rem;
    flex-shrink: 0;
}

.lf-actions {
    display: flex;
    gap: 0.5rem;
}

.lf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-family: 'Outfit', 'Sora', sans-serif;
    font-weight: 600;
    border: none;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.lf-btn-back {
    width: 44px; height: 44px; padding: 0;
    flex-shrink: 0;
    background: #F5F2ED;
    color: #8A8A95;
}

.lf-btn-back:hover { background: #EDE9E1; color: #4A4A52; }
.lf-btn-back svg { width: 18px; height: 18px; }

.lf-btn-continue {
    flex: 1; height: 46px;
    font-size: 0.88rem;
    background: var(--primary, #2563EB);
    color: white;
    box-shadow: 0 2px 8px rgba(37,99,235,0.15);
    letter-spacing: -0.01em;
}

.lf-btn-continue:hover:not(:disabled) {
    filter: brightness(0.9);
    box-shadow: 0 4px 16px rgba(37,99,235,0.2);
    transform: translateY(-1px);
}

.lf-btn-continue:active:not(:disabled) { transform: translateY(0); }
.lf-btn-continue:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; }

.lf-arrow { transition: transform 0.2s ease; }
.lf-btn-continue:hover:not(:disabled) .lf-arrow { transform: translateX(3px); }

.lf-btn-submit {
    flex: 1; height: 50px;
    font-size: 0.88rem;
    background: linear-gradient(135deg, var(--primary, #2563EB) 0%, var(--primary-light, #3B82F6) 100%);
    color: white;
    box-shadow: 0 2px 12px rgba(37,99,235,0.2);
    letter-spacing: -0.01em;
}

.lf-btn-submit:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(37,99,235,0.25);
    transform: translateY(-1px);
}

.lf-btn-submit:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; }

.lf-spinner {
    display: none;
    width: 20px; height: 20px;
    border: 2.5px solid rgba(255,255,255,0.25);
    border-top-color: white;
    border-radius: 50%;
    animation: lf-spin 0.65s linear infinite;
}

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

.lf-btn-submit.is-loading .lf-btn-label { display: none; }
.lf-btn-submit.is-loading .lf-spinner { display: inline-block; }

/* --- Privacy note --- */
.lf-privacy {
    text-align: center;
    font-size: 0.66rem;
    color: #B5B5BF;
    padding: 0.4rem 1.75rem 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.lf-privacy svg {
    width: 11px; height: 11px;
    flex-shrink: 0;
    stroke: #B5B5BF;
    fill: none;
}

/* --- Success screen --- */
.lf-success {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
    transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 5;
}

.lf-success.is-active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.lf-check-circle {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: #ECFDF5;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    position: relative;
}

.lf-check-circle::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid rgba(4,120,87,0.1);
    animation: lf-ring 0.6s 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes lf-ring {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lf-check-circle svg {
    width: 28px; height: 28px;
    stroke: #047857;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.lf-check-path {
    stroke-dasharray: 30;
    stroke-dashoffset: 30;
    animation: lf-draw 0.4s 0.35s ease forwards;
}

@keyframes lf-draw { to { stroke-dashoffset: 0; } }

.lf-success-title {
    font-family: 'Outfit', 'Sora', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #1B1B1F;
    letter-spacing: -0.02em;
    margin-bottom: 0.4rem;
}

.lf-success-text {
    font-size: 0.88rem;
    color: #8A8A95;
    max-width: 300px;
    line-height: 1.6;
}

/* --- Responsive --- */
@media (max-width: 520px) {
    .lead-form {
        border-radius: 16px;
        min-height: 480px;
    }

    .lf-heading { font-size: 1.15rem; }
    .lf-choices { gap: 0.4rem; }
    .lf-choice { padding: 0.7rem 0.75rem; gap: 0.5rem; }
    .lf-emoji { width: 32px; height: 32px; font-size: 1rem; }
    .lf-text { font-size: 0.75rem; }
}
