/* ---------------------------------------------------------
   FORM STYLES - SAAS ONBOARDING VERSION
--------------------------------------------------------- */

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background:
        radial-gradient(circle at top left, rgba(74, 144, 226, 0.12), transparent 34%),
        radial-gradient(circle at bottom right, rgba(108, 92, 231, 0.10), transparent 32%),
        #f5f7fa;
    color: #1c1c1e;
}

.app,
#form-container {
    max-width: 980px;
    margin: 0 auto;
    padding: 32px 20px 48px;
}

/* SaaS branding */
.form-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 860px;
    margin: 0 auto 20px;
    padding: 0 4px;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: #172033;
}

.brand-logo::before {
    content: "";
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #4a90e2, #6c5ce7);
    margin-right: 10px;
    box-shadow: 0 0 0 6px rgba(74, 144, 226, 0.12);
}

.brand-tagline {
    font-size: 0.92rem;
    font-weight: 700;
    color: #64748b;
}

.page {
    display: block;
}

.page[hidden] {
    display: none !important;
}

.saas-card {
    max-width: 860px;
}

/* Main page wrappers */
#page-language,
#page-main,
#intake-form,
#page-thankyou {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 28px;
    padding: 34px;
    box-shadow: 0 18px 48px rgba(16, 24, 40, 0.09);
    margin: 0 auto 28px;
}

/* SaaS progress */
.form-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 28px;
}

.progress-step {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: #e8eef8;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 900;
    border: 1px solid #dbe4f0;
}

.progress-step.active {
    background: linear-gradient(135deg, #4a90e2, #357abd);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 10px 22px rgba(74, 144, 226, 0.24);
}

.progress-step.completed {
    background: #e7f3ff;
    color: #357abd;
    border-color: #b9d7ff;
}

.progress-line {
    width: 56px;
    height: 3px;
    background: #e8eef8;
}

.progress-line.active {
    background: linear-gradient(90deg, #4a90e2, #357abd);
}

.form-kicker {
    display: block;
    text-align: center;
    margin-bottom: 12px;
    color: #4a90e2;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.form-helper {
    text-align: center;
    color: #64748b;
    font-size: 1rem;
    line-height: 1.55;
    margin: -8px auto 24px;
    max-width: 640px;
}

.form-title {
    margin-bottom: 10px;
}

.language-options {
    margin-top: 10px;
}

/* Titles */
h1,
h2 {
    color: #1c1c1e;
    text-align: center;
    line-height: 1.15;
    margin: 0 0 20px;
}

#page-language h1 {
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    margin-bottom: 16px;
    letter-spacing: -0.04em;
}

#page-main h2,
#intake-form h2,
#page-thankyou h2 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    margin-bottom: 18px;
    letter-spacing: -0.03em;
}

#page-main p[data-i18n="main.subtitle"] {
    text-align: center;
    color: #64748b;
    font-size: 1rem;
    margin: -8px auto 24px;
}

#page-thankyou p {
    text-align: center;
    color: #4a5565;
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 16px;
}

/* Options layout */
.options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 22px;
}

/* Chips */
.chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d7deea;
    background: #ffffff;
    color: #1c1c1e;
    border-radius: 999px;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.chip:hover {
    transform: translateY(-1px);
    border-color: #4a90e2;
    box-shadow: 0 10px 24px rgba(74, 144, 226, 0.10);
}

.chip input {
    display: none;
}

.chip span {
    display: block;
    padding: 15px 22px;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
}

.chip input:checked + span {
    background: linear-gradient(135deg, #4a90e2, #357abd);
    color: #ffffff;
}

/* Language buttons */
.btn-lang {
    appearance: none;
    border: 1px solid #d7deea;
    background: #ffffff;
    color: #1c1c1e;
    border-radius: 16px;
    padding: 16px 26px;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.btn-lang:hover {
    transform: translateY(-2px);
    border-color: #4a90e2;
    color: #4a90e2;
    box-shadow: 0 12px 28px rgba(74, 144, 226, 0.12);
}

/* Back button */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: transparent;
    color: #4a90e2;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    margin-bottom: 18px;
    padding: 0;
}

.btn-back:hover {
    opacity: 0.8;
}

/* Other input wrappers */
#profile-other-wrap,
#needs-other-wrap {
    display: block;
    max-width: 760px;
    margin: 8px auto 28px;
    text-align: left;
}

