/* ==========================================================================
   Work: a contact sheet. Every piece gets the same label schema (client,
   piece, category, format, length), because the schema is what makes it a
   collection and not a wall of thumbnails.
   ========================================================================== */

.work main { padding-top: 0; }
.wk-bar, .wk-sec, .wk-next, .wk-empty { width: min(100% - 2 * var(--gutter), 1680px); margin-inline: auto; }

.wk-title { margin-top: 12px; font-size: clamp(2.4rem, 1.2rem + 4.6vw, 6.2rem); line-height: 1; letter-spacing: -0.035em; text-wrap: balance; }
.wk-lede { margin-top: clamp(18px, 2.4vh, 28px); max-width: 44ch; }
.wk-bar { padding-top: clamp(36px, 6vh, 64px); text-align: center; }
.wk-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px 44px; }
.wk-filters fieldset { display: grid; justify-items: center; }
.wk-filters .chips, .wk-client { justify-content: center; }
.wk-filters legend { margin-bottom: 10px; }
.chip i { font-style: normal; font-size: 0.8125rem; color: var(--ash); margin-left: 6px; }
.chip input:checked + span i { color: color-mix(in oklab, var(--blackout) 55%, transparent); }
.wk-client { display: flex; align-items: center; gap: 14px; margin-top: 18px; color: var(--ash); }
.wk-client b { color: var(--bone); font-weight: 600; }
.wk-client[hidden] { display: none; }

.wk-sec { padding-top: clamp(44px, 8vh, 96px); }
.wk-sec[hidden] { display: none; }
.wk-sec__h {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: 12px; margin-bottom: 22px; border-bottom: 1px solid var(--line);
  font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--bone);
}
.wk-sec__h span { color: var(--ash); }

