import { LegalPage, Section, LegalContact } from "@/components/marketing/legal"
import { LEGAL } from "@/lib/legal"

export const metadata = {
  title: "Acceptable Use Policy",
  description: `The rules that govern acceptable use of the ${LEGAL.service} platform and the activities that are prohibited.`,
  alternates: { canonical: "/acceptable-use" },
}

export default function Page() {
  return (
    <LegalPage
      title="Acceptable Use Policy"
      subtitle={`This Acceptable Use Policy sets out the rules for using the ${LEGAL.service} platform. It is designed to keep the Service safe, lawful, and reliable for everyone.`}
    >
      <Section heading="1. Overview and scope">
        <p>
          This Acceptable Use Policy (the <strong>Policy</strong>) applies to all access to and use of the{" "}
          {LEGAL.service} platform (the <strong>Service</strong>) operated by {LEGAL.entity} (<strong>we</strong>,{" "}
          <strong>us</strong>, or <strong>our</strong>). It applies to you as the account holder (a landlord or
          property manager), whom we refer to as <strong>you</strong> or <strong>Customer</strong>, and to anyone who
          accesses the Service through your account.
        </p>
        <p>
          This Policy forms part of, and is incorporated by reference into, our{" "}
          <a href="/terms">Terms of Service</a>. Capitalized terms that are not defined here have the meaning given
          to them in the Terms. Violating this Policy is a violation of the Terms and may result in enforcement action
          as described below.
        </p>
      </Section>

      <Section heading="2. Prohibited activities">
        <p>When using the Service, you must not, and must not permit any third party to:</p>
        <ul>
          <li>Use the Service for any illegal, fraudulent, or unauthorized purpose, or in any way that violates applicable law or regulation.</li>
          <li>Violate any housing, fair-housing, anti-discrimination, or landlord-tenant laws, including using the Service to discriminate against any Tenant or applicant on a protected basis.</li>
          <li>Harass, threaten, defame, or otherwise engage in abusive or unlawful contact with any <strong>Tenant</strong> or other individual through the Service.</li>
          <li>Upload, store, or transmit content that is infringing, unlawful, defamatory, obscene, or that contains viruses, malware, or other malicious code.</li>
          <li>Gain or attempt to gain unauthorized access to the Service, to other accounts, or to any systems or networks connected to the Service, including through scraping or automated bulk access.</li>
          <li>Probe, scan, or test the vulnerability of the Service, or circumvent, disable, or otherwise interfere with any security features or access controls.</li>
          <li>Reverse engineer, decompile, or disassemble any part of the Service, or attempt to derive its source code, except to the extent this restriction is prohibited by applicable law.</li>
          <li>Interfere with, disrupt, or place an unreasonable load on the Service or its infrastructure, or attempt to overload or degrade it.</li>
          <li>Use the email or notification features of the Service to send spam, unsolicited bulk messages, or any unlawful, deceptive, or harassing communications.</li>
          <li>Misuse <strong>Tenant</strong> personal data, including using it for any purpose other than the lawful management of the relevant tenancy or in a manner inconsistent with your obligations to that Tenant.</li>
        </ul>
      </Section>

      <Section heading="3. Data and privacy responsibilities">
        <p>
          You may only upload or process <strong>Tenant</strong> personal data, or any other personal data, for which
          you have a lawful basis and, where required, the necessary consent. You must not upload special-category or
          sensitive personal data unless doing so is lawful and appropriate for your purposes.
        </p>
        <p>
          For personal data you process through the Service, you act as the <strong>data controller</strong> and are
          responsible for complying with applicable data-protection laws. Our respective obligations are set out in
          our <a href="/dpa">Data Processing Addendum</a>, and our data practices are described in our{" "}
          <a href="/privacy">Privacy Policy</a>.
        </p>
      </Section>

      <Section heading="4. Security and vulnerability reporting">
        <p>
          You must not conduct any unauthorized security testing against the Service. If you discover a security
          vulnerability or a potential weakness, please report it responsibly to{" "}
          <a href={`mailto:${LEGAL.securityEmail}`}>{LEGAL.securityEmail}</a> and give us a reasonable opportunity to
          investigate and remediate it before disclosing it to others. We appreciate good-faith reports and will not
          pursue action against researchers who act responsibly and within the law.
        </p>
      </Section>

      <Section heading="5. Usage limits and fair use">
        <p>
          You must respect the usage limits, quotas, and rate limits associated with your plan, and you must use the
          Service in a manner consistent with fair use. You must not abuse, circumvent, or attempt to exceed any API
          rate limits, or use automated means to consume a disproportionate share of resources. We may apply
          technical or contractual measures to protect the Service and other Customers from excessive or abusive use.
        </p>
      </Section>

      <Section heading="6. Enforcement">
        <p>
          We may investigate suspected violations of this Policy and take any action we consider appropriate,
          including removing or disabling access to offending content, throttling usage, suspending or terminating
          accounts, and cooperating with law-enforcement authorities or other third parties. We may act with or
          without notice depending on the severity of the violation and the risk to the Service or others. Suspension
          and termination are further described in our <a href="/terms">Terms of Service</a>.
        </p>
      </Section>

      <Section heading="7. Reporting abuse">
        <p>
          If you become aware of any use of the Service that violates this Policy, please report it to us so that we
          can investigate.
        </p>
      </Section>

      <LegalContact email={LEGAL.contactEmail} />
    </LegalPage>
  )
}
