"use client"; import { type ReactNode, useEffect, useRef, useState } from "react"; interface RevealProps { children: ReactNode; className?: string; /** Seconds to wait before the reveal starts. */ delay?: number; } /** * Fade-and-rise-on-scroll, without motion/react. * * This component sits on the public home page, the auth pages and the settings * page, so the animation library used to be pulled into their initial bundle * for this one effect. The behaviour is a plain IntersectionObserver plus two * CSS classes. * * Two safety rules, because "invisible until a scroll event" is a bad failure * mode: * - `.motion-reveal` starts at `opacity: 0` and is only restored by the * animation, so globals.css forces it visible under * `prefers-reduced-motion`, and the root layout ships a `