fix: interactive map visuals and docker dev setup
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 23s
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🧪 QA (push) Successful in 1m6s
Build & Deploy / 🏗️ Build (push) Failing after 2m52s
Build & Deploy / 🔔 Notify (push) Successful in 1s

- Removed confusing SVG lines from map

- Restored distinct clickable markers for major references

- Fixed corepack failing to install pnpm v11 in Docker by explicitly forcing v10

- Added direct port mapping 3001:3001 to bypass proxy issues
This commit is contained in:
2026-05-26 11:31:31 +02:00
parent 06d5178614
commit 5678ddcfd9
21 changed files with 1367 additions and 175 deletions

View File

@@ -0,0 +1,52 @@
'use client';
import React from 'react';
import { motion } from 'framer-motion';
import { useLocale } from 'next-intl';
export function DataGridPulse() {
const locale = useLocale();
return (
<div className="relative w-full py-32 bg-[#050B14] overflow-hidden flex flex-col items-center border-y border-primary/20 -mx-[50vw] px-[50vw] mb-16">
{/* Blueprint grid background */}
<div
className="absolute inset-0 opacity-20 pointer-events-none"
style={{
backgroundImage: 'linear-gradient(#82ED20 1px, transparent 1px), linear-gradient(90deg, #82ED20 1px, transparent 1px)',
backgroundSize: '40px 40px'
}}
/>
{/* Pulsing horizontal lines (Data Flow) */}
<motion.div
animate={{ x: ["-100%", "100%"] }}
transition={{ duration: 3, repeat: Infinity, ease: "linear" }}
className="absolute top-1/3 left-0 w-full h-[2px] bg-gradient-to-r from-transparent via-primary to-transparent opacity-50 blur-[2px]"
/>
<motion.div
animate={{ x: ["100%", "-100%"] }}
transition={{ duration: 4, repeat: Infinity, ease: "linear" }}
className="absolute top-2/3 left-0 w-full h-[2px] bg-gradient-to-r from-transparent via-white to-transparent opacity-30 blur-[2px]"
/>
<div className="relative z-10 w-full max-w-4xl mx-auto flex flex-col items-center text-center">
<h3 className="text-sm font-bold uppercase tracking-widest text-primary mb-6">
{locale === 'en' ? 'Network Expansion in Numbers' : 'Netzausbau in Zahlen'}
</h3>
<div className="bg-black/40 backdrop-blur-md p-12 md:p-16 rounded-3xl border border-white/10 shadow-2xl">
<div className="font-mono text-6xl md:text-8xl font-black text-white tracking-tighter mb-4 leading-none" style={{ fontVariantNumeric: 'tabular-nums' }}>
372.161<span className="text-primary text-3xl md:text-5xl ml-2">m</span>
</div>
<p className="text-white/70 text-lg md:text-xl font-medium max-w-lg mx-auto">
{locale === 'en'
? 'Cable routes laid since 2023. A massive infrastructure achievement, driven by our own machinery.'
: 'Verlegte Kabeltrassen seit 2023. Eine massive Infrastrukturleistung, getragen von unserem eigenen Maschinenpark.'}
</p>
</div>
</div>
</div>
);
}

View File

