/* global React, useApp, useReveal, COPY */
const { useState, useEffect, useRef } = React;
function Nav() {
const { t, locale, setLocale } = useApp();
const locales = ["pl","en","de"];
return (
);
}
function Hero() {
const { t } = useApp();
const [scene, setScene] = useState(0);
useEffect(() => {
const id = setInterval(() => setScene((s) => (s + 1) % 3), 3800);
return () => clearInterval(id);
}, []);
return (
{t.hero.eyebrow}
{[0,1,2].map((i) => (
{t.hero.scroll} ↓
);
}
function SceneCopy({scene, t}) {
const copies = [t.hero.sceneA, t.hero.sceneB, t.hero.sceneC];
const c = copies[scene];
return (
{c.k}
{c.v}
);
}
/* Scene overlay — narrative beats over HeroUnderwater (rings → beams → cells) */
function HeroSceneOverlay({ scene }) {
return (
{/* Scene 0 — pulsing rings around panel */}
{scene === 0 && [0,1,2].map(i => (
))}
{/* Scene 1 — descending photon bars toward skin */}
{scene === 1 && (
)}
{/* Scene 2 — cellular glows scattered */}
{scene === 2 && (
)}
);
}
/* VARIANT A — photon sequence: red beam → penetrating skin → cellular regeneration */
function HeroSequence({ scene, theme }) {
return (
{/* Panel silhouette — stays */}
{/* Panel image — Essential (red) */}

{/* Glow halo behind panel */}
{/* Scene 1: light waves emanating */}
{scene === 0 && (
<>
{[0,1,2].map(i => (
))}
>
)}
{/* Scene 2: skin layers cross-section */}
{scene === 1 && (
)}
{/* Scene 3: cellular regeneration — mitochondria dots glowing */}
{scene === 2 && (
)}
);
}
/* VARIANT B (unused, reserved for future A/B test) */
function HeroUnderwater({theme}) {
const isDark = theme !== "light";
return (
{/* Cinematic backdrop */}
{/* Red halo behind panel */}
{/* Panel wrapper: slow rotation + float */}
{/* Orbital particles */}
{[...Array(18)].map((_, i) => {
const angle = (i / 18) * Math.PI * 2;
const radius = 22 + (i%3)*4;
return (
);
})}
{/* Vignette */}
);
}
/* VARIANT C — three-frame vertical triptych: pain, light, regeneration */
function HeroTriptych({scene, theme}) {
const frames = [
{ label: "Ból", color: "#1a0a0a", img: null, icon: "×" },
{ label: "Światło", color: "#3a0812", img: "images/lumaflex/essential-main.webp", icon: null },
{ label: "Regeneracja", color: "#0c0604", img: null, icon: "✓" },
];
return (
{frames.map((f, i) => (
{f.img && (

)}
{f.icon && (
{f.icon}
)}
))}
);
}
Object.assign(window, { Nav, Hero, HeroSceneOverlay });