/* Formulário do funil Avodah, no estilo Typeform: uma tela por pergunta.
   Fonte Lato (referência da mentoria) e cores da marca Avodah em fundo claro. */
:root {
  --fundo: #f6f7f3;
  --tinta: #152025;        /* texto e botões (verde-petróleo da Avodah) */
  --apoio: #56655f;        /* texto de apoio */
  --linha: rgba(21, 32, 37, .22);
  --suave: rgba(21, 32, 37, .045);
  --broto: #a9f00f;        /* destaque da marca */
  --verde: #3f6f06;        /* número das perguntas (o broto não dá leitura no fundo claro) */
  --whats: #157a3f;
  --erro: #b42318;
  --texto: 'Lato', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --suave-saida: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--fundo);
  color: var(--tinta);
  font: 400 1.0625rem/1.55 var(--texto);
  -webkit-font-smoothing: antialiased;
}

h1, h2, p { margin: 0; }
strong, b { font-weight: 900; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--tinta); outline-offset: 3px; border-radius: 4px; }
/* O título recebe o foco só para o leitor de tela anunciar a pergunta; o campo já tem o sublinhado */
h2[tabindex="-1"]:focus, input:focus { outline: none; }

/* Barra de progresso no topo */
.progresso { position: fixed; inset: 0 0 auto; height: 4px; background: rgba(21, 32, 37, .07); z-index: 5; }
.progresso span { display: block; height: 100%; width: 0; background: #8fd400; transition: width .5s var(--suave-saida); }

.topo {
  position: absolute; top: 18px; left: 20px;
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: .95rem; letter-spacing: .01em;
}

/* Palco: só a tela ativa aparece, centralizada na altura */
.palco {
  min-height: 100vh; min-height: 100dvh;
  max-width: 620px; margin: 0 auto;
  padding: 88px 20px 104px;
  display: flex; flex-direction: column; justify-content: center;
}
.palco.largo { max-width: 1000px; }
/* Nas etapas, tudo começa no topo, para o "Etapa X de 3" não mudar de lugar (a capa continua centralizada) */
.palco:has(> .pergunta.ativa) { justify-content: flex-start; }

/* Troca de tela: a de agora sobe e some, a próxima entra de baixo (ao voltar, o contrário) */
.tela.ativa { animation: entra .55s var(--suave-saida) both; }
.palco[data-dir="volta"] .tela.ativa { animation-name: entra-de-cima; }
.tela.saindo { animation: sai .2s ease-in both; }
.palco[data-dir="volta"] .tela.saindo { animation-name: sai-para-baixo; }
@keyframes entra { from { opacity: 0; transform: translateY(28px); } }
@keyframes entra-de-cima { from { opacity: 0; transform: translateY(-28px); } }
@keyframes sai { to { opacity: 0; transform: translateY(-20px); } }
@keyframes sai-para-baixo { to { opacity: 0; transform: translateY(20px); } }

/* Capa */
h1 {
  font-size: clamp(1.6rem, 5.4vw, 2.3rem);
  font-weight: 400; line-height: 1.22; letter-spacing: -.01em;
  text-align: left;
}
.bullets { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 6px; font-size: 1.1rem; }
.bullets li { display: flex; gap: .55em; align-items: baseline; }
.filtro { margin-top: 26px; font-style: italic; font-weight: 700; color: var(--apoio); font-size: 1rem; line-height: 1.5; }

/* Botão principal */
.cta {
  margin-top: 30px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 58px; padding: 14px 22px;
  border: 0; border-radius: 10px;
  background: var(--tinta); color: #fff;
  font: 900 1.05rem/1.2 var(--texto); text-transform: uppercase; letter-spacing: .03em;
  text-decoration: none; cursor: pointer;
  box-shadow: 0 10px 24px -12px rgba(21, 32, 37, .55);
  transition: transform .15s ease, box-shadow .15s ease;
}
.cta span { color: var(--broto); }
.cta:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -12px rgba(21, 32, 37, .6); }
.cta:active { transform: translateY(0); }

/* Etapas */
.etapa { font-weight: 900; color: var(--verde); font-size: .95rem; margin-bottom: 6px; }
.saudacao { font-weight: 700; color: var(--apoio); margin-bottom: 6px; font-size: 1.05rem; }
h2 { font-size: clamp(1.4rem, 4.6vw, 1.9rem); font-weight: 700; line-height: 1.28; letter-spacing: -.005em; }
.dica { margin-top: 10px; color: var(--apoio); font-size: 1rem; }

/* Etapa 1: grupos com rótulo curto em negrito */
fieldset.grupo { border: 0; padding: 0; margin: 22px 0 0; min-width: 0; }
.grupo { margin-top: 22px; }
.grupo > legend, .grupo > label { display: block; padding: 0; margin-bottom: 8px; font-weight: 700; font-size: 1rem; }

