/* ============================================================
   HAYMAKER — the work drawer
   ============================================================ */

.drawer-root { position: fixed; inset: 0; z-index: 280; pointer-events: none; visibility: hidden }
.drawer-root.is-open { pointer-events: auto; visibility: visible }

.dr-scrim {
  position: absolute; inset: 0;
  background: rgba(5,6,9,.68);
  backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .42s var(--ease);
}
.drawer-root.is-open .dr-scrim { opacity: 1 }

.dr {
  position: absolute; inset: 0 0 0 auto;
  width: min(880px, 100%);
  display: grid; grid-template-rows: auto 1fr;
  background: var(--ground);
  box-shadow: -40px 0 90px -50px rgba(0,0,0,.9);
  translate: 100% 0;
  transition: translate .52s var(--ease-out);
  outline: none;
}
.drawer-root.is-open .dr { translate: 0 0 }

/* ── bar ──────────────────────────────────────────────────── */

.dr-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: clamp(14px,1.6vw,20px) clamp(18px,2.4vw,38px);
  border-bottom: 1px solid var(--hair);
  background: color-mix(in srgb, var(--ground) 92%, transparent);
  backdrop-filter: blur(10px);
}
.dr-nav { display: flex; gap: 6px }
.dr-step {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: var(--r-pill); cursor: pointer;
  font-size: 13px; font-weight: 500; color: var(--ink-2);
  transition: background .25s var(--ease), color .25s var(--ease), opacity .25s var(--ease);
}
.dr-step:hover:not(:disabled) { background: rgba(22,21,15,.06); color: var(--ink) }
.dr-step:disabled { opacity: .3; cursor: not-allowed }
.dr-close {
  display: grid; place-items: center; width: 36px; height: 36px; flex: none;
  border-radius: 50%; cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--hair);
  transition: background .25s var(--ease), rotate .35s var(--ease);
}
.dr-close:hover { background: rgba(22,21,15,.06); rotate: 90deg }
.dr-close svg { width: 12px; height: 12px; stroke: var(--ink); stroke-width: 1.6; fill: none }

/* ── body ─────────────────────────────────────────────────── */

.dr-scroll { overflow-y: auto; overscroll-behavior: contain }
.dr-art { padding: clamp(26px,3.4vw,54px) clamp(18px,2.4vw,38px) clamp(40px,5vw,80px) }

.dr-head { display: grid; gap: 14px; margin-bottom: clamp(22px,2.8vw,38px) }
.dr-summary { max-width: 56ch }

/* the film leads, at full width */
.dr-stage { margin: 0 0 clamp(22px,2.8vw,38px) }
.dr-film {
  position: relative; display: block; width: 100%; aspect-ratio: 16/9;
  border-radius: var(--r-md); overflow: clip; background: var(--pitch);
  object-fit: cover;
}
.dr-film--empty { display: grid; place-items: center }
.dr-film--empty img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .38 }
.dr-film__note {
  position: relative; padding: 9px 16px; border-radius: var(--r-pill);
  background: rgba(5,6,9,.72); color: rgba(243,242,236,.72);
  box-shadow: inset 0 0 0 1px rgba(243,242,236,.16);
}

/* ── ledger ───────────────────────────────────────────────── */

.dr-meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: clamp(14px,2vw,28px);
  padding-block: clamp(18px,2.2vw,28px);
  border-block: 1px solid var(--hair);
  margin-bottom: clamp(22px,2.8vw,36px);
}
.dr-meta dt { margin-bottom: 7px }
.dr-meta dd { margin: 0; font-size: 14.5px; font-weight: 500; line-height: 1.4; letter-spacing: -.012em }

.dr-prose { max-width: 62ch; font-size: 16px; line-height: 1.68; color: var(--ink-2) }
.dr-prose + .dr-prose { margin-top: 14px }

/* ── plates ───────────────────────────────────────────────── */

.dr-plates { display: grid; gap: clamp(10px,1.4vw,18px); margin-top: clamp(28px,3.4vw,50px) }
.dr-plate { margin: 0; display: grid; gap: 9px }
.dr-plate img {
  width: 100%; aspect-ratio: 16/9; object-fit: cover;
  border-radius: var(--r-sm); background: var(--tile);
}
.dr-plate:nth-child(4n+1) img, .dr-plate:nth-child(4n+4) img { aspect-ratio: 16/9 }

