/* Quiz de financiamento de caminhão — mesmos tokens do style.css do site principal */
:root {
    --bg-light: #F8FAFC;
    --bg-white: #FFFFFF;
    --primary-color: #002A5E;
    --primary-soft: #E8EEF6;
    --accent-color: #FF6B00;
    --accent-hover: #E65C00;
    --accent-soft: #FFF1E6;
    --text-dark: #1E293B;
    --text-muted: #64748B;
    --border-light: #E2E8F0;
    --error: #B42318;
    --success: #15803D;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-strong: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --font-sans: 'Inter', sans-serif;
    --font-heading: 'Baloo 2', cursive;
    --radius: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-sans);
    color: var(--text-dark);
    background: var(--bg-light);
    line-height: 1.5;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Faixa azul atrás do topo e do começo do cartão */
body::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 280px;
    background: linear-gradient(160deg, #003B80 0%, var(--primary-color) 70%);
    z-index: -1;
}

a { color: var(--primary-color); }

/* Topo */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    max-width: 640px;
    width: 100%;
    margin: 0 auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    font-size: 0.8rem;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.brand img { width: 44px; height: auto; }
.brand strong { font-size: 0.95rem; }

.topbar-wpp {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 14px;
    border-radius: 999px;
    transition: background 0.2s ease;
}

.topbar-wpp:hover { background: rgba(255, 255, 255, 0.26); }

/* Cartão principal */
.quiz-shell {
    flex: 1;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    padding: 4px 16px 32px;
}

.screen {
    display: none;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-strong);
    padding: 28px 20px;
}

.screen.is-active { display: block; animation: rise 0.25s ease-out; }

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

@media (prefers-reduced-motion: reduce) {
    .screen.is-active { animation: none; }
}

/* Abertura */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-soft);
    color: #A84500;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 12px;
    border-radius: 999px;
    margin-bottom: 16px;
}

.intro h1 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 1.85rem;
    line-height: 1.15;
    margin-bottom: 12px;
}

.lead {
    color: var(--text-muted);
    font-size: 1.02rem;
    margin-bottom: 20px;
}

.intro-points {
    list-style: none;
    display: grid;
    gap: 10px;
    margin-bottom: 26px;
}

.intro-points li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.intro-points i { color: var(--success); font-size: 1.1rem; }

.micro {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 12px;
}

/* Botão principal */
.cta-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 58px;
    background-color: var(--accent-color);
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.2rem;
    padding: 14px 24px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
    text-decoration: none;
    text-align: center;
    box-shadow: 0 8px 16px rgba(255, 107, 0, 0.3);
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.cta-primary:hover { background-color: var(--accent-hover); }
.cta-primary:active { transform: scale(0.98); }
.cta-primary:focus-visible { outline: 3px solid var(--primary-color); outline-offset: 3px; }
.cta-primary:disabled { opacity: 0.6; cursor: wait; box-shadow: none; }

/* Barra de progresso */
.progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}

.progress-track {
    flex: 1;
    height: 8px;
    background: var(--border-light);
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0;
    background: var(--accent-color);
    border-radius: 999px;
    transition: width 0.3s ease;
}

.progress-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Pergunta */
.step-title {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 1.5rem;
    line-height: 1.2;
    margin-bottom: 6px;
}

.step-help {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 18px;
}

.options {
    display: grid;
    gap: 10px;
    border: 0;
}

.option {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 60px;
    padding: 14px 16px;
    background: var(--bg-white);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    font: inherit;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-dark);
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.option:hover { border-color: #94A3B8; }
.option:focus-visible { outline: 3px solid var(--accent-color); outline-offset: 2px; }

.option .opt-icon {
    flex: 0 0 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--primary-soft);
    color: var(--primary-color);
    font-size: 1.05rem;
}

.option .opt-text { flex: 1; }
.option .opt-sub { display: block; font-weight: 400; font-size: 0.85rem; color: var(--text-muted); }

.option[aria-pressed="true"],
.option[aria-checked="true"] {
    border-color: var(--accent-color);
    background: var(--accent-soft);
}

.option[aria-pressed="true"] .opt-icon,
.option[aria-checked="true"] .opt-icon {
    background: var(--accent-color);
    color: #fff;
}

/* Caixinha de marcação para múltipla escolha */
.option .opt-check {
    flex: 0 0 22px;
    height: 22px;
    border: 2px solid #94A3B8;
    border-radius: 6px;
    display: grid;
    place-items: center;
    color: transparent;
    font-size: 0.75rem;
}

.option[aria-checked="true"] .opt-check {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}

/* Campos de texto */
.field { margin-bottom: 14px; }

.field label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.field input {
    width: 100%;
    min-height: 54px;
    padding: 12px 16px;
    font: inherit;
    font-size: 1.05rem;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    background: var(--bg-white);
    color: var(--text-dark);
    transition: border-color 0.15s ease;
}

.field input:focus { outline: none; border-color: var(--primary-color); }
.field input[aria-invalid="true"] { border-color: var(--error); }

.field input.plate {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 800;
    font-size: 1.4rem;
    text-align: center;
}

.field-error {
    display: none;
    color: var(--error);
    font-size: 0.85rem;
    margin-top: 6px;
}

.field-error.is-visible { display: block; }

.other-input { margin-top: 10px; }

.step-actions {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.link-btn {
    background: none;
    border: none;
    font: inherit;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    padding: 10px;
    min-height: 44px;
}

/* Consentimento */
.consent {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 6px 0 4px;
}

.consent input { margin-top: 3px; width: 18px; height: 18px; flex: 0 0 18px; accent-color: var(--accent-color); }

.secure-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 10px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    background: none;
    border: none;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px 4px;
    min-height: 44px;
}

.back-btn[hidden] { display: none; }

/* Tela final */
.done { text-align: center; }

.done-icon {
    width: 72px;
    height: 72px;
    margin: 4px auto 18px;
    border-radius: 50%;
    background: #DCFCE7;
    color: var(--success);
    display: grid;
    place-items: center;
    font-size: 2rem;
}

.done h2 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 1.6rem;
    line-height: 1.2;
    margin-bottom: 8px;
}

.done p { color: var(--text-muted); margin-bottom: 22px; }

/* Honeypot */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Rodapé */
.quiz-footer {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 16px 32px;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    display: grid;
    gap: 8px;
}

@media (min-width: 600px) {
    .screen { padding: 36px 36px; }
    .intro h1 { font-size: 2.2rem; }
    .step-title { font-size: 1.7rem; }
}