/* Campos em caixa */
.grupo input:not([type="radio"]), .campo-arroba {
  display: block; width: 100%; min-height: 52px; padding: 12px 14px;
  border: 1px solid var(--linha); border-radius: 10px;
  background: #fff; color: var(--tinta);
  font: 400 1.1rem/1.3 var(--texto);
  outline: none; transition: border-color .2s ease, box-shadow .2s ease;
}
.grupo input::placeholder { color: rgba(21, 32, 37, .38); }
.grupo input:not([type="radio"]):focus, .campo-arroba:focus-within { border-color: var(--tinta); box-shadow: 0 0 0 3px rgba(21, 32, 37, .12); }
.grupo input[aria-invalid="true"], .campo-arroba:has(input[aria-invalid="true"]) { border-color: var(--erro); }

.campo-arroba { display: flex; align-items: center; gap: 2px; }
.campo-arroba span { color: var(--apoio); font-size: 1.1rem; }
.grupo .campo-arroba input { min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }

/* Faixas de faturamento em botões lado a lado */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.chip span {
  display: block; min-height: 46px; padding: 11px 15px;
  border: 1px solid var(--linha); border-radius: 10px;
  background: var(--suave); font-size: 1rem; line-height: 1.4; cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.chip span:hover { background: rgba(21, 32, 37, .09); border-color: rgba(21, 32, 37, .4); }
.chip input:checked + span { background: var(--broto); border-color: var(--tinta); }
.chip input:focus-visible + span { outline: 3px solid var(--tinta); outline-offset: 2px; }
.chips:has(input[aria-invalid="true"]) .chip span { border-color: var(--erro); }

.erro {
  display: inline-block; margin-top: 8px; padding: 6px 12px; border-radius: 8px;
  background: #fdecea; color: var(--erro); font-weight: 700; font-size: .95rem;
}

/* Continuar: apagado até tudo estar preenchido (continua clicável e mostra o que falta) */
.continuar {
  display: block; width: 100%; min-height: 56px; margin-top: 28px; padding: 0 22px;
  border: 0; border-radius: 10px;
  background: #87908d; color: #fff;
  font: 900 1.2rem/1 var(--texto); cursor: pointer;
  transition: background .2s ease, box-shadow .2s ease;
}
.continuar.pronto { background: var(--tinta); box-shadow: 0 10px 24px -12px rgba(21, 32, 37, .55); }

/* Tremida de erro */
.tremendo { animation: treme .4s ease; }
@keyframes treme {
  20% { transform: translateX(-6px); } 40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); } 80% { transform: translateX(2px); }
}

/* Respostas do investimento */
.opcoes { display: grid; gap: 10px; margin-top: 24px; max-width: 520px; }
.opcao {
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 56px; padding: 12px 16px; text-align: left;
  border: 1px solid var(--linha); border-radius: 10px;
  background: var(--suave); color: var(--tinta);
  font: 700 1.05rem/1.35 var(--texto); cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.opcao:hover { background: rgba(21, 32, 37, .09); border-color: rgba(21, 32, 37, .4); }
.opcao.escolhida { background: var(--broto); border-color: var(--tinta); }
.opcao.piscando { animation: pisca .32s steps(1) 1; }
@keyframes pisca { 0%, 100% { background: var(--broto); } 50% { background: var(--suave); } }

/* Agenda */
.agenda { margin-top: 20px; min-height: 520px; }
.agenda-reserva { margin-top: 18px; }
.agenda-reserva .cta { max-width: 320px; }

/* Agendou */
.selo {
  display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 18px;
  border-radius: 50%; background: var(--broto); color: var(--tinta); font-size: 1.6rem; font-weight: 900;
}
.quando { margin-top: 10px; font-weight: 900; font-size: 1.15rem; }
.texto { margin-top: 14px; font-size: 1.1rem; }

/* Página do WhatsApp */
.cta-whats { background: var(--whats); text-transform: none; letter-spacing: 0; font-size: 1.1rem; }
.cta-whats svg { flex: none; }

/* Voltar */
.rodape-nav { position: fixed; left: 16px; bottom: 16px; z-index: 5; }
.voltar {
  min-height: 42px; padding: 0 14px; border: 1px solid var(--linha); border-radius: 8px;
  background: #fff; color: var(--tinta); font: 700 .95rem/1 var(--texto); cursor: pointer;
}
.voltar:hover { border-color: var(--tinta); }

@media (min-width: 760px) {
  .topo { top: 26px; left: 32px; }
  .palco { padding-top: 96px; }
  .cta { width: auto; min-width: 360px; justify-content: space-between; }
  .agenda-reserva .cta { min-width: 0; }
  .rodape-nav { left: 32px; bottom: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .tela.ativa, .tela.saindo, .opcao.piscando, .tremendo { animation: none !important; }
  .progresso span, .cta, .continuar, .chip span { transition: none; }
}
