/* M28 Investigates · the Films & Documentaries page (Bex's briefs of 25 Nov 2026). Made by lib/p_films.py.

   "Netflix-style (inspired by Netflix, nothing copied)": the title; one large featured film (a full-width still, its
   title, its one-line summary when it has one, "Play" and "More info"); then rows that scroll sideways, each with a
   title, posters that grow slightly on hover, and an arrow at each end. Black, our red, our font. A poster is a link
   to the film's own page: nothing loads from YouTube here.

   The type is the site's seven settings (core.css), no size of its own:
     the page title                               headline
     the featured film's title                    section heading
     its one-line summary                         standfirst
     a row's title                                subheading
     a poster's title, and every line of facts    small text */

.fx-top { padding-top: clamp(1.5rem, 1.1rem + 1.6vw, 2rem); }
.fx-top h1 { position: relative; padding-top: 1.125rem; font: 800 var(--ts-headline)/var(--ts-headline-lh) var(--f-text); letter-spacing: -.03em; color: var(--head); text-wrap: balance; }
.fx-top h1::before { content: ""; position: absolute; left: 0; top: 0; width: 1.75rem; height: 3px; background: var(--red); }      /* the short red bar of the page titles */

/* ---------------------------------------------------------------- the featured film */
.fx-hero { position: relative; display: grid; min-height: clamp(21rem, 33vw, 29.5rem); margin-top: clamp(1rem, .8rem + 1vw, 1.75rem); overflow: hidden; background: #000; }
.fx-hero__pic { position: absolute; inset: 0; }
.fx-hero__pic .ph { width: 100%; height: 100%; aspect-ratio: auto; background: #000; }
.fx-hero__pic .ph img { object-position: center 28%; transition: none; }
/* the still fades into the page at the left, where the words stand, and at the foot, where the rows begin */
.fx-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgb(0 0 0 / .9) 0%, rgb(0 0 0 / .66) 32%, rgb(0 0 0 / .1) 66%, rgb(0 0 0 / 0) 100%), linear-gradient(0deg, var(--bg) 0%, rgb(0 0 0 / 0) 36%); }
.fx-hero__in { position: relative; z-index: 1; align-self: end; padding-block: clamp(1.5rem, 1rem + 2.4vw, 2.75rem); }
.fx-hero h2 { max-width: 40rem; font: 800 var(--ts-section)/1.12 var(--f-text); letter-spacing: -.015em; color: var(--white); text-wrap: balance; }
.fx-hero__s { max-width: 40rem; margin-top: .625rem; font: 400 var(--ts-stand)/1.4 var(--f-text); color: var(--white); }
.fx-hero__m { display: flex; flex-wrap: wrap; gap: 0 .625rem; margin-top: .625rem; font: 400 var(--ts-small)/1.4 var(--f-text); color: #D6D6D6; }
.fx-hero__m span + span::before, .fx-card__m span + span::before { content: "·"; margin-right: .625rem; color: var(--ink-3); }
.fx-hero__m .fx-by { font-weight: 700; color: var(--white); }
.fx-hero .btnrow { margin-top: clamp(1rem, .8rem + .8vw, 1.5rem); }
.fx-play { background: var(--red); border-color: var(--red); color: var(--white); }
.fx-play:hover { background: var(--white); border-color: var(--white); color: var(--black); }
.fx-play svg { fill: currentColor; }
@media (max-width: 47.99em) {
  .fx-hero { min-height: 25rem; }
  .fx-hero::after { background: linear-gradient(0deg, var(--bg) 0%, rgb(0 0 0 / .78) 38%, rgb(0 0 0 / .12) 72%, rgb(0 0 0 / 0) 100%); }
  .fx-hero .btn { flex: 1 1 0; padding-inline: 1rem; }
}

/* ---------------------------------------------------------------- the rows */
.fx-rows { --fx-pad: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))); --fx-w: clamp(13.5rem, 17.2vw, 17rem);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(1.375rem, 1.1rem + 1.3vw, 2.25rem); padding-block: clamp(1.25rem, 1rem + 1.2vw, 2rem) clamp(2.75rem, 2rem + 3vw, 4.5rem); }
.fx-row { min-width: 0; }                                  /* a row is as wide as the page, never as wide as its posters: the line of posters scrolls inside it */
.fx-row__t { padding-inline: var(--fx-pad); font: 800 var(--ts-sub)/1.2 var(--f-text); letter-spacing: -.01em; color: var(--head); }
.fx-row__t a { display: inline-flex; align-items: center; gap: .5em; min-height: 2.75rem; color: inherit; }      /* tall enough for a thumb */
.fx-row__t a i { font-style: normal; color: var(--red); transition: transform .2s; }
.fx-row__t a:hover i { transform: translateX(.25rem); }
.fx-rail { position: relative; }
.fx-rail__track { display: flex; gap: clamp(.625rem, .5rem + .5vw, 1rem); padding: .875rem var(--fx-pad) .375rem; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; scroll-padding-inline: var(--fx-pad); scrollbar-width: none; }
.fx-rail__track::-webkit-scrollbar { display: none; }
.fx-rail__track:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.fx-rail__track > li { position: relative; flex: 0 0 auto; width: var(--fx-w); scroll-snap-align: start; }
.fx-rail__track > li:hover, .fx-rail__track > li:focus-within { z-index: 2; }
@media (max-width: 47.99em) { .fx-rows { --fx-w: 62vw; } }                    /* a poster and the edge of the next one: the row says it goes on */

/* a poster: the still, the title, then whose film it is, the year and the length */
.fx-card a { display: block; color: var(--head); }
.fx-card .ph { border-radius: 3px; background: #101010; transform-origin: center; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.fx-card .ph img { transition: none; }
.fx-card a:hover .ph, .fx-card a:focus-visible .ph { transform: scale(1.045); box-shadow: 0 12px 30px rgb(0 0 0 / .75); }
.fx-card h3 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin-top: .75rem; font: 700 var(--ts-small)/1.3 var(--f-text); color: var(--head); }
.fx-card a:hover h3 { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: .22em; }
.fx-card__m { display: flex; flex-wrap: wrap; gap: 0 .625rem; margin-top: .25rem; font: 400 var(--ts-small)/1.35 var(--f-text); color: var(--ink-3); }
.fx-by { color: var(--ink-2); }
.fx-pod { display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: 3px; background: #101010; transition: transform .25s var(--ease); }
.fx-pod svg { width: auto; height: 100%; }
.fx-card--pod a:hover .fx-pod { transform: scale(1.045); }
@media (prefers-reduced-motion: reduce) { .fx-card .ph, .fx-pod, .fx-row__t a i { transition: none; } }

/* the two arrows at a row's ends (shown by assets/js/films.js; a touch screen swipes instead) */
.fx-rail__btn { position: absolute; z-index: 3; top: .875rem; display: grid; place-items: center; width: clamp(2.75rem, 3.4vw, 3.5rem); height: calc(var(--fx-w) * 9 / 16); padding: 0; border: 0;
  background: rgb(0 0 0 / .72); color: var(--white); cursor: pointer; opacity: 0; transition: opacity .2s, background .2s; }
.fx-rail__btn[hidden] { display: none; }
.fx-rail__btn--prev { left: 0; }
.fx-rail__btn--next { right: 0; }
.fx-rail__btn svg { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.fx-rail:hover .fx-rail__btn, .fx-rail__btn:focus-visible { opacity: 1; }
.fx-rail__btn:hover { background: var(--red); }
@media (hover: none) { .fx-rail__btn { display: none; } }
