import React from "react";
import Link from "next/link";

export const metadata = {
    title: "Privacy Policy | Battl Builder",
    description:
        "Privacy Policy for Battl Builder. Learn how we collect, use, and protect your data.",
};

export default function PrivacyPolicy() {
    const lastUpdated = "January 9, 2026";

    return (
        <div className="mx-auto max-w-4xl px-4 py-12">
            <div className="mb-10">
                <h1 className="text-4xl font-bold tracking-tight">Privacy Policy</h1>
                <p className="mt-2 text-sm opacity-60">Last Updated: {lastUpdated}</p>
            </div>

            <div className="space-y-12 text-sm leading-relaxed text-white/90">
                {/* 1. Introduction */}
                <section>
                    <h2 className="mb-4 text-xl font-semibold">1. Introduction</h2>
                    <p>
                        Battl Builder (&quot;we,&quot; &quot;us,&quot; &quot;our,&quot; or &quot;Company&quot;) respects your privacy
                        and is committed to protecting it through this Privacy Policy. This
                        policy explains our practices regarding the collection, use, and
                        protection of your personal information when you access our website
                        and use our services (the &quot;Service&quot;).
                    </p>
                    <p className="mt-4">
                        Please read this Privacy Policy carefully. If you do not agree with
                        our practices, please do not use the Service. Your use of the Service
                        constitutes your acceptance of this Privacy Policy.
                    </p>
                </section>

                {/* 2. Information We Collect */}
                <section>
                    <h2 className="mb-4 text-xl font-semibold">
                        2. Information We Collect
                    </h2>
                    <div className="space-y-4">
                        <div>
                            <h3 className="font-semibold text-amber-100">
                                A. Information You Provide Directly
                            </h3>
                            <ul className="mt-2 list-disc space-y-2 pl-5">
                                <li>
                                    <strong>Account Information:</strong> Email address, username,
                                    password, and profile details
                                </li>
                                <li>
                                    <strong>Build Content:</strong> Firearm builds, images,
                                    descriptions, and configurations you create or share
                                </li>
                                <li>
                                    <strong>Communication:</strong> Messages, feedback, comments,
                                    and support inquiries
                                </li>
                                <li>
                                    <strong>Payment Information:</strong> Billing address, payment
                                    method details (processed securely by third-party providers)
                                </li>
                            </ul>
                        </div>

                        <div>
                            <h3 className="font-semibold text-amber-100">
                                B. Information Collected Automatically
                            </h3>
                            <ul className="mt-2 list-disc space-y-2 pl-5">
                                <li>
                                    <strong>Device & Browser Data:</strong> Device type, operating
                                    system, browser type, IP address, and unique identifiers
                                </li>
                                <li>
                                    <strong>Usage Data:</strong> Pages visited, time spent,
                                    features used, clicks, searches, and interactions
                                </li>
                                <li>
                                    <strong>Cookies & Tracking:</strong> Session cookies, persistent
                                    cookies, and web analytics tools
                                </li>
                                <li>
                                    <strong>Geolocation Data:</strong> Approximate location based on
                                    IP address (not precise GPS)
                                </li>
                            </ul>
                        </div>

                        <div>
                            <h3 className="font-semibold text-amber-100">
                                C. Information from Third Parties
                            </h3>
                            <ul className="mt-2 list-disc space-y-2 pl-5">
                                <li>
                                    <strong>Merchant & Product Data:</strong> Product catalogs, pricing,
                                    and specifications from affiliate partners
                                </li>
                                <li>
                                    <strong>Social Media:</strong> Profile information if you link
                                    social accounts
                                </li>
                                <li>
                                    <strong>Analytics Providers:</strong> Aggregated usage statistics
                                </li>
                            </ul>
                        </div>
                    </div>
                </section>

                {/* 3. How We Use Your Information */}
                <section>
                    <h2 className="mb-4 text-xl font-semibold">
                        3. How We Use Your Information
                    </h2>
                    <p>We use your information for the following purposes:</p>
                    <ul className="mt-3 list-disc space-y-2 pl-5">
                        <li>Provide, operate, and improve the Service</li>
                        <li>Create and manage your account</li>
                        <li>Process transactions and send related confirmations</li>
                        <li>Personalize your experience and recommend features</li>
                        <li>Send transactional and informational emails</li>
                        <li>Conduct analytics and monitor Service performance</li>
                        <li>
                            Detect, investigate, and prevent fraud, abuse, and security issues
                        </li>
                        <li>Comply with legal obligations and enforce our Terms</li>
                        <li>
                            Send marketing communications (with your consent, where required)
                        </li>
                    </ul>
                </section>

                {/* 4. Data Sharing */}
                <section>
                    <h2 className="mb-4 text-xl font-semibold">4. Data Sharing</h2>
                    <p>
                        We may share your information in the following circumstances:
                    </p>
                    <div className="mt-4 space-y-3">
                        <div>
                            <p className="font-semibold">Service Providers</p>
                            <p className="text-white/75">
                                Third-party vendors who assist with hosting, analytics, email,
                                payments, and customer support. These providers are bound by
                                confidentiality agreements.
                            </p>
                        </div>
                        <div>
                            <p className="font-semibold">Affiliate Partners</p>
                            <p className="text-white/75">
                                We may share limited information with merchant affiliates for
                                product fulfillment and tracking purposes.
                            </p>
                        </div>
                        <div>
                            <p className="font-semibold">Public Content</p>
                            <p className="text-white/75">
                                Builds, images, and descriptions you publish are visible to other
                                users of the Service.
                            </p>
                        </div>
                        <div>
                            <p className="font-semibold">Legal Compliance</p>
                            <p className="text-white/75">
                                We may disclose information when required by law, court order, or
                                government request, or to protect our rights and safety.
                            </p>
                        </div>
                        <div>
                            <p className="font-semibold">Business Transfers</p>
                            <p className="text-white/75">
                                In the event of a merger, acquisition, or sale of assets, your
                                information may be transferred as part of that transaction.
                            </p>
                        </div>
                    </div>
                    <p className="mt-4 font-semibold text-orange-200">
                        We do NOT sell your personal information to third parties for
                        marketing purposes.
                    </p>
                </section>

                {/* 5. Cookies & Tracking Technologies */}
                <section>
                    <h2 className="mb-4 text-xl font-semibold">
                        5. Cookies & Tracking Technologies
                    </h2>
                    <p>
                        We use cookies and similar technologies to enhance your experience:
                    </p>
                    <div className="mt-4 space-y-3">
                        <div>
                            <p className="font-semibold">Essential Cookies</p>
                            <p className="text-white/75">
                                Required for authentication, security, and basic functionality.
                            </p>
                        </div>
                        <div>
                            <p className="font-semibold">Performance Cookies</p>
                            <p className="text-white/75">
                                Collect analytics data to improve Service performance and user
                                experience.
                            </p>
                        </div>
                        <div>
                            <p className="font-semibold">Preference Cookies</p>
                            <p className="text-white/75">
                                Remember your settings and preferences for future visits.
                            </p>
                        </div>
                    </div>
                    <p className="mt-4">
                        You can control cookies through your browser settings. Disabling cookies
                        may affect Service functionality.
                    </p>
                </section>

                {/* 6. Data Security */}
                <section>
                    <h2 className="mb-4 text-xl font-semibold">6. Data Security</h2>
                    <p>
                        We implement industry-standard security measures to protect your
                        personal information, including encryption, secure servers, and access
                        controls.
                    </p>
                    <p className="mt-4">
                        However, no security system is impenetrable. While we strive to
                        protect your data, we cannot guarantee absolute security. You use the
                        Service at your own risk.
                    </p>
                    <p className="mt-4">
                        If you believe your account has been compromised, please contact us
                        immediately.
                    </p>
                </section>

                {/* 7. Data Retention */}
                <section>
                    <h2 className="mb-4 text-xl font-semibold">7. Data Retention</h2>
                    <p>
                        We retain your personal information for as long as necessary to
                        provide the Service and comply with legal obligations:
                    </p>
                    <ul className="mt-3 list-disc space-y-2 pl-5">
                        <li>
                            <strong>Account Information:</strong> Retained while your account is
                            active; deleted or anonymized upon deletion request
                        </li>
                        <li>
                            <strong>Build Content:</strong> Retained as long as you choose to
                            keep it; may be retained in backups for operational purposes
                        </li>
                        <li>
                            <strong>Transactional Data:</strong> Retained for 7 years for
                            tax/legal compliance
                        </li>
                        <li>
                            <strong>Analytics Data:</strong> Aggregated and anonymized after
                            12–24 months
                        </li>
                    </ul>
                </section>

                {/* 8. Your Privacy Rights */}
                <section className="rounded-xl border border-blue-500/30 bg-blue-500/5 p-6">
                    <h2 className="mb-4 text-xl font-semibold text-blue-200">
                        8. Your Privacy Rights
                    </h2>
                    <p className="mb-4">
                        Depending on your location, you may have the following rights:
                    </p>
                    <ul className="space-y-3">
                        <li>
                            <strong>Right to Access:</strong> Request a copy of your personal
                            data
                        </li>
                        <li>
                            <strong>Right to Correction:</strong> Request correction of inaccurate
                            data
                        </li>
                        <li>
                            <strong>Right to Deletion:</strong> Request deletion of your data (with
                            exceptions for legal compliance)
                        </li>
                        <li>
                            <strong>Right to Opt-Out:</strong> Opt out of marketing communications
                            and certain tracking
                        </li>
                        <li>
                            <strong>Right to Portability:</strong> Request your data in a portable
                            format
                        </li>
                        <li>
                            <strong>Right to Objection:</strong> Object to certain data processing
                            activities
                        </li>
                    </ul>
                    <p className="mt-4">
                        To exercise these rights, email us at{" "}
                        <span className="text-blue-300">privacy@battlbuilder.com</span> with
                        your request. We will respond within 30 days.
                    </p>
                </section>

                {/* 9. CCPA / California Privacy Rights */}
                <section>
                    <h2 className="mb-4 text-xl font-semibold">
                        9. CCPA & California Residents
                    </h2>
                    <p>
                        If you are a California resident, the California Consumer Privacy Act
                        (CCPA) grants you additional rights:
                    </p>
                    <ul className="mt-3 list-disc space-y-2 pl-5">
                        <li>
                            Know what personal information is collected, used, and shared
                        </li>
                        <li>Delete personal information under certain circumstances</li>
                        <li>Opt-out of the sale or sharing of personal information</li>
                        <li>Non-discrimination for exercising your CCPA rights</li>
                    </ul>
                    <p className="mt-4">
                        We do not sell personal information. To submit a CCPA request, email
                        us at{" "}
                        <span className="text-amber-300">privacy@battlbuilder.com</span>.
                    </p>
                </section>

                {/* 10. Children's Privacy */}
                <section>
                    <h2 className="mb-4 text-xl font-semibold">10. Children&apos;s Privacy</h2>
                    <p>
                        The Service is not intended for users under 18 years of age. We do not
                        knowingly collect personal information from children under 18.
                    </p>
                    <p className="mt-4">
                        If we become aware that we have collected information from a child
                        under 18, we will delete such information immediately and terminate the
                        child&apos;s account.
                    </p>
                    <p className="mt-4">
                        If you believe we have collected information from a child under 18,
                        please contact us immediately.
                    </p>
                </section>

                {/* 11. Third-Party Links & Services */}
                <section>
                    <h2 className="mb-4 text-xl font-semibold">
                        11. Third-Party Links & Services
                    </h2>
                    <p>
                        The Service may contain links to third-party websites and services
                        operated by other companies. This Privacy Policy applies only to
                        Battl Builder. We are not responsible for the privacy practices of
                        third-party sites.
                    </p>
                    <p className="mt-4">
                        Please review the privacy policies of any third-party services before
                        providing your information.
                    </p>
                </section>

                {/* 12. International Data Transfers */}
                <section>
                    <h2 className="mb-4 text-xl font-semibold">
                        12. International Data Transfers
                    </h2>
                    <p>
                        If you access the Service from outside the United States, your
                        information may be transferred to, stored in, and processed in the
                        United States or other countries where we operate.
                    </p>
                    <p className="mt-4">
                        By using the Service, you consent to the transfer of your information
                        to countries outside your country of residence, which may have
                        different data protection rules.
                    </p>
                </section>

                {/* 13. Updates to This Policy */}
                <section>
                    <h2 className="mb-4 text-xl font-semibold">
                        13. Updates to This Privacy Policy
                    </h2>
                    <p>
                        We may update this Privacy Policy from time to time to reflect changes
                        in our practices or for other operational, legal, or regulatory reasons.
                    </p>
                    <p className="mt-4">
                        We will notify you of material changes by posting the updated policy
                        here and updating the &quot;Last Updated&quot; date. Your continued use of the
                        Service following the posting of changes constitutes your acceptance
                        of the updated Privacy Policy.
                    </p>
                </section>

                {/* 14. Contact Us */}
                <section className="rounded-xl border border-amber-500/30 bg-amber-500/5 p-6">
                    <h2 className="mb-4 text-xl font-semibold text-amber-200">
                        14. Contact Us
                    </h2>
                    <p>
                        If you have questions about this Privacy Policy or wish to exercise
                        your privacy rights, please contact us:
                    </p>
                    <div className="mt-4 space-y-2 text-white/80">
                        <p>
                            <strong>Email:</strong>{" "}
                            <span className="text-amber-300">privacy@battlbuilder.com</span>
                        </p>
                        <p>
                            <strong>Mailing Address:</strong>
                            <br />
                            Battl Builder, LLC.
                            <br />
                            {/* [Your Address]
                            <br />
                            [City, State, ZIP] */}
                        </p>
                    </div>
                    <p className="mt-4 text-sm">
                        We will respond to all privacy inquiries within 30 days of receipt.
                    </p>
                </section>

                <div className="space-y-3 pt-10">
                    <p className="text-xs opacity-50">
                        This Privacy Policy is aligned with GDPR, CCPA, and other major
                        privacy regulations.
                    </p>
                    <Link
                        href="/"
                        className="block text-sm text-amber-400 hover:text-amber-300 transition-colors"
                    >
                        ← Return to Home
                    </Link>
                </div>
            </div>
        </div>
    );
}