/* cartao-virtual — estilo exclusivo desta tela.
   O que e reaproveitado por mais de uma pagina mora em css/style.css,
   que carrega antes deste. */
/* ===== 28-cena-cartao.css ===== */
/* Cena do hero de /solucoes/cartao-virtual/: o cartao sendo lido.

   A camera do iPhone apontada para um cartao de papel deitado na mesa. O visor
   entra desfocado e acerta o foco, o codigo ganha o contorno amarelo, desce a
   tarja com o endereco — e um toque abre o cartao virtual de verdade.

   Tres coisas fazem a cena parecer camera, e nao desenho: o cartao esta em
   perspectiva, como quem fotografa de cima; o visor abre desfocado e foca; e o
   cromo do aplicativo esta ali, com disparador, modos e zoom. O contorno do
   codigo mora dentro do cartao, entao acompanha a perspectiva dele.

   O quadriculado nao e um QR que se leia: e o padrao que o olho reconhece como
   um. A encenacao e `aria-hidden`; o que conta esta no `alt` da imagem.

   Todas as medidas sao `cqw`, a largura da propria cena. */
.cvt-cena {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 34rem;
  margin-inline: auto;
  container-type: inline-size;
}

/* --- O aparelho --- */
.cvt-fone {
  position: relative;
  width: 55.0cqw;
  padding: 1.4cqw;
  border-radius: 6cqw;
  background: #0f172a;
  box-shadow: 0 4cqw 9cqw rgba(15, 23, 42, 0.3);
}

.cvt-ilha {
  position: absolute;
  z-index: 6;
  top: 3.4cqw;
  left: 50%;
  translate: -50% 0;
  width: 16cqw;
  height: 4.4cqw;
  border-radius: 9999px;
  background: #0f172a;
}

.cvt-tela {
  position: relative;
  overflow: hidden;
  border-radius: 4.8cqw;
  aspect-ratio: 9 / 18.4;
  background: #000;
}

.cvt-indicador {
  position: absolute;
  z-index: 6;
  bottom: 1.2cqw;
  left: 50%;
  translate: -50% 0;
  width: 28%;
  height: 0.7cqw;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.6);
}

/* --- O visor --- */
.cvt-camera {
  position: absolute;
  inset: 0;
  animation: cvt-camera 16s ease-out infinite;
}

@keyframes cvt-camera {
  0%,
  33.0% {
    opacity: 1;
  }

  39.0%,
  88.0% {
    opacity: 0;
  }

  95.0%,
  100% {
    opacity: 1;
  }
}

/* A mesa, com a luz caindo de cima. O visor abre fora de foco e acerta — e o
   que mais faz a cena parecer camera. */
.cvt-cenario {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(60% 22% at 50% 60%, rgba(148, 163, 184, 0.35) 0%, transparent 70%),
    radial-gradient(120% 70% at 50% 8%, #47566b 0%, #24303f 42%, #121a25 100%);
  animation: cvt-foco 16s ease-out infinite;
}

@keyframes cvt-foco {
  0% {
    filter: blur(1.1cqw);
    scale: 1.06;
  }

  9.0%,
  88.0% {
    filter: blur(0);
    scale: 1;
  }

  95.0%,
  100% {
    filter: blur(1.1cqw);
    scale: 1.06;
  }
}

/* O movimento de quem esta escaneando: quem se mexe e a camera. O cartao entra
   em quadro vindo de baixo e torto, e o enquadramento assenta quando o codigo e
   reconhecido. */
.cvt-mao,
.cvt-tremor {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.cvt-mao {
  animation: cvt-aproxima 16s cubic-bezier(0.25, 0.8, 0.3, 1) infinite;
}

@keyframes cvt-aproxima {
  0% {
    translate: 11cqw 15cqw;
    rotate: 6deg;
    scale: 0.8;
  }

  9.0% {
    translate: 3cqw 4cqw;
    rotate: 1.6deg;
    scale: 0.94;
  }

  14.0%,
  88.0% {
    translate: 0 0;
    rotate: 0deg;
    scale: 1;
  }

  95.0%,
  100% {
    translate: 11cqw 15cqw;
    rotate: 6deg;
    scale: 0.8;
  }
}

/* E o tremor de mao, que nunca para: e o que separa uma camera na mao de um
   desenho parado. */
.cvt-tremor {
  animation: cvt-tremor 5.5s ease-in-out infinite;
}

@keyframes cvt-tremor {
  0%,
  100% {
    translate: -0.5cqw 0.3cqw;
    rotate: -0.5deg;
  }

  35% {
    translate: 0.4cqw -0.4cqw;
    rotate: 0.4deg;
  }

  70% {
    translate: 0.5cqw 0.5cqw;
    rotate: -0.2deg;
  }
}

/* O cartao de papel, deitado: a perspectiva e o que tira o ar de desenho. */
.cvt-impresso {
  display: flex;
  align-items: center;
  gap: 3cqw;
  width: 86%;
  aspect-ratio: 85 / 55;
  padding: 4cqw;
  border-radius: 1.5rem;
  background: linear-gradient(150deg, #fff 0%, #eef2f7 100%);
  transform: perspective(75cqw) rotateX(36deg) rotateZ(-6deg);
  box-shadow: 0 6cqw 6cqw rgba(0, 0, 0, 0.45);
}

.cvt-impresso-dados {
  display: flex;
  flex-direction: column;
  gap: 1.6cqw;
  flex: 1;
  min-width: 0;
}

.cvt-marca {
  width: 62%;
  height: auto;
}

.cvt-impresso-linha {
  width: 84%;
  height: 1.2cqw;
  border-radius: 9999px;
  background: #cbd5e1;
}

.cvt-impresso-curta {
  width: 54%;
}

.cvt-impresso-codigo {
  position: relative;
  flex: none;
  width: 34%;
}

.cvt-qr {
  display: block;
  width: 100%;
  fill: #0f172a;
  shape-rendering: crispEdges;
}

/* O contorno do codigo: mora dentro do cartao, entao entorta junto com ele. */
.cvt-alvo {
  position: absolute;
  inset: -1.6cqw;
  border: 0.6cqw solid transparent;
  border-radius: 1.2cqw;
  animation: cvt-alvo 16s cubic-bezier(0.3, 0.8, 0.3, 1) infinite;
}

@keyframes cvt-alvo {
  0%,
  13.99% {
    border-color: transparent;
    scale: 1.3;
  }

  17.0%,
  33.0% {
    border-color: #ffd60a;
    scale: 1;
  }

  39.0%,
  100% {
    border-color: transparent;
    scale: 1.3;
  }
}

/* --- O cromo do aplicativo --- */
.cvt-cromo-topo {
  position: absolute;
  top: 7.5cqw;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  font-size: 2.2cqw;
  color: rgba(255, 255, 255, 0.85);
}

.cvt-cromo-pe {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 0 4cqw;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 60%, transparent);
}

.cvt-zoom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.4cqw;
  margin-bottom: 2.4cqw;
  font-size: 1.8cqw;
  font-style: normal;
  color: rgba(255, 255, 255, 0.75);
}

.cvt-zoom b {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5cqw;
  height: 5cqw;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.5);
  font-size: 1.9cqw;
  color: #ffd60a;
}

