/* Arzi's Dream: the Watch page (/watch/). Loaded after /css/road.css and /css/page.css, which bring the fonts, colours,
   header, footer, .road-head/.pg-head, .ep-meta, the .watch buttons and the home page's .give button. The player first,
   sized so the episode's heading, meta line and synopsis still fit on the first screen below it; then the episode list
   beside them; then the LaunchGood call (owner, 28 Nov 2026). */

/* the player's width: 16:9 at the height the first screen leaves once the header and --wt-info (room for the heading,
   meta line and synopsis below it) are taken out, never wider than the column (the header's --gutter) and not under
   560px on a very short screen. The text, the list and the LaunchGood call line up with it (owner, 27 and 28 Nov 2026) */
.pg-watch{--wt-info:clamp(220px,30svh,340px);--wt-w:min(100%,max(min(100%,560px),calc((100svh - var(--bar) - 3vh - var(--wt-info)) * 16 / 9)))}
.wt{padding:calc(var(--bar) + 3vh) var(--gutter) 0}

/* ---------- the screen: Mux Player, or the cover with one line ---------- */
.wt-screen{position:relative;width:var(--wt-w);aspect-ratio:16/9;margin:0 auto;background:#000;
  box-shadow:0 40px 90px rgba(0,0,0,.55);overflow:hidden}
.wt-screen mux-player{display:block;width:100%;height:100%;--media-object-fit:cover;--media-font-family:var(--sans)}
/* cover, not contain, in the page: the box and the episodes are both 16:9, so nothing is cropped, but contain left a
   hairline of the black box above the picture where the box lands on a fraction of a pixel, or where a rendition is not
   exactly 16:9 (Mux's 854x480). In fullscreen the screen's shape differs, so js/watch.js switches back to contain there
   (Mux Player puts an element inside its shadow root in fullscreen, so :fullscreen never matches the player) */
.wt-poster{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.wt-off .wt-poster{filter:brightness(.5)}
.wt-note{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:22px;padding:0 8%;text-align:center}
.wt-note p{max-width:24em;font-size:clamp(20px,2vw,30px);line-height:1.3;color:var(--cream);text-wrap:balance;text-shadow:var(--shadow-txt)}
.wt-note .watch{min-height:50px}
/* without JavaScript: the cover and the line; with it, js/watch.js replaces both */
.wt-nojs{display:none}
.no-js .wt-nojs{display:flex}
.no-js .wt-poster{filter:brightness(.5)}

/* ---------- heading and text beside the episode list ---------- */
.wt-body{width:var(--wt-w);margin:3.4vh auto 0;display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:4vh 4.5vw;align-items:start}
.wt .pg-head{font-size:clamp(34px,2.9vw,54px)}
.wt-meta{margin-top:1.3vh}
.wt-syn{margin-top:1.5vh;max-width:36em;color:var(--body);line-height:1.55;text-wrap:pretty}

.wt-list-head{font-family:var(--sans);font-weight:400;text-transform:uppercase;font-size:14px;letter-spacing:.16em;color:var(--label)}
.wt-eps{margin-top:2vh;display:flex;flex-direction:column;gap:14px}
.wt-ep-link{display:flex;align-items:center;gap:18px;padding:8px;border:1px solid rgba(239,231,214,.14);transition:border-color .3s,background-color .3s}
.wt-ep-link:hover{border-color:rgba(239,231,214,.5);background:rgba(239,231,214,.04)}
.wt-ep-link[aria-current=page]{border-color:var(--gold)}
.wt-thumb{flex:none;width:clamp(120px,10vw,168px);aspect-ratio:16/9;height:auto;object-fit:cover}
.wt-ep-text{display:flex;flex-direction:column;gap:4px}
.wt-ep-name{font-size:22px;line-height:1.2;color:var(--cream)}
.wt-ep-len{font-family:var(--sans);text-transform:uppercase;font-size:13px;letter-spacing:.14em;color:var(--label)}
.wt-ep-link[aria-current=page] .wt-ep-len{color:var(--gold)}
.wt-soon p{padding:14px 8px 0;font-size:19px;line-height:1.4;color:var(--sec);font-style:italic}

/* ---------- LaunchGood (the home page's support heading and gold .give button, from css/road.css) ---------- */
.wt-give{width:var(--wt-w);max-width:calc(100% - 2 * var(--gutter));margin:14vh auto 0;padding:7vh 0 14vh;border-top:1px solid rgba(239,231,214,.14);
  display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:4vh 4.5vw;align-items:start}
.wt-give-head{font-weight:500;font-size:clamp(26px,2.2vw,40px);line-height:1.15;color:var(--cream);text-wrap:balance}
.wt-give-row{margin-top:0}
.wt-give .give{text-decoration:none}

@media (max-width:760px){
  /* phones: the player runs edge to edge under the header */
  .wt{padding:var(--bar) 0 0}
  .wt-screen{width:100%;box-shadow:none}
  .wt-body{width:auto;grid-template-columns:minmax(0,1fr);margin-top:4vh;padding:0 var(--gutter);gap:6vh}
  .wt-give{width:auto;max-width:none;grid-template-columns:minmax(0,1fr);margin:10vh var(--gutter) 0;padding:6vh 0 10vh;gap:4vh}
  .wt-give-head{font-size:25px}
  .wt .pg-head{font-size:36px}
  .wt-syn{font-size:18px}
  .wt-ep-name{font-size:20px}
  .wt-note p{font-size:19px}
  .wt-note{gap:14px}
}

@media (prefers-reduced-motion:reduce){
  .wt-ep-link{transition:none}
}
