@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=Inter:wght@400;500;600&display=swap');


/* ======================================================
   VARIÁVEIS
   ====================================================== */

:root {
    --bg: #F5F3EF;
    --bg-panel: #FFFFFF;

    --ink: #252525;
    --ink-dim: #6B6B67;

    --accent: #315C57;
    --accent-light: #DCE9E6;

    --line: #DDDCD7;

    --radius: 14px;
}


/* ======================================================
   RESET
   ====================================================== */

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;

    background: var(--bg);
    color: var(--ink);

    font-family: 'Inter', sans-serif;
    line-height: 1.4;

    overflow-x: hidden;
    overflow-y: auto;

    /* Scrollbar geral */
    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
}


/* ======================================================
   SCROLLBAR GERAL DA PÁGINA
   ====================================================== */

body::-webkit-scrollbar {
    width: 8px;
}

body::-webkit-scrollbar-track {
    background: transparent;
}

body::-webkit-scrollbar-thumb {
    background: var(--line);
    border-radius: 10px;
}

body::-webkit-scrollbar-thumb:hover {
    background: var(--ink-dim);
}


.oculto {
    display: none !important;
}


/* ======================================================
   TELA INICIAL
   ====================================================== */

#tela-inicio {
    height: 100vh;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    padding: 2rem 1.5rem;

    background:
        radial-gradient(
            circle at 15% 10%,
            rgba(49, 92, 87, 0.08),
            transparent 45%
        ),
        radial-gradient(
            circle at 85% 85%,
            rgba(49, 92, 87, 0.06),
            transparent 45%
        ),
        var(--bg);

    overflow-y: auto;
}

.inicio-conteudo {
    max-width: 640px;

    margin: 0 auto;

    text-align: center;
}

.inicio-eyebrow {
    text-transform: uppercase;

    letter-spacing: 0.14em;

    font-size: 0.78rem;

    color: var(--accent);

    font-weight: 600;

    margin: 0 0 1.25rem;
}

.inicio-titulo {
    font-family: 'Fraunces', serif;

    font-weight: 700;

    font-size: clamp(2rem, 6vw, 3.25rem);

    line-height: 1.1;

    letter-spacing: -0.02em;

    margin: 0 0 1.75rem;
}

.inicio-titulo span {
    color: var(--accent);

    font-style: italic;
}

.inicio-texto {
    text-align: left;

    color: var(--ink-dim);

    font-size: 1rem;
}

.inicio-texto p {
    margin: 0 0 1rem;
}

.inicio-texto strong {
    color: var(--ink);
}


/* ======================================================
   BOTÃO COMEÇAR
   ====================================================== */

#btn-comecar {
    display: block;

    width: 100%;
    max-width: 420px;

    margin: 2.25rem auto 0;

    padding: 1.1rem;

    background: var(--accent);
    color: var(--bg);

    border: none;
    border-radius: var(--radius);

    font-family: 'Inter', sans-serif;

    font-weight: 600;
    font-size: 1.05rem;

    cursor: pointer;

    transition:
        transform 0.1s ease,
        opacity 0.15s ease;
}

#btn-comecar:hover {
    transform: translateY(-1px);
}


/* ======================================================
   TELA DO TESTE
   ====================================================== */

#app {
    height: 100vh;

    max-width: 720px;

    margin: 0 auto;

    padding: 1.5rem 1.5rem 1.25rem;

    display: flex;
    flex-direction: column;
}

#progresso-container {
    height: 4px;

    background: var(--line);

    border-radius: 4px;

    overflow: hidden;

    margin-bottom: 0.5rem;

    flex-shrink: 0;
}

#progresso-barra {
    height: 100%;

    width: 0%;

    background: var(--accent);

    transition: width 0.3s ease;
}

#progresso-texto {
    text-align: center;

    color: var(--ink-dim);

    font-size: 0.8rem;

    margin: 0 0 1rem;

    letter-spacing: 0.02em;

    flex-shrink: 0;
}

.grupo {
    background: var(--bg-panel);

    border: 1px solid var(--line);

    border-radius: var(--radius);

    padding: 1.25rem 1.5rem;

    display: flex;
    flex-direction: column;

    flex: 1;

    min-height: 0;
}

.grupo-titulo {
    font-family: 'Fraunces', serif;

    font-size: 1.05rem;

    color: var(--accent);

    margin: 0 0 0.75rem;

    flex-shrink: 0;

    display: flex;

    justify-content: space-between;

    align-items: baseline;
}

