:root {
  --navy-900: #000c19;
  --navy-800: #001731;
  --navy-700: #001f40;
  --gold-500: #ad8f4b;
  --gold-300: #d8b86a;
  --gold-100: #f5d38e;
  --cream: #fae6b6;
  --tint: #fdf7e8;
  --paper: #ffffff;
  --bg: #eff4fb;
  --ink: #1a2433;
  --ink-soft: #4e4e4e;
  --ink-faint: #8a93a1;
  --line: #e4e9f1;
  --gold-grad: linear-gradient(135deg, #f5d38e 0%, #ad8f4b 100%);
  --shadow: 0 24px 60px -28px rgba(0, 12, 25, 0.55);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 18px;
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: var(--ink);
  background:
    radial-gradient(120% 120% at 50% -10%, var(--navy-700) 0%, var(--navy-800) 45%, var(--navy-900) 100%);
}

.palco {
  width: 100%;
  max-width: 560px;
  background: var(--paper);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.topo {
  padding: 22px 30px 0;
}

.marca {
  display: block;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--navy-800);
  text-align: center;
}

.progresso {
  margin-top: 18px;
  height: 5px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
}

.progresso-barra {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: var(--gold-grad);
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.cena {
  padding: 30px 30px 38px;
}

.oculto {
  display: none;
}

.cena-abertura {
  padding: 0;
}

.cena-quiz {
  padding: 18px 24px 22px;
}

.hero {
  position: relative;
  padding-top: 16px;
  text-align: center;
  background: linear-gradient(180deg, #f3ead2 0%, #fbf2df 60%, #fdf7e8 100%);
  overflow: hidden;
}

.hero picture {
  display: block;
}

.hero-foto {
  display: block;
  width: 76%;
  max-width: 330px;
  height: auto;
  margin: 0 auto -2px;
}

.abertura-conteudo {
  position: relative;
  margin-top: -46px;
  padding: 28px 30px 38px;
  background: var(--paper);
  border-radius: 30px 30px 0 0;
}

.selo {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-500);
}

h1 {
  margin: 0 0 16px;
  font-weight: 700;
  font-size: 28px;
  line-height: 1.24;
  letter-spacing: -0.02em;
  color: var(--navy-800);
}

.subtitulo {
  margin: 0 0 28px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.contagem {
  margin: 18px 0 0;
  text-align: left;
}

.contagem-linha {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 8px;
  font-size: 12.5px;
  color: var(--ink-faint);
}

.contagem-valor {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.contagem-valor strong {
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
  color: var(--gold-500);
}

.contagem-trilha {
  display: block;
  height: 6px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
}

.contagem-barra {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-300));
  transition: width 0.6s ease;
}

.contagem-restam {
  margin: 9px 0 0;
  font-size: 12.5px;
  color: var(--ink-faint);
  text-align: center;
}

.contagem-restam strong {
  font-weight: 700;
  color: var(--gold-500);
  font-variant-numeric: tabular-nums;
}

.pulsa {
  animation: pulsa 0.5s ease;
}

@keyframes pulsa {
  40% {
    transform: scale(1.18);
    color: var(--gold-300);
  }
}

/* a foto fica com a altura que sobra depois do texto, medida em svh (área visível com as barras do
   navegador à mostra), que é estável e não muda quando a pessoa rola */
.pergunta-foto {
  height: clamp(70px, calc((100vh - 470px) * 0.48), 250px);
  height: clamp(70px, calc((100svh - 470px) * 0.48), 250px);
  width: auto;
  max-width: 86%;
  aspect-ratio: 1 / 1;
  margin: 0 auto 14px;
  border-radius: 16px;
  object-fit: cover;
  object-position: center;
  background: var(--tint);
  box-shadow: 0 12px 26px -16px rgba(0, 23, 49, 0.45);
}

.pergunta-foto:not(.oculto) {
  display: block;
}

.pergunta-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
}

.etapa {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-500);
}

.contador {
  margin: 0;
  font-size: 12px;
  color: var(--ink-faint);
  white-space: nowrap;
}

.pergunta {
  margin: 0 0 13px;
  font-weight: 700;
  font-size: clamp(19px, 3.1vh, 26px);
  font-size: clamp(19px, 3.1svh, 26px);
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--navy-800);
}

.opcoes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(4px, 0.6vh, 7px);
  gap: clamp(4px, 0.6svh, 7px);
}

