/* Cena de fundo da entrada (login e tela de carregamento): planeta girando (WebGL), estrelas logo com espessura 3D e órbita.
   Monocromático por decisão do tanpz (2026-11-26). Só transform/opacity animam (fluido a 60 fps). */
.cena { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: #000002; }
.cena-sky { position: absolute; inset: 0; width: 100%; height: 100%; }
/* o planeta gira em torno do próprio centro (bem abaixo da tela): a curva do horizonte fica no lugar e a superfície desliza */
.cena-planet { position: absolute; inset: -12% -16%; background: url(/assets/img/login-fundo.jpg) center 72% / cover no-repeat; transform-origin: 50% 640%; opacity: 0; animation: cenaIn 2.2s .1s cubic-bezier(.2,.7,.2,1) forwards, cenaGira 40s ease-in-out infinite alternate; will-change: transform; }
.cena-planet::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 50% at 50% 40%, rgba(0,0,2,.55), rgba(0,0,2,0) 75%), linear-gradient(180deg, rgba(0,0,2,.35), rgba(0,0,2,0) 40%, rgba(0,0,2,.35)); }
@media (max-aspect-ratio: 1/1) { .cena-planet { inset: -12% -60%; } }
/* planeta em WebGL (planeta.js): gira de verdade; a foto acima só aparece sem WebGL */
.cena-planeta { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; animation: cenaIn 1.6s .05s cubic-bezier(.2,.7,.2,1) forwards; }
.cena.gl .cena-planet { display: none; }
/* profundidade da logo: espessura 3D (cópias escuras empilhadas para trás) + órbita fina que passa ATRÁS e NA FRENTE dela */
.logo3d { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.logo3d img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* 2026-11-27: as cópias da espessura pareciam "outro D atrás" (tanpz): saem; a profundidade fica na sombra */
.logo3d .ext { display: none; }
.logo3d .ext:first-child { filter: brightness(.18) drop-shadow(0 20px 26px rgba(0,0,0,.9)); }
.logo3d .face { position: relative; transform: translateZ(.5px); filter: drop-shadow(0 10px 18px rgba(0,0,0,.75)) drop-shadow(0 0 14px rgba(255,255,255,.14)); }
.orbita { position: absolute; left: 50%; top: 56%; width: 210%; height: 44%; margin-left: -105%; margin-top: -22%; pointer-events: none; } /* sem transform/opacity aqui: senão as camadas não intercalam com a logo */
.orbita > * { position: absolute; inset: 0; transform: rotate(-14deg); }
.orbita i { border-radius: 50%; border: 1.5px solid rgba(255,255,255,.55); box-shadow: 0 0 10px rgba(255,255,255,.18); -webkit-mask: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent); mask: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent); }
.orbita .tras { z-index: 0; clip-path: inset(0 0 50% 0); opacity: .5; }
.orbita .frente { z-index: 4; clip-path: inset(50% 0 0 0); }
.orb-dot { z-index: 0; animation: orbZ 9s linear infinite; }
/* o ponto anda num círculo achatado na altura da órbita (44% x 210% da logo = 0,2165) */
.orb-sq { position: absolute; left: 0; top: 50%; width: 100%; aspect-ratio: 1; transform: translateY(-50%) scaleY(.2165); }
.orb-spin { position: absolute; inset: 0; animation: orbGira 9s linear infinite; }
.orb-spin b { position: absolute; left: 50%; top: 0; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: #fefefe; box-shadow: 0 0 10px 3px rgba(255,255,255,.65), 0 0 26px 8px rgba(255,255,255,.18); animation: orbPonto 9s linear infinite; }
@keyframes orbGira { to { transform: rotate(360deg); } }
@keyframes orbPonto { from { transform: rotate(0deg) scaleY(4.619); } to { transform: rotate(-360deg) scaleY(4.619); } }
@keyframes orbZ { 0%,24.9% { z-index: 0; opacity: .45; } 25%,74.9% { z-index: 4; opacity: 1; } 75%,100% { z-index: 0; opacity: .45; } }
/* logo viva: flutua e inclina em 3D, com sombra que acompanha */
.vivo { animation: vivoFlutua 6s ease-in-out infinite; transform-style: preserve-3d; will-change: transform; }
@keyframes vivoFlutua { 0%,100% { transform: translateY(0) rotateX(4deg) rotateY(-10deg); } 25% { transform: translateY(-9px) rotateX(-3deg) rotateY(0deg); } 50% { transform: translateY(-4px) rotateX(2deg) rotateY(10deg); } 75% { transform: translateY(-11px) rotateX(-4deg) rotateY(2deg); } }
.vivo-sombra { position: absolute; left: 50%; top: 104%; width: 70%; height: 12%; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(255,255,255,.16), transparent); filter: blur(4px); animation: vivoSombra 6s ease-in-out infinite; pointer-events: none; }
@keyframes vivoSombra { 0%,100% { transform: translateX(-50%) scale(1); opacity: 1; } 25%,75% { transform: translateX(-50%) scale(.82); opacity: .6; } }
@keyframes cenaIn { to { opacity: 1; } }
/* na tela de carregamento (2 a 3 s) o giro precisa ser visível: entra girando e se aproximando */
.boot .cena-planet { animation: cenaIn 1.2s .05s cubic-bezier(.2,.7,.2,1) forwards, cenaGiraEntrada 3.2s cubic-bezier(.2,.7,.3,1) forwards; }
@keyframes cenaGiraEntrada { from { transform: rotate(-2.4deg) scale(1.08); } to { transform: rotate(0deg) scale(1); } }
@keyframes cenaGira { from { transform: rotate(-1.3deg); } to { transform: rotate(1.3deg); } }
@media (prefers-reduced-motion: reduce) { .vivo, .vivo-sombra, .orb-dot, .orb-spin, .orb-spin b { animation: none !important; } .cena * { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; } }
