/* Funil de diagnóstico: mesma linguagem do hero do joaobignardi.com */

:root {
  --roxo: #a068ff;
  --fundo: #060218;
  --texto: #ffffff;
  --suave: rgba(255, 255, 255, 0.66);
  --linha: rgba(255, 255, 255, 0.16);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: Inter, system-ui, sans-serif;
  color: var(--texto);
  background-color: var(--fundo);
  background-image:
    radial-gradient(ellipse 40% 40% at 0% 0%, rgba(255, 214, 140, 0.35), transparent 70%),
    radial-gradient(ellipse 80% 70% at 15% 10%, rgba(160, 104, 255, 0.45), transparent 70%),
    linear-gradient(160deg, #2c2a6e 0%, #161a45 45%, #05040e 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

.topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px clamp(16px, 5vw, 64px);
}

.marca {
  font-family: Urbanist, Inter, sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--texto);
  text-decoration: none;
}

.topo-selo { font-size: 13px; color: var(--suave); }

.barra { height: 3px; margin: 0 clamp(16px, 5vw, 64px); border-radius: 3px; background: var(--linha); overflow: hidden; }
.barra span { display: block; height: 100%; width: 0; background: var(--roxo); transition: width 0.5s var(--ease); }

main {
  flex: 1;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 16px 64px;
}

.tela { width: 100%; animation: sobe 0.5s var(--ease) both; }

.selo { margin: 0 0 16px; font-size: 13px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--suave); }

h1, h2 { font-family: Urbanist, Inter, sans-serif; font-weight: 600; letter-spacing: -0.8px; margin: 0; }
h1 { font-size: clamp(34px, 6vw, 56px); line-height: 1.05; }
h2 { font-size: clamp(24px, 4.2vw, 36px); line-height: 1.15; }

.apoio { margin: 14px 0 0; font-size: 16px; line-height: 1.55; color: var(--suave); max-width: 560px; }
.nota { margin-top: 18px; font-size: 13px; color: rgba(255, 255, 255, 0.45); }
.contador { margin: 0 0 12px; font-size: 13px; color: var(--roxo); font-weight: 600; }

.linha {
  display: flex;
  align-items: center;
  margin-top: 28px;
  border-bottom: 2px solid var(--linha);
  transition: border-color 0.2s;
}
.linha:focus-within { border-color: var(--roxo); }
.prefixo { font-size: 24px; color: var(--suave); margin-right: 4px; }

input, textarea {
  width: 100%;
  font: inherit;
  color: var(--texto);
  background: transparent;
  border: 0;
  outline: none;
}

input { font-size: 24px; padding: 10px 0; }
input::placeholder, textarea::placeholder { color: rgba(255, 255, 255, 0.3); }

textarea {
  margin-top: 24px;
  padding: 14px 16px;
  font-size: 17px;
  line-height: 1.5;
  border: 1px solid var(--linha);
  border-radius: 14px;
  background: rgba(10, 6, 30, 0.35);
  resize: vertical;
}
textarea:focus { border-color: var(--roxo); }

.opcoes { display: grid; gap: 10px; margin-top: 26px; }

.opcao {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  font: inherit;
  font-size: 16px;
  text-align: left;
  color: var(--texto);
  background: rgba(10, 6, 30, 0.4);
  border: 1px solid var(--linha);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease);
}
.opcao:hover { border-color: rgba(160, 104, 255, 0.7); }
.opcao:active { transform: scale(0.99); }
.opcao.marcada { border-color: var(--roxo); background: rgba(160, 104, 255, 0.22); }

.tecla {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--linha);
  border-radius: 7px;
  color: var(--suave);
}
.opcao.marcada .tecla { background: var(--roxo); border-color: var(--roxo); color: #fff; }

.erro { min-height: 20px; margin: 10px 0 0; font-size: 14px; color: #ff9db5; }

.acoes { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; }

.botao {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  padding: 14px 26px;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  background: #000;
  border: 1px solid rgba(160, 104, 255, 0.55);
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.3s var(--ease), border-color 0.3s;
}
.acoes .botao { margin-top: 0; }
.botao:hover, .botao:focus-visible { background: var(--roxo); border-color: var(--roxo); }
.botao.contorno { background: transparent; }

.voltar { padding: 8px 0; font: inherit; font-size: 15px; color: var(--suave); background: none; border: 0; cursor: pointer; }
.voltar:hover { color: #fff; }

.isca { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.fim { text-align: center; }
.fim .apoio { margin-left: auto; margin-right: auto; }
.ok { display: inline-grid; place-items: center; width: 60px; height: 60px; margin-bottom: 22px; font-size: 28px; border-radius: 50%; background: var(--roxo); }
.pulso { width: 48px; height: 48px; margin: 0 auto 22px; border-radius: 50%; background: var(--roxo); animation: pulso 1.2s ease-in-out infinite; }

.noscript { padding: 24px; text-align: center; }

@keyframes sobe { from { opacity: 0; transform: translateY(18px); } }
@keyframes pulso { 50% { transform: scale(0.7); opacity: 0.5; } }

@media (max-width: 480px) {
  input { font-size: 20px; }
  .opcao { font-size: 15px; padding: 12px 14px; }
}

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