/* 1) VARIÁVEIS (as mesmas do site) */
:root {
  --fundo: #050a18;
  --painel: #0a1530;
  --borda: #17284f;
  --azul: #0b4ea2;
  --azul-vivo: #2f7bff;
  --azul-claro: #7db6ff;
  --texto: #e8eefb;
  --texto-suave: #9fb0d1;
  --erro: #ff7a7a;
  --gradiente: linear-gradient(90deg, var(--azul), var(--azul-vivo), var(--azul));
  --fonte: "Poppins", "Segoe UI", Arial, sans-serif;
}

/* 2) BASE E FUNDO */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { min-height: 100vh; font-family: var(--fonte); background: var(--fundo); color: var(--texto); line-height: 1.6; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--azul-vivo); outline-offset: 3px; }

/* Brilhos azuis que passeiam pelo fundo */
.fundo { position: fixed; inset: -20%; z-index: -1; pointer-events: none; filter: blur(30px);
  background:
    radial-gradient(35% 35% at 20% 25%, rgba(47, 123, 255, .28), transparent 70%),
    radial-gradient(40% 40% at 80% 70%, rgba(11, 78, 162, .45), transparent 70%);
  animation: fundo-mover 18s ease-in-out infinite alternate; }
@keyframes fundo-mover { from { transform: translate(-3%, -2%) scale(1); } to { transform: translate(4%, 3%) scale(1.12); } }

/* 3) TOPO E PASSOS */
.topo { display: flex; justify-content: space-between; align-items: center; padding: 20px 28px; }
.topo__logo img { width: 38px; height: 38px; display: block; }
.topo__voltar { color: var(--texto-suave); font-size: .9rem; transition: color .2s; }
.topo__voltar:hover { color: var(--azul-claro); }

.wizard { width: min(720px, 92%); margin: 0 auto; padding: 24px 0 64px; }

/* Bolinhas numeradas ligadas por linhas (como no exemplo) */
.passos { 
  display: flex; 
  align-items: center; 
  list-style: none; 
  max-width: 460px; 
  margin: 0 auto;
}
.passo { display: flex; align-items: center; flex: 1; }
.passo:last-child { flex: none; }
.passo__bola {
  display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%;
  font-size: .8rem; font-weight: 600; color: var(--texto-suave);
  background: var(--painel); border: 1px solid var(--borda);
  transition: background .4s, color .4s, border-color .4s, box-shadow .4s, transform .4s;
  margin-top: -68px;
}
.passo__linha { flex: 1; height: 2px; margin: 0 6px; background: var(--borda); overflow: hidden; margin-top: -68px; }
.passo__linha i { display: block; width: 0; height: 100%; background: var(--azul-vivo); transition: width .5s ease; margin-top: -68px; }

.passo--atual .passo__bola { color: #fff; background: var(--azul-vivo); border-color: var(--azul-vivo); box-shadow: 0 0 0 5px rgba(47, 123, 255, .22); transform: scale(1.08); }
.passo--feito .passo__bola { color: transparent; background: var(--azul-vivo); border-color: var(--azul-vivo); position: relative; font-size: 0; }
.passo--feito .passo__bola::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: .9rem; }
.passo--feito .passo__linha i { width: 100%; }

.contador { text-align: center; color: var(--texto-suave); font-size: .8rem; margin-bottom: 40px; }

/* 4) TELAS E OPÇÕES */
.tela { display: none; text-align: center; }
.tela--ativa { display: block; animation: tela-entrar .5s cubic-bezier(.2, .7, .2, 1) both; }
.tela--saindo { display: block; animation: tela-sair .28s ease forwards; }
/* a direção vem do JS: "avante" entra pela direita, "volta" entra pela esquerda */
#formulario[data-dir="volta"] .tela--ativa { animation-name: tela-entrar-volta; }
@keyframes tela-entrar       { from { opacity: 0; transform: translateX(40px); }  to { opacity: 1; transform: none; } }
@keyframes tela-entrar-volta { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }
@keyframes tela-sair         { to { opacity: 0; transform: translateY(-14px) scale(.98); } }

