:root {
    --navy: #0c2251;
    --navy-deep: #07183c;
    --violet: #8375db;
    --lavender-soft: #f2efff;
    --cream: #fbfaf7;
    --white: #ffffff;
    --text: #3f4250;
    --muted: #747987;
    --line: #e5e7ef;
    --danger: #d34f57;
    --shadow: 0 18px 50px rgba(12,34,81,.09);
    --radius-xl: 28px;
    --radius-lg: 20px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Montserrat", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 50% 0%, rgba(185,173,241,.13), transparent 34rem),
        var(--cream);
}

button, input { font: inherit; }

.page-shell {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 22px 14px 40px;
}

.form-card {
    width: min(100%, 900px);
    background: rgba(255,255,255,.98);
    border: 1px solid rgba(12,34,81,.05);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    padding: clamp(24px,5vw,58px);
}

.form-header { text-align: center; }

.form-header h1,
.step-heading h2 {
    font-family: "Playfair Display", serif;
    color: var(--navy);
}

.form-header h1 {
    max-width: 760px;
    margin: 0 auto;
    font-size: clamp(2rem,5.7vw,3.45rem);
    line-height: 1.05;
    letter-spacing: -.025em;
}

.form-header > p {
    max-width: 700px;
    margin: 22px auto 0;
    color: var(--muted);
    font-size: clamp(.94rem,2.5vw,1.05rem);
    line-height: 1.65;
}

.progress {
    height: 11px;
    margin-top: 32px;
    overflow: hidden;
    border-radius: 999px;
    background: #f0f0f4;
}

.progress__bar {
    width: 20%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg,#9b90ea,#c5bcf3);
    transition: width .28s ease;
}

.progress__text {
    margin: 9px 0 0 !important;
    font-size: .76rem !important;
    font-weight: 600;
    color: #8a8d98 !important;
}

.step {
    display: none;
    padding-top: 34px;
    animation: fadeIn .22s ease;
}

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

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

.step-heading { margin-bottom: 24px; }

.eyebrow {
    display: block;
    margin-bottom: 6px;
    color: var(--violet);
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .09em;
}

.step-heading h2 {
    margin: 0;
    font-size: clamp(1.65rem,4.4vw,2.3rem);
    line-height: 1.15;
}

.step-heading p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.5;
    font-size: .92rem;
}

.fields-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field label,
.other-field label {
    color: #4d4f59;
    font-weight: 600;
    font-size: .9rem;
}

