'use client' import { useState, useEffect, useRef, useMemo, useCallback } from 'react' import { Language } from '@/lib/types' import GradientText from '../ui/GradientText' import FadeInView from '../ui/FadeInView' import { type Milestone, MILESTONES, STATS } from './MilestonesSlide.data' import { THEMES } from './MilestonesSlide.themes' import { StarField, SoftGrid, Timeline, StatCard, DetailModal } from './MilestonesSlide.parts' interface MilestonesSlideProps { lang: Language } const MONO: React.CSSProperties = { fontFamily: '"JetBrains Mono","SF Mono",ui-monospace,monospace', fontVariantNumeric: 'tabular-nums', } const CSS_KF = ` @keyframes msFlow { 0%{stroke-dashoffset:0} 100%{stroke-dashoffset:-18} } @keyframes msFadeIn { from{opacity:0} to{opacity:1} } @keyframes msScaleIn { from{opacity:0;transform:scale(.94)} to{opacity:1;transform:scale(1)} } @keyframes msHeadingDark { 0%,100%{text-shadow:0 0 22px rgba(167,139,250,.3)} 50% {text-shadow:0 0 40px rgba(167,139,250,.6)} } @keyframes msHeadingLight { 0%,100%{text-shadow:0 0 22px rgba(124,58,237,.15)} 50% {text-shadow:0 0 36px rgba(124,58,237,.30)} } @keyframes msPulse { 0%,100%{r:9;opacity:.4} 50% {r:14;opacity:.05} } ` // ── Light mode hook ─────────────────────────────────────────────────────────── function useIsLight() { const [isLight, setIsLight] = useState(false) useEffect(() => { const check = () => setIsLight(document.documentElement.classList.contains('theme-light')) check() const obs = new MutationObserver(check) obs.observe(document.documentElement, { attributes: true, attributeFilter: ['class'] }) return () => obs.disconnect() }, []) return isLight } // ── Inner slide (fixed 1280×680) ────────────────────────────────────────────── function MilestonesInner({ t, de, sel, setSel }: { t: typeof THEMES.dark; de: boolean sel: Milestone | null setSel: (m: Milestone | null) => void }) { const doneCnt = useMemo(() => MILESTONES.filter(m => m.done).length, []) const total = MILESTONES.length return (
{de ? 'Von der Idee zur GmbH — was wir bereits erreicht haben' : 'From idea to GmbH — what we have already achieved'}