/* Quiz "Desbloqueio de Agenda" | A FUNDO / Adriano Marinho
   Mobile-first. Acento dourado #C9A84C (identidade visual A FUNDO).
   Multi-etapas: uma tela por vez, controlada por quiz.js. */

:root {
  --gold: #C9A84C;
  --gold-soft: #E4CD8A;
  --ink: #14120F;
  --ink-soft: #2A2620;
  --paper: #FAF7F0;
  --paper-dim: #EFE9DC;
  --line: rgba(20, 18, 15, 0.12);
  --error: #B3441F;

  --font-serif: "Fraunces", Georgia, serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--ink);
  color: var(--paper);
  min-height: 100vh;
  line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

.page {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 16px 64px;
  overflow-x: hidden;
}

.glow {
  position: absolute;
  top: -220px;
  left: 50%;
  transform: translateX(-50%);
  width: 720px;
  height: 480px;
  background: radial-gradient(ellipse at center, rgba(201, 168, 76, 0.30) 0%, rgba(201, 168, 76, 0.08) 45%, transparent 72%);
  filter: blur(10px);
  pointer-events: none;
  z-index: 0;
}

.card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  background: linear-gradient(180deg, #1C1914 0%, #16140F 100%);
  border: 1px solid rgba(201, 168, 76, 0.22);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 30px 60px -20px rgba(0,0,0,0.55);
}

/* ---------- Barra de progresso ---------- */
.progress {
  margin-bottom: 26px;
}

.progress[hidden] { display: none; }

.progress__bar {
  width: 100%;
  height: 5px;
  background: rgba(250, 247, 240, 0.10);
  border-radius: 99px;
  overflow: hidden;
}

.progress__fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-soft) 100%);
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.progress__label {
  margin: 10px 0 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(250, 247, 240, 0.55);
}

/* ---------- Telas (uma por vez) ---------- */
.screen {
  display: none;
  animation: screen-in 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.screen.is-active {
  display: block;
}

@keyframes screen-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Header (capa + whatsapp) ---------- */
.card__header {
  margin-bottom: 26px;
}

.card__eyebrow {
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.card__headline {
  margin: 0 0 14px;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 28px;
  line-height: 1.22;
  letter-spacing: -0.01em;
  color: var(--paper);
}

.card__headline--sm {
  font-size: 25px;
}

.card__subheadline {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(250, 247, 240, 0.68);
}

/* Honeypot: invisível para humanos, visível para bots que preenchem tudo */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Campos de texto ---------- */
.field {
  margin: 0 0 22px;
  padding: 0;
  border: none;
}

.field__label {
  display: block;
  padding: 0;
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--paper);
}

.field__input {
  width: 100%;
  padding: 13px 14px;
  font-family: var(--font-sans);
  font-size: 16px; /* >= 16px evita zoom automático no iOS */
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field__input::placeholder {
  color: rgba(20, 18, 15, 0.38);
}

.field__input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.25);
}

/* ---------- Perguntas ---------- */
.question__label {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.question__title {
  margin: 0 0 24px;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.28;
  letter-spacing: -0.01em;
  color: var(--paper);
}

/* ---------- Respostas (botões grandes, clicou avança) ---------- */
.answers {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.answer {
  display: block;
  width: 100%;
  text-align: left;
  padding: 16px 18px;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.45;
  font-weight: 500;
  color: rgba(250, 247, 240, 0.9);
  background: rgba(250, 247, 240, 0.04);
  border: 1.5px solid rgba(250, 247, 240, 0.12);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}

.answer:hover {
  border-color: rgba(201, 168, 76, 0.45);
  background: rgba(250, 247, 240, 0.07);
}

.answer:active {
  transform: scale(0.99);
}

.answer:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Estado "selecionado" no instante antes de avançar */
.answer.is-picked {
  border-color: var(--gold);
  background: rgba(201, 168, 76, 0.12);
  color: var(--paper);
}

/* ---------- Erro de formulário ---------- */
.form__error {
  margin: 0 0 18px;
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #FBEADD;
  background: rgba(179, 68, 31, 0.22);
  border: 1px solid rgba(179, 68, 31, 0.45);
  border-radius: var(--radius-sm);
}

.form__error[hidden] { display: none; }

/* ---------- Botão principal ---------- */
.submit-btn {
  position: relative;
  width: 100%;
  padding: 16px 20px;
  margin-top: 8px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink);
  background: linear-gradient(180deg, var(--gold-soft) 0%, var(--gold) 100%);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
  box-shadow: 0 10px 24px -10px rgba(201, 168, 76, 0.55);
}

.submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px -10px rgba(201, 168, 76, 0.65);
}

