import Link from "next/link";

export default function TermsPage() {
  return (
    <div className="min-h-screen bg-white">
      <div className="max-w-2xl mx-auto px-5 py-16">
        <Link href="/" className="text-sm text-zinc-400 hover:text-zinc-600">← Home</Link>
        <h1 className="mt-6 text-2xl font-semibold tracking-tight">Terms of Service</h1>
        <p className="mt-2 text-sm text-zinc-400">Last updated: April 2026</p>

        <div className="mt-8 space-y-6 text-sm text-zinc-600 leading-relaxed">
          <section>
            <h2 className="text-base font-medium text-zinc-900 mb-2">About ClauseGuard</h2>
            <p>ClauseGuard is an AI-powered tool that analyzes legal documents for potentially unfair clauses. It provides informational analysis only and does not constitute legal advice.</p>
          </section>

          <section>
            <h2 className="text-base font-medium text-zinc-900 mb-2">Not legal advice</h2>
            <p>ClauseGuard is not a law firm, does not provide legal advice, and is not a substitute for professional legal counsel. The analysis provided by ClauseGuard is based on machine learning models and pattern matching. It may contain errors, miss important clauses, or flag clauses that are actually fair. Always consult a qualified attorney for legal matters.</p>
          </section>

          <section>
            <h2 className="text-base font-medium text-zinc-900 mb-2">Account and billing</h2>
            <p>Free accounts are limited to 10 scans per month. Paid subscriptions are billed monthly through Stripe. You can cancel at any time from your settings page. Refunds follow Stripe's standard policies.</p>
          </section>

          <section>
            <h2 className="text-base font-medium text-zinc-900 mb-2">Acceptable use</h2>
            <p>You may use ClauseGuard for personal and commercial purposes. You may not use it to provide automated legal services to third parties, reverse-engineer the ML models, or submit content that violates any law.</p>
          </section>

          <section>
            <h2 className="text-base font-medium text-zinc-900 mb-2">Limitation of liability</h2>
            <p>ClauseGuard is provided as-is. We are not liable for decisions made based on our analysis. Our total liability is limited to the amount you paid in the 12 months prior to the claim.</p>
            <p className="mt-2 text-zinc-400 text-xs italic">Yes, we know this clause would be flagged by our own tool.</p>
          </section>

          <section>
            <h2 className="text-base font-medium text-zinc-900 mb-2">Changes</h2>
            <p>We may update these terms. We will notify you by email of material changes at least 14 days before they take effect.</p>
          </section>

          <section>
            <h2 className="text-base font-medium text-zinc-900 mb-2">Contact</h2>
            <p>Questions: <a href="mailto:legal@clauseguardweb.netlify.app" className="text-zinc-900 underline">legal@clauseguardweb.netlify.app</a></p>
          </section>
        </div>
      </div>
    </div>
  );
}