.dr-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
  margin-top: clamp(30px,3.6vw,54px); padding-top: clamp(20px,2.4vw,30px);
  border-top: 1px solid var(--hair);
}

@media (min-width: 760px) {
  .dr-plates { grid-template-columns: 1fr 1fr }
  .dr-plate:first-child { grid-column: 1 / -1 }
}
@media (max-width: 620px) {
  .dr { width: 100% }
  .dr-step span { display: none }
}

/* ── the tile that opens it ───────────────────────────────── */

.entry[data-work] { cursor: pointer }
.entry__play {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 500; color: var(--ink);
}
.entry__play i {
  display: grid; place-items: center; width: 26px; height: 26px; flex: none;
  border-radius: 50%; box-shadow: inset 0 0 0 1px var(--hair);
  transition: background .3s var(--ease), box-shadow .3s var(--ease);
}
.entry__play svg { width: 9px; height: 9px; fill: var(--ink); translate: 1px 0 }
.entry:hover .entry__play i { background: var(--lime); box-shadow: none }

/* the thumbnail that makes the row a piece of film, not a line of text */
.entry__thumb {
  display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover;
  border-radius: var(--r-sm); background: var(--tile);
  filter: saturate(.7) brightness(.92);
  transition: filter .45s var(--ease), scale .6s var(--ease-out);
}
.entry:hover .entry__thumb { filter: none; scale: 1.012 }
/* ── the film-led row ──────────────────────────────────────
   The plate and the title share a left edge. Everything that is
   not the work — register, the link out — hangs in the right
   margin, which is what makes it read as a page rather than a
   card.                                                        */

.entry--film {
  grid-template-columns: minmax(0, 8fr) minmax(0, 3fr);
  grid-template-areas: "film side" "body side";
  column-gap: clamp(20px, 3.4vw, 60px);
  row-gap: clamp(18px, 2.2vw, 28px);
  align-items: start;
  padding-block: clamp(26px, 3.2vw, 46px);
}
.entry--film > .pl { grid-area: film }
.entry--film > .entry__body { grid-area: body }
.entry--film > .entry__side { grid-area: side; display: grid; gap: 14px; justify-items: start; align-content: start }
.entry--film .entry__b { max-width: 58ch }

@media (max-width: 860px) {
  .entry--film { grid-template-columns: 1fr; grid-template-areas: "film" "body" "side" }
}

/* ── the plate and its controls ────────────────────────────── */

.pl {
  position: relative; margin: 0;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-md);
  overflow: clip;
  background: var(--pitch);
  isolation: isolate;
}
.pl video {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: scale .8s var(--ease-out), filter .5s var(--ease);
}
.entry:hover .pl video, .reel__i:hover .pl video { scale: 1.015 }
.pl.is-paused video { filter: saturate(.55) brightness(.8) }

.pl__bar {
  position: absolute; inset: auto 0 0; z-index: 2;
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: clamp(9px, 1.1vw, 15px);
  opacity: 0; translate: 0 6px;
  transition: opacity .32s var(--ease), translate .32s var(--ease-out);
  background: linear-gradient(to top, rgba(5,6,9,.62), rgba(5,6,9,0));
}
.pl:hover .pl__bar,
.pl:focus-within .pl__bar,
.pl.is-paused .pl__bar { opacity: 1; translate: 0 0 }
.pl__right { display: flex; gap: 7px }

.pl__b {
  display: grid; place-items: center;
  width: 34px; height: 34px; flex: none;
  border-radius: 50%; cursor: pointer;
  color: #fff;
  background: rgba(10,12,16,.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.2);
  transition: background .25s var(--ease), scale .3s var(--ease-out), color .25s var(--ease);
}
.pl__b svg { width: 13px; height: 13px; fill: currentColor }
.pl__b:hover { background: rgba(243,242,236,.94); color: var(--ink); scale: 1.08 }
.pl__b.is-live { background: var(--lime); color: var(--ink); box-shadow: none }
.pl--sm .pl__b { width: 28px; height: 28px }
.pl--sm .pl__b svg { width: 11px; height: 11px }

/* ── the reel grid under the three cases ───────────────────── */

.reel { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(12px, 1.6vw, 22px) }
.reel__i { display: grid; gap: 10px; align-content: start }
.reel__t { font-size: 15px; font-weight: 500; letter-spacing: -.022em }
@media (max-width: 900px) { .reel { grid-template-columns: 1fr 1fr } }
@media (max-width: 520px) { .reel { grid-template-columns: 1fr } }
