:root {
  --bg: #000;
  --surface: #0c0c0c;
  --surface-2: #141414;
  --line: #262626;
  --line-strong: #3a3a3a;
  --text: #fff;
  --muted: #9a9a9a;
  --faint: #6b6b6b;
  --accent: #3ddc97;
  --accent-hover: #5ee8ab;
  --accent-ink: #04140c;
  --accent-soft: rgba(61, 220, 151, 0.1);
  --accent-glow: rgba(61, 220, 151, 0.18);
  --placeholder: #4a4a4a;
  --gear: #3a3a3a;
  --danger: #ff6b6b;
  --radius: 12px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, textarea, select { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Estrutura ---------- */

.shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 28px 0 18px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.brand { color: var(--text); font-weight: 600; display: inline-flex; align-items: center; gap: 10px; }
.brand::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}
.step-count { color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: 0.04em; text-transform: none; }

.progress { height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; opacity: 0; transition: opacity 0.4s; }
.progress.on { opacity: 1; }
.progress-bar { height: 100%; width: 0; background: var(--accent); transition: width 0.6s var(--ease); }

.stage { flex: 1; display: flex; align-items: center; padding: 56px 0 72px; }
.stage > * { width: 100%; }
/* Perguntas e telas sem imagem ficam numa coluna de leitura confortável. */
.stage > .q, .stage > .done, .stage > .hero:not(.has-img), .stage > .loading { max-width: 720px; margin-left: auto; margin-right: auto; }

.foot { display: flex; gap: 20px; justify-content: center; padding: 0 0 32px; }

/* ---------- Telas e transição ---------- */

.screen { opacity: 0; transform: translateY(14px); transition: opacity 0.45s var(--ease), transform 0.45s var(--ease); }
.screen.in { opacity: 1; transform: none; }
.screen.leaving { opacity: 0; transform: translateY(-10px); transition-duration: 0.2s; }
@media (prefers-reduced-motion: reduce) {
  .screen, .screen.leaving, .progress-bar, .option, .btn { transition: none !important; transform: none !important; }
}

.eyebrow {
  display: inline-block;
  margin: 0 0 22px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
/* Tela inicial com imagem do anúncio: texto e botão à esquerda, imagem à direita (botão sempre no alto). */
.hero.has-img { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 56px; align-items: start; }
.hero.has-img .hero-text { padding-top: 24px; }
.hero.has-img .hero-media { max-width: 460px; justify-self: end; width: 100%; }
.hero.has-img .hero-title { font-size: clamp(30px, 3.5vw, 46px); margin-bottom: 16px; }
.hero.has-img .hero-sub { margin-bottom: 28px; font-size: 18px; }
.stage:has(> .hero.has-img) { align-items: flex-start; padding-top: 36px; }
.hero-media { margin: 0; }
.hero-img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}
.hero-title {
  margin: 0 0 20px;
  font-size: clamp(34px, 6.4vw, 58px);
  line-height: 1.06;
  letter-spacing: -0.035em;
  font-weight: 650;
  text-wrap: balance;
}
.hero-title em { font-style: normal; color: var(--accent); }
.hero-sub { margin: 0 0 36px; font-size: clamp(17px, 2.2vw, 20px); color: var(--muted); max-width: 34em; text-wrap: pretty; }
.hero-meta { margin: 22px 0 0; font-size: 14px; color: var(--faint); }

.q-meta { margin: 0 0 14px; font-size: 13px; color: var(--muted); letter-spacing: 0.04em; }
.q-meta .tag { color: var(--faint); margin-left: 8px; }
.q-title {
  margin: 0 0 12px;
  font-size: clamp(26px, 4.6vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 600;
  text-wrap: balance;
}
.q-help { margin: 0 0 8px; color: var(--muted); font-size: 16px; }
.q-body { margin-top: 32px; }

/* ---------- Opções ---------- */

.options { display: grid; gap: 12px; }
.option {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 60px;
  padding: 16px 20px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 17px;
  transition: border-color 0.2s, background-color 0.2s, transform 0.2s var(--ease);
}
.option:hover { border-color: var(--line-strong); background: var(--surface-2); transform: translateY(-1px); }
.option:active { transform: translateY(0); }
.option .key {
  flex: none;
  display: grid; place-items: center;
  width: 28px; height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  font-size: 12px;
  color: var(--muted);
  transition: all 0.2s;
}
.option.multi .key { border-radius: 6px; }
.option[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.option[aria-checked="true"] .key { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.option .check { display: none; }
.option[aria-checked="true"] .check { display: block; }
.option[aria-checked="true"] .letter { display: none; }

/* ---------- Campos ---------- */

.field {
  width: 100%;
  padding: 14px 2px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  font-size: clamp(20px, 3.4vw, 26px);
  outline: none;
  transition: border-color 0.2s;
}
.field::placeholder { color: var(--placeholder); }
.field:focus { border-bottom-color: var(--accent); }
.field-hint { margin: 12px 0 0; font-size: 13px; color: var(--faint); }

.error { min-height: 22px; margin: 14px 0 0; color: var(--danger); font-size: 14px; }
.error:empty { visibility: hidden; }

.consent {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 34px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
}
.consent input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); cursor: pointer; }
.consent .link { font-size: 14px; }

/* ---------- Botões ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 28px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover:not(:disabled) { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 8px 28px var(--accent-glow); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.btn.ghost:hover:not(:disabled) { color: var(--text); border-color: var(--line-strong); }
.btn.sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn .arrow { transition: transform 0.2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn.wa svg { width: 20px; height: 20px; }

.nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 40px; }
.nav .spacer { flex: 1; }
.kbd-hint { font-size: 13px; color: var(--faint); }
.kbd-hint b { color: var(--muted); font-weight: 500; }

.link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-strong);
  cursor: pointer;
}
.link:hover { color: var(--text); }

/* ---------- Redirecionamento ---------- */

.done { text-align: center; }
.done .icon {
  display: grid; place-items: center;
  width: 64px; height: 64px;
  margin: 0 auto 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}
.done .hero-sub { margin-left: auto; margin-right: auto; }
.done .retry { opacity: 0; transform: translateY(6px); transition: opacity 0.4s, transform 0.4s var(--ease); pointer-events: none; }
.done .retry.show { opacity: 1; transform: none; pointer-events: auto; }
.done .small { margin-top: 18px; font-size: 13px; color: var(--faint); }

.spinner {
  display: inline-block;
  width: 22px; height: 22px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: grid; place-items: center; }

/* ---------- Engrenagem, cookies, modal ---------- */

.gear {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  color: var(--gear);
  transition: color 0.2s, background-color 0.2s, transform 0.4s var(--ease);
}
.gear:hover { color: var(--muted); background: var(--surface-2); transform: rotate(45deg); }

.cookie {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  max-width: 560px;
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  z-index: 20;
}
.cookie[hidden] { display: none; }
.cookie p { flex: 1 1 260px; margin: 0; font-size: 14px; color: var(--muted); }
.cookie-actions { display: flex; gap: 10px; }

.modal {
  width: min(640px, calc(100vw - 32px));
  max-height: min(80vh, 720px);
  padding: 28px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.modal::backdrop { background: rgba(0, 0, 0, 0.75); backdrop-filter: blur(4px); }
.modal h2 { margin: 0 0 16px; font-size: 22px; letter-spacing: -0.01em; }
.privacy-body { color: var(--muted); font-size: 15px; white-space: pre-line; margin-bottom: 24px; }

.noscript { text-align: center; padding: 40px 24px; color: var(--muted); }

@media (max-width: 900px) {
  .hero.has-img { grid-template-columns: 1fr; gap: 32px; }
  .hero.has-img .hero-media { max-width: 440px; }
}

/* ---------- Celular ---------- */

@media (max-width: 560px) {
  .shell { padding: 0 20px; }
  .topbar { padding-top: 20px; }
  .stage { align-items: flex-start; padding: 40px 0 56px; }
  .hero-sub { margin-bottom: 36px; }
  .hero.has-img { gap: 28px; }
  .hero.has-img .hero-sub { margin-bottom: 24px; }
  .hero .btn.primary { width: 100%; }
  .option { font-size: 16px; min-height: 56px; padding: 14px 16px; }
  .nav { flex-wrap: wrap-reverse; }
  .nav .btn.primary { flex: 1 1 100%; }
  .kbd-hint { display: none; }
  .gear { right: 10px; bottom: 10px; }
}

/* Página de obrigado: contagem para abrir o WhatsApp */
.redirect-note { margin: 0 0 22px; font-size: 15px; color: var(--muted); }
.redirect-note .countdown { display: inline-block; min-width: 1.2em; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }

/* Artes sem fundo (PNG transparente): sem moldura nem fundo, ficam direto sobre a página. */
.hero-img[src$=".png"] { border: 0; background: none; border-radius: 0; }

/* ---------- Página estática (formulário único) e landing page ---------- */

body[data-layout="form"] .stage, body[data-layout="landing"] .stage { align-items: flex-start; padding-top: 32px; }
.page-form { max-width: 640px; margin: 0 auto; }
.page-form.has-img { max-width: none; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 56px; align-items: start; }
.page-form.has-img .hero-media { position: sticky; top: 24px; max-width: 460px; justify-self: end; width: 100%; }
.page-form .hero-title { font-size: clamp(28px, 3.4vw, 42px); margin-bottom: 14px; }
.page-form .hero-sub { font-size: 17px; margin-bottom: 24px; }

.lead-form { padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.lead-form-title { margin: 0 0 18px; font-size: 20px; letter-spacing: -0.01em; }
.ff { margin-bottom: 18px; }
.ff-label { display: block; margin-bottom: 8px; font-size: 15px; font-weight: 600; color: var(--text); }
.ff-opt { font-weight: 400; color: var(--faint); }
.ff-help { margin: -4px 0 8px; font-size: 13px; color: var(--muted); }
.ff-input {
  width: 100%; padding: 12px 14px; font-size: 16px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 10px; outline: none;
  transition: border-color 0.2s;
}
.ff-input:focus { border-color: var(--accent); }
.ff-input::placeholder { color: var(--placeholder); }
select.ff-input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 52%, calc(100% - 14px) 52%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.ff-error { margin: 6px 0 0; font-size: 13px; color: var(--danger); }
.ff-error:empty { display: none; }
.lead-form .consent { margin-top: 0; padding: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 9px 14px; font-size: 14.5px; line-height: 1.3; text-align: left;
  background: transparent; color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.chip:hover { border-color: var(--accent); }
.chip[aria-checked="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.full { width: 100%; }
.hero-meta.center { text-align: center; margin-top: 14px; }

.landing .hero { margin-bottom: 8px; }
.lp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 48px; }
.lp-section { padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.lp-title { margin: 0 0 14px; font-size: 19px; letter-spacing: -0.01em; }
.lp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lp-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 15.5px; }
.lp-mark { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 700; }
.lp-form-wrap { max-width: 640px; margin: 56px auto 0; }

/* Página simples (uma dobra): intro à esquerda, formulário compacto à direita. */
body[data-layout="form"] .stage { padding-top: 20px; }
.page-form.one-fold { max-width: 1100px; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 40px; align-items: center; margin: 0 auto; }
.page-form.one-fold .hero-title { font-size: clamp(26px, 3vw, 38px); margin-bottom: 12px; }
.page-form.one-fold .hero-sub { font-size: 16px; margin-bottom: 18px; }
.page-form.one-fold .hero-media { position: static; max-width: 340px; margin: 0; }
.lead-form.compact { padding: 18px 20px; }
.lead-form.compact .lead-form-title { margin-bottom: 12px; font-size: 18px; }
.lead-form.compact { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; align-content: start; }
.lead-form.compact > * { grid-column: 1 / -1; }
.lead-form.compact > .ff { grid-column: auto; margin: 0; display: flex; flex-direction: column; justify-content: flex-end; }
.lead-form.compact > .ff:has(.consent), .lead-form.compact > .ff:first-of-type { grid-column: 1 / -1; }
.lead-form.compact .ff-label { margin-bottom: 5px; font-size: 13px; }
.lead-form.compact .ff-help { display: none; }
.lead-form.compact .ff-input { padding: 9px 12px; font-size: 15px; border-radius: 8px; }
.lead-form.compact select.ff-input { padding-right: 34px; text-overflow: ellipsis; }
.lead-form.compact .consent { padding: 8px 10px; font-size: 12.5px; }
.lead-form.compact .error:empty { display: none; }
.lead-form.compact .btn.full { margin-top: 4px; }
.lead-form.compact .hero-meta.center { margin-top: 2px; }

@media (max-width: 900px) {
  .page-form.one-fold { grid-template-columns: 1fr; gap: 16px; }
  .page-form.one-fold .hero-media { display: none; }
  .page-form.has-img { grid-template-columns: 1fr; gap: 28px; }
  .page-form.has-img .hero-media { position: static; justify-self: start; max-width: 420px; }
}
@media (max-width: 560px) {
  body[data-layout="form"] .stage, body[data-layout="landing"] .stage { padding-top: 20px; }
  .lead-form { padding: 18px; }
  .page-form.has-img .hero-media { display: none; } /* no celular, o formulário vem primeiro e sem imagem */
  .lead-form.compact { grid-template-columns: 1fr; padding: 14px; gap: 8px; }
  .lead-form.compact .ff-inline .ff-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .lead-form.compact .ff-inline select.ff-input:invalid, .lead-form.compact .ff-inline select.ff-input { font-size: 14.5px; }
  .shell:has(.one-fold) .topbar { padding-top: 10px; padding-bottom: 6px; }
  .page-form.one-fold .hero-title { font-size: 24px; margin-bottom: 8px; }
  .page-form.one-fold .hero-sub { font-size: 15px; margin-bottom: 0; }
}
