/* ============================================================
   Lipsmatch Wall — the home-page collage of showcase films
   Built by js/lipsmatch-wall.js into [data-lm-wall].
   NOTE: the template sets html { font-size: 62.5% }, so 1rem = 10px.
   Tokens come from main.css (--accent, --accent-rgb, --t-bright,
   --t-muted, --st-muted, --base-tint, --_font-accent).
   ============================================================ */

.lmw {
  --lmw-gap: clamp(0.6rem, 0.9vw, 1.2rem);
  --lmw-radius: 1.2rem;
  position: relative;
  margin-top: clamp(3.2rem, 5vw, 6rem);
  font-family: var(--_font-default);
  /* main.css sets `section { min-width: 360px }` globally. Inside a
     padded container on a 360px phone that is 30px wider than the room
     available, and the whole page picks up a horizontal scrollbar. */
  min-width: 0;
}
.lmw * { box-sizing: border-box; }

/* When the wall is its own band (Lipsmatch home) the section already
   carries the rhythm, so it does not need the lead-in of the variant
   that sits inside another block. */
.lmw--standalone { margin-top: 0; }

/* Accent haze behind the grid so the wall sits in light rather than
   on a flat panel. Purely decorative, never intercepts the pointer. */
.lmw::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 12%;
  width: min(90rem, 92%);
  height: 60%;
  transform: translateX(-50%);
  background: radial-gradient(60% 60% at 50% 50%, rgba(var(--accent-rgb), 0.13), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

/* ---- heading ---- */
.lmw__head {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.6rem 3.2rem;
  margin-bottom: clamp(1.8rem, 2.6vw, 3rem);
}
.lmw__head-main { max-width: 62rem; }

.lmw__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.7rem 1.4rem;
  border-radius: 100px;
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--t-bright);
  font-size: 1.2rem;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
}
.lmw__eyebrow::before {
  content: "";
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0.35rem rgba(var(--accent-rgb), 0.22);
  animation: lmw-pulse 2.4s ease-in-out infinite;
}
@keyframes lmw-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.7); } }

.lmw__title {
  font-family: var(--_font-accent);
  font-size: clamp(2.8rem, 4vw, 4.4rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  font-weight: var(--fw-medium);
  color: var(--t-bright);
  margin: 1.6rem 0 0;
}
.lmw__title em {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.lmw__lede {
  margin: 1.2rem 0 0;
  max-width: 54ch;
  color: var(--t-muted);
  font-size: clamp(1.5rem, 1.3vw, 1.7rem);
  line-height: 1.5;
}

/* Counter rail: titles / languages / versions, read as one line */
.lmw__counts {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  flex-wrap: wrap;
  padding-bottom: 0.4rem;
}
.lmw__count { display: flex; flex-direction: column; gap: 0.3rem; }
.lmw__count-num {
  font-family: var(--_font-accent);
  font-size: clamp(2.2rem, 2.4vw, 3rem);
  font-weight: var(--fw-semibold);
  line-height: 1;
  color: var(--t-bright);
  letter-spacing: -0.01em;
}
.lmw__count-label {
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--t-muted);
}
.lmw__count-sep {
  width: 1px;
  align-self: stretch;
  background: var(--st-muted);
}

/* ---- the grid ---- */
.lmw__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--lmw-gap);
}

/* ---- tile ---- */
.lmw__tile {
  position: relative;
  /* a grid item defaults to min-width:auto, so a caption that will not
     wrap sets the floor for its column and can push the whole section
     wider than a small phone */
  min-width: 0;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
  border-radius: var(--lmw-radius);
  /* the wall breathes in: each tile lands a beat after the one before it */
  animation: lmw-settle .7s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--i, 0) * 45ms);
  transition: transform .5s cubic-bezier(0.22, 1, 0.36, 1), z-index 0s;
}
@keyframes lmw-settle {
  from { opacity: 0; transform: translateY(12px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

.lmw__frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: var(--lmw-radius);
  border: 1px solid var(--st-muted);
  background: #0d0d0d;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .28);
  transition: border-color .45s ease, box-shadow .45s cubic-bezier(0.22, 1, 0.36, 1);
}

.lmw__poster,
.lmw__vid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Two stacked stills cross-fade as the tile changes language. */
.lmw__poster {
  opacity: 0;
  transition: opacity .55s ease;
  /* resting tiles sit back a step so the live ones carry the eye */
  filter: saturate(.82) brightness(.84);
}
.lmw__poster.is-on { opacity: 1; }
.lmw__vid { opacity: 0; transition: opacity .5s ease; }
.lmw__tile.is-live .lmw__vid { opacity: 1; }
.lmw__tile.is-live .lmw__poster { filter: none; }
.lmw__tile:hover .lmw__poster,
.lmw__tile:focus-visible .lmw__poster { filter: saturate(1) brightness(.95); }

/* Vignette + faint scanline tint: the tiles should read as screens on a
   wall, not as photographs pinned to one. */
.lmw__grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(0, 0, 0, .42) 0%, rgba(0, 0, 0, 0) 42%),
    repeating-linear-gradient(to bottom, rgba(255, 255, 255, .035) 0 1px, transparent 1px 3px);
  mix-blend-mode: normal;
  opacity: .9;
}

