"use client";

import { Container } from "@/components/common/Container";
import { PageHero } from "@/components/common/PageHero";
import { Reveal } from "@/components/motion/Reveal";
import { useTranslation } from "@/hooks/useTranslation";
import { SITE } from "@/constants/site";

export default function PrivacyPage() {
  const { t } = useTranslation();

  return (
    <>
      <PageHero
        eyebrow={t("nav.privacy")}
        title="Privacy Policy"
        subtitle="Last updated: January 1, 2026"
      />

      <section className="section">
        <Container>
          <article className="mx-auto max-w-3xl space-y-10 text-base leading-relaxed text-slate-700 dark:text-slate-300">
            <Block title="1. Introduction">
              <p>
                {SITE.name} (&ldquo;we&rdquo;, &ldquo;our&rdquo;, or &ldquo;us&rdquo;) is committed
                to protecting your privacy. This Privacy Policy explains how we collect, use,
                disclose, and safeguard your information when you use our money transfer services
                through our website and mobile applications.
              </p>
              <p>
                By using our services, you agree to the collection and use of information in
                accordance with this policy. We will not use or share your information except as
                described here.
              </p>
            </Block>

            <Block title="2. Information We Collect">
              <p>We collect several different types of information to provide and improve our services:</p>
              <ul className="ms-5 list-disc space-y-2">
                <li>
                  <strong>Identity information:</strong> first name, last name, date of birth,
                  nationality, and identity document details required for KYC compliance.
                </li>
                <li>
                  <strong>Contact information:</strong> email address, phone number, and postal
                  address.
                </li>
                <li>
                  <strong>Financial information:</strong> bank account details, card information,
                  and transfer history.
                </li>
                <li>
                  <strong>Recipient information:</strong> details about the people to whom you send
                  money.
                </li>
                <li>
                  <strong>Device &amp; usage data:</strong> IP address, browser type, device
                  identifiers, and how you interact with our services.
                </li>
              </ul>
            </Block>

            <Block title="3. How We Use Your Information">
              <p>We use the information we collect to:</p>
              <ul className="ms-5 list-disc space-y-2">
                <li>Process and complete your remittance transfers.</li>
                <li>Verify your identity in compliance with anti-money laundering regulations.</li>
                <li>Prevent fraud and protect the security of your account.</li>
                <li>Send you transaction updates, receipts, and important account notices.</li>
                <li>Improve our products and develop new features.</li>
                <li>Comply with our legal and regulatory obligations.</li>
              </ul>
            </Block>

            <Block title="4. Data Security">
              <p>
                We implement industry-standard security measures to protect your information,
                including 256-bit SSL encryption in transit, AES-256 encryption at rest, and strict
                internal access controls. All payment data is processed by PCI-DSS compliant
                providers. However, no method of transmission over the internet is 100% secure, and
                we cannot guarantee absolute security.
              </p>
            </Block>

            <Block title="5. Sharing Your Information">
              <p>
                We do not sell your personal information. We share your information only with
                trusted partners who help us operate the service, such as payment processors,
                identity verification providers, and banking partners — and only to the extent
                necessary to deliver your transfer. We may also disclose information when required
                by law or to protect against fraud.
              </p>
            </Block>

            <Block title="6. Your Rights">
              <p>You have the right to:</p>
              <ul className="ms-5 list-disc space-y-2">
                <li>Access the personal information we hold about you.</li>
                <li>Request correction of inaccurate information.</li>
                <li>
                  Request deletion of your account and associated data, subject to legal retention
                  obligations.
                </li>
                <li>Object to processing or request restriction of processing.</li>
                <li>Request data portability.</li>
                <li>
                  Withdraw consent at any time, where consent is the basis for processing.
                </li>
              </ul>
            </Block>

            <Block title="7. Cookies & Tracking">
              <p>
                We use cookies and similar technologies to remember your preferences, keep you
                signed in, and understand how our service is used. You can control cookies through
                your browser settings, but disabling them may affect functionality.
              </p>
            </Block>

            <Block title="8. Children's Privacy">
              <p>
                Our services are not directed to anyone under 18. We do not knowingly collect
                personal information from children. If you believe a child has provided us with
                personal information, please contact us so we can remove it.
              </p>
            </Block>

            <Block title="9. Changes to This Policy">
              <p>
                We may update this Privacy Policy from time to time. We will notify you of any
                material changes by email or via an in-app notice. Your continued use of our
                services after changes take effect constitutes acceptance of the revised policy.
              </p>
            </Block>

            <Block title="10. Contact Us">
              <p>
                If you have any questions about this Privacy Policy or our data practices, please
                contact us at{" "}
                <a
                  href={`mailto:${SITE.email}`}
                  className="font-bold text-brand-600 underline-offset-4 hover:underline dark:text-brand-400"
                >
                  {SITE.email}
                </a>
                .
              </p>
            </Block>
          </article>
        </Container>
      </section>
    </>
  );
}

function Block({ title, children }: { title: string; children: React.ReactNode }) {
  return (
    <Reveal className="space-y-4">
      <h2 className="text-xl font-bold tracking-tight text-slate-900 dark:text-white sm:text-2xl">
        {title}
      </h2>
      {children}
    </Reveal>
  );
}
