import { Link } from 'react-router-dom';
import { LegalLayout, H2, P, UL } from './LegalLayout';

export default function TermsPage() {
  return (
    <LegalLayout title="Terms of Service" effectiveDate="April 2026">
      <P>
        These Terms govern your access to and use of eLegal Software. By creating an account or using
        the service, you agree to them. If you are using eLegal Software on behalf of a firm, you
        represent that you have authority to bind that firm to these Terms.
      </P>

      <H2>1. The service</H2>
      <P>
        eLegal Software is software that helps law firms manage cases, track billable hours, store
        documents, and produce invoices. We provide the software; you remain responsible for
        the legal work and the relationships with your own clients.
      </P>

      <H2>2. Your account</H2>
      <UL
        items={[
          'You are responsible for safeguarding your password and for any activity under your account.',
          'Notify us promptly if you suspect unauthorized access.',
          'You must provide accurate registration information and keep it current.',
          'One person, one account. Sharing accounts is not permitted.',
        ]}
      />

      <H2>3. Acceptable use</H2>
      <P>You agree not to:</P>
      <UL
        items={[
          'Use the service to violate any law or the rights of another person.',
          'Attempt to access accounts, data, or systems you are not authorized to access.',
          'Reverse engineer, scrape, or interfere with the service or its security features.',
          'Upload malware or content that is illegal, infringing, or harmful.',
          'Resell or sublicense the service without our written consent.',
        ]}
      />

      <H2>4. Plans, fees, and trials</H2>
      <UL
        items={[
          'Paid plans renew automatically until canceled. You can cancel anytime from billing settings.',
          'Fees are charged in advance for each subscription period and are non-refundable except where required by law.',
          'We may change pricing with at least 30 days’ notice. Existing paid periods are honored at the prior price.',
          'Trial accounts and the free Starter plan have feature and usage limits. Limits may change as the product evolves.',
        ]}
      />

      <H2>5. Your content</H2>
      <P>
        You retain ownership of everything you upload (clients, cases, documents, time
        entries, invoices). You grant us a limited license to host, process, and display that
        content solely to operate the service for you. We do not use your content to train
        machine-learning models, and we will not disclose it except as described in our{' '}
        <Link to="/legal/privacy" className="text-brand-600 hover:underline">
          Privacy Policy
        </Link>
        .
      </P>

      <H2>6. Confidentiality of your clients’ data</H2>
      <P>
        We understand that information about your clients is confidential, often privileged,
        and subject to professional ethics rules. We treat it accordingly: encrypted in transit
        and at rest, scoped to your firm by our access-control system, and accessible to our
        staff only as strictly needed to operate the service or respond to a support request
        you initiate.
      </P>

      <H2>7. Suspension and termination</H2>
      <UL
        items={[
          'You may terminate your account anytime from Settings → Delete account.',
          'We may suspend or terminate accounts that violate these Terms, present a security risk, or are inactive for an extended period (we will notify you first where reasonably possible).',
          'On termination, you can export your data for up to 30 days; after that, your data is permanently deleted from our active systems and from backups within the following 30 days.',
        ]}
      />

      <H2>8. Service availability</H2>
      <P>
        We aim for high availability but do not guarantee uninterrupted service. We schedule
        maintenance during low-traffic windows and post notices for significant changes.
      </P>

      <H2>9. Disclaimer</H2>
      <P>
        The service is provided &ldquo;as is.&rdquo; To the maximum extent permitted by law, we
        disclaim all warranties, express or implied, including merchantability, fitness for a
        particular purpose, and non-infringement. eLegal Software is software, not a substitute for
        professional legal judgment. Use of the service does not create an attorney–client
        relationship between you and eLegal Software.
      </P>

      <H2>10. Limitation of liability</H2>
      <P>
        To the maximum extent permitted by law, our total liability for any claim arising out
        of or related to the service is limited to the amount you paid us in the 12 months
        preceding the event giving rise to the claim. We are not liable for indirect,
        incidental, special, consequential, or punitive damages, or for lost profits or
        revenues.
      </P>

      <H2>11. Indemnification</H2>
      <P>
        You agree to indemnify and hold us harmless from any claims, losses, or expenses
        arising out of (a) your use of the service in violation of these Terms or applicable
        law, or (b) your content.
      </P>

      <H2>12. Changes to the Terms</H2>
      <P>
        We may update these Terms from time to time. Material changes take effect 30 days after
        we post them, or sooner if required by law. Continued use after the effective date
        means you accept the updated Terms.
      </P>

      <H2>13. Governing law and disputes</H2>
      <P>
        These Terms are governed by the laws of the jurisdiction stated in your account region
        without regard to conflict-of-laws rules. The parties will attempt to resolve any
        dispute in good faith. Where that fails, disputes will be resolved by the courts
        located in that jurisdiction unless applicable law requires otherwise.
      </P>

      <H2>14. Contact</H2>
      <P>
        Questions about these Terms: <a href="mailto:legal@elegalsoftware.com" className="text-brand-600 hover:underline">legal@elegalsoftware.com</a>.
      </P>
    </LegalLayout>
  );
}