/* Four-bar "sync" meter, only on the tile that is actually playing */
.lmw__sync {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 1.1rem;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .35s ease, transform .35s ease;
  pointer-events: none;
}
.lmw__sync i {
  display: block;
  width: 2px;
  height: 100%;
  border-radius: 1px;
  background: var(--accent);
  transform-origin: bottom;
  animation: lmw-bars .9s ease-in-out infinite;
}
.lmw__sync i:nth-child(2) { animation-delay: .12s; }
.lmw__sync i:nth-child(3) { animation-delay: .26s; }
.lmw__sync i:nth-child(4) { animation-delay: .38s; }
@keyframes lmw-bars { 0%, 100% { transform: scaleY(.28); } 50% { transform: scaleY(1); } }
.lmw__tile.is-live .lmw__sync { opacity: 1; transform: none; }

/* A tile is silent, so it has to say what a click gets you. Rests as a
   small disc, opens into the full invitation on hover or focus. */
.lmw__play {
  position: absolute;
  left: 0.8rem;
  bottom: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  max-width: calc(100% - 1.6rem);
  padding: 0.55rem;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(12, 12, 12, .6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .35s ease, transform .35s ease, padding .35s ease, background .35s ease;
  pointer-events: none;
}
.lmw__play i { font-size: 1.2rem; color: var(--accent); }
.lmw__play b {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  font-weight: var(--fw-medium);
  transition: max-width .4s cubic-bezier(0.22, 1, 0.36, 1);
}
.lmw__tile.is-live .lmw__play { opacity: .85; transform: none; }
.lmw__tile:hover .lmw__play,
.lmw__tile:focus-visible .lmw__play {
  opacity: 1;
  transform: none;
  padding: 0.55rem 1rem 0.55rem 0.8rem;
  background: rgba(12, 12, 12, .78);
}
.lmw__tile:hover .lmw__play b,
.lmw__tile:focus-visible .lmw__play b { max-width: 16rem; }

/* ---- caption ---- */
.lmw__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.9rem 0.2rem 0;
  min-height: 3.4rem;
}
.lmw__film {
  font-size: 1.3rem;
  font-weight: var(--fw-semibold);
  color: var(--t-bright);
  line-height: 1.2;
  opacity: .78;
  transition: opacity .35s ease;
}
.lmw__tile.is-live .lmw__film,
.lmw__tile:hover .lmw__film { opacity: 1; }

.lmw__lang {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  text-align: right;
  white-space: nowrap;
}
.lmw__lang-native {
  font-size: 1.4rem;
  line-height: 1.15;
  font-weight: var(--fw-medium);
  color: var(--accent);
}
.lmw__lang-name {
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--t-muted);
}
/* the flip that fires the moment a tile changes language */
.lmw__lang.is-flip { animation: lmw-flip .5s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes lmw-flip {
  0%   { opacity: 0; transform: translateY(60%); }
  100% { opacity: 1; transform: none; }
}

/* ---- lift on hover / focus / live ---- */
.lmw__tile:hover,
.lmw__tile:focus-visible { transform: translateY(-4px) scale(1.015); z-index: 3; }
.lmw__tile.is-live { z-index: 2; }
.lmw__tile.is-live .lmw__frame,
.lmw__tile:hover .lmw__frame {
  border-color: rgba(var(--accent-rgb), .45);
  box-shadow:
    0 0 0 1px rgba(var(--accent-rgb), .18),
    0 18px 40px -18px rgba(0, 0, 0, .75),
    0 24px 60px -30px rgba(var(--accent-rgb), .35);
}
.lmw__tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.lmw__tile:focus:not(:focus-visible) { outline: none; }

/* ---- footer note ---- */
.lmw__foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin-top: 1.8rem;
  color: var(--t-muted);
  font-size: 1.35rem;
  line-height: 1.5;
}
.lmw__foot i { color: var(--accent); flex: none; margin-top: 0.2rem; }
.lmw__foot > span { flex: 1; min-width: 0; }
.lmw__foot a { color: var(--accent); font-weight: var(--fw-semibold); }
.lmw__foot a:hover { text-decoration: underline; }

