/* Raleway auto-hospedada (OFL): nada de terceiro carrega antes do aceite. */
@font-face {
  font-family: Raleway;
  src: url(/fonts/raleway.woff2) format('woff2');
  font-weight: 300 800;
  font-display: swap;
}

/* Paleta do site da B. (tailwind.config de bmarketing.ogustavobrandao.com.br). */
:root {
  --noite: #13182C;
  --primario: #2A3254;
  --cartao: #1B213B;
  --borda: #333D63;
  --bege: #EAE6BA;
  --suave: #D1D5DB;
  --tinta: #111111;
  --contorno: #7681AE; /* 3:1 sobre o fundo: contorno de campo */
  --erro: #FFB4A2;
  --passo: 0;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  position: relative;
  margin: 0;
  background: var(--noite);
  color: #fff;
  font: 500 1rem/1.5 Raleway, system-ui, sans-serif;
  font-variant-numeric: lining-nums; /* os números padrão da Raleway são de texto: R$ 1.000 fica torto */
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

p { margin: 0; }
a[href] { color: var(--bege); text-underline-offset: .15em; }
:focus-visible { outline: 2px solid var(--bege); outline-offset: 3px; }
.titulo:focus { outline: none; }

.so-leitor {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* O disco é o da logo: cresce a cada etapa e, no obrigado, vira a logo inteira. */
.fundo {
  position: absolute;
  inset: 0 0 auto;
  height: 24rem;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

.disco {
  position: absolute;
  top: 0;
  right: 0;
  width: 11rem;
  height: 11rem;
  fill: var(--bege);
  transform: translate(50%, -50%) scale(calc(.7 + var(--passo) * .1));
  transition: transform .6s cubic-bezier(.16, 1, .3, 1);
}

.letra {
  fill: var(--primario);
  opacity: 0;
  transition: opacity .3s ease .3s;
}

[data-tela="obrigado"] .disco { transform: translate(calc(50% - 50vw), calc(-50% + 6.25rem)) scale(.85); }
[data-tela="obrigado"] .letra { opacity: 1; }
[data-tela="obrigado"] .logo { display: none; }

.progresso {
  position: absolute;
  top: .75rem;
  right: .875rem;
  color: var(--primario);
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.5rem;
}

.coluna {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 34rem;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 1rem 1.25rem;
}

.topo {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-height: 2.5rem;
  margin-bottom: .75rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: .625rem;
  color: var(--bege);
  font-size: 1.0625rem;
  font-weight: 300;
  letter-spacing: .08em;
}

.logo img { display: block; }

.etiqueta {
  padding: .0625rem .625rem;
  border: 1px solid var(--bege);
  border-radius: 999px;
  color: var(--bege);
  font-size: .75rem;
  font-weight: 600;
}

.abertura {
  margin-bottom: 1rem;
  color: var(--suave);
  font-size: .9375rem;
  line-height: 1.45;
}

.abertura strong { color: var(--bege); font-weight: 700; }

.voltar {
  align-self: flex-start;
  min-height: 2.75rem;
  margin: 0 0 .25rem;
  padding: 0 .75rem 0 0;
  border: 0;
  background: none;
  color: var(--bege);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.voltar::before { content: '‹'; margin-right: .375rem; font-size: 1.25em; line-height: 1; }

/* Cada tela nova chega junto com o toque: elementos recriados ou que saem de display:none reiniciam a animação. */
.tela > * { animation: chegar .26s ease-out both; }

@keyframes chegar {
  from { opacity: 0; transform: translateX(.75rem); }
}

.titulo {
  margin: 0 0 1.25rem;
  font-size: clamp(1.75rem, 7.6vw, 2.5rem);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -.02em;
  text-wrap: balance;
}

.opcoes { display: grid; gap: .5rem; }

.opcao {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  width: 100%;
  min-height: 3.125rem;
  padding: .5rem 1rem .5rem 1.25rem;
  border: 1px solid var(--borda);
  border-radius: 999px;
  background: var(--cartao);
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
  -webkit-tap-highlight-color: transparent;
}

/* A bolinha repete o ponto do "B.": aparece quando a opção é escolhida. */
.opcao::after {
  content: '';
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--contorno);
  border-radius: 50%;
}

.opcao[aria-pressed="true"] { border-color: var(--bege); background: var(--bege); color: var(--tinta); }
.opcao[aria-pressed="true"]::after { border-color: var(--primario); background: var(--primario); }

@media (hover: hover) {
  .opcao:hover { border-color: var(--bege); }
  .voltar:hover { color: #fff; }
}

.campo { margin-bottom: .875rem; }

.campo label {
  display: block;
  margin-bottom: .25rem;
  color: var(--bege);
  font-size: .9375rem;
  font-weight: 600;
}

.campo input {
  display: block;
  width: 100%;
  min-height: 3.125rem;
  padding: .5rem 1rem;
  border: 1px solid var(--contorno);
  border-radius: .875rem;
  background: var(--cartao);
  color: #fff;
  font: inherit; /* 16px: abaixo disso o iPhone dá zoom no campo */
  appearance: none;
}

.campo .marcar {
  display: flex;
  align-items: center;
  gap: .625rem;
  min-height: 2.75rem;
  margin: .25rem 0 0;
  color: #fff;
  font-weight: 400;
}

.campo .marcar input { flex: none; width: 1.375rem; min-height: 0; height: 1.375rem; padding: 0; appearance: auto; accent-color: var(--primario); }

.campo input:disabled { opacity: .45; }

.campo input::placeholder { color: #A3ABCB; opacity: 1; }

/* Autopreenchimento do navegador sem o fundo claro. */
.campo input:-webkit-autofill {
  -webkit-text-fill-color: #fff;
  box-shadow: 0 0 0 100px var(--cartao) inset;
}

.campo input[aria-invalid="true"] { border-color: var(--erro); }

.erro {
  margin-top: .25rem;
  color: var(--erro);
  font-size: .875rem;
  line-height: 1.35;
}

/* Isca para robôs: fora da tela, não display:none, senão eles pulam o campo. */
.isca {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.termos {
  margin: 1rem 0;
  color: var(--suave);
  font-size: .8125rem;
  line-height: 1.45;
}

.botao {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.25rem;
  padding: .5rem 1.25rem;
  border: 1px solid var(--bege);
  border-radius: 999px;
  background: var(--bege);
  color: var(--tinta);
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s;
}

a.botao[href] { color: var(--tinta); }
.botao:disabled { opacity: .6; cursor: default; }

.botao-contorno { background: transparent; color: var(--bege); }

@media (hover: hover) {
  .botao:not(:disabled):hover { border-color: #fff; background: #fff; color: var(--noite); }
}

.obrigado { margin-top: 7.75rem; text-align: center; }
.obrigado > p { text-wrap: balance; }
.obrigado > p:first-of-type { margin-bottom: 1.5rem; color: var(--suave); }
.codigo { margin-top: 1rem; color: var(--suave); font-size: .875rem; }
.codigo strong { color: var(--bege); font-weight: 700; white-space: nowrap; }

/* Sticky: fica à vista em tela baixa e cai no fim da página nas altas, sem cobrir nada de vez. */
.nota {
  position: sticky;
  bottom: .75rem;
  margin-top: auto;
  padding: .875rem;
  border: 1px solid var(--borda);
  border-radius: 1.25rem;
  background: var(--cartao);
  box-shadow: 0 -.75rem 2rem var(--noite);
  font-size: .875rem;
  line-height: 1.4;
}

.nota-acoes { display: flex; gap: .5rem; margin-top: .625rem; }
.nota .botao { min-height: 2.75rem; padding-block: .25rem; }

.tela { margin-bottom: 1.25rem; }

/* Com a nota à vista, ela ocupa o rodapé da primeira tela. */
.rodape {
  margin-top: auto;
  padding-top: 1.5rem;
  color: var(--suave);
  font-size: .8125rem;
}

.nota:not([hidden]) ~ .rodape { display: none; }
[data-tela="obrigado"] .rodape { text-align: center; }

.lema {
  margin-bottom: .375rem;
  color: var(--bege);
  font-size: 1.25rem;
  font-weight: 300;
  line-height: 1.25;
  text-wrap: balance;
}

.sem-js { margin-bottom: 1rem; }

/* Plano B: só aparece se o app.js não carregar e não o remover em 4 s. */
#plano-b { animation: aparecer 0s 4s both; margin-bottom: 1rem; }
#plano-b a { color: inherit; text-decoration: underline; }
@keyframes aparecer { from { visibility: hidden; } }

/* Só enquanto a etiqueta de rascunho existe: em tela estreita ela encostaria no disco. */
@media (max-width: 22rem) {
  .topo:has(.etiqueta:not([hidden])) .logo span { display: none; }
}

@media (min-width: 48rem) {
  .disco { width: 18rem; height: 18rem; }
  [data-tela="obrigado"] .disco { transform: translate(calc(50% - 50vw), calc(-50% + 6.25rem)) scale(.52); }
  .progresso { top: 1.25rem; right: 1.5rem; font-size: 1.5rem; }
  .coluna { padding-top: 2.5rem; }
  .obrigado { margin-top: 6.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Página da política de privacidade. */
.politica { display: grid; gap: .75rem; align-content: start; }
.politica h2 { margin: 1.25rem 0 0; font-size: 1.15rem; line-height: 1.3; }
.politica ul { margin: 0; padding-left: 1.25rem; display: grid; gap: .4rem; }
.politica code { font-size: .9em; overflow-wrap: anywhere; }
.politica p, .politica li { overflow-wrap: anywhere; }
.politica .botao { justify-self: start; }
.aviso-rascunho { color: var(--suave); font-size: .9rem; }
