/* StarkPay v2 — login e cadastro: SÓ a cena 3D (30/11/2026). O formulário e o layout são os da v1 (estilos dentro da própria
   página, copiados literalmente em data/v2/views/{login,register}.php); aqui fica só o que é da cena:
   · o palco do escudo na coluna da direita (no lugar do carro) e, no celular, uma faixa acima do formulário;
   · a entrada: a tela abre no quadro da saída da landing (fundo #020A1A + contorno do escudo, 84–108 px, centro 50vw/48vh),
     o escudo se materializa ali e voa até o palco enquanto a página acende;
   · a ponte login ↔ cadastro: o escudo não some (o quadro do próprio 3D segura a âncora), só o cartão e o texto trocam;
   · a saída depois do login aprovado (o escudo volta ao centro e se apaga no contorno — a abertura do painel continua).
   Par de assets/js/mp-auth3d-ponte.js. Classes no <html>: a3-in → a3-run → a3-pronto · a3-ponte · a3-sai · a3-calmo. */

:root{
  --a3-lp:#020A1A; --a3-v1:#0B0D14; --a3-ciano:#00E0FF;
  --a3-ease:cubic-bezier(.16,1,.3,1);
  --a3-safe-top:env(safe-area-inset-top, 0px);
  --a3-v-lp:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 25.357 33.347'%3E%3Cg fill='none' stroke='%23BFF6FF' stroke-opacity='.9' stroke-width='1.3' stroke-linejoin='round'%3E%3Cpath vector-effect='non-scaling-stroke' d='M7.889 2.645C9.371 3.938 10.975 5.085 12.679 6.074C15.036 7.357 17.58 8.268 20.215 8.775V12.909L25.357 15.878V4.118L24.421 4.086C20.413 3.952 16.527 2.666 13.23 .382L12.679 0L12.127 .382C10.801 1.301 9.377 2.058 7.891 2.645Z'/%3E%3Cpath vector-effect='non-scaling-stroke' d='M0 9.724C4.316 9.157 8.838 8.163 12.679 6.074C10.975 5.086 9.372 3.937 7.889 2.645C5.681 3.514 3.33 4.006 .936 4.086L0 4.118Z'/%3E%3Cpath vector-effect='non-scaling-stroke' d='M18.952 24.053L23.422 26.634C24.293 25.373 24.921 23.973 25.199 22.466L25.322 21.794L17.249 17.132L5.142 10.143V8.813C3.432 9.209 1.7 9.5 0 9.722V13.11L5.32 16.181L8.196 17.842L18.952 24.051Z'/%3E%3Cpath vector-effect='non-scaling-stroke' d='M3.765 28.769C6.159 31.067 9.363 32.673 12.375 33.313C12.476 33.334 12.575 33.347 12.677 33.347C12.779 33.347 12.88 33.334 12.979 33.313C16.848 32.49 21.042 30.073 23.419 26.632L18.949 24.052C15.477 28.529 8.997 29.074 3.762 28.767Z'/%3E%3Cpath vector-effect='non-scaling-stroke' d='M3.765 28.769C6.563 28.933 9.717 28.853 12.578 28.061C9.848 27.233 6.285 25.045 5.366 22.148L0 19.05V20.731C0 23.868 1.528 26.621 3.765 28.769Z'/%3E%3C/g%3E%3C/svg%3E");
}

/* ══ 1. o palco do escudo (no lugar da imagem do carro da v1) ══ */
.spa-palco{ position:relative; width:100%; height:clamp(190px, 27vh, 250px); margin:0 auto 22px; }
.spa-palco .spa-halo{ position:absolute; left:50%; top:52%; width:min(30vw, 420px); aspect-ratio:1; transform:translate(-50%,-50%); pointer-events:none;
  background:radial-gradient(closest-side, rgba(0,224,255,.20), rgba(0,94,176,.10) 45%, transparent 72%); filter:blur(6px); }