.grupo-contador {
    font-family: 'Inter', sans-serif;

    font-size: 0.78rem;

    color: var(--ink-dim);

    font-weight: 500;
}

.grupo-contador.completo {
    color: var(--accent);
}


/* ======================================================
   PERGUNTAS
   ====================================================== */

.lista-afirmacoes {
    flex: 1;

    min-height: 0;

    display: flex;
    flex-direction: column;

    justify-content: space-evenly;

    gap: 0.1rem;

    overflow-y: auto;

    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
}

.lista-afirmacoes::-webkit-scrollbar {
    width: 8px;
}

.lista-afirmacoes::-webkit-scrollbar-track {
    background: transparent;
}

.lista-afirmacoes::-webkit-scrollbar-thumb {
    background: var(--line);

    border-radius: 10px;
}

.lista-afirmacoes::-webkit-scrollbar-thumb:hover {
    background: var(--ink-dim);
}

.afirmacao {
    display: flex;

    align-items: flex-start;

    gap: 0.65rem;

    width: 100%;

    padding: 0.3rem 0.5rem;

    border-radius: 8px;

    cursor: pointer;

    transition: background 0.15s ease;
}

.afirmacao:hover {
    background: var(--accent-light);
}

.afirmacao input[type="checkbox"] {
    appearance: none;

    width: 18px;
    height: 18px;

    min-width: 18px;

    margin-top: 0.1rem;

    border: 2px solid var(--line);

    border-radius: 5px;

    cursor: pointer;

    position: relative;

    transition:
        border-color 0.15s ease,
        background 0.15s ease;
}

.afirmacao input[type="checkbox"]:checked {
    background: var(--accent);

    border-color: var(--accent);
}

.afirmacao input[type="checkbox"]:checked::after {
    content: "";

    position: absolute;

    left: 5px;
    top: 1px;

    width: 4px;
    height: 9px;

    border: solid var(--bg);

    border-width: 0 2px 2px 0;

    transform: rotate(45deg);
}

.afirmacao input[type="checkbox"]:disabled {
    opacity: 0.3;

    cursor: not-allowed;
}

.afirmacao label {
    cursor: pointer;

    font-size: 0.85rem;

    line-height: 1.25;

    color: var(--ink);

    flex: 1;
}


/* ======================================================
   NAVEGAÇÃO
   ====================================================== */

.navegacao {
    display: flex;

    gap: 0.75rem;

    margin-top: 1rem;

    flex-shrink: 0;
}

.navegacao button {
    flex: 1;

    padding: 0.95rem;

    border: none;

    border-radius: var(--radius);

    font-family: 'Inter', sans-serif;

    font-weight: 600;

    font-size: 0.95rem;

    cursor: pointer;

    transition:
        opacity 0.15s ease,
        transform 0.1s ease;
}

#btn-anterior {
    background: transparent;

    color: var(--ink-dim);

    border: 1px solid var(--line) !important;
}

#btn-anterior:hover:not(:disabled) {
    color: var(--ink);

    border-color: var(--ink-dim) !important;
}

#btn-proximo {
    background: var(--accent);

    color: var(--bg);
}

.navegacao button:disabled {
    opacity: 0.3;

    cursor: not-allowed;
}

.navegacao button:not(:disabled):hover {
    transform: translateY(-1px);
}


/* ======================================================
   RESULTADO
   ====================================================== */

#resultado {
    height: 100vh;

    max-width: 720px;

    margin: 0 auto;

    padding: 2rem 1.5rem;

    overflow-y: auto;

    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
}

#resultado::-webkit-scrollbar {
    width: 8px;
}

#resultado::-webkit-scrollbar-track {
    background: transparent;
}

#resultado::-webkit-scrollbar-thumb {
    background: var(--line);

    border-radius: 10px;
}

#resultado::-webkit-scrollbar-thumb:hover {
    background: var(--ink-dim);
}

#resultado h2 {
    font-family: 'Fraunces', serif;

    text-align: center;

    font-size: 1.6rem;

    margin-top: 0;
}

.resultado-tipo {
    background: var(--bg-panel);

    border: 1px solid var(--accent);

    border-radius: var(--radius);

    padding: 1.75rem;

    text-align: center;

    margin-bottom: 1.25rem;
}

