/* The airframe is viewed from below its port wing. Cut the outdoor
   screen and wooden rim out of the sky layer so the airplane passes behind. */
.cinema-flypast {
  position:absolute; inset:0; pointer-events:none; overflow:hidden;
  --left:calc(var(--screen-left) - .32%);
  --right:calc(var(--screen-left) + var(--screen-width) + .32%);
  --top:calc(var(--screen-top) - .45%);
  --bottom:calc(var(--screen-top) + var(--screen-height) + .45%);
  clip-path:polygon(0 0,100% 0,100% 100%,var(--right) 100%,var(--right) var(--top),var(--left) var(--top),var(--left) var(--bottom),var(--right) var(--bottom),var(--right) 100%,0 100%);
}
.cinema-quadroplane {
  position:absolute; display:block; left:8%; top:2%; width:13%; aspect-ratio:320/258;
  overflow:hidden; transform-origin:58% 55%;
}
.cinema-quadroplane::before {
  content:''; display:block; width:800%; height:100%;
  background:url("assets/film/drive-in-quadroplane.webp") center / 100% 100% no-repeat;
}
.home-cinema.is-enlarged .cinema-flypast { display:none }
@media(prefers-reduced-motion:no-preference){
  .cinema-quadroplane { animation:drive-in-crossing 24s linear -5.6s infinite paused }
  .cinema-quadroplane::before { animation:drive-in-propeller .45s steps(8,end) infinite paused }
  .cinema-flypast.in-view .cinema-quadroplane,
  .cinema-flypast.in-view .cinema-quadroplane::before { animation-play-state:running }
  @keyframes drive-in-crossing {
    0%   { left:-19%; top:12%; transform:scale(.81) rotate(-3deg) }
    24%  { left:9%;   top:1%;  transform:scale(.89) rotate(-2deg) }
    45%  { left:35%;  top:.5%; transform:scale(.94) rotate(.5deg) }
    67%  { left:63%;  top:16%; transform:scale(.92) rotate(2deg) }
    84%  { left:85%;  top:12%; transform:scale(.83) rotate(-2deg) }
    100% { left:105%; top:5%;  transform:scale(.77) rotate(-2deg) }
  }
  @keyframes drive-in-propeller { to { transform:translateX(-100%) } }
}
@media(max-width:640px){
  .cinema-quadroplane { width:18%; top:.4%; left:12% }
}
