diff --git a/components/primitives/HiloConductor.tsx b/components/primitives/HiloConductor.tsx index b576f44..911f158 100644 --- a/components/primitives/HiloConductor.tsx +++ b/components/primitives/HiloConductor.tsx @@ -14,6 +14,20 @@ import { usePrefersReducedMotion } from '@/lib/motion'; // Uses the page-level useScroll() with no target ref on purpose: no element // measuring, no "container has a static position" warnings, and one scroll // listener for the whole page. +// +// It lives in the empty margin band to the left of the centred +// `max-w-content` (1152px) column, never over it — some sections are +// `position: relative` for unrelated reasons and some are not, so an +// absolutely-positioned overlay with no explicit stacking level paints +// inconsistently: above the static sections, behind the relative ones. `z-30` +// gives it its own stacking context that beats every section root regardless +// of that accident, while staying under the sticky header's `z-50`. +// +// Hidden below `2xl` (1536px): that's the first breakpoint that guarantees a +// safe margin outside the 1152px column — (1536 - 1152) / 2 = 192px per side, +// comfortable room for the thread's own offset plus breathing space to the +// viewport edge. Narrower viewports have no safe band, so the thread simply +// doesn't render there rather than creeping over the text. const TRAZO = 'M50 0 C 20 140, 80 260, 50 400 C 20 540, 80 660, 50 800 C 20 940, 80 1060, 50 1200'; @@ -23,50 +37,42 @@ export function HiloConductor({ className = '' }: { className?: string }) { const { scrollYProgress } = useScroll(); const avance = useSpring(scrollYProgress, { stiffness: 90, damping: 30, restDelta: 0.001 }); - const base = `pointer-events-none absolute inset-y-0 left-1/2 -translate-x-1/2 w-full max-w-content h-full ${className}`; - - // The positioning/pointer-events classes live on a wrapping