/* ============================================================
   Laptop and down
   ============================================================ */
@media only screen and (max-width: 1399px) {
  .lmw__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .lmw__meta { min-height: 3.2rem; }
}
/* Below five across the row count stops dividing ten cleanly, and a
   half-empty last row reads as a bug rather than a wall. Each step
   drops the trailing tiles instead, so the grid always ends flush. */
@media only screen and (min-width: 900px) and (max-width: 1199px) {
  /* four across, so faces stay big enough to judge the sync */
  .lmw__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lmw__tile:nth-child(n+9) { display: none; }
}
@media only screen and (min-width: 640px) and (max-width: 899px) {
  .lmw__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lmw__tile:nth-child(10) { display: none; }
  .lmw__head { align-items: flex-start; }
  .lmw__film { font-size: 1.2rem; }
}

/* ============================================================
   Phone — a hero that plays, a mosaic that flips
   ------------------------------------------------------------
   Ten equal thumbnails on a 390px screen would be ten postage
   stamps, and ten autoplaying videos would be a data bill. So the
   first tile goes full width and is the only one that plays; the
   other nine sit under it as a 3x3 mosaic of stills that keep
   changing language. Same story, a tenth of the bytes.
   ============================================================ */
@media only screen and (max-width: 639px) {
  .lmw { --lmw-gap: 0.5rem; --lmw-radius: 1rem; }
  .lmw__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .lmw__tile--hero { grid-column: 1 / -1; margin-bottom: 0.4rem; }
  .lmw__tile--hero .lmw__frame { border-radius: 1.4rem; }
  .lmw__tile--hero .lmw__film { font-size: 1.5rem; }
  .lmw__tile--hero .lmw__lang-native { font-size: 1.6rem; }
  .lmw__tile--hero .lmw__lang-name { font-size: 1.05rem; }

  /* The mosaic carries its caption inside the frame: nine captions
     underneath would out-measure the pictures. */
  .lmw__tile:not(.lmw__tile--hero) .lmw__meta {
    position: absolute;
    inset: auto 0 0 0;
    z-index: 2;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    min-height: 0;
    padding: 0.5rem 0.6rem;
    pointer-events: none;
  }
  .lmw__tile:not(.lmw__tile--hero) { position: relative; }
  .lmw__tile:not(.lmw__tile--hero) .lmw__film {
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    opacity: .72;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
  }
  .lmw__tile:not(.lmw__tile--hero) .lmw__lang { align-items: flex-start; text-align: left; }
  .lmw__tile:not(.lmw__tile--hero) .lmw__lang-native { font-size: 1.15rem; }
  .lmw__tile:not(.lmw__tile--hero) .lmw__lang-name { display: none; }
  .lmw__tile:not(.lmw__tile--hero) .lmw__sync { display: none; }
  /* the mosaic caption already owns the bottom-left of these frames */
  .lmw__tile:not(.lmw__tile--hero) .lmw__play { display: none; }
  .lmw__tile--hero .lmw__play {
    opacity: 1;
    transform: none;
    padding: 0.6rem 1.1rem 0.6rem 0.9rem;
  }
  .lmw__tile--hero .lmw__play b { max-width: 16rem; }
  .lmw__tile:not(.lmw__tile--hero) .lmw__poster { filter: saturate(.8) brightness(.8); }
  /* no hover on touch: the lift would only ever fire as a sticky tap state */
  .lmw__tile:hover { transform: none; }
  .lmw__tile:hover .lmw__frame { border-color: var(--st-muted); box-shadow: 0 2px 6px rgba(0, 0, 0, .28); }
  .lmw__tile.is-live .lmw__frame {
    border-color: rgba(var(--accent-rgb), .45);
    box-shadow: 0 0 0 1px rgba(var(--accent-rgb), .18), 0 14px 30px -16px rgba(0, 0, 0, .8);
  }

  .lmw__counts { gap: 1.2rem; }
  .lmw__count-num { font-size: 2rem; }
  .lmw__count-label { font-size: 1rem; }
  .lmw__foot { font-size: 1.25rem; margin-top: 1.4rem; }
}

