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: "Privacy Policy",
  description: "How LedgerOne collects, uses, and protects your data.",
  keywords: siteInfo.keywords
};

export default function PrivacyPage() {
  const schema = [
    {
      "@context": "https://schema.org",
      "@type": "WebPage",
      name: "Privacy Policy",
      description: "How LedgerOne collects, uses, and protects your data.",
      url: `${siteInfo.url}/privacy-policy`
    }
  ];

  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">
              Privacy Policy
            </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. Information We Collect</h3>
              <p>
                We collect information you provide directly to us, such as when you create an account, connect a bank account, or request customer support.
              </p>

              <h3 className="text-foreground font-bold mt-8 mb-4 text-xl">2. How We Use Information</h3>
              <p>
                We use the information we collect to provide, maintain, and improve our services, such as to sync your transactions and generate reports.
              </p>

              <h3 className="text-foreground font-bold mt-8 mb-4 text-xl">3. Data Security</h3>
              <p>
                We use industry-standard encryption and security measures to protect your data. We do not store your bank login credentials; they are handled by our secure partners (Plaid).
              </p>

              <h3 className="text-foreground font-bold mt-8 mb-4 text-xl">4. California Privacy Rights (CCPA)</h3>
              <p>
                If you are a California resident, you have specific rights regarding your personal information, including the right to request access to and deletion of your data. We do not sell your personal information. To exercise your rights, please contact us.
              </p>

              <h3 className="text-foreground font-bold mt-8 mb-4 text-xl">5. Canadian Privacy Rights (PIPEDA)</h3>
              <p>
                If you are a Canadian resident, you have the right to access your personal information and request corrections. We comply with the Personal Information Protection and Electronic Documents Act (PIPEDA) regarding the collection, use, and disclosure of personal information.
              </p>

              <h3 className="text-foreground font-bold mt-8 mb-4 text-xl">6. Contact Us</h3>
              <p>
                If you have any questions about this Privacy Policy, please contact us at privacy@ledgerone.com.
              </p>
            </div>
          </div>
        </div>
      </main>

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