import type { Metadata } from 'next';
import Link from 'next/link';
import { social } from '@/lib/metadata';
import { Reveal } from '@/components/reveal';

const DESCRIPTION =
  'How the United Economic Forum collects, uses, stores and protects the personal information you share with us.';

export const metadata: Metadata = {
  title: 'Privacy Policy',
  description: DESCRIPTION,
  ...social('Privacy Policy', DESCRIPTION, '/privacy'),
};

/**
 * DRAFT — pending legal sign-off.
 *
 * UEF supplied the four-sentence commitment in "UEF Website changes.docx"
 * (section 4); that text opens this page verbatim. Everything after it was
 * drafted to cover what a notice actually has to say once a site collects
 * personal data: what is collected, why, who processes it, how long it is
 * kept, and how to complain. The site's forms send submissions to Brevo, so
 * that processor is named explicitly.
 *
 * Both outstanding placeholders were settled by UEF on 28 August 2026: enquiry
 * data is kept for one year, and Mr. Peer Ahmed is the named grievance contact.
 */

const UPDATED = '28 August 2026';

function Section({ title, children }: { title: string; children: React.ReactNode }) {
  return (
    <Reveal>
      <section className="mb-12">
        <h2 className="text-2xl font-serif font-semibold mb-4 text-balance">{title}</h2>
        <div className="space-y-4 text-foreground/75 leading-relaxed">{children}</div>
      </section>
    </Reveal>
  );
}

export default function Privacy() {
  return (
    <div className="flex flex-col min-h-screen bg-background">
      <section className="bg-muted border-b border-border pt-40 pb-16">
        <div className="container mx-auto px-6 md:px-12 max-w-3xl">
        <Reveal>
          <p className="text-xs font-bold tracking-widest uppercase text-primary mb-4">Privacy &amp; Data Security</p>
          <h1 className="text-4xl md:text-5xl font-serif font-semibold mb-5 text-balance">
            Your Privacy. Our Commitment.
          </h1>
          <p className="text-sm text-foreground/50">Last updated: {UPDATED}</p>
        </Reveal>
        </div>
      </section>

      <div className="container mx-auto px-6 md:px-12 max-w-3xl py-16 md:py-20">
        {/* UEF-supplied copy, used verbatim. */}
        <div className="space-y-4 text-lg text-foreground/80 leading-relaxed mb-14 pb-14 border-b border-border">
          <p>
            At UEF, we are committed to protecting the privacy and security of the information you share with us. Your
            data is handled responsibly and safeguarded through appropriate security measures.
          </p>
          <p>
            We use your information only for legitimate UEF activities and services, and we do not share personal
            information with unauthorized third parties.
          </p>
          <p>
            Your trust is important to us. We are committed to maintaining the confidentiality, integrity, and security
            of your information.
          </p>
        </div>

        <Section title="Who we are">
          <p>
            The United Economic Forum (&ldquo;UEF&rdquo;, &ldquo;we&rdquo;, &ldquo;us&rdquo;) is a chamber of commerce
            with its Secretariat at No 4, Buhari Towers, 7th Floor, Moores Road, Chennai - 600 006, Tamil Nadu, India.
            This policy explains how we handle personal information collected through this website.
          </p>
        </Section>

        <Section title="What we collect">
          <p>We only collect what you choose to give us. Through the forms on this site, that is:</p>
          <ul className="list-disc pl-6 space-y-2">
            <li>
              <strong>Contact enquiries</strong> — your name, email address and the message you write.
            </li>
            <li>
              <strong>Membership enquiries</strong> — your name, email address, phone number and the membership
              category you select.
            </li>
          </ul>
          <p>
            We do not ask for financial details, identity documents or any special-category data through this website.
          </p>
        </Section>

        <Section title="Why we use it">
          <p>
            We use the information to respond to your enquiry, to assess membership interest, and to contact you about
            the request you submitted. We do not use it for automated decision-making, and we do not sell it.
          </p>
        </Section>

        <Section title="Who else handles it">
          <p>
            Running a website means a small number of service providers process data on our behalf. They act on our
            instructions and may not use your information for their own purposes:
          </p>
          <ul className="list-disc pl-6 space-y-2">
            <li>
              <strong>Brevo</strong> — delivers form submissions to our Secretariat inbox by email.
            </li>
            <li>
              <strong>Vercel</strong> — hosts the website and processes standard server logs.
            </li>
            <li>
              <strong>Sanity</strong> — stores the site&rsquo;s published content. It holds no visitor data.
            </li>
          </ul>
          <p>
            Some of these providers operate servers outside India. Beyond them, we share personal information only
            where the law requires it.
          </p>
        </Section>

        <Section title="How long we keep it">
          <p>
            We keep enquiry correspondence for <strong>one year</strong> from the date you contact us, after which it
            is deleted. If you would like your details removed sooner, write to us and we will do so.
          </p>
        </Section>

        <Section title="Your choices">
          <p>
            You can ask us what personal information we hold about you, ask us to correct it if it is wrong, or ask us
            to delete it. You can also withdraw consent to being contacted at any time. To make any of these requests,
            email us at the address below.
          </p>
        </Section>

        <Section title="Security">
          <p>
            The site is served over an encrypted connection, and access to enquiry data is limited to Secretariat staff
            who need it. No system is perfectly secure, but we take reasonable measures appropriate to the information
            we hold.
          </p>
        </Section>

        <Section title="Cookies">
          <p>
            This site does not use advertising or tracking cookies. Some pages embed content from Instagram and Google
            Maps; those services may set their own cookies when their content loads, under their own privacy policies.
          </p>
        </Section>

        <Section title="Contact us">
          {/* The DPDP Act wants a named individual reachable for grievances, not a
              shared inbox alone — hence Mr. Peer Ahmed and his direct address,
              with the general inbox kept for everything else. */}
          <p>
            For any question about this policy, or to exercise any of the choices above, our grievance contact is{' '}
            <strong>Mr. Peer Ahmed</strong>, reachable at{' '}
            <a href="mailto:Peer@unitedeconomicforum.com" className="text-primary hover:underline">
              Peer@unitedeconomicforum.com
            </a>
            . You can also write to{' '}
            <a href="mailto:info@unitedeconomicforum.com" className="text-primary hover:underline">
              info@unitedeconomicforum.com
            </a>{' '}
            or reach the Secretariat through our{' '}
            <Link href="/contact" className="text-primary hover:underline">
              contact page
            </Link>
            .
          </p>
        </Section>

        <Section title="Changes to this policy">
          <p>
            We may update this policy as our services change. The date at the top of this page shows when it was last
            revised.
          </p>
        </Section>
      </div>
    </div>
  );
}
