<?php
require_once 'config/config.php';
$pageTitle = 'Privacy Policy';
include 'includes/header.php';
?>

<main>
<!-- Hero -->
<section class="bg-gradient-to-br from-primary-blue via-blue-800 to-primary-green py-16 text-white">
    <div class="container mx-auto px-4 max-w-4xl text-center">
        <div class="inline-flex items-center gap-2 bg-white bg-opacity-15 border border-white border-opacity-25 rounded-full px-4 py-1.5 text-sm font-medium mb-5">
            <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"/></svg>
            Your Privacy Matters
        </div>
        <h1 class="text-4xl md:text-5xl font-extrabold mb-4 leading-tight">Privacy Policy</h1>
        <p class="text-blue-100 text-lg max-w-2xl mx-auto">Fantom Capital Limited is committed to protecting your personal data in accordance with the Kenya Data Protection Act, 2019.</p>
    </div>
</section>

<!-- Content -->
<section class="py-14 bg-gray-50">
    <div class="container mx-auto px-4 max-w-4xl">

        <!-- Quick Nav -->
        <div class="bg-white rounded-2xl shadow-sm border border-gray-100 p-6 mb-10">
            <h2 class="text-base font-bold text-gray-800 mb-3">Table of Contents</h2>
            <ol class="grid md:grid-cols-2 gap-1 text-sm text-primary-blue list-decimal list-inside">
                <li><a href="#who-we-are"          class="hover:underline">Who We Are</a></li>
                <li><a href="#data-we-collect"     class="hover:underline">Data We Collect</a></li>
                <li><a href="#how-we-use"          class="hover:underline">How We Use Your Data</a></li>
                <li><a href="#legal-basis"         class="hover:underline">Legal Basis for Processing</a></li>
                <li><a href="#data-sharing"        class="hover:underline">Data Sharing &amp; Disclosure</a></li>
                <li><a href="#data-retention"      class="hover:underline">Data Retention</a></li>
                <li><a href="#your-rights"         class="hover:underline">Your Rights</a></li>
                <li><a href="#data-security"       class="hover:underline">Data Security</a></li>
                <li><a href="#cookies"             class="hover:underline">Cookies &amp; Tracking</a></li>
                <li><a href="#third-party"         class="hover:underline">Third-Party Links</a></li>
                <li><a href="#children"            class="hover:underline">Children&rsquo;s Privacy</a></li>
                <li><a href="#changes"             class="hover:underline">Changes to This Policy</a></li>
                <li><a href="#contact"             class="hover:underline">Contact Us</a></li>
            </ol>
        </div>

        <?php
        $sections = [
            [
                'id'    => 'who-we-are',
                'icon'  => '🏢',
                'title' => '1. Who We Are',
                'body'  => '
                    <p>Fantom Capital Limited ("<strong>we</strong>", "<strong>us</strong>", or "<strong>our</strong>") is a duly licensed microfinance institution incorporated under the laws of Kenya, regulated by the Central Bank of Kenya. Our registered offices are located at Ruaraka Square, Thika Road, Nairobi, Kenya.</p>
                    <p class="mt-3">We provide personal loans, logbook loans, check-off loans, landlord loans, and related financial products through our website <a href="https://www.fancap.co.ke" class="text-primary-blue underline">www.fancap.co.ke</a> and our physical branches. This Privacy Policy explains how we collect, use, protect, and share information about you when you use our services, visit our website, or interact with us in any capacity.</p>
                    <p class="mt-3">Fantom Capital Limited acts as the <strong>data controller</strong> of your personal information and is responsible for the lawful and secure handling of that information.</p>
                '
            ],
            [
                'id'    => 'data-we-collect',
                'icon'  => '📋',
                'title' => '2. Data We Collect',
                'body'  => '
                    <p>We collect the following categories of personal data to provide, assess, and improve our lending services:</p>
                    <h4 class="font-semibold text-gray-700 mt-4 mb-2">a) Identity &amp; Contact Information</h4>
                    <ul class="list-disc list-inside space-y-1">
                        <li>Full name, date of birth, gender, and nationality</li>
                        <li>National ID number or passport number</li>
                        <li>KRA Personal Identification Number (PIN)</li>
                        <li>Residential and postal address</li>
                        <li>Phone number(s) and email address</li>
                        <li>Photographs (where required for identity verification)</li>
                    </ul>
                    <h4 class="font-semibold text-gray-700 mt-4 mb-2">b) Financial Information</h4>
                    <ul class="list-disc list-inside space-y-1">
                        <li>Bank account details, M-Pesa mobile money records, and SACCO statements</li>
                        <li>Income level, employment status, employer details, and salary slips</li>
                        <li>Credit history, Credit Reference Bureau (CRB) reports, and loan repayment records</li>
                        <li>Outstanding debts, liabilities, and financial obligations</li>
                    </ul>
                    <h4 class="font-semibold text-gray-700 mt-4 mb-2">c) Vehicle &amp; Asset Information (Logbook Loans)</h4>
                    <ul class="list-disc list-inside space-y-1">
                        <li>Vehicle make, model, year of manufacture, and type of use</li>
                        <li>Vehicle registration number and logbook details</li>
                        <li>Estimated vehicle value and professional valuation reports</li>
                        <li>Insurance policy details</li>
                    </ul>
                    <h4 class="font-semibold text-gray-700 mt-4 mb-2">d) Technical &amp; Usage Data</h4>
                    <ul class="list-disc list-inside space-y-1">
                        <li>IP address, browser type, and operating system</li>
                        <li>Pages visited, time spent on our website, and referral sources</li>
                        <li>Device identifiers and geographic location data (where consent is given)</li>
                        <li>Cookie data and session information</li>
                    </ul>
                    <h4 class="font-semibold text-gray-700 mt-4 mb-2">e) Communication Records</h4>
                    <ul class="list-disc list-inside space-y-1">
                        <li>Correspondence through email, SMS, WhatsApp, and telephone</li>
                        <li>Records of complaints, queries, and feedback</li>
                        <li>Records of consent provided for marketing or data processing</li>
                    </ul>
                '
            ],
            [
                'id'    => 'how-we-use',
                'icon'  => '⚙️',
                'title' => '3. How We Use Your Data',
                'body'  => '
                    <p>We use your personal data for the following purposes:</p>
                    <ul class="list-disc list-inside space-y-2 mt-3">
                        <li><strong>Loan Processing &amp; Assessment:</strong> To evaluate your creditworthiness, process your loan application, verify submitted documents, and determine your eligibility for our financial products.</li>
                        <li><strong>Identity Verification:</strong> To confirm your identity, prevent fraud, and comply with Know Your Customer (KYC) and Anti-Money Laundering (AML) regulations.</li>
                        <li><strong>Account Management:</strong> To create and manage your customer account, process payments, send statements, and update you on your loan status.</li>
                        <li><strong>Communication:</strong> To send you important notifications about your loan, repayment schedules, account updates, and responses to your enquiries via SMS, email, or telephone.</li>
                        <li><strong>Legal Compliance:</strong> To comply with our obligations under the Banking Act, the Microfinance Act, the Kenya Data Protection Act 2019, CRB regulations, tax laws, and any other applicable legislation.</li>
                        <li><strong>Credit Reporting:</strong> To submit and receive data from licensed Credit Reference Bureaus (CRBs) for credit assessment purposes.</li>
                        <li><strong>Debt Recovery:</strong> Where necessary, to recover overdue amounts through lawful means, including engagement of authorised debt recovery agents.</li>
                        <li><strong>Service Improvement:</strong> To analyse website usage patterns and improve the functionality, security, and user experience of our platform.</li>
                        <li><strong>Marketing (with consent):</strong> To send you information about new products, promotions, and financial tips. You may opt out at any time by contacting us at <a href="mailto:hello@fantomgrp.com" class="text-primary-blue underline">hello@fantomgrp.com</a>.</li>
                    </ul>
                '
            ],
            [
                'id'    => 'legal-basis',
                'icon'  => '⚖️',
                'title' => '4. Legal Basis for Processing',
                'body'  => '
                    <p>Under the Kenya Data Protection Act 2019, we rely on the following legal bases to process your personal data:</p>
                    <ul class="list-disc list-inside space-y-2 mt-3">
                        <li><strong>Contractual Necessity:</strong> Processing is necessary to assess, approve, and administer your loan application and any resulting loan agreement.</li>
                        <li><strong>Consent:</strong> Where you have explicitly given us permission to process your data for specific purposes, such as marketing communications. You have the right to withdraw consent at any time.</li>
                        <li><strong>Legal Obligation:</strong> Where processing is required to comply with applicable laws and regulations, including CRB submissions, tax reporting, and AML obligations.</li>
                        <li><strong>Legitimate Interests:</strong> Where processing is necessary for our legitimate business interests, such as fraud prevention, security monitoring, and service improvement, provided such interests are not overridden by your rights and interests.</li>
                    </ul>
                '
            ],
            [
                'id'    => 'data-sharing',
                'icon'  => '🤝',
                'title' => '5. Data Sharing &amp; Disclosure',
                'body'  => '
                    <p>We do not sell or rent your personal information to any third party. We may share your data with the following categories of recipients only where strictly necessary:</p>
                    <ul class="list-disc list-inside space-y-2 mt-3">
                        <li><strong>Credit Reference Bureaus (CRBs):</strong> Licensed CRBs such as TransUnion, Metropol, and CreditInfo, as required by the Credit Reference Bureau Regulations.</li>
                        <li><strong>Regulatory Authorities:</strong> The Central Bank of Kenya, Kenya Revenue Authority, the Office of the Data Protection Commissioner, and other government bodies as required by law.</li>
                        <li><strong>Law Enforcement:</strong> Police, courts, and other law enforcement or legal authorities when compelled by a court order or lawful legal process.</li>
                        <li><strong>Service Providers:</strong> Trusted third parties who provide services on our behalf, including IT support, SMS/email communication providers, vehicle valuers, debt collection agencies, and professional advisors (lawyers and auditors). All such parties are bound by confidentiality obligations and data processing agreements.</li>
                        <li><strong>Insurance Providers:</strong> For the purposes of loan protection and insurance cover, where applicable.</li>
                        <li><strong>Acquirers &amp; Successors:</strong> In the event of a merger, acquisition, or sale of business assets, your data may be transferred to the acquiring entity, subject to equivalent data protection obligations.</li>
                    </ul>
                    <p class="mt-3">All data sharing is conducted in strict compliance with the Kenya Data Protection Act 2019 and the applicable data processing agreements.</p>
                '
            ],
            [
                'id'    => 'data-retention',
                'icon'  => '📂',
                'title' => '6. Data Retention',
                'body'  => '
                    <p>We retain your personal data for as long as necessary to fulfil the purposes for which it was collected, and to comply with our legal and regulatory obligations. The following general retention periods apply:</p>
                    <ul class="list-disc list-inside space-y-2 mt-3">
                        <li><strong>Active loan accounts:</strong> For the full duration of the loan relationship.</li>
                        <li><strong>Closed loan accounts:</strong> For a minimum of <strong>seven (7) years</strong> after the loan is fully settled, as required by financial regulations and tax laws.</li>
                        <li><strong>Unsuccessful loan applications:</strong> For up to <strong>two (2) years</strong> from the date of the application decision.</li>
                        <li><strong>Website usage and technical data:</strong> For up to <strong>twelve (12) months</strong> from the date of collection.</li>
                        <li><strong>Marketing consent records:</strong> Until you withdraw consent, plus an additional period as required by law.</li>
                    </ul>
                    <p class="mt-3">When your data is no longer required, we will securely delete or anonymise it in accordance with our data destruction procedures.</p>
                '
            ],
            [
                'id'    => 'your-rights',
                'icon'  => '🛡️',
                'title' => '7. Your Rights',
                'body'  => '
                    <p>Under the Kenya Data Protection Act 2019, you have the following rights with respect to your personal data:</p>
                    <ul class="list-disc list-inside space-y-2 mt-3">
                        <li><strong>Right to Access:</strong> You have the right to request a copy of the personal data we hold about you, free of charge, subject to certain legal exceptions.</li>
                        <li><strong>Right to Rectification:</strong> You have the right to request correction of any inaccurate, incomplete, or outdated personal information we hold about you.</li>
                        <li><strong>Right to Erasure:</strong> You may request the deletion of your personal data where it is no longer necessary for the purposes it was collected, where consent has been withdrawn, or where processing is unlawful &mdash; subject to our legal retention obligations.</li>
                        <li><strong>Right to Object:</strong> You have the right to object to the processing of your personal data for direct marketing purposes or where processing is based on our legitimate interests.</li>
                        <li><strong>Right to Data Portability:</strong> Where technically feasible, you may request that we transfer your personal data to you or another organisation in a structured, commonly used, machine-readable format.</li>
                        <li><strong>Right to Withdraw Consent:</strong> Where processing is based on your consent, you may withdraw it at any time without affecting the lawfulness of processing carried out before withdrawal.</li>
                        <li><strong>Right to Lodge a Complaint:</strong> You have the right to lodge a complaint with the <strong>Office of the Data Protection Commissioner (ODPC)</strong> of Kenya if you believe your data rights have been violated.</li>
                    </ul>
                    <div class="bg-blue-50 border border-blue-200 rounded-lg p-4 mt-4">
                        <p class="text-sm text-blue-800">To exercise any of these rights, please contact our Data Protection Officer at <a href="mailto:hello@fantomgrp.com" class="underline font-semibold">hello@fantomgrp.com</a> or call <strong>0723 000 500</strong>. We will respond to all valid requests within <strong>21 days</strong> of receipt.</p>
                    </div>
                '
            ],
            [
                'id'    => 'data-security',
                'icon'  => '🔒',
                'title' => '8. Data Security',
                'body'  => '
                    <p>Fantom Capital Limited implements appropriate technical and organisational measures to protect your personal data against unauthorised access, accidental loss, alteration, disclosure, or destruction. Our security measures include:</p>
                    <ul class="list-disc list-inside space-y-2 mt-3">
                        <li>Secure Socket Layer (SSL/TLS) encryption for all data transmitted over our website</li>
                        <li>Password hashing and secure credential storage using industry-standard algorithms</li>
                        <li>Role-based access controls restricting staff access to data on a need-to-know basis</li>
                        <li>Regular security audits and vulnerability assessments of our IT systems</li>
                        <li>Physical security controls at our offices and data processing locations</li>
                        <li>Staff training on data protection obligations and secure data handling practices</li>
                        <li>Incident response procedures for detecting, reporting, and addressing data breaches</li>
                    </ul>
                    <p class="mt-3">In the event of a data breach that is likely to result in a high risk to your rights and freedoms, we will notify you and the Office of the Data Protection Commissioner within the timeframes prescribed by law.</p>
                    <p class="mt-3">While we take all reasonable precautions, no system is completely impenetrable. We encourage you to protect your account credentials and to notify us immediately at <a href="mailto:hello@fantomgrp.com" class="text-primary-blue underline">hello@fantomgrp.com</a> if you suspect any unauthorised access to your account.</p>
                '
            ],
            [
                'id'    => 'cookies',
                'icon'  => '🍪',
                'title' => '9. Cookies &amp; Tracking Technologies',
                'body'  => '
                    <p>Our website uses cookies and similar tracking technologies to enhance your browsing experience and to analyse website performance. Cookies are small text files stored on your device when you visit our website.</p>
                    <h4 class="font-semibold text-gray-700 mt-4 mb-2">Types of Cookies We Use</h4>
                    <ul class="list-disc list-inside space-y-2">
                        <li><strong>Essential Cookies:</strong> Strictly necessary for the operation of our website, including user authentication, session management, and security. These cannot be disabled.</li>
                        <li><strong>Analytical Cookies:</strong> Help us understand how visitors interact with our website by collecting anonymous statistical data (e.g., Google Analytics). This helps us improve our services.</li>
                        <li><strong>Functional Cookies:</strong> Remember your preferences (such as language or region settings) to personalise your experience.</li>
                        <li><strong>Marketing Cookies (with consent only):</strong> Used to deliver relevant advertisements and track the effectiveness of our marketing campaigns. These are only placed with your explicit consent.</li>
                    </ul>
                    <p class="mt-4">You can control and manage cookies through your browser settings. Please note that disabling certain cookies may affect the functionality of our website. For more information on managing cookies, visit <a href="https://www.allaboutcookies.org" target="_blank" class="text-primary-blue underline">www.allaboutcookies.org</a>.</p>
                '
            ],
            [
                'id'    => 'third-party',
                'icon'  => '🔗',
                'title' => '10. Third-Party Links',
                'body'  => '
                    <p>Our website may contain links to third-party websites, applications, or services that are not operated by Fantom Capital Limited. These links are provided for your convenience and informational purposes only.</p>
                    <p class="mt-3">We have no control over the content, privacy practices, or security of third-party sites. We strongly encourage you to review the privacy policies of any third-party websites you visit. Fantom Capital Limited is not responsible or liable for the privacy practices or content of such external sites.</p>
                    <p class="mt-3">Our third-party service providers (such as M-Pesa payment processing by Safaricom, Google Analytics, and SMS gateway providers) are subject to their own privacy policies and operate under data processing agreements with us.</p>
                '
            ],
            [
                'id'    => 'children',
                'icon'  => '👶',
                'title' => '11. Children\'s Privacy',
                'body'  => '
                    <p>Our financial services are intended solely for adults aged <strong>18 years and above</strong>. We do not knowingly collect, use, or store personal data from individuals under the age of 18.</p>
                    <p class="mt-3">If you are a parent or guardian and believe that your child has provided us with personal information without your consent, please contact us immediately at <a href="mailto:hello@fantomgrp.com" class="text-primary-blue underline">hello@fantomgrp.com</a>. We will take prompt steps to delete any such data from our records.</p>
                '
            ],
            [
                'id'    => 'changes',
                'icon'  => '📝',
                'title' => '12. Changes to This Privacy Policy',
                'body'  => '
                    <p>We may update this Privacy Policy from time to time to reflect changes in our data processing practices, legal requirements, or business operations. We will notify you of any material changes by:</p>
                    <ul class="list-disc list-inside space-y-1 mt-3">
                        <li>Posting the updated policy on this page with a revised "Last Updated" date</li>
                        <li>Sending a notification to the email address registered to your account (for significant changes)</li>
                        <li>Displaying a prominent notice on our website</li>
                    </ul>
                    <p class="mt-3">Your continued use of our services after the effective date of any changes constitutes your acceptance of the updated Privacy Policy. We encourage you to review this page periodically to stay informed about how we protect your data.</p>
                '
            ],
            [
                'id'    => 'contact',
                'icon'  => '📬',
                'title' => '13. Contact Us',
                'body'  => '
                    <p>If you have any questions, concerns, or requests regarding this Privacy Policy or the way we handle your personal data, please contact our Data Protection Officer:</p>
                    <div class="mt-4 grid md:grid-cols-3 gap-4">
                        <div class="bg-gray-50 rounded-xl p-4 text-center border border-gray-200">
                            <div class="text-2xl mb-2">📍</div>
                            <p class="text-xs font-bold text-gray-500 uppercase tracking-wide mb-1">Address</p>
                            <p class="text-sm text-gray-700">Ruaraka Square, Thika Road<br>Nairobi, Kenya</p>
                        </div>
                        <div class="bg-gray-50 rounded-xl p-4 text-center border border-gray-200">
                            <div class="text-2xl mb-2">📞</div>
                            <p class="text-xs font-bold text-gray-500 uppercase tracking-wide mb-1">Phone</p>
                            <p class="text-sm text-gray-700"><a href="tel:+254723000500" class="text-primary-blue hover:underline">0723 000 500</a></p>
                        </div>
                        <div class="bg-gray-50 rounded-xl p-4 text-center border border-gray-200">
                            <div class="text-2xl mb-2">✉️</div>
                            <p class="text-xs font-bold text-gray-500 uppercase tracking-wide mb-1">Email</p>
                            <p class="text-sm text-gray-700"><a href="mailto:hello@fantomgrp.com" class="text-primary-blue hover:underline">hello@fantomgrp.com</a></p>
                        </div>
                    </div>
                    <div class="mt-5 bg-blue-50 border border-blue-200 rounded-lg p-4">
                        <p class="text-sm text-blue-800">You may also lodge a complaint with the <strong>Office of the Data Protection Commissioner (ODPC)</strong> of Kenya at <a href="https://www.odpc.go.ke" target="_blank" class="underline font-semibold">www.odpc.go.ke</a> if you believe your data protection rights have been violated.</p>
                    </div>
                '
            ],
        ];

        foreach ($sections as $s): ?>
        <div id="<?php echo $s['id']; ?>" class="bg-white rounded-2xl shadow-sm border border-gray-100 p-8 mb-6 scroll-mt-24">
            <div class="flex items-center gap-3 mb-5">
                <span class="text-2xl"><?php echo $s['icon']; ?></span>
                <h2 class="text-xl font-bold text-gray-900"><?php echo $s['title']; ?></h2>
            </div>
            <div class="prose prose-gray max-w-none text-gray-700 text-sm leading-relaxed space-y-2">
                <?php echo $s['body']; ?>
            </div>
        </div>
        <?php endforeach; ?>

        <!-- Back to top -->
        <div class="text-center mt-8">
            <a href="#" class="inline-flex items-center gap-2 text-sm text-primary-blue hover:underline font-semibold">
                <svg class="w-4 h-4 rotate-180" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/></svg>
                Back to Top
            </a>
        </div>
    </div>
</section>
</main>

<?php include 'includes/footer.php'; ?>
