import type { Metadata } from "next";
import Link from "next/link";
import { privacyPolicy } from "@/content/legal";
import { pageSeo } from "@/content/page-seo";
import { PageRiftHeader } from "@/components/layout/PageRiftHeader";
import { Section } from "@/components/layout/Section";
import { TopoProseSurface } from "@/components/layout/TopoProseSurface";
import { createPageMetadata } from "@/lib/seo";
import { Button } from "@/components/ui/button";

export const metadata: Metadata = createPageMetadata(pageSeo.privacy);

export default function PrivacyPage() {
  return (
    <>
      <PageRiftHeader
        variant="minimal"
        profilePath="/privacy"
        eyebrow="Legal"
        title={<h1 className="text-4xl font-bold">{privacyPolicy.title}</h1>}
        description={
          <>
            <p className="text-sm">Last updated: {privacyPolicy.updated}</p>
            <p className="mt-4 leading-relaxed">{privacyPolicy.intro}</p>
          </>
        }
      />

      <Section>
        <TopoProseSurface className="max-w-3xl space-y-10">
          {privacyPolicy.sections.map((section) => (
            <section key={section.heading}>
              <h2 className="text-xl font-semibold text-[#1a5c38]">{section.heading}</h2>
              <p className="mt-3 text-muted-foreground leading-relaxed">{section.body}</p>
            </section>
          ))}
        </TopoProseSurface>
        <div className="mt-12">
          <Button variant="outline" className="rounded-full" asChild>
            <Link href="/contact">Contact us</Link>
          </Button>
        </div>
      </Section>
    </>
  );
}
