/* ============================================
   Spotlight Coalition — /work (Proof of Work)
   Extends style.css. Cinema-wall card treatment.
   ============================================ */

.work-intro {
  padding-top: clamp(2rem, 6vh, 3.5rem);
  padding-bottom: clamp(1.25rem, 3vh, 2rem);
}

.work-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.75rem, 1.25rem + 2.25vw, 3rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--cream);
  margin-bottom: 1rem;
}

.work-title em {
  font-style: italic;
}

.work-lede {
  font-size: clamp(0.9375rem, 0.875rem + 0.3vw, 1.0625rem);
  line-height: 1.7;
  color: var(--warm-mid);
  max-width: 620px;
}

.work-credit-note {
  margin-top: 0.875rem;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: rgba(140, 122, 98, 0.75);
  max-width: 560px;
}

/* ---- Featured band (audiobook) ---- */

.work-featured {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.25rem, 3vw, 2.25rem);
  align-items: center;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: clamp(1.5rem, 4vh, 2.5rem);
  border: 1px solid rgba(245, 237, 224, 0.12);
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(212, 160, 84, 0.07), rgba(245, 237, 224, 0.02));
}

@media (min-width: 700px) {
  .work-featured { grid-template-columns: minmax(160px, 220px) 1fr; }
}

.featured-cover img {
  width: 100%;
  height: auto;
  border-radius: 3px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

/* Full-width on mobile the cover pushes the whole grid below the fold. */
@media (max-width: 699px) {
  .featured-cover img { max-width: 190px; }
}

.featured-kicker {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.625rem;
}

.featured-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.75rem);
  line-height: 1.25;
  color: var(--cream);
  margin-bottom: 0.25rem;
}

.featured-subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--warm-mid);
  margin-bottom: 0.875rem;
}

.featured-blurb {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: rgba(245, 237, 224, 0.8);
  max-width: 52ch;
  margin-bottom: 0.75rem;
}

.featured-meta {
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--warm-mid);
  margin-bottom: 1.125rem;
}

.featured-link {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  border-bottom: 1px solid rgba(212, 160, 84, 0.4);
  padding-bottom: 2px;
}

.featured-link:hover {
  opacity: 1;
  border-bottom-color: var(--amber);
}

/* ---- Filter ---- */

.work-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-bottom: clamp(0.5rem, 2vh, 1rem);
}

.filter-chip {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--warm-mid);
  background: transparent;
  border: 1px solid rgba(245, 237, 224, 0.15);
  border-radius: 2px;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.filter-chip:hover {
  color: var(--cream);
  border-color: rgba(245, 237, 224, 0.35);
}

.filter-chip.is-active {
  color: var(--bg-deep);
  background-color: var(--amber);
  border-color: var(--amber);
}

.filter-chip:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.chip-count {
  opacity: 0.55;
  font-variant-numeric: tabular-nums;
  margin-left: 0.125rem;
}

/* ---- Sections ---- */

.work-section {
  padding-bottom: clamp(2.5rem, 6vh, 4.5rem);
}

.work-section[hidden] { display: none; }

.work-section-head {
  display: flex;
  align-items: baseline;
  gap: 0.875rem;
  flex-wrap: wrap;
  padding-top: clamp(1.75rem, 4vh, 3rem);
  padding-bottom: 1.5rem;
  border-top: 1px solid rgba(245, 237, 224, 0.1);
}

.work-section-title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
}

.work-section-blurb {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--warm-mid);
  flex: 1 1 240px;
}

/* Label and blurb crowd each other on narrow screens — stack them. */
@media (max-width: 599px) {
  .work-section-head { display: block; }

  .work-section-title {
    display: block;
    margin-bottom: 0.5rem;
  }
}

/* ---- Grid ---- */

.work-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.25rem, 3vw, 1.75rem);
}

@media (min-width: 700px) {
  .work-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.125rem;
  }
}

@media (min-width: 1000px) {
  .work-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

/* ---- Card ---- */

.work-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.work-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 3px;
  background-color: #101010;
}

.work-stage img,
.work-stage iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.work-stage img {
  object-fit: cover;
  transition: transform 0.5s ease;
}

