import { getDictionary, getLocale } from "@/i18n/get-dictionary";
import { Footer } from "@/components/layout/footer/footer";
import { Header } from "@/components/layout/header/header";
import { NotFoundSection } from "@/features/not-found/not-found-section";

/**
 * Shown for any unknown page: a wrong job / project / product link (notFound() in those pages)
 * and any URL no route matches (see [...missing]/page.tsx). Rendered inside the site layout, in the page language.
 * The tab title is a React <title> (moved into <head> by React): Next only reads metadata from the root app/not-found.
 * Figma "Not Found".
 */
export default async function NotFound() {
  const [locale, dict] = await Promise.all([getLocale(), getDictionary()]);
  const title = `${dict.notFound.metaTitle} | ${dict.brand.name}`;

  return (
    <>
      <title>{title}</title>
      <Header locale={locale} nav={dict.nav} />
      <main>
        <NotFoundSection locale={locale} t={dict.notFound} backgroundAlt={dict.career.hero.imageAlt} />
      </main>
      <Footer locale={locale} t={dict.footer} brandName={dict.brand.name} className="mt-0 md:mt-0 lg:mt-0" />
    </>
  );
}
