# -*- coding: utf-8 -*-
import json
from build import page, WHATSAPP_NUMBER, PHONE_DISPLAY, EMAIL

ABOUT_BODY = """
<section class="page-hero">
  <div class="container">
    <div class="breadcrumb"><a href="index.html">Home</a> / About Us</div>
    <span class="eyebrow">Our story</span>
    <h1>Built by people who've felt the distance too</h1>
    <p class="lede">NRI Property Guard started from a simple, familiar frustration: owning a home or plot in India while living thousands of miles away, and having no reliable, independent way to know what's actually happening to it.</p>
  </div>
</section>

<section>
  <div class="container grid grid-2" style="align-items:center;">
    <div>
      <h2>Our mission</h2>
      <p>To give every NRI property owner the same confidence a local owner has — a verified, independent, on-the-ground presence, backed by evidence that can't be faked or forgotten, and a dashboard that tells the truth in real time.</p>
      <h2>How we're different</h2>
      <p>We didn't build a one-time legal-opinion service or an informal caretaker network. We built a platform where every step — from Admin review to Manager approval — is enforced by the system itself, not just described in a brochure. What you see in your dashboard is exactly what was captured on-site, nothing more, nothing less.</p>
    </div>
    <div class="grid grid-2">
      <div class="card"><div class="icon-badge">🔍</div><h3>Independent</h3><p class="mb-0">Our Property Executives work for us, not for the tenant, broker or neighbour "keeping an eye" on things.</p></div>
      <div class="card"><div class="icon-badge">🔐</div><h3>Verifiable</h3><p class="mb-0">GPS, timestamps and cryptographic hashing mean evidence can be checked, not just trusted.</p></div>
      <div class="card"><div class="icon-badge">🌍</div><h3>Built for distance</h3><p class="mb-0">Every screen, every notification, is designed around one fact: you're not there, and shouldn't need to be.</p></div>
      <div class="card"><div class="icon-badge">📐</div><h3>Honest by design</h3><p class="mb-0">We label what we haven't verified as not verified — we'd rather say "check with your state RERA portal" than fabricate a record.</p></div>
    </div>
  </div>
</section>

<section class="section-tint">
  <div class="container">
    <div class="section-head">
      <span class="eyebrow">Coverage</span>
      <h2>On-ground teams across India's major NRI investment states</h2>
    </div>
    <ul class="pill-list" style="justify-content:center;">
      <li>Telangana</li><li>Karnataka</li><li>Maharashtra</li><li>Tamil Nadu</li><li>Andhra Pradesh</li>
      <li>Gujarat</li><li>Uttar Pradesh</li><li>Delhi NCR</li><li>Kerala</li><li>West Bengal</li><li>Punjab</li><li>Haryana</li>
    </ul>
  </div>
</section>

<section>
  <div class="container">
    <div class="cta-band">
      <h2>Have a question before you register?</h2>
      <p>We're happy to talk through your specific property situation, no obligation.</p>
      <a href="contact.html" class="btn btn-navy">Contact Our Team</a>
    </div>
  </div>
</section>
"""

page(
    "about.html",
    "About Us — NRI Property Guard",
    "Learn why NRI Property Guard was built: independent, verifiable, GPS-tagged property inspection and management for Non-Resident Indians.",
    "about.html",
    ABOUT_BODY,
)

FAQS = [
    ("Do I need to visit India to register my property?", "No. Registration is done entirely through the web portal or mobile app — you provide the address, GPS pin (or use \"current location\" if you're on-site, or paste a Google Maps link), documents and initial photos remotely."),
    ("How is this different from asking a relative or broker to check in?", "A relative or broker's update can't be independently verified — no timestamp, no GPS proof, and often a conflict of interest. Every visit from our Property Executives is GPS-tagged, timestamped, reviewed by a Property Manager, and recorded in a tamper-evident audit trail."),
    ("How often is my property actually inspected?", "On the Regular plan, one verified on-site inspection visit is scheduled every month for as long as your property remains active on the platform. On the Prime plan, a follow-up visit is automatically scheduled roughly 15 days after the first — about two visits a month — for the same ongoing verified coverage plus faster emergency response."),
    ("What exactly is in the PDF report?", "An 11-section Professional Property Inspection Report: report identification, location & GPS with a map snapshot, the full photo and video register with timestamps, a Nearby Locations section (schools, hospitals, transport, etc.), RERA self-verification links for your state, market indicators, and a cryptographic chain-of-custody section."),
    ("Is the evidence really tamper-evident?", "Yes. Every photo and video is hashed (SHA-256) at capture, and the inspection checklist is digitally signed and chained into an append-only audit trail. Any after-the-fact alteration to a record breaks the chain and can be detected."),
    ("Can I download photos, videos and reports?", "Yes — approved photos and videos can be saved directly to your device, and every generated report version can be downloaded as a PDF from your Documents & Reports section, not just the latest one."),
    ("What is Emergency SOS and who can use it?", "Emergency SOS is a Prime-tier feature: pick your property and an emergency type (break-in, encroachment, fire, flood, utility issue, or other), and it raises a high-priority ticket that immediately notifies our Admin team and your property's Property Manager. Regular customers can upgrade to Prime instantly, any time."),
    ("How much does it cost?", "Regular (1 inspection visit/month) is ₹2,000 per property per month; Prime (2 visits/month, plus Emergency SOS) is ₹3,500 per property per month. Register more than 2 properties and the per-property rate automatically drops to ₹1,500 (Regular) or ₹2,500 (Prime) — see the Pricing page for the full breakdown."),
    ("Can I pay online?", "Yes — a \"Pay Now\" button on your Invoices tab opens your UPI app (GPay, PhonePe, PayPay, etc.) with the amount pre-filled so you can pay directly from your phone; your monthly invoice is also always available as a downloadable PDF from your dashboard."),
    ("Will I see photos or videos before they're approved?", "No — by design, you only ever see photos and videos once a Property Manager has approved them. Pending or rejected items are never shown on your dashboard, so you can trust that what you see reflects a reviewed, approved capture."),
    ("What if I have a question or a problem?", "Raise a support ticket from your dashboard — pick from a few common questions or write your own — and it goes straight to your assigned Property Manager (and our Admin team for general questions), with replies visible in the same thread."),
    ("Which parts of India do you cover?", "We currently have on-ground verification teams across 12+ states including Telangana, Karnataka, Maharashtra, Tamil Nadu, Andhra Pradesh, Gujarat, Uttar Pradesh, Delhi NCR, Kerala, West Bengal, Punjab and Haryana. Message us on WhatsApp to confirm coverage for your specific city."),
]