.field label span,
.consent-row strong { color: #f06666; }

.field input,
.other-field input {
    width: 100%;
    min-height: 54px;
    padding: 0 16px;
    border: 1px solid #dfe1e9;
    border-radius: 12px;
    outline: none;
    background: #fff;
    color: var(--navy);
    box-shadow: 0 2px 8px rgba(12,34,81,.025);
    transition: border-color .18s ease, box-shadow .18s ease;
}

.field input:focus,
.other-field input:focus {
    border-color: var(--violet);
    box-shadow: 0 0 0 4px rgba(131,117,219,.11);
}

.choice-grid { display: grid; gap: 12px; }
.choice-grid--photos { grid-template-columns: repeat(2,minmax(0,1fr)); }
.choice-grid--text,
.choice-grid--call { grid-template-columns: 1fr; }

.choice-card {
    position: relative;
    display: flex;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: 0 5px 16px rgba(12,34,81,.035);
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.choice-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.choice-card:has(input:checked) {
    border-color: var(--violet);
    background: var(--lavender-soft);
    box-shadow: 0 0 0 2px rgba(131,117,219,.14), 0 9px 22px rgba(12,34,81,.08);
}

.choice-card:active { transform: scale(.985); }

.choice-card--photo {
    flex-direction: column;
    align-items: center;
    min-height: 168px;
    padding: 12px;
    text-align: center;
}

.choice-card__visual {
    width: 100%;
    aspect-ratio: 1.8/1;
    overflow: hidden;
    border-radius: 13px;
    background: #f1f1f5;
}

.choice-card__visual img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.choice-card__label {
    color: var(--navy);
    font-weight: 700;
    line-height: 1.25;
}

.choice-card--photo .choice-card__label {
    padding: 12px 3px 4px;
    font-size: .9rem;
}

.choice-card--text,
.choice-card--call,
.choice-card--other {
    min-height: 82px;
    align-items: center;
    gap: 14px;
    padding: 15px 17px;
}

.choice-card--other {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    min-height: 168px;
    gap: 8px;
}

.choice-card__icon {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--lavender-soft);
    color: var(--violet);
}

.icon-svg {
    width: 23px;
    height: 23px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.choice-card--text .choice-card__label,
.choice-card--call .choice-card__label { font-size: .92rem; }

.other-field { display: none; margin-top: 16px; }

.other-field.is-visible {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.consent-box {
    margin-top: 20px;
}

.consent-row {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 12px;
    align-items: start;
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    line-height: 1.55;
    font-size: .88rem;
    cursor: pointer;
}

.consent-row input {
    width: 19px;
    height: 19px;
    margin: 2px 0 0;
    accent-color: var(--violet);
}

.consent-row a {
    color: var(--navy);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.step-error {
    min-height: 1.2em;
    margin: 14px 0 0;
    color: var(--danger);
    font-size: .82rem;
    font-weight: 600;
}

/* BOTONES CORREGIDOS */
.form-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    height: 58px;
    padding: 0 30px;
    border-radius: 999px;
    border: 2px solid transparent;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 700;
    font-size: .9rem;
    line-height: 1;
    white-space: nowrap;
    text-align: center;
    text-decoration: none;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
}

.btn--primary {
    margin-left: auto;
    background: var(--navy);
    color: #fff;
    box-shadow: 0 10px 22px rgba(12,34,81,.13);
}

.btn--primary:hover {
    background: var(--navy-deep);
}

.btn--secondary {
    background: #fff;
    color: var(--navy);
    border-color: var(--navy);
}

.btn:focus-visible {
    outline: 3px solid rgba(131,117,219,.3);
    outline-offset: 3px;
}

.btn:disabled {
    opacity: .65;
    cursor: wait;
}

#prevBtn,
#submitBtn { display: none; }

.hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

@media (min-width: 700px) {
    .page-shell { padding: 48px 24px 70px; }
    .choice-grid--photos { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .choice-grid--text { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .choice-grid--call { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (max-width: 430px) {
    .page-shell {
        padding: 0;
        background: #fff;
    }

    .form-card {
        min-height: 100vh;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        padding: 24px 16px max(28px,env(safe-area-inset-bottom));
    }

    .form-header h1 { font-size: 2rem; }

    .form-header > p {
        margin-top: 16px;
        font-size: .88rem;
    }

    .progress {
        margin-top: 24px;
        height: 9px;
    }

    .step { padding-top: 26px; }

    .choice-grid--photos { gap: 9px; }

    .choice-card--photo {
        min-height: 150px;
        padding: 9px;
        border-radius: 16px;
    }

    .choice-card--other {
        min-height: 150px;
        border-radius: 16px;
    }

    .choice-card__visual {
        aspect-ratio: 1.55/1;
        border-radius: 11px;
    }

    .choice-card--photo .choice-card__label {
        font-size: .82rem;
        padding-top: 10px;
    }

    .choice-card--text,
    .choice-card--call {
        min-height: 74px;
        border-radius: 16px;
    }

    .choice-card__icon {
        width: 42px;
        height: 42px;
    }

    .consent-row {
        grid-template-columns: 22px 1fr;
        padding: 14px;
        gap: 10px;
        font-size: .82rem;
    }

    .form-nav {
        position: sticky;
        bottom: 0;
        gap: 10px;
        padding-top: 16px;
        padding-bottom: max(4px,env(safe-area-inset-bottom));
        background: linear-gradient(to bottom,rgba(255,255,255,0),#fff 30%);
    }

    .btn {
        flex: 1 1 0;
        min-width: 0;
        height: 54px;
        padding: 0 14px;
        font-size: .82rem;
    }

    .btn--primary {
        margin-left: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,*::before,*::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}
