import type { Metadata } from "next";
import LegalPage from "@/components/LegalPage";

export const metadata: Metadata = {
  title: "Terms of Use",
  description:
    "The rules for using the MxERP website and products — license, acceptable use, IP, warranties, liability and governing law.",
  alternates: { canonical: "/terms-of-use" },
};

const SECTIONS = [
  { id: "acceptance", label: "Acceptance of terms" },
  { id: "license", label: "MxERP license scope" },
  { id: "acceptable-use", label: "Acceptable use" },
  { id: "customer-data", label: "Customer data ownership" },
  { id: "demo", label: "Demos, trials & content" },
  { id: "ip", label: "Intellectual property" },
  { id: "warranties", label: "Warranties & liability" },
  { id: "suspension", label: "Suspension & termination" },
  { id: "law", label: "Governing law" },
  { id: "contact", label: "Contact us" },
];

export default function TermsOfUsePage() {
  return (
    <LegalPage
      pill="LEGAL · TERMS"
      title="Terms of Use"
      intro="The rules for using this website and MxERP products and services, provided by ACG Infotech Ltd., Noida, India."
      updated="October 2026"
      sections={SECTIONS}
      other={{
        href: "/privacy-policy",
        label: "Privacy Policy",
        text: "How we collect, use and safeguard your information, including DPDP Act rights.",
      }}
    >
      <section id="acceptance">
        <h2>1. Acceptance of terms</h2>
        <p>
          By accessing this website, requesting a demo or using MxERP, you agree to
          these Terms and to our <a href="/privacy-policy">Privacy Policy</a>. If
          you do not agree, please do not use the site. A signed order or
          subscription agreement with us takes precedence over these Terms where
          they conflict.
        </p>
      </section>

      <section id="license">
        <h2>2. MxERP license scope</h2>
        <p>
          MxERP is licensed, not sold. A subscription grants your organisation a
          non-exclusive, non-transferable right to use the modules you have
          subscribed to (manufacturing, construction / EPC, and shared modules such
          as inventory, finance and HR) for your internal business operations, for
          the term and user/site limits in your order.
        </p>
      </section>

      <section id="acceptable-use">
        <h2>3. Acceptable use</h2>
        <p>You agree not to:</p>
        <ul>
          <li>Share logins beyond your licensed users, or resell access without written permission</li>
          <li>Reverse-engineer, copy or extract the software except as the law allows</li>
          <li>Upload unlawful, infringing or malicious content, or use the service to break the law</li>
          <li>Probe, overload or disrupt our systems, or circumvent access controls</li>
          <li>Submit false details through demo, callback or contact forms</li>
        </ul>
      </section>

      <section id="customer-data">
        <h2>4. Customer data ownership</h2>
        <p>
          All business data you enter into MxERP — production, project, financial
          and workforce records — remains yours. We process it only to provide the
          service and support, and return or delete it per your subscription
          agreement when the relationship ends, subject to legal retention duties.
        </p>
      </section>

      <section id="demo">
        <h2>5. Demos, trials and website content</h2>
        <ul>
          <li>Demo and callback requests oblige us to contact you — nothing more; no purchase is required</li>
          <li>Trial environments may carry limits and are provided “as is” for evaluation</li>
          <li>Brochures, guides and figures on this site are illustrative; confirmed commitments appear only in a signed order</li>
        </ul>
      </section>

      <section id="ip">
        <h2>6. Intellectual property</h2>
        <p>
          The site, MxERP software, logos, documentation and content are owned by
          ACG Infotech Ltd. or its licensors and protected by IP law. Nothing here
          grants you any right other than the license in section 2.
        </p>
      </section>

      <section id="warranties">
        <h2>7. Warranties and liability</h2>
        <p>
          The website is provided “as is”. MxERP service warranties, uptime and
          remedies are stated in your subscription agreement. To the maximum extent
          the law allows, neither party is liable for indirect, incidental or
          consequential losses, and our aggregate liability is capped at the fees
          you paid in the preceding 12 months.
        </p>
      </section>

      <section id="suspension">
        <h2>8. Suspension and termination</h2>
        <p>
          We may suspend or terminate access for breach, non-payment or misuse after
          reasonable notice where practicable. You may stop using the site at any
          time; subscription termination follows your order&apos;s notice terms.
        </p>
      </section>

      <section id="law">
        <h2>9. Governing law</h2>
        <p>
          These Terms are governed by the laws of India. Courts at Noida, Uttar
          Pradesh have exclusive jurisdiction. We first attempt good-faith
          discussion of any dispute before proceedings.
        </p>
      </section>

      <section id="contact">
        <h2>10. Contact us</h2>
        <p>
          ACG Infotech Ltd. (MxERP) — H-107, Sector-63, Noida – 201301, Uttar
          Pradesh, India · <a href="tel:+919818993537">+91-9818993537</a> ·{" "}
          <a href="mailto:akg@acgil.net">akg@acgil.net</a>
        </p>
      </section>
    </LegalPage>
  );
}
