.moving-page {
  --paper: #f4f2ec;
  --ink: #30312d;
  --label-ink: #50514b;
  --gutter: clamp(10px, 1.05vw, 17px);
  background: var(--paper);
  min-height: 100vh;
  max-width: 1680px;
  padding: 19px 3.15vw 44px;
}

.moving-page .header {
  position: relative;
  flex-direction: row;
  align-items: flex-start;
  min-height: 42px;
  gap: 24px;
  margin-bottom: 26px;
}

.moving-page .wordmark {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: clamp(22px, 1.82vw, 29px);
  letter-spacing: .12em;
  line-height: 1.1;
}

.moving-page .header nav {
  width: auto;
  margin-left: auto;
  gap: clamp(24px, 3.2vw, 52px);
  padding-right: clamp(36px, 7.2vw, 115px);
}

.moving-page .header nav a,
.moving-page .filters a[data-filter],
.moving-page figcaption {
  font-family: 'Plex Mono', Menlo, monospace;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .105em;
  color: var(--label-ink);
  line-height: 1.5;
}

.moving-page .header nav a { padding: 1px 0 9px; }
.moving-page a[aria-current='page'] {
  text-decoration-thickness: 1px;
  text-underline-offset: 10px;
  text-decoration-color: #87877e;
}

.header-dot {
  position: absolute;
  right: 3px;
  top: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink);
}

.moving-page .filters {
  gap: clamp(24px, 3.55vw, 57px);
  margin-bottom: 22px;
}
.moving-page .filters a[data-filter] { padding: 5px 0 7px; }
.moving-page .filters a[data-filter][aria-current='page'] { border-color: #77786e; }
.moving-page .filters a[data-filter]:hover { color: #20211e; }

.moving-page .film-grid {
  container-type: inline-size;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px var(--gutter);
  align-items: start;
}
.moving-page .film:nth-child(n) {
  display: block;
  grid-column: span 1;
  min-width: 0;
}
.moving-page .film[data-featured="true"] { grid-column: span 2; }
.moving-page .film:nth-child(n) .reserved {
  display: block;
  overflow: hidden;
  min-height: 0;
  height: auto;
  aspect-ratio: 16 / 9;
  background: #deddd4;
}
.moving-page .film[data-featured="true"] .reserved { aspect-ratio: 2.2; }
.moving-page .film .reserved > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* The supplied Thomas thumbnail includes baked in letterbox bars. Crop only this card. */
.moving-page .film[data-vimeo-id="242773071"] .reserved > img {
  transform: scale(1.5);
}
.moving-page .film .reserved { position: relative; }
.moving-page .film .hover-still {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease;
}
.moving-page .film .reserved > video.hover-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.moving-page .film .still-sequence {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
}
.moving-page .film .still-sequence img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}
.moving-page .film .still-sequence img.is-current { opacity: 1; }
.moving-page .film .reserved.is-still-sequence-active .still-sequence { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .moving-page .film .reserved:hover .hover-still:not(.hover-video),
  .moving-page .film .reserved:focus-visible .hover-still:not(.hover-video) { opacity: 1; }
}
.moving-page .film .reserved.is-auto-gif-active > img.hover-still.hover-gif { opacity: 1; }
.moving-page .film .reserved.is-hover-video-active > .hover-video { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .moving-page .film .hover-still,
  .moving-page .film .still-sequence { display: none; }
}
.moving-page .film figcaption {
  display: block;
  margin-top: 9px;
  min-height: 35px;
  line-height: 1.45;
}
.moving-page .film-client {
  display: block;
  text-transform: uppercase;
  font-weight: 500;
  font-size: clamp(10px, .72vw, 12px);
  letter-spacing: .1em;
  color: #494a44;
}
.moving-page .film .film-title {
  display: block;
  margin-top: 2px;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: clamp(12px, .8vw, 13px);
  font-weight: 400;
  font-style: italic;
  letter-spacing: .025em;
  line-height: 1.4;
  color: #77766e;
}
.moving-page .film figcaption a {
  display: grid;
  grid-template-columns: 15px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 8px;
  width: fit-content;
}
.moving-page .film figcaption a::before {
  content: '+';
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--ink);
  font: 300 20px/.8 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
.moving-page .film-client {
  grid-column: 2;
  grid-row: 1;
}
.moving-page .film .film-title {
  grid-column: 2;
  grid-row: 2;
  margin-top: 2px;
}
.moving-page .film a:hover { text-decoration: none; }
.moving-page figcaption a:hover .film-client { text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 1000px) {
  .moving-page .film-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 24px; }
  .moving-page .film:nth-child(n) { grid-column: span 1; }
  .moving-page .film[data-featured="true"] { grid-column: span 2; }
  .moving-page .film:nth-child(n) .reserved { height: auto; aspect-ratio: 16 / 9; }
  .moving-page .film[data-featured="true"] .reserved { aspect-ratio: 2.2; }
}

