:root {
    --navy: #08152e;
    --navy-2: #102447;
    --blue: #1468ff;
    --blue-soft: #eaf2ff;
    --pink: #ff315f;
    --cyan: #39d7ff;
    --green: #14a96f;
    --ink: #15223b;
    --muted: #66728a;
    --line: #dfe5ef;
    --surface: #ffffff;
    --bg: #f1f5fb;
    --danger: #c72d4e;
    --shadow: 0 18px 50px rgba(6, 25, 58, .12);
    --radius: 22px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.45;
}

button, input, textarea, select { font: inherit; }

button, label { -webkit-tap-highlight-color: transparent; }

[hidden] { display: none !important; }

.topbar {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px max(20px, calc((100vw - 980px) / 2));
    background: var(--navy);
    color: white;
    border-bottom: 3px solid var(--pink);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: white;
    text-decoration: none;
    font-weight: 900;
    letter-spacing: -.04em;
}

.brand-mega {
    padding: 3px 8px 4px;
    background: var(--pink);
    border-radius: 7px;
    font-size: 1.2rem;
    transform: skew(-5deg);
}

.brand-fm { font-size: 1.04rem; }

.topbar-tag {
    font-size: .84rem;
    color: #cbd6ea;
}

.survey-shell {
    width: min(100% - 28px, 880px);
    margin: 28px auto 54px;
}

.hero {
    position: relative;
    overflow: hidden;
    padding: clamp(28px, 6vw, 54px);
    color: white;
    background:
        radial-gradient(circle at 85% 5%, rgba(57, 215, 255, .35), transparent 28%),
        radial-gradient(circle at 0% 100%, rgba(255, 49, 95, .32), transparent 34%),
        linear-gradient(135deg, var(--navy), #123f85);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.hero::after {
    content: "91.9";
    position: absolute;
    right: -18px;
    bottom: -58px;
    font-size: clamp(7rem, 23vw, 13rem);
    font-weight: 950;
    line-height: 1;
    color: rgba(255,255,255,.055);
    letter-spacing: -.09em;
    pointer-events: none;
}

.hero-badge,
.step-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(57, 215, 255, .14);
    color: var(--cyan);
    font-size: .74rem;
    font-weight: 850;
    letter-spacing: .12em;
}

.hero h1 {
    position: relative;
    z-index: 1;
    margin: 15px 0 14px;
    max-width: 650px;
    font-size: clamp(2.3rem, 7.5vw, 4.5rem);
    line-height: .98;
    letter-spacing: -.065em;
}

.hero h1 span { color: var(--cyan); }

.hero p {
    position: relative;
    z-index: 1;
    max-width: 650px;
    margin: 0;
    color: #dce8fb;
    font-size: clamp(1rem, 2vw, 1.18rem);
}

.hero-meta {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
}

.hero-meta span {
    padding: 7px 10px;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    font-size: .82rem;
}

.alert {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 14px;
}

.alert-error {
    color: #851d38;
    background: #fff0f3;
    border: 1px solid #ffc5d1;
}

.progress-wrap {
    position: sticky;
    top: 0;
    z-index: 20;
    margin: 20px 0;
    padding: 13px 16px;
    border: 1px solid rgba(223, 229, 239, .9);
    border-radius: 15px;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 30px rgba(6, 25, 58, .08);
}

.progress-copy {
    display: flex;
    justify-content: space-between;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: .8rem;
    font-weight: 750;
}

.progress-track {
    height: 7px;
    overflow: hidden;
    background: #e6ebf3;
    border-radius: 999px;
}

.progress-bar {
    width: 12.5%;
    height: 100%;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    border-radius: inherit;
    transition: width .3s ease;
}

#survey-form {
    padding: clamp(22px, 5vw, 42px);
    background: var(--surface);
    border: 1px solid #e3e8f0;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.form-step { animation: stepIn .25s ease both; }

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

.form-step h2 {
    margin: 10px 0 7px;
    font-size: clamp(1.75rem, 5vw, 2.45rem);
    line-height: 1.06;
    letter-spacing: -.045em;
}

.step-kicker {
    color: var(--blue);
    background: var(--blue-soft);
}

.step-intro {
    margin: 0 0 25px;
    color: var(--muted);
}

fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.question {
    margin-top: 30px;
}

.question:first-of-type { margin-top: 24px; }

.question legend,
.text-question > label,
.conditional-field > label,
.conditional-field > div > label {
    display: block;
    width: 100%;
    margin-bottom: 11px;
    color: var(--ink);
    font-size: 1.04rem;
    font-weight: 800;
}

.question label span,
.conditional-field label span,
.text-question label span {
    color: var(--muted);
    font-size: .85em;
    font-weight: 550;
}

.question-help {
    width: fit-content;
    margin: -3px 0 10px;
    padding: 4px 9px;
    color: var(--blue);
    background: var(--blue-soft);
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 750;
}

.choices {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
}

.choices.compact,
.priorities-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.choice {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 52px;
    padding: 12px 14px;
    border: 1.5px solid var(--line);
    border-radius: 14px;
    background: white;
    cursor: pointer;
    transition: border-color .16s, background .16s, transform .16s, box-shadow .16s;
}

.choice:hover {
    border-color: #a9c7ff;
    transform: translateY(-1px);
}

.choice:has(input:checked) {
    border-color: var(--blue);
    background: var(--blue-soft);
    box-shadow: 0 0 0 3px rgba(20,104,255,.08);
}

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

.choice-dot,
.choice-check {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border: 2px solid #b9c3d4;
    border-radius: 50%;
    background: white;
}

.choice:has(input:checked) .choice-dot {
    border: 6px solid var(--blue);
}

.choice-check {
    color: transparent;
    border-radius: 6px;
    font-size: .78rem;
    font-weight: 900;
}

.choice:has(input:checked) .choice-check {
    color: white;
    border-color: var(--blue);
    background: var(--blue);
}

.rating-card {
    margin-top: 18px;
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fbfcfe;
}

.rating-card legend {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-weight: 820;
}

.service-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    background: var(--blue-soft);
    border-radius: 10px;
}

.rating-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.rating-options label { cursor: pointer; }

.rating-options input {
    position: absolute;
    opacity: 0;
}

.rating-options span {
    min-height: 42px;
    display: grid;
    place-items: center;
    padding: 6px 7px;
    color: #4e5b72;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: white;
    font-size: .78rem;
    font-weight: 700;
    text-align: center;
}

.rating-options input:checked + span {
    color: white;
    border-color: var(--blue);
    background: var(--blue);
}

.conditional-field {
    margin-top: 18px;
    padding: 16px;
    background: #f7f9fc;
    border: 1px solid var(--line);
    border-radius: 14px;
}

input[type="text"],
input[type="tel"],
input[type="date"],
input[type="search"],
select,
textarea {
    width: 100%;
    padding: 13px 14px;
    color: var(--ink);
    border: 1.5px solid #ccd5e3;
    border-radius: 12px;
    background: white;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(20,104,255,.1);
}

textarea { resize: vertical; }

.text-question {
    position: relative;
    margin-top: 28px;
}

.char-count {
    margin-top: 4px;
    color: var(--muted);
    font-size: .75rem;
    text-align: right;
}

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

.identity-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 160px;
    padding: 20px;
    border: 2px solid var(--line);
    border-radius: 18px;
    cursor: pointer;
    transition: .18s ease;
}

.identity-card input {
    position: absolute;
    opacity: 0;
}

.identity-card:has(input:checked) {
    border-color: var(--blue);
    background: var(--blue-soft);
    box-shadow: 0 0 0 4px rgba(20,104,255,.09);
}

.identity-icon {
    margin-bottom: 9px;
    font-size: 2rem;
}

.identity-card strong { font-size: 1.05rem; }

.identity-card small {
    margin-top: 5px;
    color: var(--muted);
    font-size: .82rem;
}

.field-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 12px;
}

.privacy-note {
    margin: 13px 0 0;
    color: #46536b;
    font-size: .82rem;
}

.final-summary {
    display: grid;
    gap: 7px;
    margin-top: 18px;
    color: #35614f;
    font-size: .86rem;
}

