/* ---------- Cadastro em etapas: cena animada à esquerda, formulário à direita ---------- */
body.cadastro { background: var(--night); min-height: 100vh; }
.cad { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); min-height: 100vh; min-height: 100svh; }

/* lado da cena */
.cad-cena { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 32px clamp(24px, 4vw, 56px);
  background: radial-gradient(120% 80% at 30% 40%, #1f2a14 0%, #12140b 60%); color: var(--cream); }
.cad-marca { display: flex; align-items: center; gap: 12px; }
.cad-marca img { height: 48px; width: auto; }
.cad-marca .logo-nome { --logo: 34px; }
.cenas { position: relative; flex: 1; display: grid; place-items: center; }
.cena { position: absolute; width: min(100%, 460px); height: auto; opacity: 0; transform: translateY(18px) scale(.94); transition: opacity .55s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
body[data-etapa="1"] .cena-1, body[data-etapa="2"] .cena-2, body[data-etapa="3"] .cena-3, body[data-etapa="4"] .cena-4 { opacity: 1; transform: none; }
.cena-legenda { position: relative; min-height: 3em; }
.cena-legenda p { position: absolute; inset: 0 auto auto 0; margin: 0; max-width: 34ch; font-size: 18px; line-height: 1.45; color: var(--muted); opacity: 0; transform: translateY(8px); transition: opacity .45s ease, transform .45s ease; }
body[data-etapa="1"] [data-leg="1"], body[data-etapa="2"] [data-leg="2"], body[data-etapa="3"] [data-leg="3"], body[data-etapa="4"] [data-leg="4"] { opacity: 1; transform: none; transition-delay: .15s; }

/* elementos comuns das cenas */
.cena .orbita, .cena .rota { fill: none; stroke: rgba(179,189,110,.45); stroke-width: 1.2; stroke-dasharray: 4 5; }
.estrelas circle { fill: #f0e7d3; animation: piscar 2.6s ease-in-out infinite; }
.estrelas circle:nth-child(2) { animation-delay: .6s; } .estrelas circle:nth-child(3) { animation-delay: 1.2s; } .estrelas circle:nth-child(4) { animation-delay: 1.8s; }
@keyframes piscar { 50% { opacity: .2; } }

/* cena 1: envelope flutuando, satélite em órbita */
.env { animation: flutuar 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.env-corpo { fill: #f0e7d3; }
.env-aba { fill: none; stroke: #5f6b2c; stroke-width: 3; stroke-linejoin: round; }
.env-ponto { fill: #e2763f; animation: pulsar 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.sat { fill: #fffaf0; offset-path: path("M32 122a128 44 0 1 0 256 0a128 44 0 1 0 -256 0"); offset-rotate: auto; animation: orbitar 7s linear infinite; filter: drop-shadow(0 0 4px rgba(207,227,168,.9)); }
@keyframes flutuar { 50% { transform: translateY(-8px) rotate(-1.5deg); } }
@keyframes pulsar { 50% { transform: scale(1.35); opacity: .7; } }
@keyframes orbitar { to { offset-distance: 100%; } }

/* cena 2: cadeado; a haste fecha e o escudo acende quando a senha é válida */
.hexa { fill: rgba(95,107,44,.18); stroke: rgba(179,189,110,.5); stroke-width: 1.5; }
.hexa-2 { fill: rgba(95,107,44,.25); stroke-dasharray: 3 4; animation: girar 18s linear infinite; transform-box: fill-box; transform-origin: center; }
.haste { fill: none; stroke: #b3bd6e; stroke-width: 9; stroke-linecap: round; transform: translateY(-14px); transition: transform .5s cubic-bezier(.3,1.6,.5,1), stroke .3s; }
.cadeado { fill: #f0e7d3; }
.pontos-senha circle { fill: rgba(95,107,44,.25); transition: fill .2s, transform .25s; transform-box: fill-box; transform-origin: center; }
.cena-2[data-forca="1"] .pontos-senha circle:nth-child(-n+1), .cena-2[data-forca="2"] .pontos-senha circle:nth-child(-n+2),
.cena-2[data-forca="3"] .pontos-senha circle:nth-child(-n+3), .cena-2[data-forca="4"] .pontos-senha circle { fill: #5f6b2c; transform: scale(1.15); }
.varredura { fill: #cfe3a8; opacity: .7; animation: varrer 2.4s ease-in-out infinite; }
body.senha-ok .haste { transform: none; stroke: #d4dc96; }
body.senha-ok .hexa { stroke: #d4dc96; fill: rgba(179,189,110,.22); }
body.senha-ok .varredura { animation: none; opacity: 0; }
@keyframes girar { to { transform: rotate(360deg); } }
@keyframes varrer { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(120px); } }

/* cena 3: anel de progresso em 3/4 que gira devagar, com o ícone do tipo de conta */
.anel-trilho { fill: none; stroke: rgba(179,189,110,.18); stroke-width: 6; }
.anel { fill: none; stroke: #b3bd6e; stroke-width: 6; stroke-linecap: round; stroke-dasharray: 0 100; transform: rotate(-90deg); transform-box: fill-box; transform-origin: center; }
body[data-etapa="3"] .anel { animation: anel-encher 1s .2s cubic-bezier(.2,.8,.2,1) forwards; }
.anel-miolo { fill: #f0e7d3; }
.ic { fill: none; stroke: #5f6b2c; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; transition: opacity .3s, transform .35s cubic-bezier(.3,1.5,.5,1); transform-box: fill-box; transform-origin: center; }
.ic-pessoa, body.tipo-pessoa .ic-empresa { opacity: 0; transform: scale(.7); }
body.tipo-pessoa .ic-pessoa { opacity: 1; transform: none; }
.brilhos path { fill: #d4dc96; animation: piscar 2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.brilhos path:nth-child(2) { animation-delay: 1s; }
@keyframes anel-encher { to { stroke-dasharray: 75 100; } }

/* cena 4: hexágonos sobem em sequência, o trem de satélites passa e o check se desenha */
.hexes path { fill: #4c7337; stroke: #8ba35f; stroke-width: 1.2; opacity: 0; transform: translateY(14px); transform-box: fill-box; }
body[data-etapa="4"] .hexes path { animation: subir .5s cubic-bezier(.2,.9,.3,1.3) forwards; }
.hexes path:nth-child(2) { animation-delay: .08s !important; } .hexes path:nth-child(3) { animation-delay: .16s !important; } .hexes path:nth-child(4) { animation-delay: .24s !important; }
.hexes path:nth-child(5) { animation-delay: .32s !important; } .hexes path:nth-child(6) { animation-delay: .40s !important; } .hexes path:nth-child(7) { animation-delay: .48s !important; }
.trem circle { fill: #fffaf0; filter: drop-shadow(0 0 3px rgba(207,227,168,.9)); }
.trem { offset-path: path("M20 70C110 30 210 30 300 70"); offset-rotate: auto; offset-distance: 0%; opacity: 0; }
body[data-etapa="4"] .trem { animation: passar 2.4s .5s ease-in-out infinite; }
.check-fundo { fill: #b3bd6e; opacity: 0; transform: scale(.4); transform-box: fill-box; transform-origin: center; }
.check { fill: none; stroke: #12140b; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; }
body[data-etapa="4"] .check-fundo { animation: aparecer .45s .7s cubic-bezier(.3,1.6,.5,1) forwards; }
body[data-etapa="4"] .check { animation: desenhar .45s 1.05s ease-out forwards; }
.sucesso { fill: #f0e7d3; font: 800 20px/1 var(--font-head); opacity: 0; transform: translateY(8px); transform-box: fill-box; }
body[data-etapa="4"] .sucesso { animation: subir .5s 1.4s ease-out forwards; }
@keyframes subir { to { opacity: 1; transform: none; } }
@keyframes passar { 0% { offset-distance: 0%; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { offset-distance: 100%; opacity: 0; } }
@keyframes aparecer { to { opacity: 1; transform: none; } }
@keyframes desenhar { to { stroke-dashoffset: 0; } }

/* lado do formulário */
.cad-form { background: var(--cream-2); color: var(--bark); display: flex; flex-direction: column; padding: 28px clamp(24px, 5vw, 72px) 40px; }
.cad-topo { display: flex; justify-content: space-between; align-items: center; gap: 16px; font: 500 14.5px/1.3 var(--font-head); color: rgba(43,42,28,.75); }
.cad-topo a { color: var(--olive); font-weight: 700; }
.cad-voltar-site { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; }
.cad-voltar-site svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.progresso { width: 100%; max-width: 440px; margin: 36px auto 0; }
.prog-trilha { position: relative; display: block; height: 2px; margin: 0 8px; border-top: 2px dashed rgba(95,107,44,.35); }
.prog-ponto { position: absolute; top: -7px; left: 0; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--terra); box-shadow: 0 0 0 4px rgba(171,72,30,.18); transition: left .6s cubic-bezier(.2,.8,.2,1); }
.prog-etapas { list-style: none; margin: 14px 0 0; padding: 0; display: flex; justify-content: space-between; font: 600 13px/1 var(--font-head); font-stretch: var(--narrow); color: rgba(43,42,28,.5); }
.prog-etapas li.feita { color: var(--olive); } .prog-etapas li.atual { color: var(--bark); }
body[data-etapa="4"] .progresso { opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s; }

.etapas { position: relative; flex: 1; width: 100%; max-width: 440px; margin: 0 auto; display: grid; align-content: center; padding: 28px 0; }
.etapa { grid-area: 1 / 1; }
.etapa h1 { font-size: clamp(28px, 2.6vw, 38px); font-weight: 800; margin: 0 0 8px; color: var(--bark); }
.etapa .sub { margin: 0 0 26px; color: rgba(43,42,28,.75); font-size: 16.5px; }
.etapa .sub b { color: var(--bark); word-break: break-all; }
/* transição entre etapas: entra da direita e sai para a esquerda (invertido ao voltar) */
.etapa.entra { animation: entra .5s cubic-bezier(.2,.8,.2,1) both; }
.etapa.sai { animation: sai .3s ease-in both; }
.volta .etapa.entra { animation-name: entra-volta; } .volta .etapa.sai { animation-name: sai-volta; }
@keyframes entra { from { opacity: 0; transform: translateX(36px); } }
@keyframes sai { to { opacity: 0; transform: translateX(-36px); } }
@keyframes entra-volta { from { opacity: 0; transform: translateX(-36px); } }
@keyframes sai-volta { to { opacity: 0; transform: translateX(36px); } }
.etapa .campo, .etapa .sub, .etapa .sociais, .etapa .acoes, .etapa > .btn { animation: subir-leve .5s cubic-bezier(.2,.8,.2,1) both; }
.etapa.entra .sub { animation-delay: .05s; } .etapa.entra .campo { animation-delay: .1s; } .etapa.entra > .btn, .etapa.entra .acoes { animation-delay: .15s; } .etapa.entra .sociais { animation-delay: .2s; }
@keyframes subir-leve { from { opacity: 0; transform: translateY(10px); } }

.campo { margin-bottom: 18px; }
.campo label { display: block; margin-bottom: 8px; font: 700 14.5px/1.2 var(--font-head); color: var(--bark); }
.campo .opcional { font-weight: 500; color: rgba(43,42,28,.6); }
.campo input { width: 100%; min-height: 52px; padding: 12px 14px; border-radius: 8px; border: 1.5px solid rgba(95,107,44,.35); background: #fffdf7; color: var(--bark); font: 500 17px/1.3 var(--font-head); transition: border-color .2s, box-shadow .2s; }
.campo input:focus { outline: none; border-color: var(--olive); box-shadow: 0 0 0 4px rgba(95,107,44,.16); }
.campo input[aria-invalid="true"] { border-color: #ab481e; box-shadow: 0 0 0 4px rgba(171,72,30,.12); animation: tremer .32s; }
.campo input.valido { border-color: #5f6b2c; }
@keyframes tremer { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.erro { margin: 8px 0 0; min-height: 1.2em; font: 600 14px/1.35 var(--font-head); color: #93391a; }
.erro:empty { margin: 0; min-height: 0; }
.dica { margin: 8px 0 0; font-size: 14px; color: rgba(43,42,28,.65); }

.btn-cheio { width: 100%; min-height: 52px; font-size: 16px; border: 0; cursor: pointer; }
.btn-cheio.carregando { pointer-events: none; opacity: .8; }
.btn-cheio.carregando::after { content: ""; width: 16px; height: 16px; margin-left: 10px; border-radius: 50%; border: 2px solid rgba(255,250,240,.4); border-top-color: #fffaf0; animation: girar .7s linear infinite; }
.ou { display: flex; align-items: center; gap: 14px; margin: 22px 0; font: 600 13px/1 var(--font-head); color: rgba(43,42,28,.55); }
.ou::before, .ou::after { content: ""; flex: 1; height: 1px; background: rgba(95,107,44,.25); }
.sociais { display: grid; gap: 10px; }
.btn-social { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px 16px; border-radius: 8px; border: 1.5px solid rgba(43,42,28,.2); background: #fffdf7; color: var(--bark); font: 600 15.5px/1 var(--font-head); cursor: pointer; transition: border-color .2s, transform .2s, box-shadow .2s; }
.btn-social:hover { border-color: rgba(43,42,28,.45); transform: translateY(-1px); box-shadow: 0 6px 16px -10px rgba(43,42,28,.4); }
.btn-social svg { width: 20px; height: 20px; flex: none; }
.btn-apple { background: #12140b; color: #fffaf0; border-color: #12140b; }
.btn-apple:hover { border-color: #12140b; }
.btn-social.carregando { pointer-events: none; opacity: .75; }
.btn-social:focus-visible, .btn-texto:focus-visible, .ver-senha:focus-visible { outline: 2px solid var(--olive); outline-offset: 2px; }
.legal { margin: 22px 0 0; font-size: 13.5px; color: rgba(43,42,28,.65); }
.legal a { color: var(--olive); text-decoration: underline; text-underline-offset: 3px; }

.senha-wrap { position: relative; }
.senha-wrap input { padding-right: 92px; }
.ver-senha { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 40px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: var(--olive); font: 700 14px/1 var(--font-head); cursor: pointer; }
.forca { height: 6px; margin-top: 10px; border-radius: 99px; background: rgba(95,107,44,.15); overflow: hidden; }
.forca span { display: block; height: 100%; width: 0; border-radius: inherit; background: #ab481e; transition: width .35s ease, background-color .35s; }
.regras { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font: 600 13.5px/1.3 var(--font-head); color: rgba(43,42,28,.6); }
.regras li { display: flex; align-items: center; gap: 6px; transition: color .2s; }
.regras li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid currentColor; transition: background .2s, border-color .2s; }
.regras li.ok { color: #3d4a17; }
.regras li.ok::before { background: #5f6b2c url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3.5 7.2l2.3 2.3 4.7-5' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; border-color: #5f6b2c; }

.acoes { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.acoes .btn-cheio { flex: 1; }
.btn-texto { flex: none; min-height: 52px; padding: 0 12px; border: 0; background: none; color: var(--olive); font: 700 15px/1 var(--font-head); cursor: pointer; display: inline-flex; align-items: center; }
.btn-texto:hover { color: var(--bark); text-decoration: underline; text-underline-offset: 4px; }
.conectado { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 8px 12px; border-radius: 99px; background: rgba(95,107,44,.12); font: 600 14px/1 var(--font-head); color: #3d4a17; }
.conectado::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #5f6b2c; }
.resumo { list-style: none; margin: 0 0 24px; padding: 16px; border-radius: 10px; background: #fffdf7; border: 1px solid rgba(95,107,44,.2); display: grid; gap: 8px; font-size: 15px; }
.resumo b { font-family: var(--font-head); }
.etapa-fim:focus { outline: none; }
.etapa-fim h1 { animation: subir-leve .5s .3s both; }

@media (max-width: 860px) {
  .cad { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .cad-cena { padding: 16px 16px 10px; min-height: 0; }
  .cad-marca img { height: 36px; } .cad-marca .logo-nome { --logo: 26px; }
  .cenas { height: 190px; flex: none; }
  .cena { width: min(100%, 300px); }
  .cena-legenda { display: none; }
  .cad-form { padding: 14px 16px 32px; border-radius: 18px 18px 0 0; margin-top: -14px; position: relative; }
  .progresso { margin-top: 18px; }
  .etapas { align-content: start; padding-top: 24px; }
  .etapa h1 { font-size: 27px; }
}
@media (prefers-reduced-motion: reduce) {
  .cad *, .cad *::before, .cad *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.cadastro [hidden] { display: none !important; } /* o display dos componentes não pode vencer o atributo hidden */

/* etapa do nome: escolha entre empresa e pessoa física em cartões grandes */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tipo { border: 0; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; animation: subir-leve .5s cubic-bezier(.2,.8,.2,1) both; }
.etapa.entra .tipo { animation-delay: .08s; }
.tipo-op { position: relative; cursor: pointer; }
.tipo-op input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tipo-card { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 14px; border-radius: 10px; border: 1.5px solid rgba(95,107,44,.3); background: #fffdf7; transition: border-color .2s, box-shadow .2s, transform .2s, background-color .2s; }
.tipo-card svg { width: 26px; height: 26px; margin-bottom: 4px; fill: none; stroke: var(--olive); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tipo-card b { font: 800 16px/1.2 var(--font-head); color: var(--bark); }
.tipo-card small { font: 500 13px/1.35 var(--font-head); color: rgba(43,42,28,.65); }
.tipo-op:hover .tipo-card { border-color: rgba(95,107,44,.6); transform: translateY(-1px); }
.tipo-op input:checked + .tipo-card { border-color: var(--olive); background: #f4f1df; box-shadow: 0 0 0 3px rgba(95,107,44,.18); }
.tipo-op input:checked + .tipo-card svg { stroke: var(--bark); }
.tipo-op input:focus-visible + .tipo-card { outline: 2px solid var(--olive); outline-offset: 2px; }
.campo-nome label { font-size: 16px; transition: color .2s; }
.campo-nome input { min-height: 58px; font-size: 18px; }
.cad-form { overflow-x: clip; } /* a etapa que entra deslizando não alarga a página no celular */