/* Play button */

.work-play {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: var(--cream);
}

/* The caption sits on the frame, and several of these clips have burned-in
   text of their own — so the scrim has to be heavy enough to win. */
.work-play::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 8, 8, 0.92) 0%, rgba(8, 8, 8, 0.72) 22%, rgba(8, 8, 8, 0.25) 52%, rgba(8, 8, 8, 0.05) 100%);
}

.work-glyph {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid rgba(245, 237, 224, 0.75);
  background: rgba(20, 20, 20, 0.35);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.work-glyph svg {
  width: 15px;
  height: 15px;
  margin-left: 3px;
  fill: var(--cream);
  transition: fill 0.25s ease;
}

.work-card:hover .work-glyph,
.work-play:focus-visible .work-glyph {
  background-color: var(--amber);
  border-color: var(--amber);
  transform: scale(1.06);
}

.work-card:hover .work-glyph svg,
.work-play:focus-visible .work-glyph svg { fill: var(--bg-deep); }

.work-card:hover .work-stage img { transform: scale(1.03); }

.work-play:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

/* Duration badge */

.work-duration {
  position: absolute;
  right: 0.625rem;
  top: 0.625rem;
  z-index: 2;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--cream);
  background: rgba(10, 10, 10, 0.7);
  padding: 0.125rem 0.4rem;
  border-radius: 2px;
  pointer-events: none;
}

/* ---- Caption, overlaid on the frame ---- */

.work-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 0.875rem 0.875rem 0.75rem;
  pointer-events: none;
}

.work-name {
  display: block;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 0.9375rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--cream);
  margin-bottom: 0.1875rem;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55);
}

/* Cards carry the client only. Per-piece roles live in the lightbox —
   repeating "Director, Writer, Producer, Editor" across 17 tiles reads
   as noise, and the credit posture is stated once in the intro. */
.work-client {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.45;
  color: var(--amber);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
}

/* Playing state: strip the poster chrome out of the way */

.work-card.is-playing .work-play,
.work-card.is-playing .work-duration,
.work-card.is-playing .work-meta { display: none; }

/* ---- Lightbox ----
   Drive's player can't lay itself out below ~600px wide — inside a 330px
   tile it overflows and crops the frame. Playing here gives it room. */

body.lightbox-open { overflow: hidden; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
}

.lightbox[hidden] { display: none; }

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 8, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.lightbox-panel {
  position: relative;
  width: 100%;
  max-width: 1100px;
}

.lightbox-panel:focus { outline: none; }

.lightbox-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  background: #000;
  border-radius: 3px;
  overflow: hidden;
}

/* Narrow screens can't give Drive's player the width it wants, and it
   clips the bottom of the frame to fit its chrome. A taller box lets it
   letterbox instead of crop — losing a little space beats losing picture. */
@media (max-width: 699px) {
  .lightbox-stage { aspect-ratio: 4 / 3; }
}

.lightbox-stage iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.lightbox-close {
  position: absolute;
  top: -2.5rem;
  right: -0.25rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--cream);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color 0.2s ease;
}

.lightbox-close:hover { color: var(--amber); }

.lightbox-close:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.lightbox-meta {
  padding-top: 1rem;
  display: flex;
  align-items: baseline;
  gap: 0.875rem;
  flex-wrap: wrap;
}

.lightbox-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.0625rem, 1rem + 0.5vw, 1.375rem);
  line-height: 1.3;
  color: var(--cream);
}

.lightbox-credit {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.5;
}

.lightbox-client { color: var(--amber); }

.lightbox-roles { color: rgba(245, 237, 224, 0.6); }

.lightbox-roles:not(:empty)::before {
  content: ' · ';
  color: rgba(245, 237, 224, 0.35);
}

@media (max-width: 599px) {
  .lightbox-close {
    top: -2.25rem;
    right: 0;
  }

  .lightbox-meta {
    display: block;
  }

  .lightbox-title { margin-bottom: 0.25rem; }
}

/* ---- CTA spacing ---- */

.work-cta { padding: clamp(3.5rem, 9vh, 7rem) 0; }