.opcao {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: clamp(7px, 1.1vh, 10px) 14px;
  padding: clamp(7px, 1.1svh, 10px) 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  font: inherit;
  font-size: clamp(14px, 2.28vh, 18px);
  font-size: clamp(14px, 2.28svh, 18px);
  line-height: 1.35;
  color: var(--ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

@media (hover: hover) and (pointer: fine) {
  .opcao:hover {
    border-color: var(--gold-300);
    background: var(--tint);
  }
}

body.tem-toque .opcao:hover,
body.tem-toque .opcao:focus {
  border-color: var(--line);
  background: var(--paper);
}

.opcao .marcador {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid #cdd5e0;
  position: relative;
  transition: border-color 0.18s ease;
}

.opcao.ativa {
  border-color: var(--gold-500);
  background: var(--tint);
  transform: translateY(-1px);
}

.opcao.ativa .marcador {
  border-color: var(--gold-500);
  background: var(--gold-grad);
}

.opcao.ativa .marcador::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--paper);
}

.voltar {
  flex-shrink: 0;
  margin: 0;
  border: none;
  background: none;
  padding: 4px 0;
  font: inherit;
  font-size: 12.5px;
  color: var(--ink-faint);
  cursor: pointer;
}

/* na primeira pergunta o botão só fica invisível, pra não deslocar a etapa e o contador */
.voltar.oculto {
  display: block;
  visibility: hidden;
}

.voltar:hover {
  color: var(--navy-800);
}

.botao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 17px 24px;
  border: none;
  border-radius: 14px;
  background: var(--navy-800);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.botao:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -16px rgba(0, 23, 49, 0.7);
}

.botao-cta {
  text-decoration: none;
  background: var(--gold-grad);
  color: var(--navy-900);
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 15px;
}

.botao-cta:hover {
  box-shadow: 0 16px 32px -14px rgba(173, 143, 75, 0.8);
}

#resultadoTitulo {
  margin: 0 0 22px;
  font-weight: 700;
  font-size: 26px;
  line-height: 1.26;
  letter-spacing: -0.02em;
  color: var(--navy-800);
}

.diagnostico p {
  margin: 0 0 16px;
  font-size: 15.5px;
  line-height: 1.62;
  color: var(--ink-soft);
}

.bloco {
  margin-top: 24px;
  padding: 20px 22px;
  border-radius: 16px;
  background: var(--tint);
  border: 1px solid #f0e4c6;
}

.bloco-titulo {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-500);
}

.bloco-texto {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.sinais {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sinais li {
  position: relative;
  padding-left: 20px;
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.sinais li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold-grad);
}

.apoio {
  margin: 20px 0 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-faint);
  text-align: center;
}

.convite {
  margin-top: 30px;
  padding: 26px 24px 28px;
  border-radius: 18px;
  background: linear-gradient(160deg, var(--navy-800), var(--navy-900));
  color: #fff;
}

.convite-selo {
  margin: 0 0 18px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
  color: var(--gold-100);
}

.convite-chamada {
  margin: 0 0 16px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
}

.beneficios {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.beneficios li {
  position: relative;
  padding-left: 30px;
  font-size: 15px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92);
}

.beneficios li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold-grad);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center / 12px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.convite-fechamento {
  margin: 0 0 20px;
  font-size: 15.5px;
  line-height: 1.55;
  color: #fff;
}

.garantia {
  margin: 14px 0 0;
  text-align: center;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.6);
}

.loader {
  text-align: center;
  padding: 34px 0 26px;
}

.loader-anel {
  --p: 0;
  width: 138px;
  height: 138px;
  margin: 0 auto 30px;
  border-radius: 50%;
  position: relative;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--gold-500) calc(var(--p) * 1%), var(--line) 0);
  transition: background 0.2s linear;
}

.loader-anel::after {
  content: "";
  position: absolute;
  inset: 11px;
  border-radius: 50%;
  background: var(--paper);
}

.loader-pct {
  position: relative;
  z-index: 1;
  font-weight: 700;
  font-size: 29px;
  letter-spacing: -0.02em;
  color: var(--navy-800);
}

.loader-titulo {
  margin: 0 0 10px;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.015em;
  color: var(--navy-800);
}

.loader-msg {
  margin: 0;
  min-height: 22px;
  font-size: 15px;
  color: var(--ink-faint);
}

.loader-msg.troca {
  animation: surge 0.35s ease;
}

.cena-entra {
  animation: surge 0.4s ease;
}

@keyframes surge {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 520px) {
  body {
    padding: 0;
    align-items: stretch;
  }

  .palco {
    border-radius: 0;
    max-width: none;
    min-height: 100vh;
    min-height: 100dvh;
    box-shadow: none;
  }

  .topo {
    padding: 12px 18px 0;
  }

  .marca {
    font-size: 13px;
  }

  .progresso {
    margin-top: 10px;
    height: 4px;
  }

  .cena-quiz {
    padding: 12px 18px 16px;
  }

  h1 {
    font-size: 25px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cena-entra,
  .progresso-barra,
  .contagem-barra,
  .pulsa {
    animation: none;
    transition: none;
  }
}