/* Narrow phones: three across still works, but the caption inside a
   ~110px tile does not. Drop to the language mark alone. */
@media only screen and (max-width: 400px) {
  .lmw__tile:not(.lmw__tile--hero) .lmw__film { display: none; }
}

/* ============================================================
   Reduced motion / Save-Data: the wall holds still
   ============================================================ */
.lmw--still .lmw__sync { display: none; }
@media (prefers-reduced-motion: reduce) {
  .lmw__tile { animation: none; }
  .lmw__tile:hover, .lmw__tile:focus-visible { transform: none; }
  .lmw__eyebrow::before { animation: none; }
  .lmw__sync i { animation: none; transform: scaleY(.6); }
  .lmw__poster { transition: none; }
}

/* ============================================================
   Light theme
   ============================================================ */
[color-scheme="light"] .lmw__frame { background: #e9e6e4; }
[color-scheme="light"] .lmw__grain {
  background: linear-gradient(to top, rgba(0, 0, 0, .42) 0%, rgba(0, 0, 0, 0) 45%);
}
[color-scheme="light"] .lmw__poster { filter: saturate(.85) brightness(.92); }

/* ============================================================
   The screening room — the wall's lightbox
   ------------------------------------------------------------
   .lmwbox__stage is a mount for the shared cycler in
   js/lipsmatch.js, which injects its own .lm-cycle__langs rail
   and .lm-cycle stage (styled by css/lipsmatch.css). Everything
   here only gives those room, caps their height so the caption
   survives a short viewport, and wraps them in chrome.
   ============================================================ */
.lmwbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 3vw, 3.2rem);
}
.lmwbox[hidden] { display: none; }
.lmwbox * { box-sizing: border-box; }

.lmwbox__scrim {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 8, .9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: lmwbox-fade .35s ease both;
}
@keyframes lmwbox-fade { from { opacity: 0; } to { opacity: 1; } }

.lmwbox__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  /* Third term hugs the film: once the height budget caps it, .lm-cycle
     keeps 16/9 and narrows, and a full-width panel would leave a band of
     empty background beside it. Same derivation as the stage cap below,
     so film, caption and panel edge all end on the same line. */
  width: min(112rem, 100%, calc(min(58vh, 92vh - 34rem) * 16 / 9 + 4.8rem));
  max-height: 92vh;
  border-radius: 2rem;
  border: 1px solid var(--st-muted);
  background: var(--base-tint);
  overflow: hidden;
  box-shadow: 0 40px 120px -40px rgba(0, 0, 0, .9);
  animation: lmwbox-rise .45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes lmwbox-rise {
  from { opacity: 0; transform: translateY(18px) scale(.985); }
  to   { opacity: 1; transform: none; }
}

.lmwbox__stage {
  position: relative;
  flex: 0 0 auto;
  padding: clamp(1.4rem, 2.4vw, 2.4rem) clamp(1.4rem, 2.4vw, 2.4rem) 0;
}
/* Letterbox rather than crop: these are other people's frames.
   The cap takes the caption's share off the top rather than trusting a
   flat vh: on a laptop the caption and the language rail together want
   roughly 30rem, and without that the panel grows an inner scrollbar. */
.lmwbox__stage .lm-cycle {
  max-height: min(58vh, calc(92vh - 34rem));
  margin-inline: auto;     /* any rounding left over stays symmetric */
}
.lmwbox__stage .lm-cycle__layer { object-fit: contain; }
.lmwbox__fallback {
  display: block;
  width: 100%;
  max-height: 58vh;
  border-radius: 1.2rem;
  background: #000;
}

