/* Paleta da Rafa (08/11/2026): azul-petróleo, marfim e dourado.
   12/11/2026 (mentor: "priorize a leitura"): só a abertura fica escura; perguntas e resultado em marfim com texto petróleo.
   No claro, o dourado #B89446 (2,55:1 no marfim) é só ornamento; estado e foco usam petróleo ou dourado escuro #7a5f22 (5,4:1). */
:root {
  --fundo: #082F36;        /* azul-petróleo profundo */
  --superficie: #0D3A42;
  --superficie-2: #143F45;
  --texto: #F6F2EA;        /* marfim */
  --texto-suave: #C9CBC3;
  --linha: #2B5359;
  --ornamento: #B89446;    /* dourado antigo */
  --destaque: #D2B26A;     /* texto dourado sobre escuro */
  --estado: #B89446;       /* foco, marcado, progresso */
  --acao: #B89446;
  --acao-hover: #D2B26A;
  --sobre-acao: #082F36;
  --erro: #F4A99A;
  --radius: 8px;
  --largura: 640px;
  color-scheme: dark;
}
body.claro {
  --fundo: #F6F2EA;
  --superficie: #FFFFFF;
  --superficie-2: #ECE4D2;
  --texto: #082F36;
  --texto-suave: #3d5a5e;  /* 6,9:1 no marfim */
  --linha: #CFC6B2;
  --destaque: #7a5f22;
  --estado: #082F36;
  --acao: #082F36;
  --acao-hover: #0D3A42;
  --sobre-acao: #F6F2EA;
  --erro: #B42318;         /* 5,9:1 no marfim */
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fundo);
  color: var(--texto);
  font: 400 17px/1.65 "Montserrat", system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-tap-highlight-color: rgba(184, 148, 70, .25);
}
button, label.opcao, a, input { touch-action: manipulation; }

.topo {
  max-width: var(--largura);
  width: 100%;
  margin: 0 auto;
  padding: 20px 16px 0;
}
.marca { font: 600 13px/1 "Montserrat", sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--destaque); }
.progresso { margin-top: 14px; }
.progresso-barra { height: 6px; background: var(--linha); border-radius: 3px; overflow: hidden; }
.progresso-barra span { display: block; height: 100%; width: 0; background: var(--estado); transition: width .2s ease; }

main {
  flex: 1;
  max-width: var(--largura);
  width: 100%;
  margin: 0 auto;
  padding: 28px 16px 40px;
  outline: none;
}

h1, h2, h3 { font-family: Montserrat, "Helvetica Neue", Arial, sans-serif; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; margin: 0 0 16px; text-wrap: balance; }
h1 { font-size: clamp(30px, 7vw, 42px); }
h2 { font-size: clamp(23px, 5vw, 28px); }
h3 { font-size: 20px; margin-top: 28px; }
p { margin: 0 0 14px; text-wrap: pretty; }
.suave { color: var(--texto-suave); }
.pequeno { font-size: 15px; }

/* perguntas: Montserrat negrito (pedido da Rafa/mentor) */
.pergunta { font: 700 clamp(20px, 5.2vw, 22px)/1.35 "Montserrat", system-ui, sans-serif; letter-spacing: -.005em; margin-bottom: 14px; }
.secao { font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--destaque); margin-bottom: 12px; }
.orienta { border-left: 3px solid var(--ornamento); padding: 2px 0 2px 14px; margin-bottom: 22px; }
.orienta .secao { text-transform: none; letter-spacing: 0; font-size: 17px; color: var(--texto); line-height: 1.45; margin-bottom: 6px; }
.orienta p:last-child { margin: 0; color: var(--texto-suave); }

