/* ============================================================
   Teste da Dor — quiz.css
   Identidade: navy + sage + off-white | DM Sans + Playfair
   ============================================================ */

:root {
  --off-white: #F0EDE8;
  --navy: #1B3A4B;
  --navy-deep: #0F1E26;
  --sage: #8CA57E;
  --sage-light: #9DB183;
  --sage-dark: #40534A;
  --white: #FFFFFF;
  --font-sans: "DM Sans", system-ui, -apple-system, Arial, sans-serif;
  --font-editorial: "Playfair Display", Georgia, serif;
  --fs-small: 0.875rem;
  --radius: 8px;
  --radius-lg: 14px;
  --shadow-card: 0 2px 12px rgba(15, 30, 38, 0.07);
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; font-family: var(--font-sans);
  font-size: clamp(1rem, 1.5vw, 1.0625rem); line-height: 1.6;
  color: var(--navy); background: var(--off-white);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh; display: flex; flex-direction: column;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p { margin: 0 0 1rem; overflow-wrap: break-word; }
h1 { font-size: clamp(1.75rem, 5vw, 2.75rem); line-height: 1.15; font-weight: 700; }
h2 { font-size: clamp(1.375rem, 3.5vw, 1.875rem); line-height: 1.25; font-weight: 700; }
:focus-visible { outline: 3px solid var(--sage); outline-offset: 2px; }

.editorial { font-family: var(--font-editorial); font-style: italic; font-weight: 400; color: var(--sage-dark); }
.eyebrow {
  font-size: var(--fs-small); font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--sage-dark); margin-bottom: 0.75rem;
}

/* ===== HEADER ===== */
.quiz-header {
  display: flex; flex-direction: column; gap: 0.75rem;
  padding: 1rem 1.5rem 0.75rem; max-width: 760px; width: 100%; margin-inline: auto;
}
.quiz-brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--navy); }
.quiz-brand img { width: 40px; height: 40px; object-fit: contain; mix-blend-mode: multiply; }
.quiz-brand span { display: flex; flex-direction: column; line-height: 1.2; }
.quiz-brand strong { font-size: 1rem; }
.quiz-brand small { font-size: 0.75rem; color: var(--sage-dark); }
.quiz-progress {
  height: 6px; border-radius: 999px; background: rgba(27, 58, 75, 0.12); overflow: hidden;
}
.quiz-progress-fill {
  height: 100%; background: var(--sage); border-radius: 999px;
  transition: width 0.35s ease;
}

/* ===== TELAS ===== */
main { flex: 1; display: flex; width: 100%; }
.tela { display: none; width: 100%; }
.tela.ativa { display: flex; align-items: flex-start; justify-content: center; }
.tela-inner {
  width: 100%; max-width: 640px; padding: 1.5rem 1.5rem 3rem;
  animation: entrar 0.35s ease;
}
@keyframes entrar {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .tela-inner { animation: none; }
  .quiz-progress-fill { transition: none; }
}

.ilustracao {
  width: min(300px, 62%); margin: 0.5rem 0 1.25rem;
  mix-blend-mode: multiply;
  /* Fundo das artes é quase branco; o brightness leva a branco puro, que desaparece
     no multiply. Não usar contrast aqui: apaga os detalhes em sage claro. */
  filter: brightness(1.04);
}
.tela-texto { color: rgba(27, 58, 75, 0.85); }
.nota-cfm { font-size: 0.8125rem; color: rgba(27, 58, 75, 0.6); margin-top: 1.25rem; }

/* ===== BOTÕES ===== */
.btn-agendar {
  display: inline-block; background: var(--sage); color: var(--navy-deep);
  font-family: var(--font-sans); font-weight: 600; font-size: 1rem;
  text-decoration: none; text-align: center; border: 0;
  padding: 0.875rem 1.75rem; border-radius: var(--radius); cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}
.btn-agendar:hover, .btn-agendar:focus-visible { background: var(--sage-dark); color: var(--off-white); }
.btn-grande { width: 100%; max-width: 420px; padding: 1rem 2rem; font-size: 1.0625rem; margin-top: 0.5rem; }

.btn-voltar {
  background: none; border: 0; color: var(--sage-dark); font-family: var(--font-sans);
  font-size: var(--fs-small); font-weight: 600; cursor: pointer;
  margin-top: 1.5rem; padding: 0.5rem 0.75rem; border-radius: var(--radius);
}
.btn-voltar:hover { text-decoration: underline; }

/* ===== PERGUNTAS ===== */
.pergunta-apoio { font-size: 0.9375rem; color: rgba(27, 58, 75, 0.65); }
.opcoes { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1.5rem; }
.opcao {
  background: var(--white); border: 2px solid transparent; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); padding: 1rem 1.25rem; text-align: left;
  font-family: var(--font-sans); font-size: 1.0625rem; font-weight: 500; color: var(--navy);
  cursor: pointer; transition: border-color 0.2s ease, transform 0.15s ease;
}
.opcao:hover { border-color: var(--sage-light); }
.opcao:active { transform: scale(0.985); }
.opcao.selecionada { border-color: var(--sage); background: #F4F7F1; }

/* ===== FORMULÁRIO ===== */
#form-teste { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 1rem; }
#form-teste label { font-size: var(--fs-small); font-weight: 600; color: var(--sage-dark); margin-top: 0.75rem; }
#form-teste input {
  font-family: var(--font-sans); font-size: 1rem; color: var(--navy);
  background: var(--white); border: 1px solid rgba(27, 58, 75, 0.2);
  border-radius: var(--radius); padding: 0.8rem 1rem;
}
#form-teste input:focus-visible { outline: 3px solid var(--sage); outline-offset: 0; border-color: var(--sage); }
#form-teste .btn-grande { margin-top: 1.25rem; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; }
.form-feedback { min-height: 1.5em; font-size: var(--fs-small); color: var(--sage-dark); margin: 0.5rem 0 0; }

/* ===== RESULTADO ===== */
.placar { display: flex; align-items: baseline; gap: 0.6rem; margin: 0.5rem 0 1.5rem; }
.placar-numero {
  font-family: var(--font-editorial); font-style: italic;
  font-size: clamp(3rem, 9vw, 4.5rem); line-height: 1; color: var(--sage-dark);
}
.placar-max { font-size: var(--fs-small); color: rgba(27, 58, 75, 0.6); }

.subscores { display: flex; flex-direction: column; gap: 0.85rem; margin-bottom: 1.75rem; }
.subscore { display: grid; grid-template-columns: 1fr auto; gap: 0.2rem 0.75rem; align-items: center; }
.subscore-nome { font-size: var(--fs-small); font-weight: 600; }
.subscore-valor { font-size: var(--fs-small); color: var(--sage-dark); font-variant-numeric: tabular-nums; }
.subscore-barra {
  grid-column: 1 / -1; height: 8px; border-radius: 999px;
  background: rgba(27, 58, 75, 0.1); overflow: hidden;
}
.subscore-fill {
  height: 100%; width: 0; background: var(--sage); border-radius: 999px;
  transition: width 0.8s ease 0.2s;
}

.resultado-texto p { color: rgba(27, 58, 75, 0.85); }
.resultado-cta { margin-top: 0.5rem; }

/* ===== FOOTER ===== */
.quiz-footer { padding: 1.25rem 1.5rem; text-align: center; }
.quiz-footer p { margin: 0; font-size: 0.8125rem; color: rgba(27, 58, 75, 0.55); }

@media (min-width: 640px) {
  .quiz-header { padding-top: 1.5rem; }
  .tela-inner { padding-top: 2.5rem; }
}