.wk-grid { display: grid; gap: 34px 16px; }
.wk-grid--v { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wk-grid--h { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .wk-grid--v { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 720px) { .wk-grid--h { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .wk-grid--v { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 20px; } }
@media (min-width: 1300px) { .wk-grid--v { grid-template-columns: repeat(5, minmax(0, 1fr)); } .wk-grid--h { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.piece[hidden] { display: none; }
.piece { view-transition-name: var(--vt); }
.piece__a { display: grid; gap: 14px; text-decoration: none; color: inherit; border-radius: 12px; }
.piece__a:hover { color: inherit; }
.piece__media {
  position: relative; display: block; overflow: hidden; isolation: isolate;
  aspect-ratio: 9 / 16; border-radius: 10px; background: var(--surface);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 16px 32px -18px rgb(0 0 0 / 0.8);
}
.wk-grid--h .piece__media { aspect-ratio: 16 / 9; }
.piece__media::after {
  content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.08), inset 0 0 0 1px rgb(255 255 255 / 0.05);
}
.piece__media > img, .piece__media > video {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover;
  transition: transform 520ms var(--ease);
}
.piece__media > video { z-index: 1; opacity: 0; transition: opacity 180ms var(--ease), transform 520ms var(--ease); }
.piece.is-previewing .piece__media > video { opacity: 1; }
.piece__bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; height: 2px; background: var(--tally);
  transform-origin: 0 50%; transform: scaleX(var(--pp, 0));
}
@media (hover: hover) and (pointer: fine) {
  .piece__a:hover .piece__media > img, .piece__a:hover .piece__media > video { transform: scale(1.025); }
}
.piece__label { display: grid; gap: 2px; }
.piece__label b { font-weight: 600; font-size: 1rem; }
.piece__title { color: color-mix(in oklab, var(--bone) 82%, var(--ash)); font-size: 0.9375rem; line-height: 1.4; }
.piece__label .meta { margin-top: 6px; font-size: 0.6875rem; }
.piece__a:focus-visible { outline-offset: 6px; }
.piece__a:active .piece__media { transform: scale(0.99); }

/* entrance: fires once, staggered within a row */
@media (scripting: enabled) {
  .piece { opacity: 0; transform: translateY(14px); transition: opacity 620ms var(--ease), transform 620ms var(--ease); transition-delay: calc(var(--i, 0) * 45ms); }
  .piece.is-in { opacity: 1; transform: none; }
}

.wk-empty { padding-top: 48px; color: var(--ash); }
.wk-empty[hidden] { display: none; }
.link-btn { color: var(--bone); text-decoration: underline; text-underline-offset: 0.22em; font-weight: 600; }

.wk-next { display: grid; justify-items: center; text-align: center; gap: 18px; padding-block: clamp(96px, 16vh, 180px); }
.wk-next .lede { max-width: 48ch; margin-inline: auto; color: var(--ash); }

/* ---------------------------------------------------------------- player -- */
.player {
  width: min(100vw - 24px, 1180px); max-width: none; max-height: calc(100svh - 24px);
  padding: 0; border: 0; background: transparent; color: var(--bone); overflow: visible;
}
.player::backdrop { background: rgb(8 8 9 / 0.985); }
.player[open] { animation: nk-player 260ms var(--ease); }
@keyframes nk-player { from { opacity: 0; transform: scale(0.97); } }
.player__frame { display: grid; place-items: center; }
.player__video {
  display: block; max-width: 100%; max-height: calc(100svh - 168px);
  border-radius: 12px; background: #000;
}
.player[data-format="v"] .player__video { height: calc(100svh - 168px); width: auto; aspect-ratio: 9 / 16; }
.player[data-format="h"] .player__video { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.player__info { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-top: 18px; }
.player__title { margin-top: 4px; color: color-mix(in oklab, var(--bone) 84%, var(--ash)); }
.player__meta { margin-top: 6px; }
.player__nav { display: flex; gap: 8px; }

@media (max-width: 639px) {
  .wk-grid--v { gap: 26px 12px; }
  .piece__label b { font-size: 0.9375rem; }
  .player__video, .player[data-format="v"] .player__video { max-height: calc(100svh - 200px); }
  .player__nav { width: 100%; }
  .player__nav .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .piece { opacity: 1; transform: none; transition: none; }
  .player[open] { animation: none; }
  .piece__media > img, .piece__media > video { transition: none; }
}

/* Phones: centred composition, equal gutters. */
@media (max-width: 899px) {
  .wk-head { text-align: center; }
  .wk-lede { margin-inline: auto; }
  .wk-filters { justify-content: center; }
  .wk-filters fieldset { justify-items: center; }
  .wk-filters .chips, .wk-client { justify-content: center; }
  .piece__label { text-align: center; }
  .wk-next { justify-items: center; text-align: center; }
  .wk-next .lede { margin-inline: auto; }
  .work .foot, .work .foot__cols { text-align: center; justify-items: center; }
  .work .foot__small { justify-content: center; }
}

/* -------------------------------------------------------------- the wall --
   Five columns of vertical frames from the work, each drifting at its own
   depth; the house reel plays in the middle column. */
.vhero--work { min-height: 100svh; }
.wall { position: absolute; inset: -18% -6%; z-index: -2; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.wall__col { display: grid; gap: 14px; align-content: start; will-change: transform; }
.wall__col:nth-child(even) { margin-top: -22%; }
.wall__col img, .wall__live { display: block; width: 100%; aspect-ratio: 9 / 16; object-fit: cover; max-width: none; height: auto; border-radius: 16px; filter: brightness(0.55) saturate(0.85); }
.wall__live { position: relative; overflow: hidden; filter: none; box-shadow: 0 0 0 2px var(--tally), 0 30px 60px -20px rgb(0 0 0 / 0.8); }
.wall__live img, .wall__live video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 0; filter: brightness(0.8); }
.wall__live video { opacity: 0; transition: opacity 600ms var(--ease); }
.wall__live video.is-live { opacity: 1; }
.piece__label { text-align: center; justify-items: center; }
@media (max-width: 899px) {
  .wall { grid-template-columns: repeat(3, minmax(0, 1fr)); inset: -10% -30%; gap: 10px; }
  .wall__col { gap: 10px; }
  .wall__col:nth-child(1), .wall__col:nth-child(5) { display: none; }
  .vhero--work .vhero__actions .btn { flex: 1 1 100%; }
}
