/* ==========================================================================
   Videos: the list at /videos/ and the video pages.
   Loaded after site.css by those pages only. Everything here is built from
   site.css's colours, type sizes and spacing.
   ========================================================================== */

/* --------------------------------------------------------------------------
   The list: each group is a headed list of rows, as the years are on the
   writing index, with a few lines about the group above its rows.
   -------------------------------------------------------------------------- */

.group__about { max-width: var(--measure); padding-block: var(--s5) var(--s4); }
.group__about > * + * { margin-top: var(--s4); }
.group__about + .posts { border-top: 1px solid var(--line); }

/* A running time with the play mark in front of it */
.runtime { display: inline-flex; align-items: center; gap: var(--s2); }
.runtime svg { width: 0.625rem; height: 0.625rem; flex: none; fill: currentColor; }

/* --------------------------------------------------------------------------
   A video page: the post layout with one more piece, the still. On a wide
   screen the chapters sit beside the still and the write-up. On a narrow one
   the order is still, chapters, write-up.
   -------------------------------------------------------------------------- */

.post--video { row-gap: var(--s6); }
.post--video > * { grid-column: 1; }
.post--video > .toc { grid-column: 2; grid-row: 1 / span 2; }
@media (max-width: 60rem) {
  .post--video > .toc { grid-column: 1; grid-row: auto; order: 0; }
}

/* The still that stands in for the player: the dark strip, a line of text,
   a play mark and the running time. The whole thing is one link to the video. */
.poster {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 1fr auto;
  gap: var(--s4) var(--s5);
  aspect-ratio: 16 / 9; padding: var(--s5);
  background: var(--strip); color: var(--white);
}
.poster:hover { color: var(--white); }
.poster__title { align-self: center; max-width: 16em; font-size: var(--fs-h2); font-weight: 300; line-height: 1.25; text-wrap: balance; }
.poster .circle { align-self: center; width: clamp(5rem, 14vw, 9rem); }
.poster__foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: var(--s4); font: 400 var(--fs-meta)/1 var(--font-mono); }
.poster__play { display: grid; place-items: center; width: var(--control); height: var(--control); background: var(--copper); }
.poster__play svg { width: 0.875rem; height: 0.875rem; fill: currentColor; }
.poster:hover .poster__play { background: var(--copper-dark); }

/* Chapters: the contents list from a post, with a time code where the number
   goes and, optionally, the chapter's length at the end of the row. A row
   with no link is a chapter that has nowhere on the page to lead. */
.toc--times li a { grid-template-columns: 3.25rem minmax(0, 1fr) auto; }
.toc--times li a:not([href]):hover { color: var(--text); }
.toc--times small { padding-left: var(--s3); color: var(--muted); font-size: var(--fs-meta); line-height: 1.9; }
