/* ==========================================================
   WebFormas: Formulário de Diagnóstico
   Identidade herdada da LP: maximalista / brutalista-pop
   ========================================================== */

@font-face { font-family: 'Archivo Black'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/archivo-black-latin.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 200 800; font-display: swap; src: url('../fonts/plus-jakarta-sans.woff2') format('woff2'); }
@font-face { font-family: 'Caveat'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('../fonts/caveat.woff2') format('woff2'); }

:root {
  --purple-900: #2A0A4F;
  --purple-700: #4F1B8B;
  --purple-400: #B088FF;
  --lime: #A8E830;
  --lime-bright: #C5FF3D;
  --lime-deep: #7AB800;
  --magenta: #FF2E9A;
  --hot-pink: #FF1478;
  --yellow: #FFC107;
  --cyan: #2DD4FF;
  --ink: #0A0614;
  --paper: #FAF7F2;
  --cream: #FFF6E3;

  --font-display: 'Archivo Black', Impact, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-hand: 'Caveat', cursive;

  --shadow-brut: 6px 6px 0 0 var(--ink);
  --shadow-brut-sm: 4px 4px 0 0 var(--ink);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

body {
  background:
    radial-gradient(ellipse 900px 500px at 10% -10%, rgba(168, 232, 48, 0.18), transparent 60%),
    radial-gradient(ellipse 700px 500px at 110% 10%, rgba(255, 46, 154, 0.14), transparent 60%),
    var(--paper);
}

img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; }

/* ---------- estrutura ---------- */

.app {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  max-width: 620px;
  margin: 0 auto;
  padding: 0 20px env(safe-area-inset-bottom);
}

.topo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0 10px;
}
.topo img { width: 38px; }
.topo span { font-family: var(--font-display); font-size: 0.85rem; letter-spacing: -0.01em; }

.progresso { height: 10px; border: 2px solid var(--ink); background: var(--cream); overflow: hidden; }
.progresso__barra { height: 100%; width: 0; background: var(--magenta); transition: width .35s cubic-bezier(.22,1,.36,1); }
.progresso[hidden] { display: none; }

.palco { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 24px 0 32px; }

/* ---------- telas ---------- */

.tela { display: none; }
.tela.ativa { display: block; animation: entrar .32s cubic-bezier(.22,1,.36,1) both; }
.tela.saindo { animation: sair .2s ease-in both; }

