import { createFileRoute, Link } from "@tanstack/react-router";

export const Route = createFileRoute("/legal/terms")({
  head: () => ({
    meta: [
      { title: "Terms and Conditions — VotersAlert" },
      {
        name: "description",
        content: "The terms governing your use of the VotersAlert political outreach platform.",
      },
    ],
  }),
  component: TermsPage,
});

function TermsPage() {
  return (
    <div className="min-h-dvh bg-background text-foreground">
      <header className="border-b">
        <div className="mx-auto max-w-4xl px-6 py-6 flex items-center justify-between">
          <Link to="/home" className="font-semibold">
            ← VotersAlert
          </Link>
          <span className="text-xs text-muted-foreground">Last updated: June 2026</span>
        </div>
      </header>
      <main className="mx-auto max-w-3xl px-6 py-12">
        <h1 className="text-3xl font-bold tracking-tight">Terms and Conditions</h1>
        <p className="mt-4 text-muted-foreground">
          These terms govern your access to and use of the VotersAlert platform. By creating an
          account you agree to them.
        </p>

        <h2 className="mt-10 text-xl font-semibold">1. Eligibility</h2>
        <p className="mt-2 text-muted-foreground">
          Accounts are available only to verified political organizations, candidates, and their
          authorized agencies. Identity is verified before activation.
        </p>

        <h2 className="mt-8 text-xl font-semibold">2. Acceptable use</h2>
        <ul className="mt-2 list-disc pl-6 space-y-2 text-muted-foreground">
          <li>Send only to recipients who have given documented, opt-in consent.</li>
          <li>Comply with INEC quiet periods, NCC content rules and applicable laws.</li>
          <li>No hate speech, disinformation, voter suppression, or impersonation.</li>
        </ul>

        <h2 className="mt-8 text-xl font-semibold">3. Billing</h2>
        <p className="mt-2 text-muted-foreground">
          Wallet top-ups are prepaid and non-refundable once consumed. Per-send rates are displayed
          before each campaign is launched.
        </p>

        <h2 className="mt-8 text-xl font-semibold">4. Suspension</h2>
        <p className="mt-2 text-muted-foreground">
          We may suspend accounts that breach these terms, our compliance policies, or applicable
          law, with or without notice.
        </p>

        <h2 className="mt-8 text-xl font-semibold">5. Liability</h2>
        <p className="mt-2 text-muted-foreground">
          VotersAlert is provided "as is". Our aggregate liability is limited to fees paid in the
          three months preceding the claim.
        </p>

        <h2 className="mt-8 text-xl font-semibold">6. Governing law</h2>
        <p className="mt-2 text-muted-foreground">Federal Republic of Nigeria.</p>
      </main>
    </div>
  );
}