.lmwbox__close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  z-index: 5;
  width: 4.2rem;
  height: 4.2rem;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 50%;
  background: rgba(13, 14, 17, .68);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color .3s ease, background .3s ease, transform .3s ease;
}
.lmwbox__close:hover { border-color: var(--accent); background: rgba(13, 14, 17, .92); transform: rotate(90deg); }
.lmwbox__close:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---- caption ---- */
.lmwbox__info {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem 3.2rem;
  padding: clamp(1.6rem, 2.6vw, 2.6rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.lmwbox__text { min-width: 0; }

.lmwbox__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem 1.2rem;
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: var(--fw-semibold);
  color: var(--t-muted);
}
/* The marker has to survive the film being famous: this is our
   demonstration, not a campaign anyone commissioned. */
.lmwbox__demo {
  padding: 0.45rem 1rem;
  border-radius: 100px;
  border: 1px solid rgba(var(--accent-rgb), .4);
  background: rgba(var(--accent-rgb), .1);
  color: var(--accent);
  letter-spacing: .12em;
}
.lmwbox__title {
  margin: 1rem 0 0.8rem;
  font-family: var(--_font-accent);
  font-size: clamp(2rem, 2.8vw, 2.8rem);
  font-weight: var(--fw-medium);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--t-bright);
}
.lmwbox__blurb {
  margin: 0;
  max-width: 70ch;
  font-size: 1.55rem;
  line-height: 1.55;
  color: var(--t-muted);
}
.lmwbox__hint {
  margin: 1.4rem 0 0;
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-size: 1.3rem;
  line-height: 1.45;
  color: var(--t-muted);
  opacity: .8;
}
.lmwbox__hint i { color: var(--accent); font-size: 1.6rem; flex: none; }

/* ---- walk the wall without closing ---- */
.lmwbox__nav {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex: none;
}
.lmwbox__step {
  width: 4.4rem;
  height: 4.4rem;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--st-muted);
  border-radius: 50%;
  background: transparent;
  color: var(--t-bright);
  font-size: 1.7rem;
  cursor: pointer;
  transition: border-color .3s ease, background .3s ease, color .3s ease;
}
.lmwbox__step:hover {
  border-color: rgba(var(--accent-rgb), .5);
  background: rgba(var(--accent-rgb), .1);
  color: var(--accent);
}
.lmwbox__step:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.lmwbox__pos {
  min-width: 6rem;
  text-align: center;
  font-size: 1.25rem;
  letter-spacing: .1em;
  color: var(--t-muted);
  font-variant-numeric: tabular-nums;
}

body.lmw-locked { overflow: hidden; }

/* --- laptop landscape: film beside the caption ----------------------
   Stacked, a short window caps the film's height, and .lm-cycle holds
   16/9, so the width comes down with it and the film floats in the left
   half of a full-width panel. A wide short window has room the other
   way: put the caption there and give the film all the height it can
   take. Mirrors the same rule on the showcase page's lightbox. */
@media (min-width: 900px) and (max-height: 860px) {
  /* the caption shares the width here, so the panel goes back to full */
  .lmwbox__panel { flex-direction: row; align-items: stretch; width: min(112rem, 100%); }
  .lmwbox__stage {
    flex: 1 1 62%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(1.4rem, 2.4vw, 2.4rem);
  }
  .lmwbox__stage .lm-cycle { max-height: calc(92vh - 11rem); width: 100%; }
  .lmwbox__info {
    flex: 1 1 38%;
    min-width: 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    padding-left: 0;
    padding-right: 6.5rem;   /* clear of the close button */
  }
  .lmwbox__blurb { max-width: none; }
  .lmwbox__nav { margin-top: 2rem; }
}

/* ---- phone: a sheet, film first, caption under the thumb ---- */
@media only screen and (max-width: 767px) {
  .lmwbox { padding: 0; place-items: stretch; }
  .lmwbox__panel {
    width: 100%;
    max-height: 100%;
    height: 100%;
    border: none;
    border-radius: 0;
    justify-content: center;
  }
  .lmwbox__stage { padding: 0 1.2rem; }
  .lmwbox__stage .lm-cycle { max-height: 44vh; }
  .lmwbox__info {
    flex-direction: column;
    align-items: stretch;
    gap: 1.6rem;
    flex: 0 1 auto;
  }
  .lmwbox__nav { justify-content: space-between; }
  .lmwbox__close { top: 1rem; right: 1rem; width: 3.8rem; height: 3.8rem; }
  .lmwbox__blurb { font-size: 1.45rem; }
}

@media (prefers-reduced-motion: reduce) {
  .lmwbox__scrim, .lmwbox__panel { animation: none; }
  .lmwbox__close:hover { transform: none; }
}