.resultado-tipo .nome-tipo {
    font-family: 'Fraunces', serif;

    font-size: 1.75rem;

    color: var(--accent);

    margin: 0.25rem 0;
}

.resultado-tipo .pontos {
    color: var(--ink-dim);

    font-size: 0.88rem;
}

.resultado-tipo .motivacao {
    text-align: left;

    color: var(--ink);

    font-size: 0.92rem;

    margin: 1.1rem 0 0.5rem;
}

.resultado-tipo .descricao-tipo {
    text-align: left;

    color: var(--ink-dim);

    font-size: 0.88rem;

    margin: 0;

    line-height: 1.5;

    white-space: pre-line;
}

.empate-aviso {
    background: var(--bg-panel);

    border: 1px solid var(--line);

    border-radius: var(--radius);

    padding: 1.25rem;

    margin-bottom: 1.25rem;
}

.empate-aviso > p {
    color: var(--ink-dim);

    margin: 0 0 1rem;

    font-size: 0.9rem;
}

.empate-item {
    border-top: 1px solid var(--line);

    padding-top: 0.85rem;

    margin-top: 0.85rem;
}

.empate-item:first-of-type {
    border-top: none;

    padding-top: 0;

    margin-top: 0;
}

.nome-tipo-pequeno {
    font-family: 'Fraunces', serif;

    color: var(--accent);

    font-size: 1.05rem;

    margin-bottom: 0.35rem;
}

.empate-item .motivacao {
    font-size: 0.85rem;

    margin: 0.4rem 0 0.3rem;
}

.empate-item .descricao-tipo {
    font-size: 0.83rem;

    white-space: pre-line;
}

.barra-tipo {
    display: grid;

    grid-template-columns: 130px 1fr 2.5rem;

    align-items: center;

    gap: 0.65rem;

    margin-bottom: 0.5rem;

    font-size: 0.85rem;
}

.barra-tipo-fundo {
    height: 9px;

    background: var(--line);

    border-radius: 6px;

    overflow: hidden;
}

.barra-tipo-preenchida {
    height: 100%;

    background: var(--accent);

    border-radius: 6px;
}


/* ======================================================
   BOTÕES DO RESULTADO
   ====================================================== */

#btn-refazer,
#btn-analise-completa {
    display: block;

    width: 100%;

    padding: 1rem;

    background: var(--accent);

    color: var(--bg);

    border: none;

    border-radius: var(--radius);

    font-family: 'Inter', sans-serif;

    font-weight: 600;

    font-size: 1rem;

    cursor: pointer;

    transition:
        transform 0.1s ease,
        opacity 0.15s ease;
}

#btn-refazer {
    margin-top: 1rem;
}

#btn-analise-completa {
    margin: 1rem 0 1.5rem;
}

#btn-refazer:hover,
#btn-analise-completa:hover {
    transform: translateY(-1px);
}


/* ======================================================
   RESPONSIVO
   ====================================================== */

@media (max-height: 650px) {

    .afirmacao label {
        font-size: 0.78rem;
    }

    .grupo {
        padding: 1rem 1.25rem;
    }
}


/* ======================================================
   CHECKOUT
   ====================================================== */

#tela-inicio:has(.checkout-conteudo) {
    min-height: 100vh;

    height: auto;

    display: block;

    overflow-y: auto;

    padding-top: 3rem;
    padding-bottom: 3rem;
}

.checkout-conteudo {
    width: 100%;

    max-width: 640px;

    min-height: 100vh;

    height: auto;

    margin: 0 auto;

    padding-top: 0;
    padding-bottom: 3rem;

    text-align: center;
}

.checkout-card {
    width: 100%;

    box-sizing: border-box;

    margin-top: 1.5rem;

    padding: 1.5rem;

    background: var(--bg-panel);

    border: 1px solid var(--line);

    border-radius: var(--radius);

    text-align: left;

    box-shadow:
        0 4px 16px rgba(37, 37, 37, 0.035);
}

.checkout-card:first-of-type {
    margin-top: 2rem;
}

.checkout-card h2 {
    margin: 0 0 0.5rem;

    font-family: 'Fraunces', serif;

    font-size: 1.4rem;
}

.checkout-descricao {
    margin: 0 0 1.25rem;

    color: var(--ink-dim);

    line-height: 1.6;
}

.campo {
    margin-top: 1rem;
}

