import type { Metadata } from "next";

export const metadata: Metadata = {
  title: "Terms of Service",
  description: "Terms of service for Tia — the baby tracker and digital heirloom for Indian families.",
  alternates: { canonical: "/terms" },
  openGraph: {
    type: "website",
    url: "/terms",
    title: "Terms of Service | Tia",
    description: "Terms of service for Tia — the baby tracker and digital heirloom for Indian families.",
  },
};

export default function TermsPage() {
  return (
    <div className="max-w-2xl mx-auto px-4 py-20">
      <h1 className="text-3xl font-bold text-gray-900 mb-2">Terms of Service</h1>
      <p className="text-sm text-gray-400 mb-10">Last updated: May 2026</p>

      <div className="space-y-8 text-gray-700 leading-relaxed">
        <section>
          <h2 className="text-xl font-bold text-gray-900 mb-3">Acceptance</h2>
          <p>
            By using Tia, you agree to these terms. If you don&apos;t agree, please don&apos;t use
            the service.
          </p>
        </section>

        <section>
          <h2 className="text-xl font-bold text-gray-900 mb-3">What Tia is</h2>
          <p>
            Tia is a baby-tracking and heirloom-archiving application for families. It is
            not a medical service. Tia does not provide medical advice, diagnosis, or
            treatment. For any health concerns about your child, consult your pediatrician.
          </p>
        </section>

        <section>
          <h2 className="text-xl font-bold text-gray-900 mb-3">Your account</h2>
          <p>
            You are responsible for maintaining the security of your account. You must
            be at least 18 years old to create an account. Family members you invite
            are governed by these same terms.
          </p>
        </section>

        <section>
          <h2 className="text-xl font-bold text-gray-900 mb-3">Your data</h2>
          <p>
            You own your data. We do not claim any ownership over the records, photos,
            or content you create in Tia. You can export and delete your data at any time.
            See our <a href="/privacy" className="text-rose-500 hover:underline">Privacy Policy</a> for details.
          </p>
        </section>

        <section>
          <h2 className="text-xl font-bold text-gray-900 mb-3">Acceptable use</h2>
          <p>
            You agree not to use Tia to store illegal content, harm others, or interfere
            with the service. We may terminate accounts that violate these terms.
          </p>
        </section>

        <section>
          <h2 className="text-xl font-bold text-gray-900 mb-3">Service availability</h2>
          <p>
            Tia is provided as-is during early access. We make no guarantees of uptime
            or availability, though we work hard to keep the service running reliably.
          </p>
        </section>

        <section>
          <h2 className="text-xl font-bold text-gray-900 mb-3">Changes to these terms</h2>
          <p>
            We may update these terms. We will notify you by email before any material
            changes take effect.
          </p>
        </section>

        <section>
          <h2 className="text-xl font-bold text-gray-900 mb-3">Contact</h2>
          <p>
            Questions? Email{" "}
            <a href="mailto:tia@manohargupta.com" className="text-rose-500 hover:underline">
              tia@manohargupta.com
            </a>
            .
          </p>
        </section>
      </div>
    </div>
  );
}
