/* Work page styles, tuned to a dark Ben Mauro-like layout */

.work-page {
  background: #040404;
  color: #fff;
}

.work-container {
  max-width: 1500px;
  margin: 0 auto;
  padding: calc(92px + env(safe-area-inset-top)) 20px 84px;
}

.work-hero {
  max-width: 760px;
  margin: 0 auto 28px;
  text-align: center;
}

.work-kicker {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.55);
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 2.8px;
  text-transform: uppercase;
}

.work-title {
  margin: 0;
  color: #fff;
  font-family: 'League Spartan', 'Anton', sans-serif;
  font-size: clamp(44px, 7vw, 82px);
  line-height: 0.88;
  letter-spacing: -0.05em;
}

.work-subtitle {
  margin: 12px auto 0;
  color: rgba(255, 255, 255, 0.68);
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  line-height: 1.7;
  max-width: 610px;
}

.work-featured {
  margin-bottom: 10px;
}

.work-featured-card,
.work-card {
  position: relative;
  overflow: hidden;
  background: #0b0b0b;
  transition: box-shadow 220ms ease;
  cursor: pointer;
}

.work-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.work-featured-card img,
.work-card img,
.work-featured-card video,
.work-card video,
.work-featured-card iframe,
.work-card iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  transition: transform 420ms ease, filter 420ms ease;
  filter: saturate(0.92) contrast(1.03);
  pointer-events: none;
}

.work-media-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 1;
  transition: opacity 220ms ease;
}

.work-featured-card video,
.work-card video,
.work-featured-card iframe,
.work-card iframe {
  z-index: 1;
}

.work-featured-card.media-ready .work-media-fallback,
.work-card.media-ready .work-media-fallback {
  opacity: 0;
}

.work-featured-card.media-failed video,
.work-card.media-failed video,
.work-featured-card.media-failed iframe,
.work-card.media-failed iframe {
  opacity: 0;
}

.work-featured-card iframe,
.work-card iframe {
  position: absolute;
  inset: auto;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: auto;
  height: 100%;
  aspect-ratio: 16 / 9;
  min-width: 100%;
  min-height: 100%;
}

.work-featured-card {
  border-radius: 0;
  min-height: min(58vw, 760px);
}

.work-featured-card .work-overlay {
  inset: auto 0 0 0;
  padding: 24px 24px 20px;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 52px;
}

.work-card {
  min-height: 300px;
}

.work-card--wide {
  grid-column: span 6;
  min-height: 380px;
}

.work-card--third {
  grid-column: span 4;
  min-height: 320px;
}

.work-card:hover img,
.work-featured-card:hover img {
  transform: scale(1.02);
  filter: saturate(1.02) contrast(1.06);
}

.work-card:hover video,
.work-featured-card:hover video {
  transform: scale(1.02);
  filter: saturate(1.02) contrast(1.06);
}

.work-card:hover iframe,
.work-featured-card:hover iframe {
  transform: translate(-50%, -50%) scale(1.02);
  filter: saturate(1.02) contrast(1.06);
}

.work-featured-card,
.work-card {
  isolation: isolate;
}

.work-featured-card::after,
.work-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 0.5px solid transparent;
  box-shadow: inset 0 0 0 1px transparent;
  pointer-events: none;
  opacity: 0;
  transition: opacity 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.work-featured-card:hover::after,
.work-card:hover::after {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.96);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.95);
}

.work-overlay {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: 20px 18px 16px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.72) 100%);
  display: grid;
  gap: 4px;
}

.work-index {
  color: #fff;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.work-overlay h2 {
  margin: 0;
  color: #fff;
  font-family: 'League Spartan', 'Anton', sans-serif;
  font-size: clamp(16px, 1.8vw, 26px);
  line-height: 1;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  max-width: calc(100% - 8px);
  overflow-wrap: anywhere;
}

.work-card--wide .work-overlay h2,
.work-featured-card .work-overlay h2 {
  font-size: clamp(16px, 2vw, 28px);
}

.work-overlay p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  max-width: calc(100% - 8px);
  overflow-wrap: anywhere;
}

