/* HC-BUILD hc-films v1.0 2026-11-16
   The film slot: one card per film, used by the homepage "See it work" band and the Proof page.

   Markup contract (the script is js/hc-films.js):
     <div class="hc-films hc-films--3">                       (or hc-films--6 on the Proof page)
       <figure class="hc-film" data-film="f1" id="film-f1">   (add hc-film--wide for a 16:9 film)
         <div class="hc-film__media">
           <video controls playsinline preload="none" poster="..." src="..." data-ngn="..." ...></video>
           (or, where no close video exists yet, a still: <img ...>, no play button, no controls)
         </div>
         <figcaption class="hc-film__cap"><b>Film title</b><span>Product full name</span>
           <small class="hc-film__note">Illustrative example</small></figcaption>
       </figure>
     </div>

   Colours come from the page's own tokens, so the same card sits on the dark homepage
   (--card, --stage-ink) and on the paper pages (--surface, --ink) without a second theme.
   Every card in a row is the same height: the media well stretches and centres its film,
   so a 16:9 film beside a tall one is letterboxed on the well instead of leaving a hole. */
.hc-films{
  --f-card:var(--card,var(--surface,#FFFFFF));
  --f-line:var(--line,#E7DDCF);
  --f-ink:var(--stage-ink,var(--ink,#241E1A));
  --f-ink-2:var(--stage-ink-2,var(--ink-2,#574E45));
  --f-ink-3:var(--stage-ink-3,var(--ink-3,#6E6056));
  --f-well:#14110F;
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;align-items:stretch;margin-top:26px
}
.hc-film{margin:0;min-width:0;display:flex;flex-direction:column;background:var(--f-card);border:1px solid var(--f-line);border-radius:14px;padding:10px;color:var(--f-ink)}
.hc-film__media{flex:1 1 auto;display:flex;align-items:center;justify-content:center;background:var(--f-well);border-radius:10px;overflow:hidden}
.hc-film__media video,.hc-film__media img{display:block;width:100%;max-width:100%;height:auto;aspect-ratio:var(--hc-film-ratio,9/16);object-fit:contain;background:var(--f-well)}
.hc-film--wide .hc-film__media video,.hc-film--wide .hc-film__media img{aspect-ratio:var(--hc-film-ratio,16/9)}
.hc-film__cap{display:flex;flex-direction:column;gap:2px;padding:12px 6px 4px;text-align:left}
.hc-film__cap b{font-size:1rem;font-weight:700;line-height:1.3;color:var(--f-ink)}
.hc-film__cap span{font-size:.9rem;line-height:1.4;color:var(--f-ink-2)}
.hc-film__note{font-family:var(--mono,ui-monospace,Consolas,monospace);font-size:.72rem;line-height:1.4;color:var(--f-ink-3);margin-top:5px}
.hc-film:target{border-color:var(--brand,#E8722B);box-shadow:0 0 0 1px var(--brand,#E8722B) inset}

/* four slots (homepage, from 18 Nov 2026): four to a row, then two, then one */
.hc-films--4{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:900px){.hc-films--4{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* six slots (Proof page): three, then two, then one to a row */
@media(max-width:900px){.hc-films--6{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* phones: one card to a row, centred, never wider than a phone screen needs */
@media(max-width:720px){
  .hc-films,.hc-films--4,.hc-films--6{grid-template-columns:minmax(0,340px);justify-content:center;gap:14px}
}

/* the one line of maths under the homepage films, and its source */
.hc-mathsline{margin-top:26px;max-width:64ch;font-size:clamp(1rem,1.5vw,1.1rem);line-height:1.55;color:var(--stage-ink,var(--ink,#241E1A))}
.hc-mathsline a{font-weight:700;white-space:nowrap;color:var(--brand-deep,#C2521C);text-decoration:underline;text-underline-offset:3px}
.hc-mathssrc{margin-top:8px;font-size:.82rem;line-height:1.5;color:var(--stage-ink-3,var(--ink-3,#6E6056))}
.hc-mathssrc a{color:inherit;text-decoration:underline;text-underline-offset:3px}
