import { Badge } from "@/src/components/ui/badge";
import { Card, CardContent } from "@/src/components/ui/card";
import { FileText, Mail } from "lucide-react";
import type { Metadata } from "next";

export const metadata: Metadata = {
  title: "Terms & Conditions - Service Agreement",
  description:
    "Xpecto Global terms and conditions. Read our service agreement, export terms, and business policies for international trade.",
  alternates: {
    canonical: "/terms-conditions",
  },
  robots: {
    index: true,
    follow: true,
  },
};

export default function TermsConditions() {
  return (
    <div className="bg-white">
      {/* Hero Section */}
      <section className="relative h-75 flex items-center bg-[#0B1C2D]">
        <div className="absolute inset-0 bg-linear-to-r from-[#0B1C2D] to-[#1a3a52] pointer-events-none"></div>
        <div className="relative z-10 max-w-360 mx-auto px-6 w-full">
          <Badge className="mb-4 bg-white/10 text-white hover:bg-white/20">
            Legal
          </Badge>
          <h1 className="text-5xl font-bold text-white mb-4">
            Terms & Conditions
          </h1>
          <p className="text-gray-300">Effective Date: March 1, 2026 | Last Updated: February 28, 2026</p>
        </div>
      </section>

      {/* Content */}
      <section className="py-20">
        <div className="max-w-4xl mx-auto px-6">
          <div className="prose prose-lg max-w-none">
            {/* Introduction */}
            <Card className="mb-8 border-l-4 border-[#B8860B]">
              <CardContent className="md:p-6 p-4">
                <div className="flex md:flex-row flex-col items-start gap-4">
                  <FileText className="text-[#B8860B] shrink-0 mt-1" size={24} />
                  <div>
                    <h2 className="text-xl font-bold text-[#0B1C2D] mb-2">1. Introduction</h2>
                    <p className="text-gray-600 leading-relaxed">
                      These Terms & Conditions ("Terms") govern the use of the website and trade services provided by <strong>Xpecto IT Solutions Pvt Ltd</strong>, operating under the brand name <strong>Xpecto Global</strong> ("Company", "we", "us", "our").
                    </p>
                    <p className="text-gray-600 leading-relaxed mt-3">
                      By accessing our website or engaging in any trade transaction with us, you agree to comply with and be bound by these Terms. If you do not agree, please refrain from using our services.
                    </p>
                  </div>
                </div>
              </CardContent>
            </Card>

            {/* Company Information */}
            <div className="mb-8">
              <h2 className="text-2xl font-bold text-[#0B1C2D] mb-4">2. Company Information</h2>
              <div className="bg-[#F5F7FA] p-6 rounded-lg">
                <p className="text-gray-700 mb-2"><strong>Legal Entity:</strong> Xpecto IT Solutions Pvt Ltd</p>
                <p className="text-gray-700 mb-2"><strong>Division:</strong> Xpecto Global</p>
                <p className="text-gray-700 mb-2"><strong>Website:</strong> <a href="https://www.xpectoglobal.com" className="text-[#B8860B] hover:underline">https://www.xpectoglobal.com</a></p>
              </div>
            </div>

            {/* Scope of Services */}
            <div className="mb-8">
              <h2 className="text-2xl font-bold text-[#0B1C2D] mb-4">3. Scope of Services</h2>
              <p className="text-gray-600 mb-3">Xpecto Global provides:</p>
              <ul className="list-disc pl-6 text-gray-600 space-y-1 mb-3">
                <li>International import-export services</li>
                <li>Product sourcing from verified manufacturers</li>
                <li>Export documentation support</li>
                <li>Logistics coordination</li>
                <li>Trade compliance assistance</li>
                <li>Supplier and buyer onboarding</li>
              </ul>
              <p className="text-gray-600">
                We act as a trading partner, exporter, sourcing agent, or intermediary depending on the agreed contractual arrangement.
              </p>
            </div>

            {/* Use of Website */}
            <div className="mb-8">
              <h2 className="text-2xl font-bold text-[#0B1C2D] mb-4">4. Use of Website</h2>
              <p className="text-gray-600 mb-3">You agree to:</p>
              <ul className="list-disc pl-6 text-gray-600 space-y-1 mb-3">
                <li>Provide accurate information</li>
                <li>Use the website for lawful purposes only</li>
                <li>Not misuse or attempt to disrupt the website</li>
                <li>Not attempt unauthorized access to systems</li>
              </ul>
              <p className="text-gray-600">We reserve the right to suspend access for violations.</p>
            </div>

            {/* Quotations & Orders */}
            <div className="mb-8">
              <h2 className="text-2xl font-bold text-[#0B1C2D] mb-4">5. Quotations & Orders</h2>
              
              <h3 className="text-xl font-bold text-[#0B1C2D] mb-3">5.1 Quotations</h3>
              <ul className="list-disc pl-6 text-gray-600 space-y-1 mb-4">
                <li>All quotations are subject to availability.</li>
                <li>Prices are valid only for the period stated.</li>
                <li>Pricing may change due to market fluctuations, freight changes, currency variation, or regulatory adjustments.</li>
              </ul>

              <h3 className="text-xl font-bold text-[#0B1C2D] mb-3">5.2 Order Confirmation</h3>
              <p className="text-gray-600 mb-2">An order becomes binding only after:</p>
              <ul className="list-disc pl-6 text-gray-600 space-y-1">
                <li>Written confirmation from the Company</li>
                <li>Agreement on payment terms</li>
                <li>Signed contract or purchase order (where applicable)</li>
              </ul>
            </div>

            {/* Pricing & Payment Terms */}
            <div className="mb-8">
              <h2 className="text-2xl font-bold text-[#0B1C2D] mb-4">6. Pricing & Payment Terms</h2>
              <p className="text-gray-600 mb-3">Payment terms may include:</p>
              <ul className="list-disc pl-6 text-gray-600 space-y-1 mb-3">
                <li>Letter of Credit (LC)</li>
                <li>Telegraphic Transfer (TT)</li>
                <li>Advance Payment</li>
                <li>Other mutually agreed terms</li>
              </ul>
              <p className="text-gray-600 mb-2">
                All bank charges, intermediary charges, and transfer fees are the responsibility of the buyer unless otherwise agreed.
              </p>
              <p className="text-gray-600">
                Failure to make payment may result in suspension or cancellation of shipment.
              </p>
            </div>

            {/* Shipping & Delivery */}
            <div className="mb-8">
              <h2 className="text-2xl font-bold text-[#0B1C2D] mb-4">7. Shipping & Delivery</h2>
              <p className="text-gray-600 mb-3">Shipping terms shall follow Incoterms (latest version) such as:</p>
              <ul className="list-disc pl-6 text-gray-600 space-y-1 mb-3">
                <li>FOB (Free on Board)</li>
                <li>CIF (Cost, Insurance & Freight)</li>
                <li>EXW (Ex Works)</li>
                <li>CFR</li>
              </ul>
              <p className="text-gray-600 mb-3">
                Risk transfer occurs as defined under the agreed Incoterm.
              </p>
              <p className="text-gray-600 mb-2">Delivery timelines are estimates and may vary due to:</p>
              <ul className="list-disc pl-6 text-gray-600 space-y-1 mb-3">
                <li>Port congestion</li>
                <li>Customs delays</li>
                <li>Force majeure events</li>
                <li>Regulatory inspections</li>
              </ul>
              <p className="text-gray-600">We are not liable for delays beyond our reasonable control.</p>
            </div>

            {/* Export Documentation */}
            <div className="mb-8">
              <h2 className="text-2xl font-bold text-[#0B1C2D] mb-4">8. Export Documentation</h2>
              <p className="text-gray-600 mb-3">We provide export documentation including:</p>
              <ul className="list-disc pl-6 text-gray-600 space-y-1 mb-3">
                <li>Commercial Invoice</li>
                <li>Packing List</li>
                <li>Bill of Lading / Airway Bill</li>
                <li>Certificate of Origin</li>
                <li>COA (Certificate of Analysis), if applicable</li>
                <li>MSDS (where applicable)</li>
                <li>Phytosanitary / Regulatory Certificates (if required)</li>
              </ul>
              <p className="text-gray-600">
                Buyers are responsible for verifying import regulations in their destination country.
              </p>
            </div>

            {/* Product Compliance */}
            <div className="mb-8">
              <h2 className="text-2xl font-bold text-[#0B1C2D] mb-4">9. Product Compliance & Regulatory Responsibility</h2>
              <p className="text-gray-600 mb-3">
                We ensure products meet export compliance standards in India.
              </p>
              <p className="text-gray-600 mb-2">However, the buyer is responsible for:</p>
              <ul className="list-disc pl-6 text-gray-600 space-y-1">
                <li>Import licenses</li>
                <li>Regulatory approvals in destination country</li>
                <li>Customs duties and taxes</li>
                <li>Country-specific labeling requirements</li>
              </ul>
            </div>

            {/* Inspection & Quality */}
            <div className="mb-8">
              <h2 className="text-2xl font-bold text-[#0B1C2D] mb-4">10. Inspection & Quality</h2>
              <p className="text-gray-600 mb-3">Quality inspection may include:</p>
              <ul className="list-disc pl-6 text-gray-600 space-y-1 mb-3">
                <li>Pre-shipment inspection</li>
                <li>Third-party inspection (if requested)</li>
                <li>Batch documentation</li>
              </ul>
              <p className="text-gray-600 mb-2">Any claims related to quality must be submitted within:</p>
              <ul className="list-disc pl-6 text-gray-600 space-y-1 mb-3">
                <li>7 days from delivery (visible damage)</li>
                <li>14 days from receipt (quality concerns)</li>
              </ul>
              <p className="text-gray-600">Claims must be supported with documentation and evidence.</p>
            </div>

            {/* Limitation of Liability */}
            <div className="mb-8">
              <h2 className="text-2xl font-bold text-[#0B1C2D] mb-4">11. Limitation of Liability</h2>
              <p className="text-gray-600 mb-2">To the maximum extent permitted by law:</p>
              <ul className="list-disc pl-6 text-gray-600 space-y-1">
                <li>Our liability shall not exceed the total invoice value of the relevant shipment.</li>
                <li>We are not liable for indirect, consequential, or incidental damages.</li>
                <li>We are not responsible for delays caused by third-party logistics providers.</li>
              </ul>
            </div>

            {/* Force Majeure */}
            <div className="mb-8">
              <h2 className="text-2xl font-bold text-[#0B1C2D] mb-4">12. Force Majeure</h2>
              <p className="text-gray-600 mb-3">We shall not be liable for failure or delay caused by:</p>
              <ul className="list-disc pl-6 text-gray-600 space-y-1 mb-3">
                <li>Natural disasters</li>
                <li>War or political instability</li>
                <li>Pandemic</li>
                <li>Government restrictions</li>
                <li>Port closures</li>
                <li>Transportation strikes</li>
                <li>Acts beyond reasonable control</li>
              </ul>
              <p className="text-gray-600">Affected obligations shall be suspended during the force majeure period.</p>
            </div>

            {/* Intellectual Property */}
            <div className="mb-8">
              <h2 className="text-2xl font-bold text-[#0B1C2D] mb-4">13. Intellectual Property</h2>
              <p className="text-gray-600 mb-2">All website content including:</p>
              <ul className="list-disc pl-6 text-gray-600 space-y-1 mb-3">
                <li>Text</li>
                <li>Graphics</li>
                <li>Logos</li>
                <li>Trade materials</li>
                <li>Documents</li>
              </ul>
              <p className="text-gray-600">
                are the property of Xpecto IT Solutions Pvt Ltd and may not be reproduced without written permission.
              </p>
            </div>

            {/* Confidentiality */}
            <div className="mb-8">
              <h2 className="text-2xl font-bold text-[#0B1C2D] mb-4">14. Confidentiality</h2>
              <p className="text-gray-600 mb-2">Both parties agree to:</p>
              <ul className="list-disc pl-6 text-gray-600 space-y-1 mb-3">
                <li>Keep business information confidential</li>
                <li>Not disclose pricing, trade details, supplier information</li>
                <li>Protect proprietary documentation</li>
              </ul>
              <p className="text-gray-600">This clause survives termination of business engagement.</p>
            </div>

            {/* Termination */}
            <div className="mb-8">
              <h2 className="text-2xl font-bold text-[#0B1C2D] mb-4">15. Termination</h2>
              <p className="text-gray-600 mb-2">We reserve the right to terminate:</p>
              <ul className="list-disc pl-6 text-gray-600 space-y-1 mb-3">
                <li>Any trade engagement</li>
                <li>Website access</li>
                <li>Supplier or buyer registration</li>
              </ul>
              <p className="text-gray-600">If fraud, misrepresentation, or legal violations are suspected.</p>
            </div>

            {/* Governing Law */}
            <div className="mb-8">
              <h2 className="text-2xl font-bold text-[#0B1C2D] mb-4">16. Governing Law & Jurisdiction</h2>
              <p className="text-gray-600 mb-2">
                These Terms shall be governed by and interpreted in accordance with the laws of India.
              </p>
              <p className="text-gray-600">
                Any disputes shall be subject to the exclusive jurisdiction of courts located in India, unless otherwise contractually agreed.
              </p>
            </div>

            {/* Dispute Resolution */}
            <div className="mb-8">
              <h2 className="text-2xl font-bold text-[#0B1C2D] mb-4">17. Dispute Resolution</h2>
              <p className="text-gray-600 mb-3">Parties agree to attempt amicable resolution first.</p>
              <p className="text-gray-600 mb-2">If unresolved, disputes may be settled through:</p>
              <ul className="list-disc pl-6 text-gray-600 space-y-1">
                <li>Arbitration (if mutually agreed)</li>
                <li>Court proceedings under applicable jurisdiction</li>
              </ul>
            </div>

            {/* Amendments */}
            <div className="mb-8">
              <h2 className="text-2xl font-bold text-[#0B1C2D] mb-4">18. Amendments</h2>
              <p className="text-gray-600">
                We reserve the right to modify these Terms at any time. Updates will be posted on this page with a revised "Last Updated" date.
              </p>
            </div>

            {/* Contact Information */}
            <Card className="bg-[#F5F7FA] border-0">
              <CardContent className="p-4 md:p-8">
                <div className="flex md:flex-row flex-col items-start gap-4">
                  <Mail className="text-[#B8860B] shrink-0 mt-1" size={24} />
                  <div>
                    <h2 className="text-2xl font-bold text-[#0B1C2D] mb-3">19. Contact Information</h2>
                    <p className="text-gray-600 mb-2">
                      For questions regarding these Terms:
                    </p>
                    <p className="text-gray-700 font-semibold">Xpecto IT Solutions Pvt Ltd</p>
                    <p className="text-gray-600">(Operating as Xpecto Global)</p>
                    <p className="text-gray-600 mt-2">
                      <strong>Email:</strong> <a href="mailto:legal@xpectoglobal.com" className="text-[#B8860B] hover:underline">legal@xpectoglobal.com</a>
                    </p>
                    <p className="text-gray-600">
                      <strong>Website:</strong> <a href="https://www.xpectoglobal.com" className="text-[#B8860B] hover:underline">https://www.xpectoglobal.com</a>
                    </p>
                  </div>
                </div>
              </CardContent>
            </Card>
          </div>
        </div>
      </section>
    </div>
  );
}
