/* =========================================================
   I.A MILIONÁRIO — quiz de captura
   Paleta: obsidiana / ouro / esmeralda · mobile-first
   ========================================================= */

:root {
    --obsidian: #0a0e14;
    --panel:    #121822;
    --panel-2:  #161d29;
    --line:     rgba(240, 198, 116, 0.14);
    --gold:     #e7b44c;
    --gold-2:   #f0c674;
    --gold-soft: rgba(231, 180, 76, 0.12);
    --emerald:  #34d399;
    --cream:    #f5f3ee;
    --ink:      #8a94a6;
    --ink-dim:  #5c6678;
    --danger:   #f4776b;

    --radius: 16px;
    --radius-sm: 11px;
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

    --font-display: "Space Grotesk", system-ui, sans-serif;
    --font-body: "Inter", system-ui, -apple-system, sans-serif;
}

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

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

body {
    font-family: var(--font-body);
    color: var(--cream);
    background: var(--obsidian);
    min-height: 100vh;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    display: flex;
    justify-content: center;
    padding: 24px 18px 40px;
    position: relative;
    overflow-x: hidden;
}

/* Brilho dourado ambiente */
.aura {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(60% 45% at 50% -5%, rgba(231, 180, 76, 0.16), transparent 70%),
        radial-gradient(50% 40% at 90% 110%, rgba(52, 211, 153, 0.08), transparent 70%);
    pointer-events: none;
}

.stage {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* -------- Marca -------- */
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    font-family: var(--font-display);
    letter-spacing: 0.14em;
    font-size: 0.92rem;
    font-weight: 600;
}
.brand__mark {
    display: grid;
    place-items: center;
    width: 34px; height: 34px;
    border-radius: 9px;
    font-weight: 700;
    color: var(--obsidian);
    background: linear-gradient(135deg, var(--gold-2), var(--gold));
    box-shadow: 0 6px 18px rgba(231, 180, 76, 0.35);
}
.brand__name { color: var(--cream); }
.accent { color: var(--gold); }

/* -------- Medidor de riqueza -------- */
.meter { display: flex; flex-direction: column; gap: 8px; }
.meter__track {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}
.meter__fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--gold), var(--gold-2));
    box-shadow: 0 0 14px rgba(231, 180, 76, 0.5);
    transition: width 0.6s var(--ease);
}
.meter__label {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--ink);
    font-weight: 500;
}
.meter__percent {
    font-family: var(--font-display);
    color: var(--gold);
    font-variant-numeric: tabular-nums;
}

/* -------- Card -------- */
.card {
    position: relative;
    background: linear-gradient(180deg, var(--panel), var(--panel-2));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px 22px 26px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    min-height: 340px;
    display: grid;
}

/* Cada passo ocupa a mesma célula do grid; só o ativo aparece */
.step {
    grid-area: 1 / 1;
    opacity: 0;
    visibility: hidden;
    transform: translateX(22px);
    transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
    pointer-events: none;
    align-self: start;
}
.step.is-active {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
}
.step.is-leaving-left {
    transform: translateX(-22px);
}

/* -------- Tipografia de conteúdo -------- */
.eyebrow, .q-index {
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.72rem;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 12px;
}
.headline {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.72rem;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin-bottom: 14px;
}
.q-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.32rem;
    line-height: 1.22;
    margin-bottom: 20px;
}
.lead {
    color: var(--ink);
    font-size: 1rem;
    margin-bottom: 26px;
}

/* -------- Opções (radios estilizados) -------- */
.options { display: flex; flex-direction: column; gap: 10px; }
.option { display: block; cursor: pointer; }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option__box {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 15px 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    font-size: 0.98rem;
    font-weight: 500;
    transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.1s var(--ease);
}
.option__dot {
    flex: none;
    width: 18px; height: 18px;
    border-radius: 50%;
    border: 2px solid var(--ink-dim);
    transition: border-color 0.2s, box-shadow 0.2s;
    position: relative;
}
.option:hover .option__box { border-color: rgba(231, 180, 76, 0.4); }
.option input:focus-visible + .option__box { outline: 2px solid var(--gold); outline-offset: 2px; }
.option input:checked + .option__box {
    border-color: var(--gold);
    background: var(--gold-soft);
}
.option input:checked + .option__box .option__dot {
    border-color: var(--gold);
    box-shadow: inset 0 0 0 4px var(--gold);
}

/* -------- Textarea / campos -------- */
.textarea, .field input {
    width: 100%;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--cream);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 14px 15px;
    transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
    resize: vertical;
}
.textarea { min-height: 110px; }
.field { margin-bottom: 16px; }
.field label {
    display: block;
    font-size: 0.82rem;
    color: var(--ink);
    font-weight: 500;
    margin-bottom: 7px;
}
.textarea::placeholder, .field input::placeholder { color: var(--ink-dim); }
.textarea:focus, .field input:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(231, 180, 76, 0.04);
}
.field input.is-invalid, .textarea.is-invalid { border-color: var(--danger); }

/* -------- Erros -------- */
.field-error {
    color: var(--danger);
    font-size: 0.82rem;
    margin-top: 7px;
    min-height: 1em;
}
.field-error--form { text-align: center; margin: 4px 0 0; }

/* -------- Botões -------- */
.btn {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: var(--radius-sm);
    padding: 15px 22px;
    cursor: pointer;
    transition: transform 0.1s var(--ease), box-shadow 0.2s var(--ease), background 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn--primary {
    color: var(--obsidian);
    background: linear-gradient(135deg, var(--gold-2), var(--gold));
    box-shadow: 0 10px 26px rgba(231, 180, 76, 0.3);
    width: 100%;
}
.btn--primary:hover { box-shadow: 0 12px 32px rgba(231, 180, 76, 0.45); }
.btn--primary:disabled { opacity: 0.7; cursor: progress; }
.btn--ghost {
    color: var(--ink);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.btn--ghost:hover { color: var(--cream); border-color: rgba(255, 255, 255, 0.28); }

.nav { display: flex; gap: 12px; margin-top: 24px; }
.nav .btn--ghost { flex: none; padding-left: 20px; padding-right: 20px; }

/* Spinner do submit */
.btn__spinner {
    width: 17px; height: 17px;
    border: 2px solid rgba(10, 14, 20, 0.35);
    border-top-color: var(--obsidian);
    border-radius: 50%;
    display: none;
    animation: spin 0.7s linear infinite;
}
.btn.is-loading .btn__text { opacity: 0.6; }
.btn.is-loading .btn__spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

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

.privacy {
    text-align: center;
    color: var(--ink-dim);
    font-size: 0.76rem;
    margin-top: 14px;
}

.foot {
    text-align: center;
    color: var(--ink-dim);
    font-size: 0.76rem;
    letter-spacing: 0.03em;
}

/* -------- Responsivo -------- */
@media (min-width: 560px) {
    body { padding-top: 44px; }
    .card { padding: 34px 32px 30px; }
    .headline { font-size: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
    .step { transform: none; }
}
