{/* Persistent background layer -- lives OUTSIDE AnimatePresence, drifts continuously */}
{/* Persistent midground layer -- transforms with currentScene, no mount/unmount */}
= 3 ? 0.4 : 0.9,
}}
transition={{ duration: 0.8, ease: [0.22, 1, 0.36, 1] }}
/>
{/* Only scene-specific foreground content lives inside AnimatePresence */}
{currentScene === 0 && }
{currentScene === 1 && }
{currentScene === 2 && }
{currentScene === 3 && }
{currentScene === 4 && }
);
}
```
**Scene component** -- each scene is a choreographed sequence with visual layers:
```tsx
// src/components/video/video_scenes/Scene1.tsx
// Scene with choreographed multi-element sequence + visual layers
export function Scene1() {
const [phase, setPhase] = useState(0);
useEffect(() => {
const timers = [
setTimeout(() => setPhase(1), 0), // accent line draws
setTimeout(() => setPhase(2), 400), // headline staggers in
setTimeout(() => setPhase(3), 1200), // subline appears
setTimeout(() => setPhase(4), 2500), // elements begin exit drift
];
return () => timers.forEach(t => clearTimeout(t));
}, []);
return (