@@ -0,0 +1,64 @@
'use client';
import React, { useRef } from 'react';
import { motion, useScroll, useTransform } from 'framer-motion';
import { useLocale } from 'next-intl';
export function DeepDrillAnimation() {
const containerRef = useRef<HTMLDivElement>(null);
const locale = useLocale();
const { scrollYProgress } = useScroll({
target: containerRef,
offset: ["start center", "end center"]
});
const drillDepth = useTransform(scrollYProgress, [0, 1], ["0%", "100%"]);
return (
<div ref={containerRef} className="relative w-full py-32 flex flex-col items-center">
<div className="absolute inset-0 bg-[#050B14] -mx-[50vw] px-[50vw]" />
<div className="relative z-10 w-full max-w-3xl mx-auto flex flex-col items-center text-center text-white">
<h3 className="text-3xl font-heading font-extrabold mb-8 tracking-tight">
{locale === 'en' ? 'Precision in Depth' : 'Präzision in der Tiefe'}
</h3>
<p className="text-white/60 text-lg mb-16 max-w-xl">
{locale === 'en'
? 'Horizontal Directional Drilling (HDD) allows us to cross obstacles and rivers with extreme care.'
: 'Horizontalspülbohrverfahren (HDD) erlaubt uns, Hindernisse und Flüsse extrem schonend zu unterqueren.'}
</p>
{/* The Drill Path */}
<div className="relative w-2 h-96 bg-white/10 rounded-full mb-16">
<motion.div
className="absolute top-0 left-0 w-full bg-primary rounded-full"
style={{ height: drillDepth, boxShadow: '0 0 20px rgba(130,237,32,0.6)' }}
>
{/* The Drill Head */}
<div className="absolute -bottom-2 -left-2 w-6 h-6 bg-white rounded-full border-4 border-primary shadow-[0_0_15px_rgba(255,255,255,1)]" />
</motion.div>
</div>
{/* The Reveal Data */}
<motion.div
initial={{ opacity: 0, y: 20 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true, margin: "-100px" }}
transition={{ duration: 0.8 }}
className="flex flex-col items-center"
>
<div className="font-mono text-6xl md:text-8xl font-black text-white tracking-tighter mb-4" style={{ fontVariantNumeric: 'tabular-nums' }}>
102.771<span className="text-primary text-3xl md:text-5xl ml-2">m</span>
</div>
<div className="text-sm font-bold uppercase tracking-widest text-primary">
{locale === 'en' ? 'Drilled distance since 2023' : 'Gebohrte Strecke seit 2023'}
</div>
</motion.div>
</div>
</div>
);
}

View File

@@ -0,0 +1,80 @@
'use client';
import React from 'react';
import { motion } from 'framer-motion';
export function GrowthChart() {
const data = [
{ year: '2023', hdd: 29436, kabel: 76727 },
{ year: '2024', hdd: 28680, kabel: 131964 },
{ year: '2025', hdd: 44655, kabel: 163470 },
];
const maxVal = 163470; // Highest value for scaling
return (
<div className="w-full bg-white rounded-3xl p-8 md:p-12 shadow-sm border border-neutral-100 my-16">
<div className="mb-10">
<h3 className="text-3xl font-heading font-extrabold text-neutral-dark mb-2">Bewiesene Leistungsfähigkeit</h3>
<p className="text-neutral-500 font-medium">Unsere verlässliche Baukapazität der letzten drei Jahre (in Metern)</p>
</div>
<div className="space-y-8">
{data.map((item, index) => {
const hddWidth = (item.hdd / maxVal) * 100;
const kabelWidth = (item.kabel / maxVal) * 100;
return (
<div key={item.year} className="relative">
<div className="text-sm font-extrabold text-neutral-dark mb-2 w-16">{item.year}</div>
<div className="space-y-2">
{/* Kabelverlegung Bar */}
<div className="flex items-center gap-4">
<div className="flex-1 bg-neutral-100 rounded-full h-6 overflow-hidden relative">
<motion.div
initial={{ width: 0 }}
whileInView={{ width: `${kabelWidth}%` }}
viewport={{ once: true, margin: "-50px" }}
transition={{ duration: 1.5, delay: 0.1 * index, ease: "easeOut" }}
className="absolute top-0 left-0 h-full bg-primary rounded-full"
/>
</div>
<div className="w-24 text-right text-xs font-bold text-neutral-500 uppercase">
Kabel: {new Intl.NumberFormat('de-DE').format(item.kabel)}m
</div>
</div>
{/* HDD Bar */}
<div className="flex items-center gap-4">
<div className="flex-1 bg-neutral-100 rounded-full h-4 overflow-hidden relative">
<motion.div
initial={{ width: 0 }}
whileInView={{ width: `${hddWidth}%` }}
viewport={{ once: true, margin: "-50px" }}
transition={{ duration: 1.5, delay: 0.2 + 0.1 * index, ease: "easeOut" }}
className="absolute top-0 left-0 h-full bg-neutral-dark rounded-full"
/>
</div>
<div className="w-24 text-right text-xs font-bold text-neutral-500 uppercase">
HDD: {new Intl.NumberFormat('de-DE').format(item.hdd)}m
</div>
</div>
</div>
</div>
);
})}
</div>
<div className="mt-8 flex gap-6 border-t border-neutral-100 pt-6">
<div className="flex items-center gap-2">
<div className="w-3 h-3 rounded-full bg-primary" />
<span className="text-xs font-bold text-neutral-500 uppercase">Kabelverlegung</span>
</div>
<div className="flex items-center gap-2">
<div className="w-3 h-3 rounded-full bg-neutral-dark" />
<span className="text-xs font-bold text-neutral-500 uppercase">HDD Spülbohrung</span>
</div>
</div>
</div>
);
}

