import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import { AnimatedBackground } from "@/components/AnimatedBackground";
import { SiteFooter } from "@/components/SiteFooter";
import { SiteHeader } from "@/components/SiteHeader";
import "./globals.css";

const geistSans = Geist({
  variable: "--font-geist-sans",
  subsets: ["latin"],
});

const geistMono = Geist_Mono({
  variable: "--font-geist-mono",
  subsets: ["latin"],
});

const siteUrl = "https://nexus.ninjakernen.info";

export const metadata: Metadata = {
  metadataBase: new URL(siteUrl),
  title: {
    default: "Ninja Nexus — Kontrolleret platform til virksomheds-PC'er",
    template: "%s · Ninja Nexus",
  },
  description:
    "Ninja Nexus samler shell, identity, policy, software deployment og update-kanal i en moderne POC-platform til styrede Windows-PC'er.",
  openGraph: {
    type: "website",
    locale: "da_DK",
    url: siteUrl,
    siteName: "Ninja Nexus",
    title: "Ninja Nexus — Kontrolleret platform til virksomheds-PC'er",
    description:
      "Ninja Nexus samler shell, identity, policy, software deployment og update-kanal i en moderne POC-platform.",
    images: [{ url: "/nexus-logo-banner.png", width: 640, height: 160, alt: "Ninja Nexus" }],
  },
  twitter: {
    card: "summary_large_image",
    title: "Ninja Nexus",
    description:
      "Kontrolleret platform-oplevelse oven på Windows — POC til virksomheds-PC'er.",
  },
  robots: { index: true, follow: true },
  alternates: { canonical: siteUrl },
  icons: {
    icon: [{ url: "/nexus-icon.png", type: "image/png" }],
    apple: "/nexus-icon.png",
  },
};

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="da" className={`${geistSans.variable} ${geistMono.variable} h-full`}>
      <body className="flex min-h-full flex-col antialiased">
        <AnimatedBackground />
        <SiteHeader />
        <main className="flex-1">{children}</main>
        <SiteFooter />
      </body>
    </html>
  );
}
