import { PageSchema } from "../../components/page-schema";
import { SiteFooter } from "../../components/site-footer";
import { SiteHeader } from "../../components/site-header";
import { siteInfo } from "../../data/site";

export const metadata = {
  title: "Terms of Service",
  description: "Terms and conditions for using LedgerOne.",
  keywords: siteInfo.keywords
};

export default function TermsPage() {
  const schema = [
    {
      "@context": "https://schema.org",
      "@type": "WebPage",
      name: "Terms of Service",
      description: "Terms and conditions for using LedgerOne.",
      url: `${siteInfo.url}/terms`
    }
  ];

  return (
    <div className="min-h-screen bg-background font-sans text-foreground flex flex-col">
      <SiteHeader />

      <main className="flex-1 pt-32 pb-24 relative overflow-hidden">
        <div className="absolute inset-0 mesh-gradient -z-10 opacity-30" />

        <div className="max-w-3xl mx-auto px-6 lg:px-8">
          <div className="glass-panel rounded-3xl p-8 sm:p-12 shadow-sm">
            <h1 className="text-3xl font-bold tracking-tight text-foreground sm:text-4xl mb-8">
              Terms of Service
            </h1>

            <div className="prose prose-gray dark:prose-invert max-w-none text-muted-foreground">
              <p className="lead text-lg">
                Last updated: October 24, 2023
              </p>

              <h3 className="text-foreground font-bold mt-8 mb-4 text-xl">1. Acceptance of Terms</h3>
              <p>
                By accessing and using LedgerOne, you accept and agree to be bound by the terms and provision of this agreement.
              </p>

              <h3 className="text-foreground font-bold mt-8 mb-4 text-xl">2. Service Description</h3>
              <p>
                LedgerOne provides financial data aggregation, ledger management, and reporting tools. We are not a bank or financial advisor.
              </p>

              <h3 className="text-foreground font-bold mt-8 mb-4 text-xl">3. User Accounts</h3>
              <p>
                You are responsible for maintaining the security of your account and password. LedgerOne cannot and will not be liable for any loss or damage from your failure to comply with this security obligation.
              </p>

              <h3 className="text-foreground font-bold mt-8 mb-4 text-xl">4. Data Privacy</h3>
              <p>
                Your data is yours. We do not sell your financial data to third parties. See our Privacy Policy for details on how we protect your information.
              </p>

              <h3 className="text-foreground font-bold mt-8 mb-4 text-xl">5. Governing Law</h3>
              <p>
                These Terms shall be governed by and defined following the laws of the United States and Canada. LedgerOne Inc. and yourself irrevocably consent that the courts of the United States and Canada shall have exclusive jurisdiction to resolve any dispute which may arise in connection with these terms.
              </p>

              <h3 className="text-foreground font-bold mt-8 mb-4 text-xl">6. Dispute Resolution</h3>
              <p>
                Any dispute arising out of or in connection with this contract, including any question regarding its existence, validity, or termination, shall be referred to and finally resolved by arbitration under the rules of the American Arbitration Association (AAA) for US residents, or the ADR Institute of Canada for Canadian residents.
              </p>
            </div>
          </div>
        </div>
      </main>

      <SiteFooter />
      <PageSchema schema={schema} />
    </div>
  );
}
