/* CAMPO · formulário de parceiros v1 (17/10/2026)
   Cores e tipos do kit da marca (site-v6/03-kit). O tema escolhido sobrescreve só tokens.
   A: editorial creme (padrão) · B: imersivo verde (body[data-tema="b"]) */

:root {
  --verde-campo: #12372f;
  --verde-profundo: #0d2c25;
  --salvia: #748b76;
  --terracota: #b66b52;
  --terracota-texto: #9c5842;
  --creme: #f8f6f0;
  --papel: #fffefa;
  --tinta: #203a32;
  --cinza-verde-texto: #616e68;
  --linha: #e5e6de;
  --suave: #eaf0e9;
  --areia: #d1b48d;

  --serif: "Noto Serif Display", Georgia, serif;
  --sans: "Plus Jakarta Sans", system-ui, sans-serif;

  /* tokens de papel (tema A) */
  --fundo: var(--creme);
  --texto: var(--tinta);
  --titulo: var(--verde-campo);
  --apoio: var(--cinza-verde-texto);
  --opcao-fundo: var(--papel);
  --opcao-borda: #c9d0c6;
  --opcao-borda-forte: var(--salvia);
  --opcao-sel-fundo: var(--verde-campo);
  --opcao-sel-texto: var(--papel);
  --campo-fundo: var(--papel);
  --botao-fundo: var(--verde-campo);
  --botao-texto: var(--papel);
  --linha-progresso: #d9dcd2;
  --feito: var(--verde-campo);
  --traj-curva: var(--salvia);
  --traj-fixa: var(--verde-campo);
  --traj-ponto: var(--terracota);
  --erro: var(--terracota-texto);
  --foco: var(--terracota);
  --base-fundo: rgba(248, 246, 240, .92);
}

body[data-tema="b"] {
  --fundo: var(--verde-campo);
  --texto: #e3e7e1;
  --titulo: var(--creme);
  --apoio: #bec6c0;
  --opcao-fundo: rgba(248, 246, 240, .06);
  --opcao-borda: rgba(248, 246, 240, .28);
  --opcao-borda-forte: rgba(248, 246, 240, .6);
  --opcao-sel-fundo: var(--creme);
  --opcao-sel-texto: var(--verde-campo);
  --campo-fundo: rgba(248, 246, 240, .08);
  --botao-fundo: var(--creme);
  --botao-texto: var(--verde-campo);
  --linha-progresso: rgba(248, 246, 240, .2);
  --feito: var(--areia);
  --traj-curva: var(--areia);
  --traj-fixa: var(--creme);
  --erro: #e7b4a2;
  --foco: var(--areia);
  --base-fundo: rgba(18, 55, 47, .92);
}

* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--fundo);
  color: var(--texto);
  font: 400 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  transition: background .4s ease;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--foco); outline-offset: 3px; }

.f {
  position: relative;
  min-height: 100dvh;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Trajetória: o grafismo oficial (Trajetorias_fundo_escuro.svg) se desenha uma vez, na tela final */
.f-encontro { display: block; width: min(78vw, 340px); height: auto; margin: 36px -24px 0 auto; fill: none; stroke-width: 1.5; }
.f-encontro path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: desenha 1.6s cubic-bezier(.3, .6, .2, 1) forwards; }
.f-encontro path:nth-child(2) { animation-delay: .25s; }
.f-encontro path:nth-child(3) { animation-delay: .5s; }
.f-encontro path:nth-child(4) { animation-delay: .1s; }
.f-encontro circle { opacity: 0; animation: aparece .4s ease 1.7s forwards; }
@keyframes desenha { to { stroke-dashoffset: 0; } }
@keyframes aparece { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .f-encontro path { animation: none; stroke-dashoffset: 0; } .f-encontro circle { animation: none; opacity: 1; } }

/* Topo */
.f-topo {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 44px 1fr 44px; align-items: center;
  padding: max(10px, env(safe-area-inset-top)) 12px 6px;
}
.f-assinatura { justify-self: center; display: grid; justify-items: start; gap: 4px; }
.f-marca { height: 25px; width: auto; display: block; } /* 124 px de largura: mínimo de 120 px do brandbook */
.f-descritor { font-size: 12px; line-height: 1; letter-spacing: .02em; color: var(--apoio); white-space: nowrap; }
.f-voltar {
  width: 44px; height: 44px; border: 0; background: none; border-radius: 50%;
  display: grid; place-items: center; font-size: 22px; color: var(--titulo);
  transition: transform .15s ease, opacity .2s ease;
}
.f-voltar:active { transform: scale(.96); }
.f-voltar.is-oculto { visibility: hidden; }

