/* Players that live ON the page: YouTube mixes, Mixcloud, SoundCloud, Spotify.
   A separate file so the site's own stylesheet stays one crew's business.

   Every colour, family and size here is a token out of the approved world
   (motion-study/style.css, imported by site.css): no new hex, no new type scale.

   The whole point of this file is that the poster and the iframe occupy the SAME
   box. The box owns the height — 16:9 for YouTube, the widget's own height for the
   three service players — so swapping one for the other moves nothing else on the
   page. Nothing here animates, so a visitor who asks for reduced motion sees
   exactly what everyone else sees. */

.motion-study .embed .embed-box {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--room-line);
  background-color: var(--room-ground);
}

.motion-study .embed-box > :is(img, iframe, button, .embed-slab) {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.motion-study .embed-poster { object-fit: cover; opacity: .62; }

/* The plain slab the three service players wear instead of a picture. Their own
   artwork lives behind a third-party request, and this page makes none until the
   visitor asks for one. */
.motion-study .embed-slab {
  display: grid;
  align-content: center;
  gap: .25rem;
  padding-inline: 1.25rem;
}
.motion-study .embed-service { color: var(--room-light); font-size: .875rem; letter-spacing: .12em; text-transform: uppercase; }
.motion-study .embed-who { color: var(--room-muted); font-size: 1rem; }

/* The button IS the poster's surface: it covers the whole box, so the press target
   is the picture, and its words are the accessible name ("Play <title>"). */
.motion-study .embed-play {
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  font: inherit;
  font-size: 1rem;
  text-align: left;
  color: var(--room-light);
  background: transparent;
  cursor: pointer;
}

/* The words sit on the site's own ground rather than straight on the picture. A
   poster can be bright (the Sky Club one is a wall of daylight) and pale words on
   it are a guess at legibility, not a design. */
.motion-study .embed-play-pill {
  display: flex;
  align-items: center;
  gap: .75rem;
  max-width: 100%;
  padding: .625rem .875rem;
  background-color: var(--room-ground);
}
.motion-study .embed-play:hover .embed-play-words { text-decoration: underline; text-underline-offset: .3em; }
/* The world's own focus ring is 3px of champagne; this one is the same ring, drawn
   just inside the box because the button fills it edge to edge. */
.motion-study .embed-play:focus-visible { outline: 3px solid var(--room-light); outline-offset: -5px; }

.motion-study .embed-play-words {
  max-width: 32ch;
  text-wrap: balance;
}

/* A triangle, drawn in borders so it needs no file and no request. */
.motion-study .embed-play-mark {
  flex: none;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: .6rem 0 .6rem 1rem;
  border-color: transparent transparent transparent var(--room-light);
}

.motion-study .embed figcaption { margin-top: .75rem; }

@media (max-width: 48rem) {
  .motion-study .embed-play { padding: .75rem .875rem; font-size: .9375rem; }
  .motion-study .embed-play-words { max-width: 24ch; }
}
