import type { Metadata, Viewport } from "next";
import "./globals.css";

export const metadata: Metadata = {
  title: {
    default: "HeadlineSift — AI-Curated News That Matters",
    template: "%s | HeadlineSift",
  },
  description:
    "HeadlineSift curates top news headlines, deduplicates coverage across outlets with AI, and ranks stories by significance — not just clickbait.",
  keywords: ["news", "headlines", "AI", "curation", "aggregator"],
  authors: [{ name: "HeadlineSift" }],
  metadataBase: new URL(
    process.env.NEXT_PUBLIC_APP_URL || "http://localhost:3000",
  ),
  openGraph: {
    type: "website",
    siteName: "HeadlineSift",
    title: "HeadlineSift — AI-Curated News That Matters",
    description:
      "HeadlineSift curates top news headlines, deduplicates coverage across outlets with AI, and ranks stories by significance.",
  },
  robots: {
    index: true,
    follow: true,
  },
};

export const viewport: Viewport = {
  width: "device-width",
  initialScale: 1,
  themeColor: "#2563eb",
};

export default function RootLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  return (
    <html lang="en" suppressHydrationWarning>
      <body className="flex min-h-screen flex-col">
        {children}
      </body>
    </html>
  );
}