@keyframes entrar { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes sair   { to { opacity: 0; transform: translateY(-14px); } }

@media (prefers-reduced-motion: reduce) {
  .tela.ativa, .tela.saindo { animation: none; }
  .progresso__barra { transition: none; }
}

.contador { font-family: var(--font-hand); font-size: 1.15rem; color: var(--purple-700); margin-bottom: 6px; }

.pergunta {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 6.5vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}

.ajuda { font-size: 0.95rem; color: #4a4458; margin: -14px 0 20px; }

/* ---------- opções ---------- */

.opcoes { display: flex; flex-direction: column; gap: 12px; }

.opcao {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 14px 18px;
  text-align: left;
  font-size: 1.02rem;
  font-weight: 600;
  background: #fff;
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-brut-sm);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.opcao:hover { background: var(--cream); }
.opcao:active { transform: translate(4px, 4px); box-shadow: 0 0 0 0 var(--ink); }
.opcao[aria-pressed="true"] { background: var(--lime); box-shadow: var(--shadow-brut); }
.opcao__letra {
  flex: 0 0 auto;
  display: grid; place-items: center;
  width: 26px; height: 26px;
  font-size: 0.78rem; font-weight: 800;
  border: 2px solid var(--ink); background: var(--cream);
}
.opcao[aria-pressed="true"] .opcao__letra { background: var(--ink); color: var(--lime); }

/* ---------- campos ---------- */

.campo { margin-bottom: 16px; }
.campo label { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 6px; }
.campo input {
  width: 100%;
  min-height: 56px;
  padding: 14px 16px;
  font-family: inherit; font-size: 1.05rem;
  background: #fff;
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-brut-sm);
}
.campo input:focus { outline: none; background: var(--cream); box-shadow: var(--shadow-brut); }
.campo input[aria-invalid="true"] { border-color: var(--hot-pink); }
.campo__erro { display: block; margin-top: 6px; font-size: 0.85rem; font-weight: 700; color: var(--hot-pink); }
.campo__erro:empty { display: none; }

.subcampo { margin-top: 12px; }
.subcampo[hidden] { display: none; }

.consentimento { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0; font-size: 0.86rem; }
.consentimento input { width: 22px; height: 22px; flex: 0 0 auto; accent-color: var(--purple-700); }

/* honeypot */
.armadilha { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- botões ---------- */

.acoes { display: flex; align-items: center; gap: 12px; margin-top: 24px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 56px; padding: 14px 26px;
  font-family: var(--font-display); font-size: 1rem; letter-spacing: -0.01em;
  background: var(--lime); color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-brut);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { background: var(--lime-bright); }
.btn:active { transform: translate(6px, 6px); box-shadow: 0 0 0 0 var(--ink); }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn--fantasma { background: transparent; box-shadow: none; border-color: transparent; font-family: var(--font-body); font-weight: 700; text-decoration: underline; padding: 14px 4px; min-height: 44px; }

.btn--wa {
  position: relative;
  background: linear-gradient(89deg, #056362, #03A696, #056362, #96D9D2);
  background-size: 400% 200%;
  animation: textura-wa 2s ease infinite;
  color: #fff;
  border: 2px solid var(--ink);
  border-radius: 500px;
  box-shadow: var(--shadow-brut);
}
@keyframes textura-wa { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@media (prefers-reduced-motion: reduce) { .btn--wa { animation: none; } }

/* ---------- capa ---------- */

.capa { text-align: left; }
.capa__titulo { font-family: var(--font-display); font-size: clamp(1.9rem, 8vw, 3rem); line-height: 1.05; letter-spacing: -0.03em; }
.capa__titulo em { font-style: normal; background: var(--lime); padding: 0 .1em; box-decoration-break: clone; }
.capa__sub { margin: 18px 0 8px; font-size: 1.05rem; }
.capa__tempo { font-family: var(--font-hand); font-size: 1.3rem; color: var(--purple-700); }

/* ---------- carregando ---------- */

.carregando { text-align: center; padding: 40px 0; }
.carregando__marca {
  display: inline-block; width: 64px; height: 64px;
  border: 5px solid var(--ink); border-top-color: var(--magenta);
  border-radius: 50%; animation: girar 1s linear infinite;
}
@keyframes girar { to { transform: rotate(360deg); } }
.carregando__texto { margin-top: 20px; font-family: var(--font-display); font-size: 1.1rem; }
.carregando__passo { margin-top: 8px; font-size: 0.92rem; color: #4a4458; min-height: 1.4em; }

/* ---------- relatório ---------- */

.relatorio__topo { margin-bottom: 26px; }
.relatorio__titulo { font-family: var(--font-display); font-size: clamp(1.6rem, 6.5vw, 2.2rem); line-height: 1.1; }
.relatorio__intro { margin-top: 14px; font-size: .98rem; line-height: 1.5; color: #4a4458; }
.relatorio__nota { display: inline-block; margin-top: 14px; padding: 6px 14px; border: 2px solid var(--ink); background: var(--cream); font-weight: 800; box-shadow: var(--shadow-brut-sm); }

.bloco { border: 2px solid var(--ink); background: #fff; box-shadow: var(--shadow-brut); margin-bottom: 22px; }
.bloco__cabeca { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 2px solid var(--ink); }
.bloco__titulo { font-family: var(--font-display); font-size: 1.1rem; }
.bloco__selo { flex: 0 0 auto; padding: 4px 10px; border: 2px solid var(--ink); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.bloco__selo--verde { background: var(--lime); }
.bloco__selo--atencao { background: var(--yellow); }
.bloco__selo--critico { background: var(--hot-pink); color: #fff; }
.bloco__selo--nao_verificado { background: #e4e0ea; }

.bloco__lista { list-style: none; padding: 14px 18px; }
.bloco__item { display: flex; gap: 10px; padding: 7px 0; font-size: .96rem; }
.bloco__marca { flex: 0 0 auto; width: 12px; height: 12px; margin-top: .38em; border: 2px solid var(--ink); }
.bloco__marca--verde { background: var(--lime); }
.bloco__marca--atencao { background: var(--yellow); }
.bloco__marca--critico { background: var(--hot-pink); }
.bloco__marca--nao_verificado { background: #e4e0ea; }

.bloco__acao { padding: 14px 18px; border-top: 2px dashed var(--ink); background: var(--cream); font-weight: 600; font-size: .95rem; }

.fecho { border: 2px solid var(--ink); background: var(--purple-900); color: #fff; box-shadow: var(--shadow-brut); padding: 24px 20px; margin: 30px 0 40px; text-align: center; }
.fecho h2 { font-family: var(--font-display); font-size: 1.35rem; line-height: 1.15; margin-bottom: 10px; }
.fecho p { font-size: .96rem; opacity: .9; margin-bottom: 18px; }

.rodape { padding: 26px 0 30px; text-align: center; font-size: .8rem; color: #4a4458; }
.rodape img { width: 92px; margin: 10px auto 0; }

.erro-global { border: 2px solid var(--hot-pink); background: #fff; box-shadow: var(--shadow-brut-sm); padding: 14px 16px; margin-top: 16px; font-weight: 700; color: var(--hot-pink); font-size: .92rem; }
.erro-global[hidden] { display: none; }