View File

@@ -6,7 +6,10 @@ import { MapPin, Factory, Zap, CheckCircle2, ArrowUpRight } from 'lucide-react';
import Image from 'next/image';
import { useRouter } from 'next/navigation';
import { AnimatedGlossyBorder } from '@/components/ui/AnimatedGlossyBorder';
import { Location, defaultLocations } from '@/lib/map-data';
import { Location, defaultLocations, minorLocations } from '@/lib/map-data';
import { useLocale } from 'next-intl';
const allLocations = [...defaultLocations, ...minorLocations];
interface Stat {
value: string;
@@ -31,15 +34,17 @@ export function InteractiveGermanyMap({
{ value: '100', suffix: '%', label: 'Überregionale Reichweite' },
{ value: '2', suffix: '+', label: 'Operative Standorte' },
],
locations = defaultLocations,
locations = allLocations,
isHero = false
}: InteractiveGermanyMapProps) {
const [activeLocation, setActiveLocation] = useState<Location | null>(null);
const router = useRouter();
const locale = useLocale();
const hq = locations.find((l) => l.type === 'hq');
const branch = locations.find((l) => l.type === 'branch');
const projects = locations.filter((l) => l.type === 'project');
const minorNodes = locations.filter((l) => l.type === 'minor_node');
return (
<div className={isHero ? "relative w-full" : "relative w-full max-w-7xl mx-auto py-16 md:py-24 px-4 sm:px-6 mt-16 md:mt-20"}>
@@ -91,80 +96,49 @@ export function InteractiveGermanyMap({
</div>
{/* Map Right */}
<div className="xl:col-span-7 relative flex items-center justify-center lg:justify-end mt-8 lg:mt-0 z-10">
<div className="xl:col-span-7 relative flex items-center justify-center min-h-[500px] lg:min-h-[700px] z-10 pointer-events-none">
{/* Map Container - Enforce strict aspect ratio matching the SVG (1024x1024) */}
<div className="relative w-full max-w-[600px] aspect-square z-10">
<div className="relative w-full max-w-[600px] aspect-square group pointer-events-auto">
{/* Map SVG */}
<div className="absolute inset-0 opacity-[0.25] mix-blend-screen drop-shadow-2xl brightness-200">
<div className="absolute inset-0 opacity-[0.25] mix-blend-screen drop-shadow-2xl brightness-200 pointer-events-none">
<Image
src="/germany-map.svg"
alt="Deutschlandkarte"
alt={locale === 'en' ? "Map of Germany" : "Deutschlandkarte"}
fill
className="object-cover"
priority
/>
</div>
{/* Connections (Lines) */}
<svg className="absolute inset-0 w-full h-full pointer-events-none z-10">
{hq && branch && (
<motion.line
x1={`${hq.x}%`}
y1={`${hq.y}%`}
x2={`${branch.x}%`}
y2={`${branch.y}%`}
stroke="rgba(130,237,32,0.6)"
strokeWidth="2"
strokeDasharray="6 6"
initial={{ pathLength: 0, opacity: 0 }}
animate={{ pathLength: 1, opacity: 1 }}
transition={{ duration: 2, ease: "easeOut" }}
/>
)}
{hq && projects.map((proj, idx) => (
<motion.line
key={proj.id}
x1={`${hq.x}%`}
y1={`${hq.y}%`}
x2={`${proj.x}%`}
y2={`${proj.y}%`}
stroke="rgba(130,237,32,0.3)"
strokeWidth="1.5"
initial={{ pathLength: 0, opacity: 0 }}
animate={{ pathLength: 1, opacity: 1 }}
transition={{ duration: 1.5, delay: 0.5 + idx * 0.2 }}
/>
))}
</svg>
{/* Minor Location Markers (The 100+ generic projects) */}
{locations.filter(l => l.type === 'minor_node').map((loc, idx) => (
<div
key={`minor-${idx}`}
className="absolute z-10 group/minor cursor-pointer w-10 h-10 flex items-center justify-center"
style={{
left: `${loc.x}%`,
top: `${loc.y}%`,
transform: 'translate(-50%, -50%)',
}}
onMouseEnter={() => setActiveLocation(loc)}
onMouseLeave={() => setActiveLocation(null)}
>
<div className="w-1.5 h-1.5 bg-primary/80 rounded-full group-hover/minor:bg-white group-hover/minor:scale-150 transition-all duration-300" />
<div className="absolute inset-0 m-auto w-2 h-2 bg-primary rounded-full opacity-0 group-hover/minor:animate-ping" />
</div>
))}
{/* Location Pins */}
{locations.map((loc, idx) => {
{/* Major & Reference Location Markers (HQ, Branch, Project) */}
{locations.filter(l => l.type !== 'minor_node').map((loc, idx) => {
const isHQ = loc.type === 'hq';
const isBranch = loc.type === 'branch';
const isActive = activeLocation?.id === loc.id;
const isNearLeft = loc.x < 50;
const isNearRight = loc.x >= 50;
const isNearTop = loc.y < 55; // 55% threshold to strongly avoid the top header
const tooltipClasses = [
'absolute w-[280px] sm:w-64 bg-white text-neutral-dark p-5 rounded-2xl shadow-2xl z-[9999] border border-neutral-100',
isNearLeft ? 'left-1/2 sm:left-0 -translate-x-1/2 sm:translate-x-0' : 'left-1/2 sm:left-auto sm:right-0 -translate-x-1/2 sm:translate-x-0',
isNearTop
? 'top-full mt-4 before:absolute before:-top-6 before:left-0 before:w-full before:h-6'
: 'bottom-full mb-4 before:absolute before:-bottom-6 before:left-0 before:w-full before:h-6'
].join(' ');
const arrowClasses = [
'absolute border-8 border-transparent drop-shadow-sm hidden sm:block',
isNearLeft ? 'left-6' : 'right-6',
isNearTop ? '-top-4 border-b-white border-t-0' : '-bottom-4 border-t-white border-b-0'
].join(' ');
return (
<div
key={loc.id}
className={`absolute transform -translate-x-1/2 -translate-y-1/2 group cursor-pointer w-16 h-16 flex items-center justify-center ${isActive ? 'z-[60]' : 'z-20'}`}
className={`absolute transform -translate-x-1/2 -translate-y-1/2 group/pin cursor-pointer w-16 h-16 flex items-center justify-center ${isActive ? 'z-[60]' : 'z-20'}`}
style={{ left: `${loc.x}%`, top: `${loc.y}%` }}
onMouseEnter={() => setActiveLocation(loc)}
onMouseLeave={() => setActiveLocation(null)}
@@ -177,121 +151,125 @@ export function InteractiveGermanyMap({
<div className="absolute inset-0 m-auto w-6 h-6 rounded-full animate-ping bg-primary/50 scale-150" />
)}
{/* Marker Dot */}
{/* Elegant Marker Dot */}
<motion.div
initial={{ scale: 0 }}
animate={{ scale: 1 }}
transition={{ type: 'spring', delay: idx * 0.1 }}
className={`relative flex items-center justify-center rounded-full shadow-[0_0_20px_rgba(130,237,32,0.4)] transition-transform duration-300 ${
isActive ? 'scale-125 z-30 ring-4 ring-primary/30' : 'scale-100'
className={`relative flex items-center justify-center rounded-full shadow-[0_0_20px_rgba(130,237,32,0.6)] transition-transform duration-300 ${
isActive ? 'scale-125 z-30 ring-4 ring-primary/40' : 'scale-100 group-hover/pin:scale-110'
} ${
isHQ || isBranch
? 'w-6 h-6 bg-primary text-[#050B14]'
? 'w-7 h-7 bg-primary text-[#050B14]'
: 'w-4 h-4 bg-white ring-[3px] ring-primary'
}`}
>
{(isHQ || isBranch) && <MapPin className="w-3.5 h-3.5" />}
{(isHQ || isBranch) && <MapPin className="w-4 h-4" />}
</motion.div>
{/* Tooltip */}
<AnimatePresence>
{isActive && (
<motion.div
variants={{
hidden: { opacity: 0, y: isNearTop ? -15 : 15, scale: 0.9 },
visible: {
opacity: 1, y: 0, scale: 1,
transition: {
type: "spring", stiffness: 350, damping: 25,
staggerChildren: 0.05, delayChildren: 0.05
}
},
exit: {
opacity: 0, y: isNearTop ? -10 : 10, scale: 0.95,
transition: { duration: 0.15, ease: "easeIn" }
}
}}
initial="hidden"
animate="visible"
exit="exit"
className={`${tooltipClasses} overflow-hidden p-0`}
>
{loc.featuredImage && (
<motion.div
variants={{ hidden: { opacity: 0 }, visible: { opacity: 1 } }}
className="relative w-full h-32 bg-neutral-100 overflow-hidden"
>
<Image
src={loc.featuredImage}
alt={loc.name}
fill
className="object-cover transform transition-transform duration-1000 ease-[cubic-bezier(0.16,1,0.3,1)] group-hover:scale-110"
/>
<div className="absolute inset-0 bg-gradient-to-t from-black/60 to-transparent opacity-80" />
<div className="absolute bottom-3 left-4 flex items-center gap-2">
{isHQ ? <Factory className="w-4 h-4 text-primary drop-shadow" /> : <Zap className="w-4 h-4 text-primary drop-shadow" />}
<span className="font-extrabold text-sm leading-tight text-white drop-shadow-md">{loc.name}</span>
</div>
</motion.div>
)}
<div className={loc.featuredImage ? "p-5 pt-4" : "p-5"}>
{!loc.featuredImage && (
<motion.div
variants={{ hidden: { opacity: 0, x: -5 }, visible: { opacity: 1, x: 0 } }}
className="flex items-center gap-2 mb-2"
>
{isHQ ? <Factory className="w-4 h-4 text-primary" /> : <Zap className="w-4 h-4 text-primary" />}
<span className="font-extrabold text-sm leading-tight text-neutral-dark">{loc.name}</span>
</motion.div>
)}
<motion.p
variants={{ hidden: { opacity: 0, y: 5 }, visible: { opacity: 1, y: 0 } }}
className="text-xs text-neutral-500 font-medium"
>
{loc.description}
</motion.p>
{loc.details && (
<ul className="mt-4 space-y-2">
{loc.details.map((detail, i) => (
<motion.li
key={i}
variants={{ hidden: { opacity: 0, x: -5 }, visible: { opacity: 1, x: 0 } }}
className="text-[11px] text-neutral-dark flex items-center gap-2 font-semibold"
>
<div className="w-4 h-4 rounded-full bg-primary/10 flex items-center justify-center shrink-0">
<CheckCircle2 className="w-3 h-3 text-primary" />
</div>
{detail}
</motion.li>
))}
</ul>
)}
{loc.href && (
<motion.div
variants={{ hidden: { opacity: 0, y: 5 }, visible: { opacity: 1, y: 0 } }}
className="mt-4 pt-3 border-t border-neutral-100 text-xs font-bold text-primary flex items-center gap-1 group/link"
>
Zum Projekt
<span className="text-base leading-none translate-y-[1px] transform transition-transform duration-300 group-hover:translate-x-1.5">&rarr;</span>
</motion.div>
)}
</div>
{/* Arrow Down/Up */}
<div className={arrowClasses} />
</motion.div>
)}
</AnimatePresence>
</div>
);
})}
{/* Global Tooltip */}
<AnimatePresence>
{activeLocation && (
<motion.div
key="tooltip"
initial={{ opacity: 0, y: 10, scale: 0.95 }}
animate={{ opacity: 1, y: 0, scale: 1 }}
exit={{ opacity: 0, y: 10, scale: 0.95 }}
transition={{ duration: 0.2 }}
className="absolute z-[9999] pointer-events-none"
style={{
left: `${activeLocation.x}%`,
top: `${activeLocation.y}%`,
transform: activeLocation.x < 50 ? 'translate(20px, -50%)' : 'translate(calc(-100% - 20px), -50%)',
}}
>
<div className="bg-[#050B14]/95 backdrop-blur-xl border border-white/10 rounded-2xl shadow-2xl min-w-[200px] w-max max-w-[300px] text-white overflow-hidden">
{activeLocation.featuredImage && (
<div className="relative w-full h-32 bg-neutral-900">
<Image
src={activeLocation.featuredImage}
alt={activeLocation.name}
fill
className="object-cover"
/>
<div className="absolute inset-0 bg-gradient-to-t from-[#050B14] to-transparent opacity-90" />
</div>
)}
<div className="p-4">
<div className="flex items-center gap-2 mb-1">
<MapPin className="w-3.5 h-3.5 text-primary" />
<span className="text-xs font-bold text-primary uppercase tracking-wider">
{activeLocation.type === 'hq' ? 'Hauptsitz' :
activeLocation.type === 'branch' ? 'Niederlassung' :
activeLocation.type === 'minor_node' ? 'Projekt' : 'Referenz'}
</span>
</div>
<div className="font-heading font-bold text-lg leading-tight mb-2">
{activeLocation.name}
</div>
{activeLocation.type !== 'minor_node' ? (
<div className="text-white/60 text-sm line-clamp-3 mb-3">
{activeLocation.description}
</div>
) : (
<div className="text-white/60 text-xs mb-3">
{activeLocation.description === 'wind' ? 'Errichtung Leitungstrassen & Netzanbindung für Windpark-Infrastruktur.' :
activeLocation.description === 'pv' ? 'Bau von Mittelspannungstrassen zur Einspeisung der PV-Anlage.' :
activeLocation.description === 'fiber' ? 'Komplexer FTTx Breitbandausbau inkl. LWL-Montage & Tiefbau.' :
activeLocation.description === 'power' ? '110kV Hochspannungstrasse Erdkabelverlegung.' :
activeLocation.description === 'battery' ? 'Infrastrukturausbau für BESS (Batteriespeicher).' :
'Komplexes Infrastrukturprojekt (Tiefbau & HDD).'}
</div>
)}
{(activeLocation.details || activeLocation.type === 'minor_node') && (
<ul className="mb-3 space-y-1.5 border-t border-white/10 pt-3">
{activeLocation.type === 'minor_node' ? (
<>
<li className="text-[11px] text-white/80 flex items-start gap-2 font-medium">
<CheckCircle2 className="w-3 h-3 text-primary shrink-0 mt-0.5" />
<span>{
activeLocation.description === 'wind' ? 'Netzanbindung Windpark' :
activeLocation.description === 'pv' ? 'Einspeisung PV-Anlage' :
activeLocation.description === 'fiber' ? 'FTTx Infrastruktur' :
activeLocation.description === 'power' ? '110kV Trasse' :
activeLocation.description === 'battery' ? 'BESS Anschluss' : 'Infrastrukturprojekt'
}</span>
</li>
<li className="text-[11px] text-white/80 flex items-start gap-2 font-medium">
<CheckCircle2 className="w-3 h-3 text-primary shrink-0 mt-0.5" />
<span>Tiefbau & Spülbohrung (HDD)</span>
</li>
</>
) : (
activeLocation.details?.map((detail, i) => (
<li key={i} className="text-[11px] text-white/80 flex items-start gap-2 font-medium">
<CheckCircle2 className="w-3 h-3 text-primary shrink-0 mt-0.5" />
<span>{detail}</span>
</li>
))
)}
</ul>
)}
{activeLocation.href && (
<div className="inline-flex items-center text-xs font-bold text-primary">
{locale === 'en' ? 'Learn more' : 'Zum Projekt'}
<ArrowUpRight className="w-3.5 h-3.5 ml-1" />
</div>
)}
</div>
</div>
</motion.div>
)}
</AnimatePresence>
</div>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,102 @@
'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<HTMLDivElement>(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 (
<div
ref={containerRef}
className="relative w-full min-h-[70vh] bg-[#050B14] flex flex-col items-center justify-center overflow-hidden border-y border-neutral-800"
>
{/* Massive Watermark Numbers */}
<motion.div
style={{ opacity: bgOpacity }}
className="absolute inset-0 flex flex-col items-center justify-center pointer-events-none select-none overflow-hidden mix-blend-overlay"
>
<div className="font-heading font-black text-[20vw] leading-none text-white opacity-20 whitespace-nowrap">
<span className="font-mono tracking-tighter">474.932</span>
</div>
</motion.div>
{/* Foreground Content */}
<div className="relative z-10 container max-w-7xl mx-auto px-4 flex flex-col items-center text-center">
<h2 className="text-3xl md:text-5xl font-heading font-extrabold text-white mb-6 tracking-tight">
{locale === 'en' ? (
<>An infrastructure <br className="md:hidden"/> that connects the country.</>
) : (
<>Eine Infrastruktur, <br className="md:hidden"/> die das Land verbindet.</>
)}
</h2>
<p className="text-white/60 text-lg md:text-xl max-w-2xl font-medium mb-16">
{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."
}
</p>
{/* Abstract SVG Line Animation */}
<div className="w-full max-w-4xl h-32 relative">
<svg
width="100%"
height="100%"
viewBox="0 0 1000 100"
preserveAspectRatio="none"
className="absolute inset-0"
>
{/* Background dim line */}
<path
d="M0,50 Q250,0 500,50 T1000,50"
fill="none"
stroke="rgba(255,255,255,0.05)"
strokeWidth="2"
/>
{/* Glowing animated line */}
<motion.path
d="M0,50 Q250,0 500,50 T1000,50"
fill="none"
stroke="#82ED20" // primary color
strokeWidth="4"
style={{ pathLength }}
className="drop-shadow-[0_0_15px_rgba(130,237,32,0.8)]"
/>
</svg>
</div>
{/* Static Data Grid (No jumping text) */}
<div className="grid grid-cols-1 md:grid-cols-3 gap-8 md:gap-16 w-full max-w-4xl mt-12">
<div className="flex flex-col items-center">
<div className="font-mono text-5xl md:text-6xl font-black text-white tracking-tighter mb-2">100<span className="text-primary">+</span></div>
<div className="text-xs font-bold uppercase tracking-widest text-white/50">{locale === 'en' ? 'Major Projects' : 'Großprojekte'}</div>
</div>
<div className="flex flex-col items-center">
<div className="font-mono text-5xl md:text-6xl font-black text-white tracking-tighter mb-2">372<span className="text-primary text-3xl">km</span></div>
<div className="text-xs font-bold uppercase tracking-widest text-white/50">{locale === 'en' ? 'Cable Laying' : 'Kabelverlegung'}</div>
</div>
<div className="flex flex-col items-center">
<div className="font-mono text-5xl md:text-6xl font-black text-white tracking-tighter mb-2">102<span className="text-primary text-3xl">km</span></div>
<div className="text-xs font-bold uppercase tracking-widest text-white/50">{locale === 'en' ? 'HDD Drilling' : 'Spülbohrung'}</div>
</div>
</div>
</div>
</div>
);
}

View File

@@ -0,0 +1,48 @@
'use client';
import React, { useEffect, useState } from 'react';
import { motion, useMotionValue, useTransform, animate, useInView } from 'framer-motion';
interface AnimatedCounterProps {
value: number;
duration?: number;
delay?: number;
suffix?: string;
prefix?: string;
className?: string;
}
export function AnimatedCounter({
value,
duration = 2,
delay = 0,
suffix = '',
prefix = '',
className = '',
}: AnimatedCounterProps) {
const count = useMotionValue(0);
const rounded = useTransform(count, (latest) => {
// Format with thousands separator
return new Intl.NumberFormat('de-DE').format(Math.round(latest));
});
const ref = React.useRef(null);
const inView = useInView(ref, { once: true, margin: "-100px" });
useEffect(() => {
if (inView) {
const controls = animate(count, value, {
duration: duration,
delay: delay,
ease: 'easeOut',
});
return controls.stop;
}
}, [inView, value, duration, delay, count]);
return (
<motion.span ref={ref} className={className}>
{prefix}<motion.span>{rounded}</motion.span>{suffix}
</motion.span>
);
}

View File

@@ -7,5 +7,6 @@ export * from './Card';
export * from './Badge';
export * from './Input';
export * from './Textarea';
export * from './AnimatedCounter';
export * from './Label';
export * from './Callout';