/* abertura (fundo escuro) */
.abertura { position: relative; padding: 8px 0 4px; }
.abertura > * { position: relative; }
.arcos { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.arcos path { fill: none; stroke: var(--ornamento); opacity: .55; vector-effect: non-scaling-stroke; stroke-width: 1.2; }
.sobretitulo { font-size: 14px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ornamento); margin-bottom: 4px; }
.subtitulo { font: 500 18px/1.45 Montserrat, "Helvetica Neue", Arial, sans-serif; color: var(--texto-suave); margin-bottom: 22px; }
.abertura h1 { margin-bottom: 12px; text-transform: none; }
.abertura h1 em { font-style: normal; font-weight: 700; color: var(--destaque); }
.apoio-titulo { font: 600 19px/1.45 Montserrat, "Helvetica Neue", Arial, sans-serif; margin-bottom: 20px; }
.fio { border: 0; height: 1px; width: 120px; margin: 0 0 20px; background: linear-gradient(90deg, var(--ornamento), transparent); }
.lead { font-size: 18px; }
.como { list-style: none; margin: 24px 0 28px; padding: 20px; background: #F6F2EA; color: #082F36; border-radius: var(--radius); display: grid; gap: 14px; }
.como li { display: flex; gap: 14px; align-items: flex-start; font-weight: 600; line-height: 1.4; }
.como span { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 1px solid #B89446; color: #7a5f22; display: grid; place-items: center; font: 700 15px/1 Montserrat, "Helvetica Neue", Arial, sans-serif; }
main, .topo, .rodape { position: relative; z-index: 1; }

/* opções */
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
.opcoes { display: grid; gap: 10px; margin: 18px 0; }
.opcao {
  display: flex; gap: 12px; align-items: center;
  min-height: 52px;
  padding: 12px 16px;
  background: var(--superficie);
  border: 1px solid var(--linha);
  border-radius: var(--radius);
  cursor: pointer;
  line-height: 1.4;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.opcao:hover { border-color: var(--estado); }
.opcao input { margin: 0; accent-color: var(--estado); width: 20px; height: 20px; flex: none; }
.opcao:has(input:checked) { border-color: var(--estado); box-shadow: inset 0 0 0 1px var(--estado); background: var(--superficie-2); font-weight: 600; }
.opcao:has(input:focus-visible) { outline: 3px solid var(--estado); outline-offset: 2px; }
.opcao.separada { margin-top: 6px; border-style: dashed; }

/* campos */
label.campo { display: block; font-weight: 600; margin: 18px 0 6px; }
input[type=text], input[type=email], input[type=tel], textarea {
  width: 100%;
  font: inherit;
  padding: 12px 14px;
  min-height: 48px;
  border: 1px solid var(--linha);
  border-radius: var(--radius);
  background: var(--superficie);
  color: var(--texto);
}
body.claro input[type=text], body.claro input[type=email], body.claro input[type=tel], body.claro textarea { border-color: #7a8785; } /* 3,3:1 no marfim, 3,7:1 no branco */
textarea { min-height: 150px; resize: vertical; }
input:focus-visible, textarea:focus-visible { outline: 3px solid var(--estado); outline-offset: 1px; border-color: var(--estado); }
.erro { color: var(--erro); font-size: 15px; font-weight: 600; margin: 12px 0 0; }
.consentimento { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; margin: 20px 0; cursor: pointer; }
.consentimento input { margin-top: 3px; accent-color: var(--estado); width: 20px; height: 20px; flex: none; }
a { color: var(--destaque); }

/* botões */
.acoes { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-top: 20px; }
button {
  font: 600 16px/1.2 "Montserrat", sans-serif;
  border-radius: var(--radius);
  padding: 15px 22px;
  min-height: 48px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.primario { background: var(--acao); color: var(--sobre-acao); }
.primario:hover { background: var(--acao-hover); }
.secundario { background: transparent; color: var(--texto-suave); border-color: var(--linha); }
.secundario:hover { color: var(--texto); border-color: var(--texto-suave); }
body.claro .secundario { border-color: #7a8785; }
button:focus-visible { outline: 3px solid var(--estado); outline-offset: 2px; }
.abertura button:focus-visible { outline-color: #F6F2EA; }
.cheio { width: 100%; }

/* resultado */
.res-topo { background: var(--superficie); border: 1px solid var(--linha); border-top: 4px solid var(--ornamento); border-radius: var(--radius); padding: 22px 20px 8px; margin-bottom: 24px; }
.res-frase { font-size: clamp(25px, 6vw, 32px); line-height: 1.25; }
.selo { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--destaque); margin-bottom: 10px; }
.saudacao { font-weight: 500; }
.bloco, .caixa, .reconhecer, .incentivo, .assinatura, .limite { max-width: 62ch; }
.bloco { margin: 28px 0; }
.leitura p { font-size: 18px; }
.bloco-tit { font-size: 22px; padding-bottom: 8px; border-bottom: 1px solid var(--linha); margin-bottom: 16px; }
.movimento { font-weight: 600; }
.rotulo { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--destaque); margin-bottom: 6px; }
.caixa { background: var(--superficie); border: 1px solid var(--linha); border-radius: var(--radius); padding: 22px 20px 8px; margin: 24px 0; }
.caixa h2 { font-size: 24px; }
.caixa h3 { font: 700 17px/1.35 "Montserrat", sans-serif; margin: 20px 0 8px; }
.fala { font: 600 19px/1.45 Montserrat, "Helvetica Neue", Arial, sans-serif; border-left: 3px solid var(--ornamento); padding: 4px 0 4px 14px; margin: 4px 0 18px; }
ol.passos { padding-left: 22px; margin: 0 0 14px; }
ol.passos li { margin-bottom: 10px; }
.matriz { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0 16px; }
.matriz div { border: 1px solid var(--linha); border-radius: var(--radius); padding: 10px 12px; font-size: 15px; }
.matriz strong { display: block; }
.dicas { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 24px; }
.dica { background: var(--superficie-2); border-radius: var(--radius); padding: 16px; }
.dica h3 { font: 700 16px/1.35 "Montserrat", sans-serif; margin: 0 0 6px; }
.dica p { font-size: 16px; margin: 0; }
.reconhecer { border-left: 3px solid var(--ornamento); padding: 4px 0 4px 16px; margin: 24px 0; font-size: 18px; }
.reconhecer p { margin: 0; }
.incentivo { font-family: Montserrat, "Helvetica Neue", Arial, sans-serif; font-weight: 600; font-size: 20px; line-height: 1.45; text-align: center; margin: 36px auto 18px; }
.assinatura { font: 600 18px/1.4 Montserrat, "Helvetica Neue", Arial, sans-serif; text-align: center; margin: 0 auto 32px; color: var(--destaque); }
.aviso { background: var(--superficie-2); border-radius: var(--radius); padding: 12px 14px; font-size: 15px; }
.proximo { background: var(--superficie); border: 1px solid var(--linha); border-radius: var(--radius); padding: 20px; }
.escolha { display: flex; flex-direction: column; gap: 4px; text-align: left; width: 100%; background: var(--superficie); border: 1px solid var(--linha); color: var(--texto); line-height: 1.3; }
.escolha span { font-weight: 400; font-size: 15px; color: var(--texto-suave); }
.escolha:hover, .escolha[aria-pressed="true"] { border-color: var(--estado); background: var(--superficie-2); }
.pote { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.rodape { max-width: var(--largura); width: 100%; margin: 0 auto; padding: 24px 16px 32px; font-size: 14px; color: var(--texto-suave); border-top: 1px solid var(--linha); }
.rodape p { margin: 0 0 6px; }
.piloto { font-weight: 600; }

@media (max-width: 520px) {
  .matriz, .dicas { grid-template-columns: 1fr; }
  /* botões sempre à mão no celular, sem cobrir o fim do formulário */
  form .acoes {
    position: sticky; bottom: 0; z-index: 2;
    margin: 20px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--fundo); border-top: 1px solid var(--linha);
  }
  .acoes button.primario { flex: 1; }
}
@media print {
  .topo, .rodape, .proximo button, #escolha { display: none; }
  body { background: #fff; color: #082F36; }
  body, body.claro { --texto: #082F36; --texto-suave: #3d5a5e; --superficie: #fff; --superficie-2: #f3ecdc; --linha: #d8d2c4; --destaque: #7a5f22; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