.tela__titulo { font-size: clamp(1.5rem, 4vw, 2.1rem); font-weight: 700; line-height: 1.25; }
.tela__sub { color: var(--texto-suave); margin: 10px 0 32px; }
.tela__rotulo { color: var(--texto-suave); font-size: .85rem; margin: 26px 0 12px; }
.tela__erro { min-height: 1.4em; margin-top: 18px; color: var(--erro); font-size: .9rem; }
.tela__erro.mostrar { animation: tremer .4s; }
@keyframes tremer { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.opcoes { display: grid; gap: 12px; text-align: left; }
.opcoes--chips   { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.opcoes--cartoes { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.opcao { position: relative; cursor: pointer; display: block; }
.opcao input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }   /* o input real fica invisível por cima */
.opcao__corpo {
  display: block; height: 100%; padding: 16px 18px; border-radius: 14px;
  background: var(--painel); border: 1px solid var(--borda);
  transition: transform .2s, border-color .2s, background .2s, box-shadow .2s;
}
.opcao__corpo b { display: block; font-weight: 600; font-size: .95rem; padding-right: 22px; }
.opcao__corpo small { display: block; margin-top: 4px; color: var(--texto-suave); font-size: .8rem; line-height: 1.45; }
.opcao__corpo img { width: 40px; height: 40px; object-fit: contain; margin-bottom: 10px; display: block; }

.opcao:hover .opcao__corpo { transform: translateY(-3px); border-color: var(--azul); }
.opcao input:focus-visible + .opcao__corpo { outline: 3px solid var(--azul-vivo); outline-offset: 2px; }

/* selecionado: borda azul, brilho e selo de "ok" no canto */
.opcao input:checked + .opcao__corpo {
  border-color: var(--azul-vivo); background: rgba(47, 123, 255, .14);
  box-shadow: 0 0 0 1px var(--azul-vivo), 0 8px 30px rgba(47, 123, 255, .25);
  animation: selecionar .35s ease;
}
.opcao__corpo::after {
  content: "✓"; position: absolute; top: 12px; right: 12px; display: grid; place-items: center;
  width: 20px; height: 20px; border-radius: 50%; font-size: .7rem; color: #fff; background: var(--azul-vivo);
  opacity: 0; transform: scale(.4); transition: opacity .2s, transform .25s;
}
.opcao input:checked + .opcao__corpo::after { opacity: 1; transform: scale(1); }
@keyframes selecionar { 40% { transform: scale(1.03); } }

/* 5) CAMPOS */
.campo { display: block; text-align: left; font-size: .85rem; color: var(--texto-suave); }
.campo--largo { grid-column: 1 / -1; }
.campo input, .campo textarea, .campo--oculto input {
  display: block; width: 100%; margin-top: 8px; padding: 14px 16px; font: inherit; font-size: 1rem; color: var(--texto);
  background: var(--painel); border: 1px solid var(--borda); border-radius: 12px; resize: vertical;
  transition: border-color .2s, box-shadow .2s;
}
.campo input::placeholder, .campo textarea::placeholder { color: #5d6f93; }
.campo input:focus, .campo textarea:focus { outline: none; border-color: var(--azul-vivo); box-shadow: 0 0 0 4px rgba(47, 123, 255, .2); }
.grade-campos { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.opcoes + .campo { margin-top: 16px; }

/* campo "Outro setor": abre com animação de altura */
.campo--oculto { max-height: 0; opacity: 0; overflow: hidden; margin-top: 0 !important; transition: max-height .4s ease, opacity .3s, margin .3s; }
.campo--oculto.mostrar { max-height: 90px; opacity: 1; margin-top: 16px !important; }
.campo--oculto input { margin-top: 0; }

.aceite { display: flex; gap: 10px; align-items: flex-start; margin-top: 26px; text-align: left; font-size: .82rem; color: var(--texto-suave); cursor: pointer; }
.aceite input { margin-top: 4px; width: 16px; height: 16px; accent-color: var(--azul-vivo); flex: none; }

/* 6) BOTÕES E TELA FINAL */
.acoes { display: flex; justify-content: center; gap: 14px; margin-top: 5px; }
.acoes[hidden] { display: none; }
.btn {
  display: inline-block; padding: 14px 34px; border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-weight: 600; color: #fff;
  background: var(--gradiente); background-size: 200% 100%; background-repeat: repeat-x;
  box-shadow: 0 0 24px rgba(47, 123, 255, .45);
  animation: gradiente-botao 6s linear infinite;
  transition: transform .2s, box-shadow .2s, opacity .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 0 34px rgba(47, 123, 255, .7); }
.btn:active { transform: translateY(0) scale(.98); }
@keyframes gradiente-botao { from { background-position: 0% 50%; } to { background-position: 200% 50%; } }
.btn--fantasma { background: transparent; color: var(--texto-suave); border: 1px solid var(--borda); box-shadow: none; animation: none; }
.btn--fantasma:hover { color: #fff; border-color: var(--azul-vivo); box-shadow: none; }
.btn[hidden], .btn--fantasma[hidden] { display: none; }

.check { width: 84px; height: 84px; margin: 0 auto 18px; display: block; fill: none; stroke: var(--azul-vivo); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.check circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: desenhar .7s ease forwards; }
.check path   { stroke-dasharray: 40;  stroke-dashoffset: 40;  animation: desenhar .5s .55s ease forwards; }
@keyframes desenhar { to { stroke-dashoffset: 0; } }

.resumo { text-align: left; margin: 0 auto 32px; max-width: 560px; background: var(--painel); border: 1px solid var(--borda); border-radius: 18px; padding: 8px 22px; }
.resumo div { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--borda); font-size: .9rem; }
.resumo div:last-child { border-bottom: 0; }
.resumo dt { color: var(--texto-suave); }
.resumo dd { color: var(--texto); }
.final__acoes { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; }

/* 7) RESPONSIVO */
@media (max-width: 600px) {
  .topo { padding: 16px 18px; }
  .passo__bola { 
    width: 26px; 
    height: 26px; 
    font-size: .7rem; 
    margin: 0px 0px 0px 0px;
  }
  .passo__linha { margin: 0 0px; }
  .grade-campos { grid-template-columns: 1fr; }
  .resumo div { grid-template-columns: 1fr; gap: 2px; }
  .acoes { flex-direction: column-reverse; }
  .acoes .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .fundo, .btn, .opcao input:checked + .opcao__corpo { animation: none; }
  .tela--ativa, .tela--saindo { animation-duration: .01s; }
  .check circle, .check path { animation-duration: .01s; animation-delay: 0s; }
}


#btn-voltar[hidden] {
  display: none !important;
}


/* Ajustes exclusivos para tablets */

@media (min-width: 769px) and (max-width: 1024px) {
  .mosaico{
    margin: 0 auto;
  }

  .wizard { width: min(720px, 92%); margin: 0 auto; padding: 180px 0 64px; }

}