// site-film-hotpage.jsx — Cinematic hotpage for streaming week
// Replaces FilmDetail when festival.streaming.enabled && videoUrl is set
const HP_STRAND_COLORS = {
Fiction: { color:"#ff5c70", grad:"linear-gradient(150deg,#611f2f 0%,#2d1019 100%)" },
Documentary: { color:"#9b6fc0", grad:"linear-gradient(150deg,#42295f 0%,#241646 100%)" },
Animation: { color:"#ffc436", grad:"linear-gradient(150deg,#634b1a 0%,#2d230c 100%)" },
Experimental: { color:"#5fd0d8", grad:"linear-gradient(150deg,#13444a 0%,#0b2126 100%)" },
};
function hpFallback(sc) {
return `radial-gradient(120% 85% at 80% 16%,${sc.color}4d 0%,transparent 50%),radial-gradient(90% 70% at 8% 98%,${sc.color}26 0%,transparent 52%),${sc.grad}`;
}
// NOTE: film hotpage playback (both the main video and the trailer) is rendered via the
// shared, analytics-wired window.VideoPlayer (site-video-player.jsx) — see usages below.
// A duplicate local VideoPlayer used to live here, shadowing window.VideoPlayer for the
// trailer JSX tag ( resolves to same-file declarations before window.*),
// and it only ever called window.trackEvent — a function that is never defined anywhere in
// the app (only sketched in STATS_EXPANSION_PLAN.md). That silently dropped 100% of trailer
// play/completion analytics. Removed; trailer now explicitly uses window.VideoPlayer too.
function FilmHotpage({ filmId, navigate }) {
const d = useSite();
const f = d.festival || {};
const str = f.streaming || {};
const ovr = (str.filmOverrides || {})[filmId] || {};
const currentYear = (f.dates?.year) || new Date().getFullYear().toString();
const film = (d.films || []).find(fl => fl.id === filmId);
if (!film) {
return (