/* ==========================================================================
   Topo dos cases: os três celulares giram entre si
   O da frente vai para a esquerda, o da esquerda passa por trás para a direita,
   e o da direita vem para a frente. Ciclo de 9 s, só com CSS (funciona no canvas).
   ========================================================================== */

.case-hero-visual { perspective: 1200px; }

.case-hero-visual .fan,
.case-hero-visual .fan-center,
.case-hero-visual .fan-left,
.case-hero-visual .fan-right {
  left: 50%;
  right: auto;
  bottom: 2%;
  width: min(48%, 264px);
  translate: -50% 0;
  transform-origin: 50% 100%;
}

@media (prefers-reduced-motion: no-preference) {
  .case-hero-visual .fan {
    animation: fan-rise 1s .2s cubic-bezier(.2, .7, .2, 1) both, phone-cycle 9s cubic-bezier(.65, 0, .35, 1) infinite;
  }
  .case-hero-visual .fan-center { animation-delay: .2s, 1.2s; }
  .case-hero-visual .fan-left { animation-delay: .35s, -1.8s; }
  .case-hero-visual .fan-right { animation-delay: .45s, -4.8s; }
  .case-hero-visual:hover .fan { animation-play-state: running, paused; }
}

/* Três posições: frente (centro), esquerda e direita, ambas atrás e menores */
@keyframes phone-cycle {
  0%, 25% { left: 50%; rotate: 0deg; scale: 1; z-index: 3; filter: drop-shadow(0 32px 48px rgb(23 33 43 / 24%)); }
  33.33%, 58.33% { left: 22%; rotate: -10deg; scale: .8; z-index: 2; filter: drop-shadow(0 16px 24px rgb(23 33 43 / 14%)) brightness(.94); }
  66.67%, 91.67% { left: 78%; rotate: 10deg; scale: .8; z-index: 1; filter: drop-shadow(0 16px 24px rgb(23 33 43 / 14%)) brightness(.94); }
  100% { left: 50%; rotate: 0deg; scale: 1; z-index: 3; filter: drop-shadow(0 32px 48px rgb(23 33 43 / 24%)); }
}

/* Sem animação: leque parado, como antes */
@media (prefers-reduced-motion: reduce) {
  .case-hero-visual .fan-left { left: 22%; rotate: -10deg; scale: .8; z-index: 2; }
  .case-hero-visual .fan-right { left: 78%; rotate: 10deg; scale: .8; z-index: 1; }
  .case-hero-visual .fan-center { z-index: 3; }
}

/* Espaços reservados do Tap são mais altos: um pouco menores para não encostar no topo */
.case-hero-visual .slot-phone.fan { width: min(40%, 216px); }

@media (max-width: 680px) {
  .case-hero-visual .fan { width: min(52%, 200px); }
}
