/* Layer the original photograph without a pointer-driven camera. */
.cinema-intro > .atrium-art {
  --atrium-photo: url('/hero/courtyard-hero.webp') var(--atrium-position, center) / cover no-repeat;
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: clip;
  pointer-events: none;
}

.atrium-art > div {
  position: absolute;
  inset: 0;
}

.atrium-depth {
  background:
    radial-gradient(ellipse at 50% 50%, #1a100b85 0%, #1a100b45 44%, transparent 73%),
    linear-gradient(180deg, #20140dcd 0%, #20140d98 76px, #1a110c10 23%, #1d120c4d 66%, #140d09bc 100%),
    var(--atrium-photo);
  transform: scale(1.04);
}

.atrium-wing--left {
  --wing-travel: -47%;
  clip-path: polygon(0 0, 23% 0, 29% 30%, 25% 58%, 38% 100%, 0 100%);
  background:
    linear-gradient(107deg, #1c1511c2 0%, #2b1b1469 21%, #24150f2e 39%),
    linear-gradient(0deg, #140c09db, transparent 73%),
    var(--atrium-photo);
}

.atrium-wing--right {
  --wing-travel: 47%;
  clip-path: polygon(78% 0, 100% 0, 100% 100%, 66% 100%, 76% 61%, 71% 30%);
  background:
    linear-gradient(255deg, #24180fc7 0%, #34241a8a 20%, #271b1345 36%),
    linear-gradient(0deg, #150d0ae0, transparent 72%),
    var(--atrium-photo);
}

@media (prefers-reduced-motion: no-preference) {
  /* The near planes stay in front of the next scene as the deeper image recedes. */
  #home .cinema-scenes[data-cinema-transition="atrium"] > .cinema-intro {
    z-index: 3;
    background: transparent;
  }

  [data-cinema-transition="atrium"] > .cinema-intro[data-cinema-outgoing] .atrium-depth {
    animation: atrium-push 480ms cubic-bezier(.22, 1, .36, 1) both, atrium-depth-fade 420ms ease both;
  }

  [data-cinema-transition="atrium"][data-cinema-backward] > .cinema-intro[data-cinema-active] .atrium-depth {
    animation: atrium-push 480ms cubic-bezier(.22, 1, .36, 1) reverse both, atrium-depth-fade 420ms ease reverse both;
  }

  [data-cinema-transition="atrium"] > .cinema-intro[data-cinema-outgoing] .atrium-wing {
    animation: atrium-planes-open 480ms cubic-bezier(.22, 1, .36, 1) both;
  }

  [data-cinema-transition="atrium"][data-cinema-backward] > .cinema-intro[data-cinema-active] .atrium-wing {
    animation: atrium-planes-open 480ms cubic-bezier(.22, 1, .36, 1) reverse both;
  }
}

@keyframes atrium-push {
  from { transform: scale(1.04); }
  to { transform: scale(1.18); }
}

@keyframes atrium-depth-fade {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes atrium-planes-open {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(var(--wing-travel), -5%, 0); }
}
