/* =========================================================
   Formulário VAI PRI — estilo
   Consistente com a landing page: fontes Sora + Clash Display,
   tokens de marca, botões com gradiente. Mobile-first.
   As classes e a estrutura permanecem intactas para o form.js.
   ========================================================= */

:root {
  /* Cores de marca (mesmas da LP) */
  --c-dark:       #050D16;
  --c-navy:       #1E3550;
  --c-blue:       #2C52F0;
  --c-blue-light: #7D95F5;
  --c-bg-soft:    #F3F6FF;
  --c-line:       #E2E7F7;
  --c-text:       #41506B;
  --c-text-soft:  #B9C4DE;
  --error:        #ff6b6b;

  --bg:        var(--c-dark);
  --text:      #ffffff;
  --text-soft: var(--c-text-soft);
  --radius:    14px;

  --font-body:    "Sora", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-display: "Clash Display", var(--font-body);

  --grad-btn:  radial-gradient(38.67% 91.17% at 50% 8.83%, var(--c-blue-light) 0%, var(--c-blue) 100%);
  --grad-dark: radial-gradient(at top center, var(--c-navy) 0%, var(--c-dark) 70%);
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  background: var(--grad-dark);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 32px 18px 56px;
  min-height: 100%;
}

/* ---------- Estrutura geral ---------- */
.form-shell {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
}

/* ---------- Cabeçalho ---------- */
.form-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  margin-bottom: 34px;
}
.logo {
  width: 160px;
  height: auto;
  /* o SVG da logo tem partes escuras; deixa branco sobre o fundo escuro */
  filter: brightness(0) invert(1);
}

/* Barra de progresso */
.progress {
  width: 100%;
  height: 7px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  overflow: hidden;
}
.progress__bar {
  height: 100%;
  width: 0%;
  background: var(--grad-btn);
  border-radius: 99px;
  transition: width .35s ease;
}

/* ---------- Telas ---------- */
.steps { position: relative; }
.step {
  display: none;
  flex-direction: column;
  gap: 16px;
  animation: fade-in .35s ease;
}
.step.is-active { display: flex; }

@keyframes fade-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.step__title {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 5vw, 1.9rem);
  line-height: 1.22;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.step__text {
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.6;
}
.step__actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* ---------- Campos de texto ---------- */
.field {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.05rem;
  padding: 16px 18px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.field::placeholder { color: var(--text-soft); }
.field:focus {
  border-color: var(--c-blue-light);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(125, 149, 245, .25);
}

/* Campo de telefone com prefixo de país */
.phone-field {
  display: flex;
  align-items: stretch;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.phone-field:focus-within {
  border-color: var(--c-blue-light);
  box-shadow: 0 0 0 3px rgba(125, 149, 245, .25);
}
.phone-field__flag {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  font-size: 1.05rem;
  color: var(--text-soft);
  border-right: 1.5px solid rgba(255, 255, 255, 0.14);
  white-space: nowrap;
}
.flag-br {
  width: 22px;
  height: 15px;
  border-radius: 3px;
  background:
    radial-gradient(circle at 50% 50%, #0b3da3 0 5px, transparent 5.5px),
    linear-gradient(#f6c70a, #f6c70a);
  position: relative;
}
.field--phone {
  border: none;
  border-radius: 0;
  background: transparent;
  flex: 1;
}
.field--phone:focus { box-shadow: none; background: transparent; }

/* Mensagem de erro */
.field-error {
  color: var(--error);
  font-size: .9rem;
  min-height: 1.1em;
}

/* ---------- Botões ---------- */
.btn {
  font-family: var(--font-display);
  font-size: clamp(.95rem, 2.4vw, 1.05rem);
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  border: none;
  border-radius: 8px;
  padding: 16px 30px;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .2s ease, filter .2s ease, opacity .2s ease;
}
.btn:active { transform: scale(.98); }

.btn--primary {
  background: var(--grad-btn);
  color: #fff;
  box-shadow: 0 14px 30px -12px rgba(44, 82, 240, 0.7);
}
.btn--primary:hover {
  filter: brightness(1.06);
  box-shadow: 0 18px 36px -12px rgba(44, 82, 240, 0.8);
}

.btn--ghost {
  background: transparent;
  color: var(--text-soft);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
}
.btn--ghost:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.4); }

.btn[disabled] { opacity: .5; cursor: not-allowed; filter: none; }

/* ---------- Opções de múltipla escolha ---------- */
.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  padding: 16px 18px;
  cursor: pointer;
  font-size: 1.02rem;
  transition: background-color .18s ease, border-color .18s ease, transform .08s ease;
}
.option:hover { background: rgba(255, 255, 255, 0.09); }
.option:active { transform: scale(.99); }
.option.is-selected {
  border-color: var(--c-blue-light);
  background: rgba(125, 149, 245, 0.14);
}
.option__badge {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.option.is-selected .option__badge {
  background: var(--grad-btn);
  border-color: transparent;
  color: #fff;
}
.option__label { line-height: 1.4; }

/* ---------- Spinner (tela de conclusão) ---------- */
.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(255, 255, 255, 0.14);
  border-top-color: var(--c-blue-light);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin-bottom: 4px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Foco visível ---------- */
.btn:focus-visible,
.option:focus-visible {
  outline: 3px solid var(--c-blue-light);
  outline-offset: 2px;
}

/* ---------- Ajustes mobile ---------- */
@media (max-width: 480px) {
  .btn { flex: 1; }
  .step__actions { flex-direction: row-reverse; }
}

/* ---------- Acessibilidade ---------- */
@media (prefers-reduced-motion: reduce) {
  .step { animation: none; }
  .btn, .option, .field { transition: none; }
}
