"use client"; import { useEffect, useState } from "react"; import Image from "next/image"; import { AnimatePresence, motion } from "framer-motion"; /** * Global preloader — covers the viewport on first paint with the spinning * Cerkel mark, wordmark and a shimmer bar, then sweeps up and away. Scroll * is locked while visible. Pure client-side; shows once per full page load. */ const MIN_SHOW_MS = 1500; export default function Preloader() { const [done, setDone] = useState(false); useEffect(() => { document.documentElement.style.overflow = "hidden"; const t = setTimeout(() => { setDone(true); document.documentElement.style.overflow = ""; }, MIN_SHOW_MS); return () => { clearTimeout(t); document.documentElement.style.overflow = ""; }; }, []); return ( {!done && ( )} ); }