/* Progresso: linha reta do grafismo, ponto terracota marca onde ela está */
.f-progresso { position: relative; z-index: 2; height: 12px; margin: 4px 24px 0; }
.f-progresso__linha, .f-progresso__feito {
  position: absolute; left: 0; top: 50%; height: 1.5px; transform: translateY(-50%);
}
.f-progresso__linha { right: 0; background: var(--linha-progresso); }
.f-progresso__feito {
  width: calc(var(--p, 0) * 100%); background: var(--feito);
  transition: width .6s cubic-bezier(.2, .7, .2, 1);
}
.f-progresso__ponto {
  position: absolute; top: 50%; left: calc(var(--p, 0) * 100%);
  width: 9px; height: 9px; border-radius: 50%; background: var(--terracota);
  transform: translate(-50%, -50%);
  transition: left .6s cubic-bezier(.2, .7, .2, 1);
}

/* Palco: uma pergunta por vez */
.f-palco {
  position: relative; z-index: 1; flex: 1;
  padding: 36px 24px 140px;
}
.f-tela { animation: entra .45s cubic-bezier(.2, .7, .2, 1) both; }
.f-tela.volta { animation-name: entra-volta; }
@keyframes entra { from { opacity: 0; transform: translateY(14px); } }
@keyframes entra-volta { from { opacity: 0; transform: translateY(-14px); } }
@media (prefers-reduced-motion: reduce) {
  .f-tela, .f-tela.volta { animation: none; }
  .f-progresso__feito, .f-progresso__ponto { transition: none; }
}

.f-eco {
  font-size: 14px; color: var(--apoio); margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.f-eco i { color: var(--terracota); font-size: 16px; }
.f-eco__ponto { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--terracota); }
body[data-tema="b"] .f-eco i { color: var(--areia); }
.f-sobre { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--apoio); margin-bottom: 14px; font-weight: 500; }

.f-pergunta {
  font: 300 clamp(30px, 8.4vw, 40px)/1.12 var(--serif);
  color: var(--titulo);
  letter-spacing: -.01em;
  text-wrap: balance;
}
.f-pergunta em { font-style: italic; }
.f-pergunta:focus { outline: none; }
.f-ajuda { margin-top: 12px; font-size: 15px; color: var(--apoio); text-wrap: pretty; max-width: 34ch; }

.f-corpo { margin-top: 28px; display: grid; gap: 10px; }

/* Opções */
.f-opcao {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: 56px; padding: 14px 16px;
  text-align: left; font-size: 16px; font-weight: 500; line-height: 1.3;
  color: var(--texto); background: var(--opcao-fundo);
  border: 1.5px solid var(--opcao-borda); border-radius: 16px;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .12s ease;
}
@media (hover: hover) { .f-opcao:hover { border-color: var(--opcao-borda-forte); } }
.f-opcao:active { transform: scale(.96); }
.f-opcao small { display: block; font-weight: 400; font-size: 14px; color: var(--apoio); margin-top: 2px; }
.f-opcao__marca {
  flex: none; margin-left: auto; width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px solid var(--opcao-borda-forte); display: grid; place-items: center; font-size: 14px;
  transition: background .18s ease, border-color .18s ease;
}
.f-opcao__marca i { opacity: 0; transform: scale(.6); transition: opacity .15s ease, transform .2s ease; }
.f-opcao[aria-checked="true"], .f-opcao[aria-pressed="true"] {
  background: var(--opcao-sel-fundo); border-color: var(--opcao-sel-fundo); color: var(--opcao-sel-texto);
}
.f-opcao[aria-checked="true"] small, .f-opcao[aria-pressed="true"] small { color: inherit; opacity: .8; }
.f-opcao[aria-checked="true"] .f-opcao__marca, .f-opcao[aria-pressed="true"] .f-opcao__marca {
  border-color: currentColor;
}
.f-opcao[aria-checked="true"] .f-opcao__marca i, .f-opcao[aria-pressed="true"] .f-opcao__marca i { opacity: 1; transform: none; }
.f-opcao[disabled] { opacity: .45; }

