diff --git a/components/sections/CloudRevealSection.tsx b/components/sections/CloudRevealSection.tsx index 9c47325..e641ef7 100644 --- a/components/sections/CloudRevealSection.tsx +++ b/components/sections/CloudRevealSection.tsx @@ -81,8 +81,9 @@ export default function CloudRevealSection() { let rafId: number const loop = () => { + const rect = section.getBoundingClientRect() const totalHeight = section.offsetHeight - window.innerHeight - const scrolled = window.scrollY - section.offsetTop + const scrolled = -rect.top const progress = Math.max(0, Math.min(1, scrolled / totalHeight)) const targetIdx = Math.min(