"use client"; import { useState, useEffect } from 'react' import Link from 'next/link' import Image from 'next/image' import { Syne } from 'next/font/google' import { ArrowRight, ArrowUpRight, Sun, Moon, Menu, X } from 'lucide-react' const syne = Syne({ subsets: ['latin'], weight: ['400', '500', '600', '700', '800'] }) const FEATURES = [ { num: '01', title: 'Mitgliederverwaltung', desc: 'Digitales CRM für alle Mitgliedsdaten. Kontakte, Statushistorie und Dokumentenablage — sicher in der Cloud, immer aktuell.', tags: ['Cloud CRM', 'Aktenführung', 'Einladungsmanagement'], }, { num: '02', title: 'Push-News & Kommunikation', desc: 'Statt ungeöffneter E-Mails: direkte Push-Benachrichtigungen mit hoher Erreichbarkeit. Sofort, zuverlässig und datenschutzorientiert konfigurierbar.', tags: ['Push-Notifications', 'News-Feed', 'Direktkommunikation'], }, { num: '03', title: 'Event- und Terminmanagement', desc: 'Veranstaltungen anlegen, kommunizieren und RSVPs digital einsammeln. Keine manuellen Listen, kein Nachfragen — alles läuft automatisch.', tags: ['Terminübersicht', '1-Klick RSVP', 'Kalender-Export'], }, { num: '04', title: 'Lehrlingsbörse & Stellenmarkt', desc: 'Nachwuchs finden, bevor andere ihn sehen. Integrierter Marktplatz für Ausbildungsstellen und Fachkräfte direkt in der App.', tags: ['Lehrlingsbörse', 'Stellenmarkt', 'Lokale Reichweite'], }, ] const STATS = [ { num: 'Bis zu 10 Std.', label: 'Zeitersparnis je nach Prozess' }, { num: 'Echtzeit', label: 'Kommunikation' }, { num: 'Cloud', label: 'Sicher konzipiert & ueberall nutzbar' }, { num: 'AVV', label: 'Art.-28-Vertrag vor Go-Live' }, ] const CONTACT_EMAIL = 'johannestils@aol.com' const CONTACT_SUBJECT = 'Anfrage InnungsApp PRO' const CONTACT_WEBMAIL_HREF = `https://mail.google.com/mail/?view=cm&fs=1&to=${encodeURIComponent(CONTACT_EMAIL)}&su=${encodeURIComponent(CONTACT_SUBJECT)}` const COOKIE_CONSENT_KEY = 'innungsapp_cookie_consent' const COOKIE_CONSENT_EVENT = 'innungsapp:cookie-consent-granted' const COOKIE_CONSENT_TIMESTAMP_KEY = 'innungsapp_cookie_consent_timestamp' const COOKIE_CONSENT_SOURCE_KEY = 'innungsapp_cookie_consent_source' type CookieConsentState = 'loading' | 'pending' | 'accepted' | 'declined' export default function RootPage() { const [theme, setTheme] = useState('theme-light'); const [mounted, setMounted] = useState(false); const [openFaq, setOpenFaq] = useState(null); const [cookieConsent, setCookieConsent] = useState('loading') const [showMailFallback, setShowMailFallback] = useState(false) const [mobileMenuOpen, setMobileMenuOpen] = useState(false) useEffect(() => { setMounted(true); const savedTheme = localStorage.getItem('theme'); if (savedTheme) { setTheme(savedTheme); } const savedConsent = window.localStorage.getItem(COOKIE_CONSENT_KEY) if (savedConsent === 'accepted' || savedConsent === 'declined') { setCookieConsent(savedConsent) } else { setCookieConsent('pending') } }, []); useEffect(() => { if (cookieConsent === 'accepted') { window.posthog?.opt_in_capturing?.() const sendPageView = () => { window.posthog?.capture?.('landing_page_viewed', { path: window.location.pathname, }) } if (window.posthog?.capture) { sendPageView() } else { window.dispatchEvent(new Event(COOKIE_CONSENT_EVENT)) window.setTimeout(sendPageView, 150) } } if (cookieConsent === 'declined') { window.posthog?.opt_out_capturing?.() } }, [cookieConsent]) const setCookieChoice = (choice: Exclude) => { window.localStorage.setItem(COOKIE_CONSENT_KEY, choice) window.localStorage.setItem(COOKIE_CONSENT_TIMESTAMP_KEY, new Date().toISOString()) window.localStorage.setItem(COOKIE_CONSENT_SOURCE_KEY, 'landing_banner') setCookieConsent(choice) if (choice === 'accepted') { window.dispatchEvent(new Event(COOKIE_CONSENT_EVENT)) } } const openCookieSettings = () => { window.localStorage.removeItem(COOKIE_CONSENT_KEY) setCookieConsent('pending') } const trackLandingCta = (placement: string) => { if (cookieConsent !== 'accepted') return const sendCta = () => { window.posthog?.capture?.('landing_cta_clicked', { placement, target: 'contact_email', }) } if (window.posthog?.capture) { sendCta() } else { window.dispatchEvent(new Event(COOKIE_CONSENT_EVENT)) window.setTimeout(sendCta, 150) } } const handleContactCtaClick = (placement: string) => { trackLandingCta(placement) setShowMailFallback(true) } const toggleTheme = () => { const newTheme = theme === 'theme-dark' ? 'theme-light' : 'theme-dark'; setTheme(newTheme); localStorage.setItem('theme', newTheme); }; const toggleFaq = (index: number) => { setOpenFaq(openFaq === index ? null : index); } const schemaOrg = { "@context": "https://schema.org", "@graph": [ { "@type": "SoftwareApplication", "name": "InnungsApp PRO", "applicationCategory": "BusinessApplication", "operatingSystem": "Web, iOS, Android", "offers": { "@type": "Offer", "price": "0", "priceCurrency": "EUR" }, "description": "Cloudbasierte Verwaltungssoftware für Handwerksinnungen mit Mitgliederverwaltung, Kommunikation und Terminmanagement." }, { "@type": "FAQPage", "mainEntity": [ { "@type": "Question", "name": "Wie lange dauert der Wechsel zur InnungsApp PRO?", "acceptedAnswer": { "@type": "Answer", "text": "Unser Onboarding-Team unterstützt Sie beim gesamten Prozess und richtet Ihre Umgebung schnellstmöglich ein. Sie können zeitnah starten." } }, { "@type": "Question", "name": "Ist die Plattform DSGVO-konform?", "acceptedAnswer": { "@type": "Answer", "text": "Wir arbeiten mit DSGVO-orientierten Prozessen. Vor Go-Live wird ein AV-Vertrag geschlossen; bei Datenverarbeitung in den USA nutzen wir SCC, dokumentieren TIA und setzen zusaetzliche Schutzmassnahmen ein. Die konkrete Compliance haengt von Konfiguration und Vertraegen ab." } }, { "@type": "Question", "name": "Brauchen meine Mitglieder eine Schulung?", "acceptedAnswer": { "@type": "Answer", "text": "Nein, die App ist so intuitiv wie WhatsApp – Ihre Mitglieder können sie ohne Einarbeitung direkt nutzen." } } ] } ] }; return ( <>