/* global React */
/* Hero backdrop — hallucinating patterns. Pure shape + color, no words.
Each scene animates on its own; the reel cross-fades through them. */
const { useState: hbUseState, useEffect: hbUseEffect } = React;
/* SCENE 1 — Logarithmic spiral, slowly rotating */
function SceneSpiral() {
// Pre-compute a spiral path
const points = [];
for (let t = 0; t < 36; t += 0.05) {
const r = 6 * Math.exp(0.16 * t);
const x = 500 + Math.cos(t) * r;
const y = 500 + Math.sin(t) * r;
points.push(`${x.toFixed(1)},${y.toFixed(1)}`);
}
const d = "M" + points.join(" L");
return (
);
}
/* SCENE 2 — Grid that breathes & skews like perspective tilting */
function SceneGrid() {
return (
);
}
/* SCENE 3 — Concentric rings pulsing outward */
function SceneRings() {
return (
{Array.from({ length: 14 }).map((_, i) => (
))}
);
}
/* SCENE 4 — Dot field that pulses and shifts */
function SceneDots() {
return (
);
}
/* SCENE 5 — Diagonal scrolling stripes */
function SceneStripes() {
return (
);
}
/* SCENE 6 — Sunray conic rotating */
function SceneRays() {
return (
);
}
/* SCENE 7 — Moiré of two rotating grids */
function SceneMoire() {
return (
);
}
/* SCENE 8 — Sine wave field stacking */
function SceneWaves() {
return (
);
}
const SCENES = [SceneSpiral, SceneGrid, SceneRings, SceneDots, SceneStripes, SceneRays, SceneMoire, SceneWaves];
function HeroBackdrop() {
const [i, setI] = hbUseState(0);
const [flicker, setFlicker] = hbUseState(false);
hbUseEffect(() => {
const id = setInterval(() => {
setFlicker(true);
setTimeout(() => setI((x) => (x + 1) % SCENES.length), 90);
setTimeout(() => setFlicker(false), 220);
}, 4200);
return () => clearInterval(id);
}, []);
return (
{SCENES.map((Scene, idx) => (
))}
);
}
Object.assign(window, { HeroBackdrop });