:root {
  --film-radius: clamp(12px, 1.6vw, 22px);
  --film-ease: cubic-bezier(.22, .7, .24, 1);
}

/* Agency work thumbnails sit directly on the production desk. */
.work-shelf .work-item + .work-item {
  border: 0;
  padding: 0;
}
.work-shelf .work-item img,
#content-body .agency-work-item figure img {
  display: block;
  border: 0;
  border-radius: var(--film-radius);
  box-shadow: 0 4px 14px #18263a15;
}
.context-work {
  border: 0;
  border-radius: var(--film-radius);
}

/* Cinema's floating archive frames keep the selected film legible at an angle. */
.perspective-surface {
  border: 0;
  border-radius: var(--film-radius);
}
.perspective-panel {
  padding: 0;
  border: 0;
  border-radius: var(--film-radius);
  overflow: hidden;
  box-shadow: 0 9px 28px #26331b2b;
  transition: transform 480ms var(--film-ease), opacity 300ms ease, box-shadow 300ms ease;
}
.perspective-panel[aria-pressed="true"] { box-shadow: 0 15px 40px #26331b45; }
.perspective-panel img { display: block; }
.perspective-panel > span { padding-inline: clamp(12px, 2vw, 20px); }
.perspective-panel[aria-pressed="true"] > span { font-weight: 700; }

.work-image,
.archive-tile img,
.film-index img,
#player,
.continuation-work > a { border-radius: var(--film-radius); }
.archive-strip button { border-radius: 12px; }
.continuation-work > a {
  border: 0;
  box-shadow: 0 6px 18px #0002;
}

/* Keep the film at its original ratio, with controls inside the viewing area. */
#film-dialog {
  border: 0;
  border-radius: clamp(15px, 2vw, 26px);
}
.film-media :is(video, iframe) { aspect-ratio: 16 / 9; }
.film-media video { object-fit: contain; }

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .work-shelf .work-item img,
  #content-body .agency-work-item figure img {
    transition: transform 340ms var(--film-ease), filter 340ms ease, box-shadow 340ms ease;
  }
  .work-shelf .work-item:hover img,
  #content-body .agency-work-item:hover figure img {
    transform: translateY(-1px);
    box-shadow: 0 7px 19px #18263a26;
  }
  .work-image img { transition: transform 480ms var(--film-ease); }
  .work-image:hover img { transform: scale(1.018); }
  .archive-strip button { transition: transform 260ms var(--film-ease), border-color 260ms ease; }
  .archive-strip img { transition: opacity 260ms ease; }
}
@media (prefers-reduced-motion: no-preference) {
  #film-dialog[open], #player-dialog[open] { animation: film-appear 180ms ease-out; }
}
@keyframes film-appear {
  from { opacity: .72; }
  to { opacity: 1; }
}

.motion-reduced .work-shelf .work-item img,
.motion-reduced #content-body .agency-work-item figure img,
body:has(#motion-toggle[aria-pressed="true"]) .archive-strip button {
  transition: none;
  transform: none;
}
body:has(#motion-toggle[aria-pressed="true"]) .archive-strip img { transition: none; }
body:has(#motion-toggle[aria-pressed="true"]) #player-dialog[open] { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .perspective-panel, .work-image img, .work-shelf .work-item img { transition: none; }
  .work-shelf .work-item:hover img, .work-image:hover img { transform: none; }
}
