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

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

export default function PrivacyPage() {
  return (
    <Section className="pt-28">
      <p className="text-xs font-semibold uppercase tracking-widest text-[#1a5c38]">Legal</p>
      <h1 className="mt-3 text-4xl font-bold">{privacyPolicy.title}</h1>
      <p className="mt-2 text-sm text-muted-foreground">Last updated: {privacyPolicy.updated}</p>
      <p className="mt-6 max-w-3xl text-muted-foreground leading-relaxed">
        {privacyPolicy.intro}
      </p>
      <div className="mt-12 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>
        ))}
      </div>
      <div className="mt-12">
        <Button variant="outline" className="rounded-full" asChild>
          <Link href="/contact">Contact us</Link>
        </Button>
      </div>
    </Section>
  );
}
