import type { Metadata, Viewport } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";

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

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

export const metadata: Metadata = {
  metadataBase: new URL("https://scopewrit.cyberelf.link"),
  title: "ScopeWrit — Deterministic Run Authority for Autonomous Agents",
  description:
    "Signed, deny-by-default authorization for every consequential agent action, with consume-once capabilities and tamper-evident receipts.",
  authors: [{ name: "Cyberelf Labs", url: "https://cyberelf.link/" }],
  creator: "Cyberelf Labs",
  alternates: { canonical: "/" },
  icons: {
    icon: "/favicon.svg",
    shortcut: "/favicon.svg",
  },
  openGraph: {
    type: "website",
    url: "/",
    siteName: "ScopeWrit",
    title: "ScopeWrit — Reachable is not authorized.",
    description:
      "Signed, deny-by-default run authority for autonomous agents.",
    images: [
      {
        url: "https://cyberelf.link/assets/cyberelf-social.png",
        width: 1731,
        height: 909,
        alt: "Cyberelf Labs: strange ideas, serious systems",
      },
    ],
  },
  twitter: {
    card: "summary_large_image",
    title: "ScopeWrit — Reachable is not authorized.",
    description:
      "Signed, deny-by-default run authority for autonomous agents.",
    images: ["https://cyberelf.link/assets/cyberelf-social.png"],
  },
  robots: { index: true, follow: true },
};

export const viewport: Viewport = {
  colorScheme: "dark",
  themeColor: "#07100f",
  width: "device-width",
  initialScale: 1,
};

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="en">
      <body className={`${geistSans.variable} ${geistMono.variable}`}>
        {children}
      </body>
    </html>
  );
}