/* Chips (regiões, respostas curtas) */
.f-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.f-chip {
  min-height: 44px; padding: 10px 16px; border-radius: 999px; font-size: 15px; font-weight: 500;
  background: var(--opcao-fundo); border: 1.5px solid var(--opcao-borda); color: var(--texto);
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .12s ease;
}
.f-chip:active { transform: scale(.96); }
.f-chip[aria-pressed="true"] { background: var(--opcao-sel-fundo); border-color: var(--opcao-sel-fundo); color: var(--opcao-sel-texto); }
.f-sub { margin-top: 22px; font-size: 15px; font-weight: 500; color: var(--titulo); margin-bottom: 10px; }

/* Campos */
.f-campo { display: grid; gap: 6px; }
.f-campo label { font-size: 14px; font-weight: 500; color: var(--apoio); }
.f-entrada, .f-texto {
  width: 100%; min-height: 58px; padding: 16px 18px; font-size: 18px;
  background: var(--campo-fundo); color: var(--texto);
  border: 1.5px solid var(--opcao-borda-forte); border-radius: 16px;
  transition: border-color .18s ease, box-shadow .18s ease;
  -webkit-appearance: none; appearance: none;
}
.f-entrada::placeholder, .f-texto::placeholder { color: var(--apoio); opacity: 1; }
.f-entrada:focus, .f-texto:focus { outline: none; border-color: var(--titulo); box-shadow: 0 0 0 4px color-mix(in srgb, var(--foco) 22%, transparent); }
.f-entrada.grande { font: 300 26px/1.2 var(--serif); padding: 14px 18px; }
.f-entrada.medio { font-size: 20px; font-weight: 500; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.f-texto { min-height: 132px; resize: none; line-height: 1.45; font-size: 17px; }
.f-entrada[aria-invalid="true"], .f-texto[aria-invalid="true"] { border-color: var(--erro); }
.f-erro { font-size: 14px; color: var(--erro); display: flex; gap: 6px; align-items: center; min-height: 20px; }
.f-erro:empty { display: none; }
.f-exemplos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.f-exemplo {
  border: 0; background: none; padding: 6px 0; margin-right: 12px; font-size: 14px; color: var(--apoio);
  text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 3px;
}
.f-prefixo { position: relative; }
.f-prefixo span { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--apoio); font-size: 18px; pointer-events: none; }
.f-prefixo .f-entrada { padding-left: 38px; }

/* Áudio */
.f-voz { display: grid; gap: 14px; justify-items: center; padding: 8px 0 4px; }
.f-gravar {
  width: 96px; height: 96px; border-radius: 50%; border: 0;
  background: var(--botao-fundo); color: var(--botao-texto); font-size: 36px;
  display: grid; place-items: center; position: relative;
  box-shadow: 0 10px 30px -12px rgba(13, 44, 37, .5);
  transition: transform .12s ease;
}
.f-gravar:active { transform: scale(.96); }
.f-gravar::after {
  content: ""; position: absolute; inset: -8px; border-radius: 50%;
  border: 1.5px solid var(--terracota); opacity: 0;
}
.f-voz.is-gravando .f-gravar { background: var(--terracota); color: var(--papel); }
@media (prefers-reduced-motion: no-preference) { .f-voz.is-gravando .f-gravar::after { animation: pulso 1.4s ease-out infinite; } }
.f-voz.is-gravando .f-gravar::after { opacity: .7; }
@keyframes pulso { from { opacity: .7; transform: scale(.9); } to { opacity: 0; transform: scale(1.25); } }
.f-voz__estado { font-size: 15px; color: var(--apoio); font-variant-numeric: tabular-nums; text-align: center; }
.f-onda { display: flex; gap: 3px; align-items: center; height: 28px; }
.f-onda span { width: 3px; border-radius: 2px; background: var(--titulo); opacity: .55; height: 6px; transition: height .08s linear; }
.f-ouvir {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px;
  background: var(--opcao-fundo); border: 1.5px solid var(--opcao-borda); border-radius: 16px;
}
.f-tocar {
  flex: none; width: 48px; height: 48px; border-radius: 50%; border: 0;
  background: var(--botao-fundo); color: var(--botao-texto); font-size: 20px; display: grid; place-items: center;
}
.f-tocar:active { transform: scale(.96); }
.f-tocar[disabled] { opacity: .5; }
.f-ouvir__txt { flex: 1; min-width: 0; display: grid; font-size: 15px; }
.f-ouvir__txt b { color: var(--titulo); font-weight: 600; }
.f-ouvir__txt span { color: var(--apoio); font-size: 14px; font-variant-numeric: tabular-nums; }
.f-ouvir__refazer { border: 0; background: none; color: var(--apoio); font-size: 14px; padding: 10px 4px; text-decoration: underline; text-underline-offset: 3px; }
.f-alternar {
  border: 0; background: none; color: var(--titulo); font-size: 15px; font-weight: 500; padding: 10px 4px;
  text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 4px;
}
.f-ou { font-size: 14px; color: var(--apoio); text-align: center; }
.f-mic-mini {
  display: inline-flex; align-items: center; gap: 8px; align-self: start;
  border: 1.5px solid var(--opcao-borda); background: var(--opcao-fundo); color: var(--titulo);
  border-radius: 999px; padding: 9px 14px; font-size: 14px; font-weight: 500; min-height: 40px;
}