.work-index-section {
  margin-top: 28px;
  padding-top: 34px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.work-index-head {
  text-align: center;
  margin-bottom: 22px;
}

.work-index-head h2 {
  margin: 0;
  color: #fff;
  font-family: 'League Spartan', 'Anton', sans-serif;
  font-size: clamp(34px, 5vw, 66px);
  letter-spacing: -0.04em;
  line-height: 0.9;
}

.work-table {
  display: grid;
  gap: 6px;
}

.work-table-row {
  display: grid;
  grid-template-columns: 72px 1.8fr 1.1fr 120px 28px;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 1.1px;
  color: rgba(255, 255, 255, 0.78);
  position: relative;
  align-items: center;
}

.work-table-link {
  color: inherit;
  text-decoration: none;
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.work-table-link:hover {
  color: #fff;
  background: transparent;
}

.work-table-link:hover,
.work-table-link:focus-visible {
  background-color: transparent;
}

.work-table-link>span {
  display: block;
  width: 100%;
  padding: 6px 8px;
}

.work-table-link>span:nth-child(1),
.work-table-link>span:nth-child(2),
.work-table-link>span:nth-child(3),
.work-table-link>span:nth-child(4) {
  transition: background-color 180ms ease, color 180ms ease;
}

.work-table-link>span:nth-child(2) {
  width: auto;
  justify-self: start;
  display: inline-block;
  padding-right: 6px;
}

.work-table-link:hover>span:nth-child(1),
.work-table-link:hover>span:nth-child(2),
.work-table-link:hover>span:nth-child(3),
.work-table-link:hover>span:nth-child(4),
.work-table-link:focus-visible>span:nth-child(1),
.work-table-link:focus-visible>span:nth-child(2),
.work-table-link:focus-visible>span:nth-child(3),
.work-table-link:focus-visible>span:nth-child(4) {
  background: transparent;
  color: inherit;
}

.work-table-link:hover>span:nth-child(3),
.work-table-link:focus-visible>span:nth-child(3) {
  display: inline-block;
  width: auto;
  justify-self: start;
}

.work-table-link:hover>span:nth-child(2),
.work-table-link:focus-visible>span:nth-child(2) {
  padding-right: 4px;
}

.work-table-link:hover>span:nth-child(4),
.work-table-link:focus-visible>span:nth-child(4) {
  background: transparent;
  color: inherit;
}

.work-table-link:hover .work-table-icon,
.work-table-link:focus-visible .work-table-icon {
  opacity: 1;
  transform: translateX(0);
}

.work-table-icon {
  justify-self: end;
  align-self: center;
  width: auto;
  height: auto;
  border: none;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  line-height: 1;
  opacity: 0;
  transition: opacity 180ms ease, transform 180ms ease, color 180ms ease;
  pointer-events: none;
}

.work-table-link:hover .work-table-icon,
.work-table-link:focus-visible .work-table-icon {
  color: #fff;
  background: transparent;
}

.work-table-row--head {
  color: rgba(255, 255, 255, 0.46);
  text-transform: uppercase;
}

.work-table-row span:last-child {
  text-align: right;
}

.work-signoff {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.work-signoff-top {
  margin: 0;
  color: #fff;
  font-family: 'League Spartan', 'Anton', sans-serif;
  font-size: clamp(56px, 12vw, 150px);
  line-height: 0.88;
  letter-spacing: -0.07em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
}

.work-signoff-bottom {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: rgba(255, 255, 255, 0.72);
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

@media (max-width: 1100px) {

  .work-card--wide,
  .work-card--third {
    grid-column: span 6;
  }
}

@media (max-width: 760px) {
  .work-container {
    padding: calc(64px + env(safe-area-inset-top)) 16px 72px;
  }

  .work-hero {
    text-align: left;
    margin-bottom: 22px;
  }

  .work-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 38px;
  }

  .work-card--wide,
  .work-card--third {
    grid-column: span 1;
    min-height: 260px;
  }

  .work-featured-card {
    min-height: 420px;
  }

  .work-featured-card video,
  .work-card video {
    top: 0;
    left: 0;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: none;
  }

  .work-index-section {
    margin-top: 22px;
    padding-top: 26px;
  }

  .work-index-head {
    margin-bottom: 18px;
    text-align: center;
  }

  .work-kicker {
    margin-bottom: 10px;
    font-size: 10px;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.72);
  }

  .work-index-head h2 {
    display: block;
    padding: 0;
    background: transparent;
    color: #fff;
    font-size: clamp(30px, 10vw, 44px);
    line-height: 0.9;
    letter-spacing: -0.05em;
  }

  .work-table {
    gap: 0;
  }

  .work-table-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 12px 0;
    align-items: start;
  }

  .work-table-row--head {
    display: none;
  }

  .work-table-row--head span:nth-child(3),
  .work-table-row--head span:nth-child(4) {
    display: none;
  }

  .work-table-link>span {
    padding: 0;
    border: 0;
    background: transparent;
  }

  .work-table-link>span:nth-child(1) {
    display: none;
  }

  .work-table-link>span:nth-child(2),
  .work-table-link>span:nth-child(3),
  .work-table-link>span:nth-child(4) {
    display: block;
    width: 100%;
    max-width: 100%;
    justify-self: start;
    color: rgba(255, 255, 255, 0.78);
    font-size: 10px;
    line-height: 1.45;
    letter-spacing: 0.8px;
    text-transform: uppercase;
  }

  .work-table-link>span:nth-child(2) {
    color: #fff;
    font-size: 11px;
    letter-spacing: 0.9px;
  }

  .work-table-icon {
    display: inline-flex;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.72;
    font-size: 12px;
  }

  .work-table-link:hover .work-table-icon,
  .work-table-link:focus-visible .work-table-icon {
    transform: translateY(-50%);
  }

  .work-signoff-top {
    font-size: clamp(42px, 18vw, 96px);
    white-space: normal;
  }

  .work-signoff-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}