import React, { useEffect, useRef, useState } from 'https://esm.sh/react@18.2.0';
import { createRoot } from 'https://esm.sh/react-dom@18.2.0/client';
import { HardHat, Building2, Wrench, ChevronDown, CheckCircle2, Factory, Activity, Truck, Hammer, PenTool, BarChart } from 'https://esm.sh/lucide-react@0.292.0?deps=react@18.2.0';
import gsap from 'https://esm.sh/gsap@3.12.2';
import { motion, useInView } from 'https://esm.sh/framer-motion@10.16.4?deps=react@18.2.0,react-dom@18.2.0';
// Keyword Highlighting Component (Scroll triggered)
const HighlightText = ({ text }) => {
const keywords = ["1998", "Infrastructure", "Manufacturing", "ABSA", "Precision", "Logistics", "Civil", "Property", "Mechanical", "Management"];
const words = text.split(/(\s+)/);
return (
<>
{words.map((word, idx) => {
const cleanWord = word.replace(/[.,]/g, '');
const isMatch = keywords.some(k => cleanWord.toLowerCase() === k.toLowerCase());
if (isMatch) {
return (
{word}
);
}
return {word};
})}
>
);
};
// Framer Motion Staggered Word Reveal
const StaggerReveal = ({ text, className = "", delay = 0 }) => {
const ref = useRef(null);
const isInView = useInView(ref, { once: true, margin: "-10%" });
const words = text.split(" ");
const containerVariants = {
hidden: { opacity: 0 },
visible: { opacity: 1, transition: { staggerChildren: 0.04, delayChildren: delay } }
};
const childVariants = {
hidden: { opacity: 0, y: 30 },
visible: { opacity: 1, y: 0, transition: { type: "spring", damping: 14, stiffness: 120 } }
};
return (
{words.map((word, idx) => (
))}
);
};
const StaggerLine = ({ children, delay = 0, className = "" }) => {
const ref = useRef(null);
const isInView = useInView(ref, { once: true, margin: "-10%" });
return (
{children}
);
};
// Floating Metric Chips
const FloatingMetricChips = () => {
const metrics = [
{ text: "EST. 1998", top: "15%", left: "10%" },
{ text: "REG: 2021/486187/07", top: "45%", right: "8%" },
{ text: "HQ: PRETORIA", bottom: "25%", left: "12%" },
{ text: "B-BBEE LEVEL 1", top: "65%", left: "20%" },
{ text: "CIDB: 5CE PE", bottom: "40%", right: "15%" },
];
return (
{metrics.map((m, i) => (
[{m.text}]
))}
);
};
// GSAP Floating Parallax Icons
const FloatingBackgroundIcons = () => {
const containerRef = useRef(null);
useEffect(() => {
const icons = gsap.utils.toArray('.floating-icon');
icons.forEach(icon => {
gsap.to(icon, { y: `random(-40, 40)`, x: `random(-40, 40)`, rotation: `random(-20, 20)`, duration: `random(4, 7)`, repeat: -1, yoyo: true, ease: "sine.inOut" });
gsap.to(icon, { yPercent: `random(-150, 150)`, ease: "none", scrollTrigger: { trigger: containerRef.current, start: "top bottom", end: "bottom top", scrub: 1 } });
});
}, []);
const iconProps = { size: 160, strokeWidth: 0.5, className: "text-moss/5 mix-blend-multiply" };
return (
);
};
// Marquee Client Wall
const MarqueeWall = () => {
const clients = ["ABSA GROUP FOUNDATIONAL", "MAMELODI HOSPITAL EXPANSION", "KIT KAT SHOPPING CENTRE", "SOSHANGUVE RESIDENCES", "DIPALESENG MUNICIPALITY", "DEPARTMENT OF PUBLIC WORKS"];
return (
{[...clients, ...clients, ...clients].map((client, idx) => (
{client}
))}
);
};
// Spotlight Image Section
const ObsidianSpotlight = () => {
const [mouse, setMouse] = useState({ x: 50, y: 50 });
const handleMove = (e) => {
const rect = e.currentTarget.getBoundingClientRect();
const x = ((e.clientX - rect.left) / rect.width) * 100;
const y = ((e.clientY - rect.top) / rect.height) * 100;
setMouse({ x, y });
};
return (
Macro Scale
Obsidian Integrity.
{/* Image 1 */}
// PROJECT_01_ABSA.DAT
{/* Image 2 */}
// PROJECT_02_SOSHANGUVE_RES.DAT
);
};
const App = () => {
const navRef = useRef(null);
const [hasScrolled, setHasScrolled] = useState(false);
useEffect(() => {
const handleScroll = () => {
const isScrolled = window.scrollY > 50;
setHasScrolled(isScrolled);
if (isScrolled) {
navRef.current.classList.add('glass-nav');
navRef.current.classList.remove('bg-transparent', 'py-8');
navRef.current.classList.add('py-4');
} else {
navRef.current.classList.remove('glass-nav');
navRef.current.classList.add('bg-transparent', 'py-8');
navRef.current.classList.remove('py-4');
}
};
handleScroll();
window.addEventListener('scroll', handleScroll);
return () => window.removeEventListener('scroll', handleScroll);
}, []);
return (
{/* Global Fixed Architectural Blueprint Grid */}
{/* Navigation */}
{/* Black Background Overlay */}
{!hasScrolled && (
{/* Dynamic Green Glow Behind Video */}
)}
{/* Large spacer to avoid immediate text cut-off on scroll */}
{/* Hero (Solid Paper White) */}
25+ Years Excellence
Legacy Meets
Precision.
{/* Marquee Institutional Track Record */}
Macro Log
Institutional Track Record.
{/* GSAP Parallax Layer & Background Content Container */}
{/* The 1998 Heritage with Founder Insert */}
The 1998 Heritage
Specialists Turned Industry Leaders.
{/* High-End Founder Insert */}
{/* Protocol / Services Expanded */}
Protocol Axis
Deep Core Capabilities.
{/* Industrial Manufacturing Full Width Section (Breathing Background) */}
Systems Extension
Manufacturing Logistics
{/* Technical Specifications List */}
Technical Specifications Axis
{[
"Aggressive fabrication of high-grade interlocking concrete pavers.",
"Manufacturing of rigid, load-bearing structural road kerbs.",
"Complex HVAC installations across vast commercial footprints.",
"Raw brick production bypassing third-party supply bottlenecks."
].map((spec, idx) => (
{spec}
))}
{/* Footer */}
);
};
const root = createRoot(document.getElementById('root'));
root.render();