/* Consentimento */
.f-aceite { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; font-size: 15px; line-height: 1.45; color: var(--texto); cursor: pointer; }
.f-aceite input { position: absolute; opacity: 0; pointer-events: none; }
.f-aceite__caixa {
  flex: none; width: 24px; height: 24px; border-radius: 7px; margin-top: 1px;
  border: 1.5px solid var(--opcao-borda-forte); display: grid; place-items: center; font-size: 15px;
  transition: background .15s ease;
}
.f-aceite__caixa i { opacity: 0; }
.f-aceite input:checked + .f-aceite__caixa { background: var(--opcao-sel-fundo); border-color: var(--opcao-sel-fundo); color: var(--opcao-sel-texto); }
.f-aceite input:checked + .f-aceite__caixa i { opacity: 1; }
.f-aceite input:focus-visible + .f-aceite__caixa { outline: 2px solid var(--foco); outline-offset: 3px; }
.f-aceite a { color: var(--titulo); }

/* Base fixa com a ação */
.f-base {
  position: fixed; left: 50%; bottom: 0; z-index: 3; transform: translateX(-50%);
  width: 100%; max-width: 560px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 24px max(16px, env(safe-area-inset-bottom));
  background: var(--base-fundo);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.f-base__dica { font-size: 14px; color: var(--apoio); font-variant-numeric: tabular-nums; }
.f-base.is-cheia .f-base__dica { display: none; }
.f-base.is-cheia .f-botao { flex: 1; justify-content: center; }
.f-botao {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border: 0; border-radius: 999px;
  background: var(--botao-fundo); color: var(--botao-texto);
  font-size: 16px; font-weight: 600;
  transition: transform .12s ease, opacity .2s ease;
}
.f-botao:active { transform: scale(.96); }
.f-botao:disabled { opacity: .6; cursor: progress; }
.f-botao i { font-size: 18px; }
.f-base[hidden] { display: none; }
.f-pular { border: 0; background: none; color: var(--apoio); font-size: 15px; padding: 12px 4px; text-decoration: underline; text-underline-offset: 3px; }

/* Abertura e fim */
.f-foto {
  display: block; width: 100%; height: clamp(200px, 34dvh, 340px); object-fit: cover; object-position: 50% 30%;
  border-radius: 20px; margin-bottom: 26px;
}
.f-abre { margin-top: -12px; }
.f-abre .f-pergunta { font-size: clamp(34px, 9.6vw, 48px); }
.f-abre .f-ajuda { font-size: 16px; max-width: 32ch; margin-top: 14px; }
.f-abre .f-nota { margin-top: 18px; }
.f-nota { margin-top: 26px; display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--apoio); }
.f-nota i { font-size: 18px; color: var(--titulo); }
.f-fim .f-pergunta { font-size: clamp(34px, 10vw, 46px); }
.f-passos { margin-top: 28px; display: grid; gap: 16px; }
.f-passo { display: grid; grid-template-columns: 28px 1fr; gap: 12px; font-size: 15px; }
.f-passo b { display: block; color: var(--titulo); font-weight: 600; }
.f-passo span { color: var(--apoio); }
.f-passo i { font-size: 22px; color: var(--titulo); margin-top: 1px; }
.f-indicar {
  margin-top: 32px; display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 22px;
  border-radius: 999px; border: 1.5px solid var(--opcao-borda-forte); background: none; color: var(--titulo);
  font-size: 16px; font-weight: 600; text-decoration: none;
}
.f-indicar:active { transform: scale(.96); }

.f-oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