@media (max-width: 640px) {
  .moving-page { padding: 23px 20px 36px; }
  .moving-page .header { flex-direction: column; gap: 23px; margin-bottom: 25px; }
  .moving-page .header nav { width: 100%; margin-left: 0; gap: 28px; padding-right: 0; }
  .moving-page .filters { gap: 12px 23px; }
  .moving-page .header nav a, .moving-page .filters a[data-filter] { font-size: 11px; }
  .moving-page .film-client { font-size: 10px; }
  .moving-page .film figcaption a { grid-template-columns: 13px minmax(0, 1fr); column-gap: 7px; }
  .moving-page .film figcaption a::before { font-size: 18px; }
  .moving-page .film-grid { padding-top: 22px; }
  .moving-page .film::before { top: -22px; font-size: 26px; }
  .moving-page .film-grid::after { top: 1px; font-size: 26px; }
}
@media (max-width: 520px) {
  .moving-page { padding-inline: 18px; }
  .moving-page .film-client { font-size: 11px; }
}

/* Award names and graphic marks over the film image. */
.moving-page .film .film-recognition{
  position:absolute;left:50%;bottom:5%;z-index:2;
  transform:translateX(-50%);display:flex;gap:5%;
  width:52%;max-width:370px;align-items:center;
  padding:0;pointer-events:none;opacity:.96;
}
.moving-page .film .film-recognition img{
  display:block;min-width:0;flex:1;width:28%;height:auto;object-fit:contain;
}
.moving-page .film .film-recognition img:only-child{
  flex:none;width:28%;margin-inline:auto;
}
.moving-page .film[data-vimeo-id="282684161"] .film-recognition img:only-child,
.moving-page .film[data-vimeo-id="375927157"] .film-recognition img:only-child,
.moving-page .film[data-vimeo-id="99552867"] .film-recognition img:only-child{
  width:36%;min-width:80px;
}
.moving-page .film[data-vimeo-id="99552867"] .film-recognition img:only-child{
  width:28%;min-width:0;max-width:92px;
}
.moving-page .film[data-vimeo-id="99552867"] .reserved > img{
  object-position:50% 50%;
}
@media(max-width:600px){
  .moving-page .film[data-vimeo-id="99552867"] .film-recognition img:only-child{width:42%}
}

.moving-page .film[data-vimeo-id="357798322"] .reserved .hover-still{
  filter:saturate(1.22) contrast(1.09) brightness(.98);
}

.moving-page .film[data-vimeo-id="136204259"] .film-recognition{width:58%;max-width:230px;gap:4%}
.moving-page .film[data-vimeo-id="1178816614"] .film-recognition{width:77%;max-width:490px;gap:2%}
.moving-page .film[data-featured="true"][data-vimeo-id="1178816614"] .film-recognition{width:87%;max-width:590px}
@media(max-width:600px){.moving-page .film[data-vimeo-id="1178816614"] .film-recognition{width:92%}}

/* Keep the opening frame generous while leaving a glimpse of the row below. */
@media (min-width: 1001px) {
  .portfolio-page.moving-page {
    max-width: 1540px;
    padding-inline: clamp(34px, 4.3vw, 70px);
  }

  .moving-page .film[data-featured="true"] .reserved {
    aspect-ratio: 3;
  }

  /* On shorter screens the opening film gives way, so the two films below it show,
     but it never gets thinner than 3.3:1. */
  .moving-page .film[data-lead="true"] .reserved {
    aspect-ratio: auto;
    height: min(calc((min(1540px, 100vw) - 2 * clamp(34px, 4.3vw, 70px)) / 3), max(calc((min(1540px, 100vw) - 2 * clamp(34px, 4.3vw, 70px)) / 3.3), calc(100svh - 402px)));
  }
}

.moving-page .film[data-vimeo-id="1142071420"] .film-client { text-transform: none; }

/* Keep the dancer and the floor in the wide opening frame. */
@media (min-width: 1001px) {
  .moving-page .film[data-vimeo-id="1142071420"] .reserved > img {
    object-position: 50% 75%;
  }

  /* The hover GIF has different framing from the static image. */
  .moving-page .film[data-vimeo-id="1142071420"] .reserved > .hover-video.hover-gif {
    object-position: 50% 20%;
  }
}

/* The Mullen frame is wider than a card, so retain its full front profile. */
.moving-page .film[data-vimeo-id="903024101"] .reserved > img {
  object-position: 6% 50%;
}

.moving-page .film[data-vimeo-id="903024101"] .reserved > .hover-video {
  object-position: 50% 50%;
}

/* Crop the baked letterbox from the Hennessy thumbnail only. */
.moving-page .film[data-vimeo-id="399420221"] .reserved > img { transform: scale(1.35); }
.moving-page .film[data-vimeo-id="399420221"]:hover .reserved > img { transform: scale(1.384); }

/* Keep the hover sequence opaque and switch frames without interpolation. */
.moving-page .film .still-sequence { padding: 0; background: #171917; }
.moving-page .film .still-sequence img { visibility: hidden; transition: none; transform: none; filter: none; }
.moving-page .film .still-sequence img.is-current { visibility: visible; }
/* Keep the poster painted underneath the opaque sequence, including after pointer exit. */
.moving-page .film .reserved[data-still-sequence] > img { visibility: visible; }
