From a69b12642237844e60bef7cb8abac7cbd074b53b Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.net>
Date: Fri, 8 May 2026 07:47:47 +0000
Subject: fix(scroll): route LandingHero scroll-down through Lenis

Lenis disables native CSS smooth scroll, so window.scrollTo({behavior:"smooth"}) jumps instantly. Expose the Lenis instance via a store and scroll through it, falling back to native when unavailable.
---
 src/lib/LandingHero.svelte | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'src/lib/LandingHero.svelte')

diff --git a/src/lib/LandingHero.svelte b/src/lib/LandingHero.svelte
index b57aec85..9f5d0368 100644
--- a/src/lib/LandingHero.svelte
+++ b/src/lib/LandingHero.svelte
@@ -1,6 +1,7 @@
 <script lang="ts">
 import { env } from "$env/dynamic/public";
 import localforage from "localforage";
+import lenis from "$stores/lenis";
 
 let heroSection = $state<HTMLElement>();
 
@@ -10,7 +11,8 @@ const scrollPastHero = () => {
 	const heroBottom =
 		heroSection.getBoundingClientRect().bottom + window.scrollY;
 
-	window.scrollTo({ top: heroBottom, behavior: "smooth" });
+	if ($lenis) $lenis.scrollTo(heroBottom);
+	else window.scrollTo({ top: heroBottom, behavior: "smooth" });
 };
 </script>
 
-- 
cgit v1.2.3