def faq_items():
    out = ""
    for i, (q, a) in enumerate(FAQS):
        out += f"""<div class="accordion-item{' open' if i==0 else ''}">
  <button class="accordion-q">{q}<span class="plus">+</span></button>
  <div class="accordion-a"{' style="max-height:400px;"' if i==0 else ''}><p>{a}</p></div>
</div>\n"""
    return out

FAQ_JSONLD_ITEMS = ",\n".join(
    json.dumps({"@type": "Question", "name": q, "acceptedAnswer": {"@type": "Answer", "text": a}})
    for q, a in FAQS
)

FAQ_BODY = f"""
<section class="page-hero">
  <div class="container">
    <div class="breadcrumb"><a href="index.html">Home</a> / FAQ</div>
    <span class="eyebrow">Frequently asked questions</span>
    <h1>Everything NRI owners ask us before registering</h1>
    <p class="lede">Can't find your answer here? <a href="https://wa.me/{WHATSAPP_NUMBER}" target="_blank" rel="noopener">Message us on WhatsApp</a> — we typically reply within minutes during business hours.</p>
  </div>
</section>
<section>
  <div class="container" style="max-width:820px;">
    {faq_items()}
  </div>
</section>
<section class="section-tint">
  <div class="container">
    <div class="cta-band" style="background:linear-gradient(120deg,var(--navy-800),var(--navy-700));">
      <h2>Still have questions?</h2>
      <p>Talk to a real person — no chatbot, no call centre script.</p>
      <a href="contact.html" class="btn btn-gold">Contact Us</a>
    </div>
  </div>
</section>
<script type="application/ld+json">
{{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [{FAQ_JSONLD_ITEMS}]
}}
</script>
"""

page(
    "faq.html",
    "FAQ — Frequently Asked Questions | NRI Property Guard",
    "Answers to the most common questions NRIs ask about property verification, inspection frequency, tamper-evident reports, pricing and Emergency SOS.",
    "faq.html",
    FAQ_BODY,
)

CONTACT_BODY = f"""
<section class="page-hero">
  <div class="container">
    <div class="breadcrumb"><a href="index.html">Home</a> / Contact</div>
    <span class="eyebrow">Get in touch</span>
    <h1>Talk to our NRI property team</h1>
    <p class="lede">Tell us about your property and situation — we'll follow up by email or WhatsApp, whichever you prefer.</p>
  </div>
</section>
<section>
  <div class="container grid grid-2" style="align-items:start;">
    <h2 class="sr-only">Contact form and details</h2>
    <div class="card">
      <h3>Send us a message</h3>
      <form data-lead-form="contact">
        <div class="form-alert"></div>
        <div class="form-grid-2">
          <div class="form-field"><label for="c-name">Full name</label><input id="c-name" name="name" required></div>
          <div class="form-field"><label for="c-email">Email</label><input id="c-email" name="email" type="email" required></div>
        </div>
        <div class="form-grid-2">
          <div class="form-field"><label for="c-phone">Phone / WhatsApp number</label><input id="c-phone" name="phone" placeholder="+1 555 000 0000"></div>
          <div class="form-field"><label for="c-city">Property city (India)</label><input id="c-city" name="city" placeholder="e.g. Hyderabad"></div>
        </div>
        <div class="form-field"><label for="c-msg">How can we help?</label><textarea id="c-msg" name="message" placeholder="Tell us a little about your property and what you'd like verified or managed."></textarea></div>
        <button type="submit" class="btn btn-primary btn-block">Send Message</button>
      </form>
    </div>
    <div class="stack-gap">
      <div class="card"><h3>📞 Call or WhatsApp</h3><p><a href="tel:+{WHATSAPP_NUMBER}">{PHONE_DISPLAY}</a><br>Fastest response is via <a href="https://wa.me/{WHATSAPP_NUMBER}" target="_blank" rel="noopener">WhatsApp</a> — most messages are answered within minutes during business hours (9 AM–8 PM IST).</p></div>
      <div class="card"><h3>✉️ Email</h3><p><a href="mailto:{EMAIL}">{EMAIL}</a><br>For detailed queries or document sharing.</p></div>
      <div class="card"><h3>🔐 Already a customer?</h3><p>Log in to your dashboard to raise a support ticket directly with your assigned Property Manager.</p><a href="portal/index.html" class="btn btn-outline-navy btn-sm">Go to Owner Login</a></div>
    </div>
  </div>
</section>
"""

page(
    "contact.html",
    "Contact Us | NRI Property Guard",
    "Get in touch with the NRI Property Guard team by WhatsApp, phone or email — we'll help you get your property registered and verified.",
    "contact.html",
    CONTACT_BODY,
)
