From 874bc4a2ff9c9fc22acbd019e16c0ef971ab3353 Mon Sep 17 00:00:00 2001 From: jwinterm Date: Sat, 6 Jun 2026 14:37:17 -0400 Subject: [PATCH] Skip the splash entirely for prefers-reduced-motion visitors Reduced-motion users now land straight on the main hero (desktop and mobile); the splash is no longer shown to them, not just de-animated. Set before paint via useIsoLayoutEffect so it never flashes. --- apps/web/src/app/page.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apps/web/src/app/page.tsx b/apps/web/src/app/page.tsx index d71d51f..1b172e7 100644 --- a/apps/web/src/app/page.tsx +++ b/apps/web/src/app/page.tsx @@ -25,6 +25,15 @@ export default function Home() { const splashRef = useRef(null); const restoreScroll = useRef(0); + // Respect prefers-reduced-motion: skip the splash entirely and land straight on + // the main hero, on desktop and mobile. Runs before paint, so the splash never + // flashes for these visitors. + useIsoLayoutEffect(() => { + if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) { + setEntered(true); + } + }, []); + // Deliberately place the nebula/monitor just to the left of the hero title, at any // screen width (restored from the original hero). const titleRef = useRef(null);