import type { Metadata } from "next";
import Link from "next/link";
import { VehCallLogo } from "../components/icons";
import { LoginForm } from "@/components/login-form";

export const metadata: Metadata = {
  title: "Log in | VehCall",
  description:
    "Log in to your VehCall account to manage your vehicles and stay reachable through QR codes — without sharing your phone number.",
  alternates: { canonical: "/login" },
};

export default function LoginPage() {
  return (
    <main className="relative flex min-h-svh items-center justify-center overflow-hidden px-5 py-12 sm:px-8">
      {/* Brand backdrop — matches the site's hero aesthetic */}
      <div className="pointer-events-none absolute inset-0 bg-grid [mask-image:radial-gradient(ellipse_at_center,black,transparent_75%)]" />
      <div className="pointer-events-none absolute inset-0 bg-glow-radial" />
      <div className="pointer-events-none absolute -left-24 top-16 h-72 w-72 rounded-full bg-brand/20 blur-[120px]" />
      <div className="pointer-events-none absolute -right-16 bottom-10 h-80 w-80 rounded-full bg-electric/20 blur-[130px]" />

      <div className="relative w-full max-w-md">
        {/* Logo */}
        <Link href="/" className="mb-7 flex items-center justify-center gap-2.5">
          <VehCallLogo />
          <span className="text-xl font-bold tracking-tight text-white">
            Veh<span className="text-brand">Call</span>
          </span>
        </Link>

        <LoginForm />
      </div>
    </main>
  );
}