.cvt-modos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5cqw;
  font-size: 1.8cqw;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.cvt-modos b {
  color: #ffd60a;
}

.cvt-acoes {
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-top: 3cqw;
}

.cvt-miniatura {
  width: 7cqw;
  height: 7cqw;
  border-radius: 1.4cqw;
  background: linear-gradient(140deg, #64748b, #1e293b);
}

/* O disparador: o anel de fora e o disco de dentro. */
.cvt-disparo {
  width: 13cqw;
  height: 13cqw;
  border-radius: 9999px;
  border: 0.7cqw solid #fff;
  background: radial-gradient(circle, #fff 0 68%, transparent 69%);
}

.cvt-girar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 8cqw;
  height: 8cqw;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 3cqw;
  color: #fff;
}

/* --- A tarja do leitor --- */
.cvt-tarja {
  position: absolute;
  z-index: 3;
  top: 13cqw;
  left: 3cqw;
  right: 3cqw;
  display: flex;
  align-items: center;
  gap: 2.4cqw;
  padding: 2.4cqw;
  border-radius: 2.6cqw;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1.6cqw 3.4cqw rgba(0, 0, 0, 0.4);
  translate: 0 -260%;
  animation: cvt-tarja 16s cubic-bezier(0.32, 0.72, 0, 1) infinite;
}

@keyframes cvt-tarja {
  0%,
  19.0% {
    translate: 0 -260%;
  }

  23.0%,
  33.0% {
    translate: 0 0;
  }

  36.0%,
  100% {
    translate: 0 -260%;
  }
}

.cvt-tarja-icone {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 7cqw;
  height: 7cqw;
  border-radius: 1.8cqw;
  background: #0f172a;
  font-size: 3cqw;
  color: #fff;
}

.cvt-tarja-texto {
  flex: 1;
  min-width: 0;
}

.cvt-tarja-texto strong {
  display: block;
  font-size: 2.2cqw;
  font-weight: 700;
  color: #0f172a;
}

.cvt-tarja-texto em {
  display: block;
  margin-top: 0.3cqw;
  font-size: 1.8cqw;
  font-style: normal;
  color: #64748b;
}

.cvt-tarja-seta {
  font-size: 2cqw;
  color: #c7c7cc;
}

/* --- O cartao de verdade --- */
.cvt-cartao {
  position: absolute;
  z-index: 4;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #050c1e;
  translate: 0 100%;
  animation: cvt-cartao 16s cubic-bezier(0.32, 0.72, 0, 1) infinite;
}

@keyframes cvt-cartao {
  0%,
  33.0% {
    translate: 0 100%;
  }

  39.0%,
  88.0% {
    translate: 0 0;
  }

  95.0%,
  100% {
    translate: 0 100%;
  }
}

/* --- O toque na tarja --- */
.cvt-toque {
  position: absolute;
  z-index: 7;
  left: 50%;
  top: 15.89%;
  width: 9cqw;
  height: 9cqw;
  border-radius: 9999px;
  border: 0.5cqw solid rgba(255, 214, 10, 0.85);
  background: rgba(255, 214, 10, 0.18);
  translate: -50% -50%;
  opacity: 0;
  animation: cvt-toque 16s ease-out infinite;
  animation-delay: 4.48s;
}

@keyframes cvt-toque {
  0% {
    scale: 0.3;
    opacity: 0;
  }

  2.5% {
    scale: 0.6;
    opacity: 1;
  }

  8%,
  100% {
    scale: 1.4;
    opacity: 0;
  }
}

/* Quem pediu menos movimento ve o desfecho: o cartao aberto no celular. */
@media (prefers-reduced-motion: reduce) {
  .cvt-cena * {
    animation: none !important;
  }

  .cvt-cartao {
    translate: 0 0;
  }

  .cvt-toque {
    opacity: 0;
  }
}
