/* ====== Tela de escolha animada (login): Cofre (financeiro) x Computador (Vídeos) ======
   Abertura: dois alvos lado a lado. Cofre -> gira a porta e pede a senha. Computador -> aproxima o
   controle, pede a biometria (posição do leitor do S25+/S23 Ultra, centro-baixo), liga as telas e dá zoom.
   Toda animação pós-escolha cabe em ~5 s. Só transform/opacity/filter. */

.escolha-palco {
  position: relative; width: min(60rem, 100%); display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;
  perspective: 1200px; margin-top: 0.4rem;
}
@media (max-width: 760px) { .escolha-palco { grid-template-columns: 1fr; max-width: 24rem; } }

.alvo {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.9rem;
  padding: 1.6rem 1.2rem 1.3rem; cursor: pointer; text-align: center;
  background: rgba(8, 11, 18, 0.66); border: 1px solid rgba(201, 169, 97, 0.3); border-radius: 6px;
  color: var(--tx); transition: transform 0.18s, border-color 0.18s, background 0.18s, box-shadow 0.18s;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.alvo:hover { transform: translateY(-3px); border-color: rgba(212, 181, 106, 0.72); box-shadow: 0 18px 50px rgba(0,0,0,.45); }
.alvo:focus-visible { outline: 2px solid var(--acento); outline-offset: 3px; }
.alvo h2 { margin: 0; font-size: 1.08rem; font-weight: 620; color: #e6cf94; letter-spacing: 0.02em; }
.alvo p { margin: 0; font-size: 0.78rem; color: var(--tx2); line-height: 1.4; }
.alvo .arte { width: 150px; height: 150px; }

/* ---------- Cofre (SVG) ---------- */
.cofre-arte { position: relative; }
.cofre-porta { transform-box: fill-box; transform-origin: 50% 50%; }
.cofre-roda { transform-box: fill-box; transform-origin: 50% 50%; transition: transform 0.2s; }
.alvo:hover .cofre-roda { transform: rotate(18deg); }
.cofre-batente { transform-box: fill-box; transform-origin: 14% 50%; }

/* animação ao escolher o cofre: roda gira 2 voltas, porta entreabre, depois some para dar lugar à senha */
.escolha-animada.abrindo-cofre .opt-pc { opacity: 0; transform: scale(.92); pointer-events: none; }
.abrindo-cofre .cofre-roda { animation: rodaGira 1.6s cubic-bezier(.5,.05,.2,1) forwards; }
.abrindo-cofre .cofre-batente { animation: portaAbre 1s ease-in 1.15s forwards; }
.abrindo-cofre .opt-cofre { animation: cofreZoom 2s ease-in forwards; }
@keyframes rodaGira { 0% { transform: rotate(0); } 60% { transform: rotate(540deg); } 100% { transform: rotate(720deg); } }
@keyframes portaAbre { to { transform: perspective(500px) rotateY(-58deg); } }
@keyframes cofreZoom { 0% { transform: scale(1); } 70% { transform: scale(1.06); } 100% { transform: scale(1.5); opacity: 0; } }

/* ---------- Computador com telas apagadas (SVG) ---------- */
.pc-tela { transition: fill 0.3s, filter 0.3s; }
.pc-brilho { opacity: 0; transition: opacity 0.3s; }

/* ao escolher o computador: aproxima (zoom), controle sobe, pede biometria; depois liga as telas e dá zoom */
.escolha-animada.indo-pc .opt-cofre { opacity: 0; transform: scale(.92); pointer-events: none; }
.escolha-animada.indo-pc .opt-pc { animation: pcAproxima .5s ease-out forwards; }
@keyframes pcAproxima { to { transform: scale(1.12) translateY(-6px); } }

/* telas ligam em cascata + zoom final (fase "ligando") */
.escolha-animada.ligando-pc .opt-pc { animation: pcLiga 2.2s ease-in forwards; }
.ligando-pc .pc-tela { fill: #0a3550; }
.ligando-pc .pc-brilho { opacity: 1; animation: telaPisca 0.5s steps(2) ; }
.ligando-pc .pc-brilho.t2 { animation-delay: .18s; }
.ligando-pc .pc-brilho.t3 { animation-delay: .36s; }
@keyframes telaPisca { 50% { opacity: .35; } }
@keyframes pcLiga { 0% { transform: scale(1.12); } 55% { transform: scale(1.25); } 100% { transform: scale(2.4); opacity: 0; } }

/* ---------- Controle tecnológico + biometria (posição do leitor: centro-baixo, como S25+/S23 Ultra) ---------- */
.biometria-cena {
  position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding-bottom: 14vh; background: radial-gradient(60% 50% at 50% 60%, rgba(8,20,34,.55), rgba(3,6,12,.9));
  opacity: 0; pointer-events: none; transition: opacity .35s;
}
.biometria-cena.on { opacity: 1; pointer-events: auto; }
.biometria-painel {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) scale(.8); opacity: 0;
  width: min(30rem, 86vw); text-align: center; color: #d9e8f5;
  transition: transform .4s cubic-bezier(.2,.8,.3,1.2), opacity .4s;
}
.biometria-cena.on .biometria-painel { transform: translate(-50%,-62%) scale(1); opacity: 1; }
.biometria-titulo { font-size: 1rem; letter-spacing: .04em; color: #8fd0ff; margin-bottom: .3rem; }
.biometria-sub { font-size: .8rem; color: #8aa0b4; }
.biometria-grade { position: absolute; inset: 0; background-image: linear-gradient(rgba(80,180,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(80,180,255,.08) 1px, transparent 1px); background-size: 34px 34px; mask-image: radial-gradient(60% 50% at 50% 75%, #000, transparent); opacity: .7; }

/* leitor de digital no centro-baixo */
.digital {
  position: relative; width: 108px; height: 108px; margin: 0 auto; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; color: #63d0ff;
  background: radial-gradient(circle, rgba(60,160,255,.18), rgba(10,30,52,.5));
  box-shadow: 0 0 0 2px rgba(99,208,255,.35), 0 0 40px rgba(60,160,255,.35) inset;
  transition: transform .15s, box-shadow .2s;
}
.digital:hover { transform: scale(1.05); }
.digital:active { transform: scale(.97); }
.digital svg { width: 62px; height: 62px; }
.digital .anel { position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(99,208,255,.5); opacity: 0; }
.biometria-cena.on .digital .anel { animation: pulsoAnel 1.8s ease-out infinite; }
@keyframes pulsoAnel { 0% { transform: scale(.9); opacity: .7; } 100% { transform: scale(1.3); opacity: 0; } }
.digital-dica { margin-top: 1rem; font-size: .82rem; color: #9fd4ff; letter-spacing: .03em; }

/* escaneando: a digital "preenche" de baixo pra cima e o anel fecha */
.biometria-cena.escaneando .digital { box-shadow: 0 0 0 2px rgba(99,255,180,.7), 0 0 60px rgba(60,255,180,.45) inset; color: #74ffc0; }
.biometria-cena.escaneando .digital .varredura { animation: varre 1s ease-in-out forwards; }
.biometria-cena.escaneando .digital-dica { color: #74ffc0; }
@keyframes varre { 0% { transform: translateY(100%);} 100% { transform: translateY(-4%);} }

/* some a cena da biometria quando entra o "ligando" */
.escolha-animada.ligando-pc .biometria-cena { opacity: 0; transition: opacity .4s; }

/* linha de varredura da digital */
.digital { overflow: hidden; }
.digital .varredura { position: absolute; left: 10%; right: 10%; height: 3px; top: 0; border-radius: 3px;
  background: linear-gradient(90deg, transparent, #74ffc0, transparent); box-shadow: 0 0 10px #74ffc0; opacity: 0; }
.biometria-cena.escaneando .digital .varredura { opacity: 1; }

/* layout da tela de escolha animada (sobre o grid centralizado do .tela-entrada) */
.tela-entrada.escolha-animada { row-gap: 1.4rem; align-content: center; }
.escolha-topo { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; }
.escolha-animada .entrada-retorno { margin-top: .6rem; }
.escolha-animada .erro-rapida { position: relative; z-index: 1; min-height: 1em; }
.escolha-animada .erro-rapida:empty { display: none; }
