/* ==========================================================================
   Our Work — rebuilt page
   Loaded only by ourwork.html. Scoped under .px-work.
   ========================================================================== */

.px-work {
  --gutter: clamp(24px, 5vw, 96px);
  background: #000;
  color: var(--px-cream);
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.px-work *,
.px-work *::before,
.px-work *::after { box-sizing: border-box; }

/* --------------------------------------------------------------- intro --- */

.px-work-intro {
  padding: clamp(70px, 11vh, 150px) var(--gutter) clamp(34px, 5vh, 56px);
  max-width: 1500px;
}

.px-work .px-eyebrow {
  font-family: "Bebas Neue", sans-serif;
  font-size: 13px;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--px-red);
  margin: 0 0 20px;
}

.px-work .px-display {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(40px, 6.4vw, 100px);
  line-height: .95;
  letter-spacing: .005em;
  text-transform: uppercase;
  margin: 0 0 22px;
  color: var(--px-cream);
}

/* .px-accent is painted as the brand mark in pixels-edits.css */

.px-work-intro p.px-lead {
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.8;
  color: var(--px-cream-soft);
  max-width: 58ch;
  margin: 0;
}

/* ------------------------------------------------------------- filters --- */

.px-filters {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 6px;
  padding: 18px var(--gutter);
  background: rgba(0, 0, 0, .9);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(226, 224, 215, .1);
  border-bottom: 1px solid rgba(226, 224, 215, .1);
}

.px-filter {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--px-cream-dim);
  font-family: "Bebas Neue", sans-serif;
  font-size: 15px;
  letter-spacing: .2em;
  text-transform: uppercase;
  padding: 8px 16px 7px;
  cursor: pointer;
  transition: color .25s ease, border-color .25s ease;
}

.px-filter span {
  font-size: 11px;
  letter-spacing: .08em;
  opacity: .6;
  margin-left: 6px;
}

.px-filter:hover { color: var(--px-cream); }

.px-filter.is-active {
  color: var(--px-cream);
  border-bottom-color: var(--px-red);
}

/* ---------------------------------------------------------------- grid --- */

.px-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: clamp(18px, 2vw, 34px);
  padding: clamp(34px, 5vh, 60px) var(--gutter) clamp(80px, 12vh, 150px);
}

.px-card {
  position: relative;
  opacity: 0;
  transform: translateY(20px);
  animation: px-card-in .6s cubic-bezier(.2,.6,.2,1) forwards;
}

@keyframes px-card-in { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .px-card { animation: none; opacity: 1; transform: none; }
}

.px-card[hidden] { display: none; }

.px-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0c0c0c;
}

/* CONTAIN, not cover. The grid is a 16:9 box but the stills are not all 16:9 —
   measured across the 59 cards: 45 are 16:9-ish, 10 ultrawide, 2 square and
   2 are VERTICAL reels. `cover` was throwing away 68% of the height of
   IMG_2809 (1101x1958) and 54% of the other reel, which is what cut the
   subject's head off on the TimeCenter card.

   The trade is real and deliberate: a 9:16 still inside a 16:9 frame can only
   occupy about a third of the width, so the reels now sit in wide pillarbox
   bars. Those bars are the card's own #0c0c0c, so they read as a deliberate
   frame rather than a gap — see .px-card__media's background. */
.px-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: saturate(.86) contrast(1.02);
  transition: transform .75s cubic-bezier(.2,.6,.2,1), filter .5s ease;
}

.px-card:hover .px-card__media img {
  transform: scale(1.06);
  filter: saturate(1) contrast(1.05);
}

/* red hairline wipes across the top of the still on hover */
.px-card__media::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  background: var(--px-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s cubic-bezier(.2,.6,.2,1);
}

.px-card:hover .px-card__media::after { transform: scaleX(1); }

.px-card__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .18);
  border: 0;
  cursor: pointer;
  opacity: 0;
  transition: opacity .35s ease, background .35s ease;
}

.px-card:hover .px-card__play,
.px-card__play:focus-visible { opacity: 1; }

.px-card__play svg {
  width: 54px;
  height: 54px;
  color: var(--px-cream);
  transition: transform .35s ease, color .35s ease;
}

.px-card__play:hover svg { transform: scale(1.12); color: var(--px-red); }

.px-card__body {
  display: block;
  padding: 16px 2px 0;
  text-decoration: none;
}

.px-card__cat {
  display: block;
  font-family: "Bebas Neue", sans-serif;
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--px-red);
  margin-bottom: 7px;
}

.px-card__title {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(17px, 1.35vw, 22px);
  letter-spacing: .035em;
  text-transform: uppercase;
  line-height: 1.25;
  margin: 0;
  color: var(--px-cream);
  transition: color .25s ease;
}

.px-card__body:hover .px-card__title { color: var(--px-red); }

.px-empty {
  grid-column: 1 / -1;
  color: var(--px-cream-dim);
  padding: 40px 0;
}

/* ------------------------------------------------------------ lightbox --- */

.px-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  place-items: center;
  padding: clamp(16px, 4vw, 60px);
  background: rgba(0, 0, 0, .94);
}

.px-lightbox[open],
.px-lightbox.is-open { display: grid; }

.px-lightbox__frame {
  width: min(1200px, 100%);
  aspect-ratio: 16 / 9;
  background: #000;
  position: relative;
}

.px-lightbox__frame iframe,
.px-lightbox__frame video {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.px-lightbox__close {
  position: absolute;
  top: -46px;
  right: 0;
  background: transparent;
  border: 0;
  color: var(--px-cream);
  font-family: "Bebas Neue", sans-serif;
  font-size: 15px;
  letter-spacing: .24em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 8px;
  transition: color .25s ease;
}

.px-lightbox__close:hover { color: var(--px-red); }

.px-lightbox__title {
  position: absolute;
  bottom: -40px;
  left: 0;
  margin: 0;
  font-family: "Bebas Neue", sans-serif;
  font-size: 15px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--px-cream-soft);
}

@media (max-width: 680px) {
  .px-grid { grid-template-columns: 1fr; }
  .px-filters { gap: 4px; padding: 14px var(--gutter); }
  .px-filter { font-size: 13px; padding: 7px 10px 6px; letter-spacing: .14em; }
  .px-card__play { opacity: 1; background: rgba(0,0,0,.12); }
  .px-card__play svg { width: 44px; height: 44px; }
}