/* PC: a coluna da cena fica presa na tela (o cadastro rola) e o palco tem o MESMO pixel no login e no cadastro —
   o escudo não pula na ponte; só o texto abaixo dele muda */
@media (min-width:992px){
  body.spa-acesso .auth-left.spa-cena{ position:sticky; top:0; align-self:start; height:100vh; height:100dvh;
    align-items:flex-start; padding-top:max(36px, calc(50vh - 290px)); }
}

/* ══ 2. âncora: vem do servidor com o quadro do 3D; sem JS não existe ══ */
.a3-ancora{ display:none; }
html.a3 .a3-ancora{ display:block; position:absolute; z-index:2; pointer-events:none; aspect-ratio:25.357/33.347; }
html.a3 .a3-heroi{ left:50%; top:50%; height:92%; transform:translate(-50%,-50%); }
html.a3 .a3-selo{ display:none; }
html.a3 .a3-ancora .a3-v2d{ position:absolute; inset:0; width:100%; height:100%; overflow:visible; display:block; filter:drop-shadow(0 18px 30px rgba(0,0,0,.6)); transition:opacity .6s var(--a3-ease); }
.a3-v2d .a3-tr{ opacity:0; }
html.a3.a3-3d .a3-ancora .a3-v2d, html.a3-run:not(.a3-3d) .a3-ancora .a3-v2d, html.a3-in .a3-ancora .a3-v2d, html.a3-espera3d .a3-ancora .a3-v2d{ opacity:0 !important; }
html.a3.a3-3d-tarde .a3-ancora .a3-v2d{ transition:opacity .9s var(--a3-ease) 1.1s; }
@media (prefers-reduced-motion:no-preference){ html.a3:not(.a3-3d) .a3-heroi .a3-v2d{ animation:a3Flutua 7s ease-in-out infinite; } }
/* o quadro do próprio 3D (mp-v3d-hero.webp, contain com 10% de folga) — é o escudo que "continua" entre login e cadastro */
html.a3 .a3-ancora .a3-foto{ position:absolute; left:-10%; top:-10%; width:120%; height:120%; max-width:none; margin:0; opacity:0; pointer-events:none; user-select:none; }
html.a3-ponte .a3-ancora .a3-foto{ opacity:1; }
html.a3-ponte .a3-ancora .a3-v2d{ opacity:0 !important; }
html.a3-ponte.a3-ponte-3d .a3-ancora .a3-foto{ opacity:0; transition:opacity .34s var(--a3-ease) .06s; }
html.a3-ponte-sai .a3-ancora .a3-foto{ opacity:1 !important; transition:opacity .2s ease !important; }
/* o 3D mora dentro da âncora: quadrado folgado (a poeira da materialização tem espaço); escudo = altura da âncora */
html.a3 .a3-v3d{ position:absolute; left:50%; top:50%; width:calc(100% * 2.121); aspect-ratio:1; transform:translate(-50%,-50%); transform-origin:50% 50%; pointer-events:none; will-change:transform; }
html.a3 .a3-heroi::after{ content:""; position:absolute; left:8%; right:8%; bottom:-14%; height:12%; border-radius:50%; z-index:-1;
  background:radial-gradient(closest-side, rgba(0,224,255,.32), rgba(0,94,176,.12) 60%, transparent); filter:blur(8px); opacity:0; transition:opacity 1s var(--a3-ease) .9s; }
html.a3.a3-pronto .a3-heroi::after, html.a3.a3-calmo .a3-heroi::after{ opacity:1; }
.a3-voo{ position:fixed; inset:0; z-index:2147482000; pointer-events:none; }
.a3-voo-ancora{ position:absolute; }