.form-navigation {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 34px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.btn {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border: 0;
    border-radius: 13px;
    font-weight: 820;
    text-decoration: none;
    cursor: pointer;
    transition: transform .16s, filter .16s, box-shadow .16s;
}

.btn:hover { transform: translateY(-1px); filter: brightness(1.02); }

.btn-primary,
.btn-submit {
    color: white;
    background: linear-gradient(135deg, var(--blue), #0750d1);
    box-shadow: 0 10px 24px rgba(20,104,255,.24);
}

.btn-submit {
    background: linear-gradient(135deg, var(--green), #088457);
    box-shadow: 0 10px 24px rgba(20,169,111,.22);
}

.btn-secondary { color: #334059; background: #edf1f7; }

.form-message {
    min-height: 20px;
    margin: 10px 0 0;
    color: var(--danger);
    font-size: .85rem;
    font-weight: 700;
    text-align: right;
}

.survey-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 32px 10px;
    color: var(--muted);
    font-size: .82rem;
    text-align: center;
}

.survey-footer p { margin: 5px 0; }
.survey-footer a { color: var(--blue); }
.footer-brand { color: var(--navy); }

.thanks-shell {
    min-height: calc(100vh - 100px);
    display: grid;
    place-items: center;
}

.thanks-card {
    width: min(100%, 650px);
    padding: clamp(28px, 7vw, 58px);
    text-align: center;
    background: white;
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.thanks-check {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    margin: 0 auto 18px;
    color: white;
    background: linear-gradient(135deg, var(--green), #21d18d);
    border-radius: 50%;
    box-shadow: 0 14px 30px rgba(20,169,111,.25);
    font-size: 2.2rem;
    font-weight: 950;
}

.thanks-card .hero-badge {
    margin-inline: auto;
    color: var(--blue);
    background: var(--blue-soft);
}

.thanks-card h1 {
    margin: 13px 0 12px;
    font-size: clamp(2rem, 8vw, 3.5rem);
    line-height: 1;
    letter-spacing: -.055em;
}

.thanks-card > p {
    margin: 0 auto;
    max-width: 520px;
    color: var(--muted);
    font-size: 1.05rem;
}

.thanks-private {
    margin: 22px 0;
    padding: 12px 14px;
    color: #35566a;
    background: #eef9ff;
    border: 1px solid #cfedfb;
    border-radius: 12px;
    font-size: .86rem;
}

.whatsapp-share {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 15px 18px;
    color: white;
    background: #16a765;
    border-radius: 15px;
    text-decoration: none;
    box-shadow: 0 12px 26px rgba(22,167,101,.22);
}

.whatsapp-share > span:first-child { font-size: 1.8rem; }
.whatsapp-share span:last-child { display: grid; text-align: left; }
.whatsapp-share small { color: #d8f8e9; }
.thanks-home { margin-top: 12px; }

.privacy-page {
    padding: clamp(24px, 6vw, 50px);
    background: white;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.privacy-page h1 {
    margin: 12px 0 24px;
    font-size: clamp(2rem, 6vw, 3.5rem);
    line-height: 1;
    letter-spacing: -.05em;
}

.privacy-page h2 { margin: 28px 0 6px; font-size: 1.2rem; }
.privacy-page p { color: #4c5870; }

.is-invalid {
    border-color: var(--danger) !important;
    box-shadow: 0 0 0 3px rgba(199,45,78,.08);
}

@media (max-width: 680px) {
    .topbar { min-height: 62px; padding-inline: 16px; }
    .topbar-tag { display: none; }
    .survey-shell { width: min(100% - 18px, 880px); margin-top: 10px; }
    .hero { padding: 27px 21px; border-radius: 19px; }
    .hero h1 { font-size: clamp(2.15rem, 12vw, 3.1rem); }
    .hero-meta { gap: 5px; }
    .hero-meta span { font-size: .73rem; }
    .progress-wrap { margin: 12px 0; border-radius: 12px; }
    #survey-form { padding: 23px 16px 18px; border-radius: 17px; }
    .choices.compact,
    .priorities-grid,
    .identity-grid,
    .field-grid { grid-template-columns: 1fr; }
    .rating-card { padding: 14px 11px; }
    .rating-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rating-options label:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .form-navigation { position: sticky; bottom: 0; z-index: 10; margin-inline: -16px; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); }
    .form-navigation .btn { flex: 1; }
    .form-message { text-align: center; }
    .identity-card { min-height: 130px; }
}
