/* ==================================================================== Showreel
   The 15-second film of a client's website (showreel.js). A sand card with
   the film drawn into it; the film recomposes for any shape, so set the
   shape here: 4:5 suits a phone and the half of a desktop split section,
   16:9 a full-width band. */

.showreel {
  --showreel-ratio: 4 / 5;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  aspect-ratio: var(--showreel-ratio);
  border-radius: 1.75rem;
  background: var(--showreel-bg, var(--linen, #f6f3ee));
  box-shadow: 0 0 0 1px rgba(20, 17, 13, .04), 0 26px 44px -30px rgba(40, 24, 8, .45);
}
/* Bare: no panel, so the film's windows sit straight on the section's own
   background (the canvas is already see-through). Its shape is kept by the
   outline the desktop window leaves when it closes, and the phone's
   companions may reach past the box's sides, so the canvas does too
   (showreel.js, resize()). Take showreel--bare off the film's div
   (index.html) to bring the panel back. */
.showreel--bare { overflow: visible; border-radius: 0; background: none; box-shadow: none; }
.showreel canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; pointer-events: none; }
.showreel video { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* Pause and play: anything that moves for more than five seconds needs
   one (WCAG 2.2.2). Beside it, back 3 seconds: a round arrow with the 3
   in it, the same glass bead. Ink-3 on linen is 5.7:1. */
.showreel__ctl {
  position: absolute;
  right: clamp(10px, 2.4%, 18px);
  bottom: clamp(10px, 2.4%, 18px);
  z-index: 1;
  display: flex;
  gap: 6px;
  align-items: center;
}
.showreel__toggle,
.showreel__back {
  padding: .6em 1em;
  border: 0;
  border-radius: 999px;
  background: rgba(246, 243, 238, .9);
  box-shadow: inset 0 0 0 1px var(--hair, rgba(20, 17, 13, .1));
  color: var(--ink-3, #665e52);
  font: 400 max(11px, .72rem)/1 var(--mono, "IBM Plex Mono", ui-monospace, monospace);
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
.showreel__toggle:hover,
.showreel__back:hover { background: var(--linen, #f6f3ee); color: var(--ink, #14110d); }
.showreel__toggle:focus-visible,
.showreel__back:focus-visible { outline: 2px solid var(--ink, #14110d); outline-offset: 2px; }
.showreel__toggle[hidden],
.showreel__back[hidden] { display: none; }
.showreel__back {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.6em;
  height: 2.6em;
  padding: 0;
  letter-spacing: 0;
}
.showreel__back svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: .5em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .45s cubic-bezier(.16, 1, .3, 1);
}
.showreel__back span { font-size: .85em; line-height: 1; padding-top: .05em; }
.showreel__back:active svg { transform: rotate(-50deg); }

/* Where the client is, in mono capitals left of the buttons (data-where).
   Hidden unless the page shows it (work.css, phones). Ink-3 on linen 5.7:1. */
.showreel__where {
  display: none;
  margin-right: 4px;
  font: 400 max(11px, .72rem)/1 var(--mono, "IBM Plex Mono", ui-monospace, monospace);
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink-3, #665e52);
}

/* The toggle's play/pause symbol: hidden unless the page asks (work.css,
   phones), where it replaces the word. */
.showreel__ico { display: none; }

/* Without WebGL2: one still of the site. */
.showreel--flat img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