/* ══ 3. o quadro da saída da landing (antes do JS) — o mesmo pixel da landing: 84–108 px de largura, centro 50vw/48vh ══ */
html.a3-in, html.a3-in body.spa-acesso{ background-color:var(--a3-lp) !important; }
html.a3-in:not(.a3-js)::after{
  content:""; position:fixed; z-index:2147483000; left:50%; top:48%; width:clamp(84px, 8.4vw, 108px); aspect-ratio:25.357/33.347;
  transform:translate(-50%,-50%); background:var(--a3-v-lp) center/100% 100% no-repeat; pointer-events:none; animation:a3Apaga .4s 2.4s both;
}
html.a3-in body.spa-acesso :is(.auth-right, .auth-left){ animation:a3Garante .5s 2.4s both !important; }
html.a3-in.a3-js body.spa-acesso :is(.auth-right, .auth-left){ animation-delay:6s !important; }
/* o contorno que liga as telas (fixo, por cima de tudo) */
.a3-contrato{ position:fixed; inset:0; z-index:2147483000; pointer-events:none; }
.a3-contrato .a3-v{ position:absolute; display:block; overflow:visible; transform-origin:0 0; will-change:transform; }
.a3-v .a3-tr{ fill:none; stroke:#BFF6FF; stroke-width:1.3; stroke-linejoin:round; vector-effect:non-scaling-stroke; opacity:.9; }
.a3-v .a3-ch{ opacity:0; }
html.a3-run .a3-contrato:not(.a3-2d) .a3-tr{ animation:a3Apaga .24s .1s both; }
html.a3-run.a3-v3d-on .a3-contrato:not(.a3-2d) .a3-tr{ animation:a3Apaga .5s .78s both; }
html.a3-run .a3-contrato.a3-2d .a3-ch{ animation:a3Acende .42s .1s both; }
html.a3-run .a3-contrato.a3-2d .a3-tr{ animation:a3Apaga .3s .4s both; }
html.a3-run .a3-contrato.a3-2d .a3-v{ transition:transform .95s var(--a3-ease); filter:drop-shadow(0 16px 28px rgba(0,0,0,.55)); }
.a3-contrato.a3-fecha .a3-tr{ opacity:0; animation:a3AcendeTr .2s .24s both; }
html.a3-sai-painel .a3-contrato.a3-fecha .a3-tr{ stroke-width:1.25; animation-name:a3AcendeTrP; }
.a3-contrato.a3-fecha .a3-ch{ opacity:0; }
.a3-contrato.a3-fecha.a3-2d .a3-ch{ opacity:1; animation:a3Apaga .2s .2s both; }
.a3-contrato.a3-fecha.a3-2d .a3-v{ transition:transform .32s var(--a3-ease); }

/* ══ 4. entrada (a3-run): o escudo nasce no centro e voa; a página acende atrás (fundo sem salto: começa no véu da landing) ══ */
html.a3.a3-run, html.a3.a3-run body.spa-acesso{ animation:a3Fundo 1s .25s both; }
html.a3.a3-run body.spa-acesso .auth-left::before, html.a3.a3-run body.spa-acesso .auth-left::after{ animation:a3Acende 1.1s .35s var(--a3-ease) both; }
html.a3.a3-run body.spa-acesso .auth-right{ animation:a3Acende .8s .55s var(--a3-ease) both; }
html.a3.a3-run body.spa-acesso .spa-cartao{ animation:a3Card .75s .9s var(--a3-ease) both; }
html.a3.a3-run body.spa-acesso .sp-show > :not(.spa-palco){ animation:a3Sobe .7s calc(1s + var(--i, 0) * 70ms) var(--a3-ease) both; }
html.a3.a3-run body.spa-acesso .spa-palco .spa-halo{ animation:a3Acende 1.2s .5s both; }
.sp-show > :nth-child(2){ --i:0 } .sp-show > :nth-child(3){ --i:1 } .sp-show > :nth-child(4){ --i:2 } .sp-show > :nth-child(5){ --i:3 }

/* ══ 5. ponte login ↔ cadastro: o escudo fica; o cartão e o texto da cena trocam ══ */
html.a3-ponte-sai body.spa-acesso :is(.spa-cartao, .sp-show > :not(.spa-palco)){ opacity:0 !important; transform:translateY(10px); transition:opacity .22s ease, transform .22s ease !important; }
html.a3-ponte-sai{ cursor:progress; }
html.a3-ponte body.spa-acesso .spa-cartao{ animation:a3Card .62s .02s var(--a3-ease) both; }
html.a3-ponte body.spa-acesso .sp-show > :not(.spa-palco){ animation:a3Sobe .6s calc(.06s + var(--i, 0) * 60ms) var(--a3-ease) both; }

/* ══ 6. saída depois do login: o escudo volta ao centro e se apaga no contorno ══ */
html.a3-sai body.spa-acesso :is(.auth-right, .sp-show > :not(.spa-palco)), html.a3-sai .toast-container{ opacity:0 !important; transition:opacity .24s var(--a3-ease) !important; }
html.a3-sai body.spa-acesso .auth-left::before, html.a3-sai body.spa-acesso .auth-left::after{ opacity:0; transition:opacity .24s var(--a3-ease); }
html.a3-sai .a3-ancora{ opacity:0; transition:opacity .12s; }
html.a3-sai-lp, html.a3-sai-lp body.spa-acesso{ background-color:var(--a3-lp) !important; transition:background-color .3s var(--a3-ease); }
html.a3-sai-painel, html.a3-sai-painel body.spa-acesso{ background-color:#05070C !important; }
html.a3-sai{ cursor:progress; }

/* ══ 7. celular: a v1 escondia a coluna da arte; aqui ela vira uma faixa acima do formulário só com o escudo ══ */
@media (max-width:991px){
  /* altura e respiro fixos: o escudo fica no MESMO pixel no login e no cadastro (a ponte não pula) */
  body.spa-acesso .auth-left.spa-cena{ display:flex !important; order:0; align-items:flex-start !important; justify-content:center !important;
    padding:calc(var(--a3-safe-top) + 14px) 0 0 !important; margin:0 !important; height:calc(var(--a3-safe-top) + 168px); min-height:0; overflow:visible; }
  body.spa-acesso .auth-left.spa-cena .sp-show{ margin:0 !important; padding:0 !important; }
  body.spa-acesso .auth-left.spa-cena::before{ background-position:center 30%; }
  body.spa-acesso .auth-left.spa-cena .sp-show > :not(.spa-palco){ display:none; }
  body.spa-acesso .spa-palco{ height:150px; margin:0 auto 4px; }
  body.spa-acesso .spa-palco .spa-halo{ width:76vw; }
  body.spa-acesso .auth-right{ padding-top:12px; }
}

/* ══ 8. movimento reduzido: tudo pronto, escudo parado ══ */
@media (prefers-reduced-motion:reduce){
  html.a3 *, html.a3 *::before, html.a3 *::after{ animation-duration:.001s !important; animation-delay:0s !important; transition-duration:.001s !important; }
}

@keyframes a3Acende{ from{ opacity:0; } to{ opacity:1; } }
@keyframes a3Garante{ from{ opacity:0; } to{ opacity:1; } }
@keyframes a3Apaga{ from{ opacity:.9; } to{ opacity:0; } }
@keyframes a3AcendeTr{ from{ opacity:0; } to{ opacity:.9; } }
@keyframes a3AcendeTrP{ from{ opacity:0; } to{ opacity:1; } }
@keyframes a3Sobe{ from{ opacity:0; transform:translateY(14px); } to{ opacity:1; transform:none; } }
@keyframes a3Card{ from{ opacity:0; transform:translateY(22px); } to{ opacity:1; transform:none; } }
@keyframes a3Fundo{ from{ background-color:var(--a3-lp); } to{ background-color:var(--a3-v1); } }
@keyframes a3Flutua{ 0%,100%{ transform:translateY(0) rotate(0); } 50%{ transform:translateY(-6px) rotate(-.6deg); } }
