/* a picture that turns a little to face the mouse, with a sheen from a light fixed up and to the left (sheen.js; 2 Dec 2026):
   the Films posters, every card (art, games, tutorials) and the photo on About. --tx and --ty (-1 to 1) are the pointer's place */
.tilt-host{position:relative;--persp:900px;--ax:6deg;--ay:4deg}
.tilt-poster{--persp:520px;--ax:9deg;--ay:6deg}
.tilt-pic{position:relative;overflow:hidden}
.tilt-box{display:block;line-height:0;align-self:start}
.tilt-photo .tilt-box,.tilt-cover .tilt-box{box-shadow:4px 4px 0 var(--shadow)}
.tilt-photo .tilt-box img,.tilt-cover .tilt-box img{box-shadow:none}
@media (max-width:640px){.tilt-photo .tilt-box{display:inline-block;box-shadow:3px 3px 0 var(--shadow)}}
.tilt-ep{--persp:600px;--ax:8deg;--ay:6deg}
/* a tutorial's video, once it plays, stays still and plain */
.tilt-video .video:not(:has(button)){transform:none!important;box-shadow:3px 3px 0 var(--shadow)!important}
.tilt-video .video:not(:has(button))::before,.tilt-video .video:not(:has(button))::after{display:none}

/* lifted and turned towards the mouse, its shadow falling away (the doubled class outweighs the engine's own poster hover) */
@media (prefers-reduced-motion:no-preference) and (hover:hover){
  .tilt-pic.tilt-pic{transition:transform .14s ease-out,box-shadow .14s ease-out,outline-color .2s}
  .card.tilt-host:hover{transform:none}
  .tilt-host:hover .tilt-pic.tilt-pic.tilt-pic{transform:perspective(var(--persp)) rotateY(calc(var(--tx,0) * var(--ax))) rotateX(calc(var(--ty,0) * -1 * var(--ay))) translateY(-4px);
    box-shadow:calc(5px - var(--tx,0) * 4px) calc(7px - var(--ty,0) * 3px) 0 var(--shadow)}
}

/* the sheen: a faint wash from the light's corner, and a diagonal band of gloss resting near it. Lifted, the band sweeps in to
   the middle and brightens; turning the picture slides it across, brighter towards the light */
.tilt-pic::after{content:"";position:absolute;inset:0;z-index:2;pointer-events:none;mix-blend-mode:soft-light;
  background:linear-gradient(135deg,rgba(255,255,255,.2) 0%,rgba(255,255,255,0) 45%)}
.tilt-pic::before{content:"";position:absolute;inset:0;z-index:2;pointer-events:none;mix-blend-mode:soft-light;
  background:linear-gradient(118deg,rgba(255,255,255,0) 34%,rgba(255,255,255,.75) 45%,rgba(255,255,255,0) 56%) no-repeat;background-size:250% 250%;
  background-position:76% 76%;opacity:.35;transition:background-position .3s ease-out,opacity .3s ease-out}
@media (hover:hover){.tilt-host:hover .tilt-pic::before{
  background-position:calc(50% + (var(--tx,0) + var(--ty,0)) * 15%) calc(50% + (var(--tx,0) + var(--ty,0)) * 15%);
  opacity:calc(.8 - (var(--tx,0) + var(--ty,0)) * .12);transition:background-position .14s ease-out,opacity .14s ease-out}}
@media (prefers-reduced-motion:reduce){.tilt-pic::before{transition:none}}
