import type { Metadata } from 'next'; import { Plus_Jakarta_Sans, Outfit, JetBrains_Mono } from 'next/font/google'; import './globals.css'; import { getSiteConfig } from '@/lib/config/loader'; import { Navbar } from '@/components/ui/Navbar'; import { Footer } from '@/components/ui/Footer'; const sansFont = Plus_Jakarta_Sans({ subsets: ['latin'], variable: '--font-sans', display: 'swap', }); const displayFont = Outfit({ subsets: ['latin'], variable: '--font-display', display: 'swap', }); const monoFont = JetBrains_Mono({ subsets: ['latin'], variable: '--font-mono', display: 'swap', }); export async function generateMetadata(): Promise { const config = getSiteConfig(); return { title: { default: `${config.brand.name} | Next-Gen AI Vision & Creative Tools Studio`, template: config.seo.titleTemplate || `%s | ${config.brand.name}`, }, description: 'Commercial-grade neural vision models for sub-pore portrait retouching, hair-strand matting background cutouts, and 4K photo restoration.', metadataBase: new URL(config.seo.siteUrl || 'http://localhost:3000'), keywords: [ 'CRE Innovations', 'AI photo editor', 'online blemish remover', 'P3M background remover', 'photo enhancer 4K', 'vintage photo restoration', 'teeth whitener AI', 'CartoonGAN anime avatar', ], authors: [{ name: 'CRE Innovations Engineering Team' }], openGraph: { type: 'website', siteName: config.brand.name, title: `${config.brand.name} | Advanced AI Photo Tools`, description: 'Free online AI photo tools with zero photo retention and native mobile app handoff.', images: [{ url: '/brand/og-default.png', width: 1200, height: 630, alt: config.brand.name }], }, twitter: { card: 'summary_large_image', title: `${config.brand.name} | Advanced AI Photo Tools`, description: 'Free online AI photo tools with zero storage and native mobile app handoff.', images: ['/brand/og-default.png'], }, }; } export default function RootLayout({ children, }: { children: React.ReactNode; }) { const config = getSiteConfig(); // Root Schema.org JSON-LD for Organization & WebSite const organizationJsonLd = { '@context': 'https://schema.org', '@type': 'Organization', name: config.brand.name, url: config.seo.siteUrl || 'http://localhost:3000', logo: `${config.seo.siteUrl || 'http://localhost:3000'}/brand/logo.svg`, sameAs: [ 'https://play.google.com/store/apps/dev?id=creinnovations', 'https://apps.apple.com/developer/creinnovations', ], }; return (