#profile-other-wrap span,
#needs-other-wrap span {
    display: block;
    text-align: center;
    font-weight: 800;
    margin-bottom: 10px;
    color: #1c1c1e;
}

/* Dynamic blocks */
.block {
    background: #ffffff;
    border: 1px solid #e4e9f2;
    border-radius: 24px;
    padding: 28px;
    margin-bottom: 22px;
    box-shadow: 0 10px 24px rgba(16, 24, 40, 0.05);
}

.block h2 {
    margin-bottom: 24px;
}

label {
    display: block;
    margin-bottom: 18px;
}

label span {
    display: block;
    margin-bottom: 10px;
    font-size: 1rem;
    font-weight: 800;
    color: #1c1c1e;
}

fieldset {
    border: 1px solid #e4e9f2;
    border-radius: 18px;
    padding: 18px;
    margin: 0 0 18px;
    background: #fbfcfe;
}

legend {
    padding: 0 8px;
    font-size: 1rem;
    font-weight: 800;
    color: #1c1c1e;
}

fieldset label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 12px 18px 0 0;
    font-weight: 700;
    color: #1c1c1e;
}

fieldset input[type="radio"] {
    width: auto;
    box-shadow: none;
}

fieldset label span {
    display: inline;
    margin: 0;
}

/* Inputs */
input,
select,
textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #cfd7e6;
    border-radius: 16px;
    background: #fbfcfe;
    color: #1c1c1e;
    font-size: 1rem;
    padding: 15px 16px;
    outline: none;
    transition: all 0.2s ease;
}

input::placeholder,
textarea::placeholder {
    color: #98a2b3;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #4a90e2;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.12);
}

textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.55;
}

/* Submit button */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 58px;
    border: none;
    border-radius: 18px;
    background: linear-gradient(135deg, #4a90e2, #357abd);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 12px 28px rgba(74, 144, 226, 0.28);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(74, 144, 226, 0.34);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Thank you page */
#page-thankyou {
    text-align: center;
    padding: 56px 32px;
}

/* Smooth fade for language changes */
.fade-lang {
    animation: fadeLang 0.25s ease;
}

@keyframes fadeLang {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 900px) {
    .app,
    #form-container {
        padding: 24px 16px 36px;
    }

    .form-brand {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 6px;
        margin-bottom: 18px;
    }

    #page-language,
    #page-main,
    #intake-form,
    #page-thankyou {
        padding: 24px 18px;
        border-radius: 22px;
    }

    .block {
        padding: 22px 18px;
        border-radius: 20px;
    }

    .chip {
        width: 100%;
        max-width: 100%;
    }

    .chip span {
        width: 100%;
        text-align: center;
    }

    .btn-lang {
        width: 100%;
    }

    .progress-line {
        width: 42px;
    }
}

@media (max-width: 600px) {
    #page-language h1 {
        font-size: 2rem;
    }

    #page-main h2,
    #intake-form h2,
    #page-thankyou h2 {
        font-size: 1.6rem;
    }

    .options {
        gap: 10px;
    }

    .chip span {
        padding: 14px 18px;
        font-size: 0.98rem;
    }

    input,
    select,
    textarea {
        font-size: 16px;
    }

    .form-progress {
        margin-bottom: 22px;
    }

    .progress-step {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }

    .progress-line {
        width: 30px;
    }

    .form-helper {
        font-size: 0.95rem;
    }

    .brand-logo {
        font-size: 1.15rem;
    }

    .brand-tagline {
        font-size: 0.85rem;
    }
}
/* PRIVACY CONSENT */
.privacy-consent {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 760px;
    margin: 8px auto 22px;
    text-align: left;
    color: #4b5563;
    font-size: 0.92rem;
    line-height: 1.45;
}

.privacy-consent input {
    width: auto;
    min-width: 18px;
    height: 18px;
    margin-top: 3px;
    accent-color: #4a90e2;
}

.privacy-consent span {
    margin: 0;
    font-weight: 500;
    color: #4b5563;
}

.privacy-consent a {
    display: inline-block;
    margin-left: 6px;
    color: #2563eb;
    font-weight: 800;
    text-decoration: none;
}

.privacy-consent a:hover {
    text-decoration: underline;
}