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

const sans = Outfit({
  variable: "--font-sans",
  subsets: ["latin"],
  weight: ["300", "400", "500", "600", "700"],
});

const display = Syne({
  variable: "--font-display",
  subsets: ["latin"],
  weight: ["500", "600", "700", "800"],
});

export const metadata: Metadata = {
  title: {
    default: "ARCHI — Architecture Platform",
    template: "%s · ARCHI",
  },
  description:
    "The all-in-one platform for architects. Build your studio website, showcase projects, manage leads, and win more work.",
  metadataBase: new URL(process.env.APP_URL ?? "http://localhost:3000"),
  robots: {
    index: true,
    follow: true,
  },
};

export const viewport: Viewport = {
  width: "device-width",
  initialScale: 1,
  viewportFit: "cover",
  themeColor: [
    { media: "(prefers-color-scheme: light)", color: "#f4f1ea" },
    { media: "(prefers-color-scheme: dark)", color: "#101214" },
  ],
};

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html
      lang="en"
      data-scroll-behavior="smooth"
      className={`${sans.variable} ${display.variable} h-full`}
    >
      <body className="flex min-h-full flex-col bg-[var(--archi-cream)] text-[var(--archi-ink)] antialiased">
        {children}
      </body>
    </html>
  );
}
