// desidium-sections-a.jsx — Nav, Hero, Divisions, Why
const { useState: useStateA, useEffect: useEffectA, useRef: useRefA } = React;
/* ---------------- NAV ---------------- */
function Nav({ lang, setLang, scrolled, go, open, setOpen }) {
const n = I18N.nav;
// "join" ("Become a model") temporarily hidden — re-add ["join","route:join"] to restore.
const items = [["roster","#roster"],["studio","#studio"],["cases","#cases"],["journal","route:journal"],["contact","#contact"]];
return (
);
}
/* ---------------- HERO ---------------- */
// Split hero: one autoplaying reel per talent, side-by-side (stacked on mobile).
// Respects prefers-reduced-motion and the tweaks "motion" toggle by pausing on the first frame.
function HeroReels({ reels, lang, motion }) {
const wrap = useRefA(null);
const base = (window.desidiumWp && window.desidiumWp.themeUri) || "";
useEffectA(() => {
const mq = window.matchMedia("(prefers-reduced-motion: reduce)");
const sync = () => {
const play = motion !== false && !mq.matches;
wrap.current && wrap.current.querySelectorAll("video").forEach(v => {
if (play) { const p = v.play(); p && p.catch && p.catch(()=>{}); } else { v.pause(); }
});
};
sync();
mq.addEventListener("change", sync);
return () => mq.removeEventListener("change", sync);
}, [motion]);
return (
{reels.map((r, i) => (
{L(r.label, lang)}
))}
);
}
function Hero({ lang, go, motion }) {
const h = I18N.hero;
const [loaded, setLoaded] = useStateA(false);
useEffectA(() => { const t = setTimeout(()=>setLoaded(true), 80); return ()=>clearTimeout(t); }, []);
return (
{h.reels && h.reels.length
?
: }
{L(h.reel,lang)}
{L(h.kicker,lang)}
{L(h.line1,lang)}
{L(h.line2a,lang)}
{L(h.line2b,lang)}
{L(h.sub,lang)}
);
}
/* ---------------- DIVISIONS ---------------- */
// Small overlay card on a division image: talent name, one-liner, Instagram + case-study links.
function TalentCard({ t, lang, go }) {
const isExternal = /^https?:\/\//.test(t.caseHref || "");
return (
{L(t.role, lang)}
{t.name}
{L(t.desc, lang)}
);
}
function Divisions({ lang, motion, go }) {
const d = I18N.divisions;
return (
{L(d.label,lang)}
{L(d.title,lang)}
{d.items.map((it, i) => (
{!it.image && {it.no}
}
{it.talent && }
{L(it.kicker,lang)}
{L(it.name,lang)}
{L(it.body,lang)}
{it.services.map((s, j) => (
{String(j+1).padStart(2,"0")}
{L(s,lang)}
))}
))}
);
}
/* ---------------- WHY ---------------- */
function Why({ lang, motion }) {
const w = I18N.why;
return (
{L(w.label,lang)}
{w.items.map((it, i) => (
{it.no}
{L(it.t,lang)}
{L(it.d,lang)}
))}
);
}
Object.assign(window, { Nav, Hero, Divisions, Why });