/* Efeitos da etapa "Gerando o vídeo" na demo de vídeos de imóveis */
.stage-proc {
  position: relative;
  aspect-ratio: 3 / 2;
  width: 100%;
  overflow: hidden;
  border-radius: 0.75rem;
  background: #0b1424;
  box-shadow: 0 0 0 1px rgba(10, 165, 232, 0.35);
  animation: stage-brilho 1.8s ease-in-out infinite;
}
.stage-proc + .stage-proc { animation-delay: 0.9s; }

.stage-proc img {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  object-fit: cover;
  transform-origin: 30% 60%;
  animation: stage-kb 5.2s cubic-bezier(.45, .05, .35, 1) forwards;
}
.stage-proc + .stage-proc img {
  transform-origin: 70% 40%;
  animation-name: stage-kb-2;
}

/* grade de "análise" */
.stage-grade {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(34, 211, 238, .22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, .22) 1px, transparent 1px);
  background-size: 22px 22px;
  mix-blend-mode: screen;
  animation: stage-grade 5.2s ease-out forwards;
  pointer-events: none;
}

/* linha de scanner */
.stage-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.stage-scan::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -30%;
  height: 30%;
  background: linear-gradient(to bottom, transparent, rgba(34, 211, 238, .28) 80%, rgba(165, 243, 252, .95) 98%, transparent);
  box-shadow: 0 6px 18px rgba(34, 211, 238, .6);
  animation: stage-scan 1.7s linear infinite;
}
.stage-proc + .stage-proc .stage-scan::before { animation-delay: .85s; }

/* cantos de "mira" */
.stage-mira {
  position: absolute;
  inset: 8px;
  pointer-events: none;
  background:
    linear-gradient(#22d3ee, #22d3ee) top left / 14px 2px,
    linear-gradient(#22d3ee, #22d3ee) top left / 2px 14px,
    linear-gradient(#22d3ee, #22d3ee) top right / 14px 2px,
    linear-gradient(#22d3ee, #22d3ee) top right / 2px 14px,
    linear-gradient(#22d3ee, #22d3ee) bottom left / 14px 2px,
    linear-gradient(#22d3ee, #22d3ee) bottom left / 2px 14px,
    linear-gradient(#22d3ee, #22d3ee) bottom right / 14px 2px,
    linear-gradient(#22d3ee, #22d3ee) bottom right / 2px 14px;
  background-repeat: no-repeat;
  filter: drop-shadow(0 0 4px rgba(34, 211, 238, .8));
  animation: stage-mira 1.4s ease-in-out infinite alternate;
}

.stage-tag {
  position: absolute;
  left: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: rgba(8, 18, 34, .72);
  backdrop-filter: blur(6px);
  padding: 3px 9px 3px 7px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
}
.stage-tag::before {
  content: "";
  height: 6px;
  width: 6px;
  border-radius: 999px;
  background: #22d3ee;
  box-shadow: 0 0 8px #22d3ee;
  animation: stage-ponto 1s ease-in-out infinite;
}

@keyframes stage-kb {
  0%   { transform: scale(1) translate(0, 0); filter: saturate(.55) brightness(.85); }
  45%  { filter: saturate(1) brightness(1); }
  100% { transform: scale(1.22) translate(-3%, -2%); filter: saturate(1.2) brightness(1.06) contrast(1.05); }
}
@keyframes stage-kb-2 {
  0%   { transform: scale(1.22) translate(3%, 2%); filter: saturate(.55) brightness(.85); }
  45%  { filter: saturate(1) brightness(1); }
  100% { transform: scale(1) translate(0, 0); filter: saturate(1.2) brightness(1.06) contrast(1.05); }
}
@keyframes stage-grade {
  0%   { opacity: .9; }
  70%  { opacity: .35; }
  100% { opacity: 0; }
}
@keyframes stage-scan {
  to { transform: translateY(440%); }
}
@keyframes stage-brilho {
  0%, 100% { box-shadow: 0 0 0 1px rgba(10, 165, 232, .35), 0 0 0 rgba(34, 211, 238, 0); }
  50%      { box-shadow: 0 0 0 1px rgba(34, 211, 238, .8), 0 0 22px rgba(34, 211, 238, .45); }
}
@keyframes stage-mira {
  from { inset: 8px; opacity: .6; }
  to   { inset: 12px; opacity: 1; }
}
@keyframes stage-ponto {
  50% { opacity: .3; }
}

@media (prefers-reduced-motion: reduce) {
  .stage-proc, .stage-proc img, .stage-grade, .stage-scan::before, .stage-mira, .stage-tag::before {
    animation: none;
  }
  .stage-grade, .stage-scan { display: none; }
}