.campo label {
    display: block;

    margin-bottom: 0.4rem;

    font-size: 0.9rem;

    font-weight: 600;
}

.campo input {
    box-sizing: border-box;

    width: 100%;

    padding: 0.9rem 1rem;

    background: var(--bg);

    color: var(--ink);

    border: 1px solid var(--line);

    border-radius: 10px;

    font-family: 'Inter', sans-serif;

    font-size: 0.95rem;

    outline: none;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.campo input:focus {
    border-color: var(--accent);

    box-shadow:
        0 0 0 3px rgba(49, 92, 87, 0.08);
}


/* ======================================================
   PIX
   ====================================================== */

.pix-card {
    text-align: center;
}

.pix-valor {
    margin: 1rem 0;

    font-family: 'Fraunces', serif;

    font-size: 2rem;

    font-weight: 700;

    color: var(--accent);
}

.qrcode {
    display: flex;

    align-items: center;
    justify-content: center;

    width: fit-content;

    margin: 0 auto;

    padding: 12px;

    background: white;

    border-radius: 10px;

    box-shadow:
        0 2px 10px rgba(37, 37, 37, 0.06);
}

.qrcode img,
.qrcode canvas {
    display: block;
}

.pix-instrucao {
    margin: 1rem 0 0;

    color: var(--ink-dim);

    font-size: 0.9rem;
}

.pix-responsavel {
    margin: 0.8rem 0 0;

    font-size: 0.9rem;

    font-weight: 600;
}


/* ======================================================
   BOTÕES DO CHECKOUT
   ====================================================== */

#btn-concluir,
#btn-voltar {
    display: block;

    box-sizing: border-box;

    width: 100%;

    padding: 1rem;

    border-radius: var(--radius);

    font-family: 'Inter', sans-serif;

    font-size: 1rem;

    font-weight: 600;

    cursor: pointer;

    transition:
        transform 0.1s ease,
        opacity 0.15s ease;
}

#btn-concluir {
    margin-top: 1.5rem;

    background: var(--accent);

    color: var(--bg);

    border: none;
}

#btn-concluir:not(:disabled):hover {
    transform: translateY(-1px);
}

#btn-concluir:disabled {
    opacity: 0.45;

    cursor: not-allowed;
}

#btn-voltar {
    margin-top: 0.75rem;

    background: transparent;

    color: var(--ink);

    border: 1px solid var(--line);
}

#btn-voltar:hover {
    transform: translateY(-1px);

    border-color: var(--ink-dim);
}


/* ======================================================
   POPUP
   ====================================================== */

.popup-overlay {
    position: fixed;

    inset: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 1.5rem;

    background: rgba(37, 37, 37, 0.45);

    z-index: 1000;
}

.popup {
    width: 100%;

    max-width: 420px;

    padding: 2rem;

    box-sizing: border-box;

    background: var(--bg-panel);

    border: 1px solid var(--line);

    border-radius: var(--radius);

    text-align: center;

    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.15);
}

.popup-icone {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 50px;
    height: 50px;

    margin: 0 auto 1rem;

    background: var(--accent-light);

    color: var(--accent);

    border-radius: 50%;

    font-size: 1.5rem;

    font-weight: 700;
}

.popup h2 {
    margin: 0 0 1rem;

    font-family: 'Fraunces', serif;

    font-size: 1.7rem;
}

.popup p {
    margin: 0.6rem 0;

    color: var(--ink-dim);

    line-height: 1.6;
}

#btn-popup-ok {
    width: 100%;

    margin-top: 1.25rem;

    padding: 1rem;

    background: var(--accent);

    color: var(--bg);

    border: none;

    border-radius: var(--radius);

    font-family: 'Inter', sans-serif;

    font-size: 1rem;

    font-weight: 600;

    cursor: pointer;

    transition: transform 0.1s ease;
}

#btn-popup-ok:hover {
    transform: translateY(-1px);
}


/* ======================================================
   CHECKOUT — TELAS PEQUENAS
   ====================================================== */

@media (max-width: 600px) {

    #tela-inicio:has(.checkout-conteudo) {
        padding: 2rem 1rem;
    }

    .checkout-conteudo {
        padding-bottom: 2rem;
    }

    .checkout-card {
        padding: 1.25rem;
    }

    .pix-valor {
        font-size: 1.8rem;
    }

    .qrcode {
        padding: 10px;
    }
}