/* The homepage film (film-hero.js). While html.film is set the top of the page is only the film:
   the header is hidden (and inert), the hero's contents are transparent and the chapter rail (or menu) waits
   until the film is scrolled away. Where there is room under the picture, the script shows the install,
   Docs and GitHub links there until they glide home. The rest of the page is there as usual below it. */
.film .site-header{visibility:hidden}
.film .hero :is(.h1-lead,.flesh,.lede,.hero-claim,.actions>*,.hero-meta,.hero-description,.host-card,.specimen){opacity:0}
.film:not(.film-away) :is(.rail,.mobile-guide,.motion-toggle){opacity:0;visibility:hidden}
/* The first paint, before the script has put the film in place. */
.film:not(.film-staged) .hero::before{content:"";position:absolute;inset:0 0 auto;height:min(100%,100svh);z-index:-1;background:var(--ground)}

/* The film's parts are the hero's own children, so they interleave with its layers: the ground under
   everything, the video and its grain over the specimen, the lifted words over the video. */
.film-part{position:absolute;left:0;top:0;pointer-events:none}
.film-ground,.film-grain{width:100%;height:min(100%,100svh)}
.film-ground{z-index:-1;background:var(--ground);-webkit-mask:linear-gradient(#000 calc(100% - 72px),#0000);mask:linear-gradient(#000 calc(100% - 72px),#0000)}
.film-video{z-index:4;display:block;object-fit:fill;transform-origin:0 0;
  /* The picture already fades to the ground at its edge; the mask makes that edge vanish on any ground. */
  -webkit-mask:linear-gradient(90deg,#0000,#000 5%,#000 95%,#0000),linear-gradient(#0000,#000 5%,#000 95%,#0000);-webkit-mask-composite:source-in;
  mask:linear-gradient(90deg,#0000,#000 5%,#000 95%,#0000) intersect,linear-gradient(#0000,#000 5%,#000 95%,#0000)}
.film-grain{z-index:4;background:url('/art/grain.png');opacity:.05;animation:film-grain .6s steps(5) infinite}
@keyframes film-grain{to{background-position:173px 291px}}
.film-word{z-index:5;margin:0;font-family:OphioBook,serif;font-style:italic;font-weight:400;line-height:1.15;color:var(--signal);white-space:nowrap;transform-origin:0 0;opacity:0}
.film-rule{position:absolute;left:0;right:0;bottom:-1px;height:1px;background:#eee6dc29;transform-origin:0 0;transform:scaleX(0);visibility:visible}

/* Bottom right of the film: Skip, then the sound notice. */
.film-controls{z-index:6;left:auto;right:max(14px,2.2%);top:min(100%,100svh);translate:0 calc(-100% - max(14px,1.6vh));display:flex;align-items:center;justify-content:flex-end;gap:8px;max-width:calc(100% - 28px);pointer-events:auto}
.film-away .film-controls{visibility:hidden;opacity:0}
.film-controls button{display:inline-flex;align-items:center;gap:9px;min-height:40px;margin:0;padding:9px 13px;border:1px solid var(--edge);background:#0a0605d9;color:#d9c6e3;font:12px/1.25 OphioMono,monospace;letter-spacing:.06em;text-transform:uppercase;text-align:left}
.film-controls button:hover{border-color:#a47cbe;color:var(--ivory)}
.film-sound i{flex:none;width:6px;height:6px;border-radius:50%;background:var(--signal);box-shadow:0 0 12px #c3ff24aa}
.film-sound svg{flex:none;width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.film-sound[aria-pressed="true"] .off,.film-sound:not([aria-pressed="true"]) .on{display:none}
/* "Watch the film" sits under the actions without taking any room, so the hero keeps today's layout. */
.film-replay{position:absolute;left:0;top:100%;margin:calc(6*var(--u,1px)) 0 0;padding-block:calc(6*var(--u,1px));border-width:0 0 1px;background:none;color:inherit;font-family:inherit;text-align:left;white-space:nowrap}
@media(max-width:760px){.film-controls{right:12px;max-width:calc(100% - 24px);gap:6px}.film-controls button{padding:8px 10px;letter-spacing:.04em}}
@media(prefers-reduced-motion:reduce){.film-grain{animation:none}}
/* The headline sits over the picture, so "host." comes in cleanly as "in." goes. */
.film .hero-copy{z-index:5}
