import { LandingNav } from "@/components/landing/LandingNav";
import { Link } from "react-router-dom";
import acmNavIcon from "@/assets/acm-nav-icon.png";

const TermsOfServicePage = () => {
  return (
    <div className="min-h-screen bg-background flex flex-col">
      <LandingNav />
      <main className="flex-grow py-16 px-6">
        <div className="max-w-3xl mx-auto prose prose-sm dark:prose-invert">
          <h1 className="text-3xl font-bold tracking-tight text-foreground">Terms of Service</h1>
          <p className="text-muted-foreground text-sm">Last updated: March 21, 2026</p>

          <h2>1. Acceptance of Terms</h2>
          <p>
            By accessing or using the services provided by Avria Community Management, LLC ("ACM," "we," "us," or "our"), you agree to be bound by these Terms of Service. If you do not agree, you may not use our services.
          </p>

          <h2>2. Description of Services</h2>
          <p>
            ACM provides a community association management platform that includes, but is not limited to:
          </p>
          <ul>
            <li>Property and unit management</li>
            <li>Financial tracking, assessments, and payment processing</li>
            <li>Violation tracking and architectural review management</li>
            <li>Document management and communication tools</li>
            <li>Board member and homeowner portals</li>
            <li>Vendor management and reporting</li>
          </ul>

          <h2>3. User Accounts</h2>
          <p>
            You are responsible for maintaining the confidentiality of your account credentials and for all activities that occur under your account. You agree to notify us immediately of any unauthorized use of your account.
          </p>

          <h2>4. Acceptable Use</h2>
          <p>You agree not to:</p>
          <ul>
            <li>Use the platform for any unlawful purpose</li>
            <li>Attempt to gain unauthorized access to any part of the system</li>
            <li>Upload malicious code, viruses, or harmful content</li>
            <li>Interfere with the operation or security of the platform</li>
            <li>Share your account credentials with unauthorized parties</li>
            <li>Use the platform to harass, defame, or threaten others</li>
          </ul>

          <h2>5. Payment Terms</h2>
          <p>
            Fees for our services are outlined in your management agreement. Payment processing is handled through secure third-party providers. Association assessments and fees are subject to the governing documents of your community association.
          </p>

          <h2>6. Data Ownership</h2>
          <p>
            You retain ownership of all data you upload to the platform. ACM is granted a limited license to use, store, and process your data solely for the purpose of providing our services. Upon termination, we will provide reasonable assistance in exporting your data.
          </p>

          <h2>7. Intellectual Property</h2>
          <p>
            The ACM platform, including its design, features, and underlying technology, is the intellectual property of Avria Community Management, LLC. You may not copy, modify, distribute, or reverse engineer any part of the platform.
          </p>

          <h2>8. Limitation of Liability</h2>
          <p>
            To the maximum extent permitted by law, ACM shall not be liable for any indirect, incidental, special, consequential, or punitive damages arising from your use of our services. Our total liability shall not exceed the fees paid by you in the twelve (12) months preceding the claim.
          </p>

          <h2>9. Indemnification</h2>
          <p>
            You agree to indemnify and hold harmless ACM, its officers, directors, employees, and agents from any claims, damages, or expenses arising from your use of the platform or violation of these Terms.
          </p>

          <h2>10. Service Availability</h2>
          <p>
            We strive to maintain high availability but do not guarantee uninterrupted access. We may perform scheduled maintenance and reserve the right to modify or discontinue features with reasonable notice.
          </p>

          <h2>11. Termination</h2>
          <p>
            Either party may terminate service in accordance with the management agreement. We reserve the right to suspend or terminate access for violation of these Terms, with notice where practicable.
          </p>

          <h2>12. Governing Law</h2>
          <p>
            These Terms shall be governed by and construed in accordance with the laws of the State of Florida, without regard to conflict of law principles.
          </p>

          <h2>13. Dispute Resolution</h2>
          <p>
            Any disputes arising from these Terms shall first be addressed through good-faith negotiation. If unresolved, disputes shall be submitted to binding arbitration in accordance with the rules of the American Arbitration Association.
          </p>

          <h2>14. Changes to Terms</h2>
          <p>
            We may update these Terms from time to time. Continued use of our services after changes constitutes acceptance of the revised Terms. We will provide notice of material changes.
          </p>

          <h2>15. Contact Us</h2>
          <p>
            If you have questions about these Terms, please contact us at:
          </p>
          <p>
            <strong>Avria Community Management, LLC</strong><br />
            Email: <a href="mailto:cam@avriacam.com" className="text-primary hover:underline">cam@avriacam.com</a>
          </p>
        </div>
      </main>

      <footer className="border-t bg-card py-12 px-6">
        <div className="max-w-7xl mx-auto flex flex-col md:flex-row justify-between items-center gap-6">
          <div className="flex flex-col items-center md:items-start gap-2">
            <div className="flex items-center gap-1.5">
              <div className="flex h-8 w-8 items-center justify-center rounded-sm bg-foreground overflow-hidden">
                <img src={acmNavIcon} alt="ACM" className="h-5 w-5 object-contain" />
              </div>
              <span className="text-sm font-extrabold tracking-tight">ACM</span>
            </div>
            <p className="text-muted-foreground text-sm mt-2">
              &copy; {new Date().getFullYear()} Avria Community Management, LLC. All rights reserved.
            </p>
          </div>
          <div className="flex gap-8 text-sm font-medium text-muted-foreground">
            <Link to="/privacy" className="hover:text-primary transition-colors">Privacy Policy</Link>
            <Link to="/terms" className="hover:text-primary transition-colors">Terms of Service</Link>
            <a href="mailto:cam@avriacam.com" className="hover:text-primary transition-colors">Contact</a>
          </div>
        </div>
      </footer>
    </div>
  );
};

export default TermsOfServicePage;