.submit-btn:active {
  transform: translateY(0);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.submit-btn__spinner {
  display: none;
  position: absolute;
  right: 18px;
  top: 50%;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  border: 2px solid rgba(20, 18, 15, 0.25);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.submit-btn.is-loading .submit-btn__spinner {
  display: block;
}

.submit-btn.is-loading .submit-btn__label {
  opacity: 0.6;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Linha de confiança ---------- */
.trust-line {
  margin: 20px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(250, 247, 240, 0.5);
}

.trust-line--center {
  text-align: center;
}

/* ---------- Tela de transição (respiro entre perguntas) ----------
   Imagem reflexiva + frase centralizada + botão "Continuar" (avanço manual). */
.screen--transition {
  min-height: 60vh;
}

.transition {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 60vh;
  padding: 12px 0;
}

.transition__figure {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1 / 1;
  margin: 0 0 26px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(250, 247, 240, 0.04);
  border: 1px solid rgba(201, 168, 76, 0.18);
  box-shadow: 0 24px 48px -22px rgba(0, 0, 0, 0.55);
}

.transition__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Enquanto a imagem não carrega (ou arquivo ainda não existe), o container
   segura a proporção sem quebrar o layout. */
.transition__img:not([src]),
.transition__img[src=""] {
  visibility: hidden;
}

.transition__text {
  margin: 0;
  max-width: 34ch;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--paper);
}

.transition__btn {
  width: auto;
  min-width: 220px;
  margin-top: 26px;
  padding-left: 40px;
  padding-right: 40px;
}

/* ---------- Telas de processamento (teatro) ---------- */
.processing {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 280px;
  justify-content: center;
  padding: 12px 0;
}

.processing__spinner {
  width: 46px;
  height: 46px;
  margin-bottom: 26px;
  border: 3px solid rgba(201, 168, 76, 0.18);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.processing__title {
  margin: 0 0 16px;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--paper);
}

.processing__step {
  margin: 0;
  min-height: 44px;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(250, 247, 240, 0.66);
  transition: opacity 0.3s ease;
}

.processing__step.is-fading {
  opacity: 0;
}

/* ---------- Diagnóstico (layout escaneável) ---------- */
.diag__headline {
  margin: 0 0 24px;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 27px;
  line-height: 1.24;
  letter-spacing: -0.01em;
  color: var(--paper);
}

/* STAT BLOCK — herói visual. 3 números grandes lado a lado. */
.diag__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 0 12px;
  padding: 22px 12px 20px;
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(201, 168, 76, 0.12) 0%, transparent 70%),
    rgba(250, 247, 240, 0.03);
  border: 1px solid rgba(201, 168, 76, 0.22);
  border-radius: var(--radius-md);
}

.diag__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 2px;
  position: relative;
  min-width: 0; /* deixa o grid encolher a coluna em vez de estourar */
}

/* Divisórias verticais sutis entre os números */
.diag__stat + .diag__stat::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 6px;
  bottom: 14px;
  width: 1px;
  background: rgba(201, 168, 76, 0.18);
}

.diag__stat-num {
  font-family: var(--font-serif);
  font-weight: 600;
  /* Fluido: cresce até 48px em telas grandes, encolhe no mobile.
     Os numerais "850+" e "78%" são curtos e cabem folgados. */
  font-size: clamp(34px, 10vw, 48px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--gold);
  text-shadow: 0 2px 20px rgba(201, 168, 76, 0.25);
  white-space: nowrap;
}

/* "metade" é uma palavra (6 letras), não um numeral curto. Recebe uma escala
   própria, um pouco menor, para caber na coluna sem clipar em telas estreitas.
   O contraste palavra/numeral fica proposital, não parece defeito. */
.diag__stat-num--word {
  font-size: clamp(22px, 6.4vw, 40px);
  letter-spacing: -0.015em;
}

.diag__stat-label {
  margin-top: 10px;
  font-size: 11px;
  line-height: 1.32;
  font-weight: 500;
  color: rgba(250, 247, 240, 0.62);
}

.diag__stats-caption {
  margin: 0 0 28px;
  font-size: 12.5px;
  line-height: 1.5;
  font-style: italic;
  text-align: center;
  color: rgba(250, 247, 240, 0.48);
}

/* SUB-HEADLINES + parágrafo de apoio */
.diag__section {
  margin: 0 0 24px;
}

.diag__subhead {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--paper);
}

.diag__text {
  margin: 0 0 0.95em;
  font-size: 15px;
  line-height: 1.66;
  color: rgba(250, 247, 240, 0.78);
}

.diag__text:last-child {
  margin-bottom: 0;
}

.diag__text strong {
  color: var(--gold-soft);
  font-weight: 600;
}

/* BULLETS FASCINATION */
.diag__fascination {
  margin: 0 0 26px;
  padding: 22px 20px 20px;
  background: rgba(201, 168, 76, 0.05);
  border: 1px solid rgba(201, 168, 76, 0.16);
  border-radius: var(--radius-md);
}

.diag__fascination-title {
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--gold-soft);
}

.diag__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}

.diag__list li {
  position: relative;
  padding-left: 22px;
  font-size: 14.5px;
  line-height: 1.55;
  color: rgba(250, 247, 240, 0.82);
}

/* Marcador elegante (losango dourado), não emoji */
.diag__list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 8px;
  width: 7px;
  height: 7px;
  background: var(--gold);
  transform: rotate(45deg);
  border-radius: 1px;
}

.diag__list strong {
  color: var(--paper);
  font-weight: 600;
}

/* PONTE */
.diag__bridge {
  margin: 0 0 4px;
  padding: 18px 18px;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--paper);
  background: rgba(201, 168, 76, 0.08);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ---------- Telas maiores: respiro extra ---------- */
@media (min-width: 640px) {
  .page {
    padding-top: 56px;
  }

  .card {
    padding: 44px 44px 40px;
  }

  .card__headline {
    font-size: 32px;
  }

  .card__headline--sm {
    font-size: 28px;
  }

  .question__title {
    font-size: 27px;
  }

  .diag__headline {
    font-size: 30px;
  }

  .diag__stats {
    gap: 12px;
    padding: 28px 22px 24px;
  }

  .diag__stat-num {
    font-size: 48px;
  }

  .diag__stat-num--word {
    font-size: 40px;
  }

  .diag__stat-label {
    font-size: 12.5px;
  }

  .diag__subhead {
    font-size: 21px;
  }

  .transition__text {
    font-size: 25px;
  }

  .processing__title {
    font-size: 24px;
  }
}
