@extends('layouts.app')
@section('title', 'Privacy Policy')
@section('content')
@include('partials.public-header')

<section class="section">
    <div class="container-sm legal-doc">
        <span class="eyebrow">Legal</span>
        <h1 style="margin-top: 14px;">Privacy Policy</h1>
        <p class="muted" style="margin-top: 6px;">Last updated: {{ date('F Y') }} · This policy explains how Befikreyy Homes handles your information.</p>

        <div class="legal-summary mt-3">
            <p style="margin: 0;"><strong>The short version:</strong> We collect only what's needed to deliver your booking, share your address with the assigned partner, and never sell your data. You can request deletion any time.</p>
        </div>

        <h2 class="mt-4">1. Information We Collect</h2>
        <p>We collect three kinds of information:</p>
        <ul class="legal-list">
            <li><strong>Account information</strong> — your name, phone number, email, and password (stored as a one-way hash).</li>
            <li><strong>Booking information</strong> — service address, area, preferred slots, notes, and property details you share with the partner.</li>
            <li><strong>Service data</strong> — visit photos (before/during/after), partner status updates, ratings, reviews, and chat logs with support.</li>
        </ul>

        <h2 class="mt-4">2. How We Use Your Information</h2>
        <ul class="legal-list">
            <li>To schedule visits, dispatch the right partner, and notify you of arrivals.</li>
            <li>To verify identity (OTP at visit start) and prevent fraud.</li>
            <li>To process payments via Razorpay and issue GST invoices.</li>
            <li>To send service updates, photo proofs, and ratings requests on WhatsApp.</li>
            <li>To send operational communications — booking confirmations, visit reminders, subscription renewals.</li>
            <li>To improve our matching algorithm and partner quality.</li>
        </ul>

        <h2 class="mt-4">3. What We Do NOT Do</h2>
        <ul class="legal-list">
            <li>We <strong>never sell</strong> your data to brokers, advertisers, or third parties.</li>
            <li>We do not run third-party tracking pixels, ad networks, or remarketing cookies.</li>
            <li>We do not store your payment card details — Razorpay handles PCI-DSS compliant tokenisation on our behalf.</li>
        </ul>

        <h2 class="mt-4">4. Who We Share With</h2>
        <ul class="legal-list">
            <li><strong>The assigned partner</strong> — receives your name, phone, address, and visit notes. They are contractually bound to use this only to deliver the service.</li>
            <li><strong>Payment processor (Razorpay)</strong> — for billing. Subject to Razorpay's privacy policy.</li>
            <li><strong>SMS / WhatsApp gateway</strong> — for OTPs and visit alerts. Phone numbers are not used for marketing.</li>
            <li><strong>Legal authorities</strong> — only when required by a valid court order.</li>
        </ul>
        <p>We never share your booking history, photos, or chat logs with anyone outside of these categories.</p>

        <h2 class="mt-4">5. Cookies &amp; Local Storage</h2>
        <p>We use only <strong>strictly necessary cookies</strong> for session management (keeping you logged in) and CSRF protection. No analytics, no third-party tracking. You can clear cookies in your browser at any time without losing your account.</p>

        <h2 class="mt-4">6. Data Retention</h2>
        <ul class="legal-list">
            <li><strong>Active accounts:</strong> data is retained while your subscription is active.</li>
            <li><strong>Cancelled accounts:</strong> booking history and invoices are kept for 7 years for tax/regulatory compliance.</li>
            <li><strong>Visit photos:</strong> retained for 12 months from visit date, then auto-deleted.</li>
            <li><strong>Support chats:</strong> retained for 24 months.</li>
        </ul>

        <h2 class="mt-4">7. Your Rights</h2>
        <p>You can, at any time:</p>
        <ul class="legal-list">
            <li><strong>Access</strong> — request a copy of all data we hold on you (emailed within 7 days).</li>
            <li><strong>Correct</strong> — fix any inaccurate information from your profile.</li>
            <li><strong>Delete</strong> — request account closure and deletion of non-regulatory data.</li>
            <li><strong>Opt out of marketing</strong> — reply STOP to any promotional WhatsApp / SMS / email.</li>
            <li><strong>Withdraw consent</strong> — without affecting the lawfulness of prior processing.</li>
        </ul>

        <h2 class="mt-4">8. Security</h2>
        <p>We protect your data with:</p>
        <ul class="legal-list">
            <li>HTTPS / TLS for all traffic.</li>
            <li>Bcrypt-hashed passwords (never stored in plain text).</li>
            <li>CSRF tokens on every form.</li>
            <li>Role-based access for staff — only the founder can view photo proofs and chat logs.</li>
            <li>Encrypted backups stored on a separate access-controlled server.</li>
        </ul>

        <h2 class="mt-4">9. Children's Privacy</h2>
        <p>Befikreyy is not directed at children under 18. We do not knowingly collect data from minors. If you believe a minor has registered, write to us and we will delete the account.</p>

        <h2 class="mt-4">10. International Transfers</h2>
        <p>Your data is primarily processed in India. Some sub-processors (e.g., Razorpay's edge network, WhatsApp gateway) may route through servers outside India. All transfers are governed by standard contractual clauses that ensure equivalent data protection.</p>

        <h2 class="mt-4">11. Updates to This Policy</h2>
        <p>Material changes will be communicated via email and an in-app banner at least 15 days before they take effect. The "Last updated" date at the top reflects the most recent revision.</p>

        <h2 class="mt-4">12. Grievance Officer (India DPDP Act, 2023)</h2>
        <p>In accordance with the Digital Personal Data Protection Act, 2023:</p>
        <div class="griev-box">
            <strong>Grievance Officer</strong><br>
            Befikreyy Homes, Flat F701, Supertech Ecociti, Sector 137, Noida 201305<br>
            📧 <a href="mailto:{{ $siteEmail }}">{{ $siteEmail }}</a><br>
            📞 <a href="tel:{{ $sitePhone }}">{{ $sitePhone }}</a><br>
            Response time: within 48 hours of receipt.
        </div>

        <p class="muted mt-4" style="font-size: 12.5px;">© {{ date('Y') }} Befikreyy Homes. All rights reserved.</p>
    </div>
</section>

@include('partials.public-footer')
@endsection