'use client'; import React, { useRef } from 'react'; import { motion, useScroll, useTransform } from 'framer-motion'; import { useLocale } from 'next-intl'; export function ScaleOfImpact() { const containerRef = useRef(null); const locale = useLocale(); // Track scroll progress through this container const { scrollYProgress } = useScroll({ target: containerRef, offset: ["start end", "end start"] }); // Map scroll progress to SVG path length const pathLength = useTransform(scrollYProgress, [0.2, 0.8], [0, 1]); // Opacity for the massive background numbers const bgOpacity = useTransform(scrollYProgress, [0.1, 0.4, 0.8, 1], [0, 0.1, 0.1, 0]); return (
{/* Massive Watermark Numbers */}
474.932
{/* Foreground Content */}

{locale === 'en' ? ( <>An infrastructure
that connects the country. ) : ( <>Eine Infrastruktur,
die das Land verbindet. )}

{locale === 'en' ? "We don't just talk about the energy transition. We build it. In the last 36 months alone, we have completed a route that stretches from our headquarters in Guben all the way to Munich." : "Wir sprechen nicht nur über die Energiewende. Wir bauen sie. Allein in den letzten 36 Monaten haben wir eine Strecke realisiert, die von unserem Hauptsitz in Guben bis nach München reicht." }

{/* Abstract SVG Line Animation */}
{/* Background dim line */} {/* Glowing animated line */}
{/* Static Data Grid (No jumping text) */}
100+
{locale === 'en' ? 'Major Projects' : 'Großprojekte'}
372km
{locale === 'en' ? 'Cable Laying' : 'Kabelverlegung'}
102km
{locale === 'en' ? 'HDD Drilling' : 'Spülbohrung'}
); }