import { useNavigate } from "react-router-dom"; import { ArrowRight } from "lucide-react"; import React, { useState, useEffect, useRef } from "react"; import { useTheme } from "next-themes"; import Silk from "@/components/Silk"; import CountUp from "@/components/CountUp"; const SPARKLE_SVG = ( ); function DemoButtonLetters({ text }: { text: string }) { // #region agent log const chars = text.split(""); const spaceIndex = chars.findIndex((c) => c === " "); const lastIndex = chars.length - 1; const lastChar = chars[lastIndex]; fetch("http://127.0.0.1:7244/ingest/72f53105-0a54-4d4c-a295-fb93aa72afcc", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ location: "Hero.tsx:DemoButtonLetters", message: "Letter split for button text", data: { text, len: chars.length, spaceIndex, spaceChar: spaceIndex >= 0 ? chars[spaceIndex] : null, lastIndex, lastChar }, timestamp: Date.now(), sessionId: "debug-session", hypothesisId: "A,C", }), }).catch(() => {}); // #endregion return ( <> {chars.map((char, i) => ( {char} ))} ); } const FOUNDING_DATE = new Date("2026-01-25"); // Samstag, 25. Januar 2026 const Hero = () => { const navigate = useNavigate(); const { resolvedTheme } = useTheme(); const [companyAge, setCompanyAge] = useState(""); const secondBtnRef = useRef(null); useEffect(() => { const el = secondBtnRef.current; if (!el) return; const firstTxtWrapper = el.querySelector(".txt-wrapper"); const letters = firstTxtWrapper ? firstTxtWrapper.querySelectorAll(".btn-letter") : []; const spaceIdx = 8; const lastIdx = 16; const wSpace = letters[spaceIdx]?.getBoundingClientRect?.()?.width ?? -1; const wLast = letters[lastIdx]?.getBoundingClientRect?.()?.width ?? -1; fetch("http://127.0.0.1:7244/ingest/72f53105-0a54-4d4c-a295-fb93aa72afcc", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ location: "Hero.tsx:useEffect:measure", message: "Measured btn-letter widths (space + last)", data: { letterCount: letters.length, wSpace, wLast, spaceIdx, lastIdx }, timestamp: Date.now(), sessionId: "debug-session", runId: "post-fix", hypothesisId: "B,D,E", }), }).catch(() => {}); }, []); useEffect(() => { const calculateAge = () => { const now = new Date(); const diff = now.getTime() - FOUNDING_DATE.getTime(); const totalSeconds = Math.floor(diff / 1000); const days = Math.floor(totalSeconds / (60 * 60 * 24)); const hours = Math.floor((totalSeconds % (60 * 60 * 24)) / (60 * 60)); const years = Math.floor(days / 365); const remainingDays = days % 365; if (years > 0) { setCompanyAge(`${years}J ${remainingDays}T ${hours}h`); } else { setCompanyAge(`${days}T ${hours}h`); } }; calculateAge(); const interval = setInterval(calculateAge, 60 * 60 * 1000); // Update every hour (only days/hours shown) return () => clearInterval(interval); }, []); // ── Silk-Hintergrund Farben ── const isDark = resolvedTheme === "dark"; // Silk: Hauptfarbe (Wellenspitzen) const silkColor = isDark ? "#6a6a6a" : "#ffffff"; // Silk: Zweite Farbe (Wellentäler) const silkColor2 = isDark ? "#000000" : "#c0c0c0"; // Silk: Rausch-Intensität const silkNoise = isDark ? 4 : 1.5; return (
{/* Silk animated background */}
{/* Label */}
Webentwicklung & Design
{/* Main Heading - Large Uppercase */}

Wir digitalisieren
Ihr Unternehmen

{/* Subheadline */}

Wir digitalisieren, automatisieren und vernetzen Ihre gesamte Firma in einem einzigen System – damit Ihr Unternehmen wachsen kann, ohne dass Sie mehr arbeiten müssen.

{/* CTA Buttons */}
{/* Trust Line */}

Für Unternehmen, die nicht stehen bleiben wollen.

{/* Bottom Stats Row */}
Projekte
{companyAge}
Am Markt
Systemverfügbarkeit
🇩🇪
Serverstandort in Deutschland
); }; export default Hero;