import React from "react";
import Link from "next/link";

export const metadata = {
  title: "Terms of Service | Battl Builder",
  description:
    "Terms of Service and legal disclaimers for Battl Builder, including firearm safety, compatibility, and community content.",
};

export default function TermsOfService() {
  const lastUpdated = "December 27, 2025";

  return (
    <div className="mx-auto max-w-4xl px-4 py-12">
      <div className="mb-10">
        <h1 className="text-4xl font-bold tracking-tight">Terms of Service</h1>
        <p className="mt-2 text-sm opacity-60">Last Updated: {lastUpdated}</p>
      </div>

      <div className="space-y-12 text-sm leading-relaxed text-white/90">
        {/* 1. Acceptance */}
        <section>
          <h2 className="mb-4 text-xl font-semibold">1. Acceptance of Terms</h2>
          <p>
            These Terms of Service (“Terms”) govern your access to and use of
            Battl Builder (the “Service”), including all content, tools,
            features, and community functionality provided through the website.
          </p>
          <p className="mt-4">
            By accessing or using any part of the Service, you agree to be bound
            by these Terms and our Privacy Policy. If you do not agree, you may
            not access or use the Service.
          </p>
          <p className="mt-4">
            The Service is offered only to individuals who are at least 18 years
            of age.
          </p>
        </section>

        {/* 2. Nature of the Service */}
        <section>
          <h2 className="mb-4 text-xl font-semibold">
            2. Nature of the Service
          </h2>
          <p>
            Battl Builder is an informational and planning platform designed to
            help users explore, visualize, and compare firearm-related
            components and configurations. The Service may include pricing data,
            compatibility indicators, build summaries, and community-generated
            content.
          </p>
          <p className="mt-4 font-medium text-orange-200">
            Battl Builder does NOT provide gunsmithing services, mechanical
            instructions, professional advice, training, or certification of any
            kind.
          </p>
        </section>

        {/* 3. Legal Compliance & Firearms Safety */}
        <section className="rounded-xl border border-orange-500/30 bg-orange-500/5 p-6">
          <h2 className="mb-4 text-xl font-semibold text-orange-200">
            3. Legal Compliance, Firearms Safety & Assumption of Risk
          </h2>
          <div className="space-y-4">
            <p className="font-medium text-orange-100">
              You are solely responsible for ensuring that any firearm,
              component, or configuration complies with all applicable local,
              state, federal, and international laws.
            </p>
            <ul className="list-disc space-y-2 pl-5">
              <li>
                Firearm laws vary significantly by jurisdiction and change
                frequently.
              </li>
              <li>
                Battl Builder does not provide legal advice or determine the
                legality of any build.
              </li>
              <li>
                Compatibility indicators are informational only and may be
                incomplete or inaccurate.
              </li>
            </ul>
            <p className="font-semibold">
              YOU ACKNOWLEDGE AND AGREE THAT THE PHYSICAL ASSEMBLY,
              MODIFICATION, POSSESSION, OR USE OF FIREARMS INVOLVES INHERENT
              RISKS, INCLUDING SERIOUS INJURY OR DEATH. YOU ASSUME ALL SUCH
              RISKS.
            </p>
            <p>
              Nothing on the Service constitutes legal, mechanical, firearms,
              safety, or professional advice of any kind.
            </p>
            <p className="mt-4 font-semibold">
              You are solely responsible for verifying all component
              compatibility, legality, and safe operation before acquiring,
              assembling, or using any firearm or related component.
            </p>
          </div>
        </section>

        {/* 4. No Warranty / No Reliance */}
        <section>
          <h2 className="mb-4 text-xl font-semibold">
            4. No Warranty; No Reliance
          </h2>
          <p>
            The Service is provided for general informational purposes only. You
            agree that you will not rely on the Service as a substitute for
            professional advice, inspection, or training.
          </p>
          <p className="mt-4">
            All content, data, and tools are provided “AS IS” and “AS
            AVAILABLE,” without warranties of any kind, whether express or
            implied.
          </p>
        </section>

        {/* 5. User Content */}
        <section>
          <h2 className="mb-4 text-xl font-semibold">
            5. User Content & Community Builds
          </h2>
          <p>
            By submitting builds, images, descriptions, comments, or other
            content (“User Content”), you represent and warrant that:
          </p>
          <ul className="mt-3 list-disc space-y-2 pl-5">
            <li>You own or have rights to submit the content</li>
            <li>The content does not infringe third-party rights</li>
            <li>The content is not unlawful, misleading, or harmful</li>
            <li>The content does not contain malware or malicious code</li>
          </ul>
          <p className="mt-4">
            You grant Battl Builder a worldwide, royalty-free, non-exclusive
            license to host, display, modify, and distribute your User Content
            in connection with the Service.
          </p>
        </section>

        {/* 6. Affiliate & Third-Party Data */}
        <section>
          <h2 className="mb-4 text-xl font-semibold">
            6. Pricing, Affiliates & Third-Party Links
          </h2>
          <p>
            Product pricing, availability, images, and specifications are
            provided by third parties and may be inaccurate or outdated. Battl
            Builder does not guarantee the accuracy of such data.
          </p>
          <p className="mt-4">
            We may earn affiliate commissions from qualifying purchases made
            through links on the Service.
          </p>
        </section>

        {/* 7. Access & Restrictions */}
        <section>
          <h2 className="mb-4 text-xl font-semibold">
            7. Access, License & Restrictions
          </h2>
          <p>
            Battl Builder grants you a limited, non-exclusive, non-transferable
            license to access the Service for personal, non-commercial use.
          </p>
          <p className="mt-4">You may NOT:</p>
          <ul className="mt-3 list-disc space-y-2 pl-5">
            <li>Scrape, crawl, or harvest data from the Service</li>
            <li>Use automated tools, bots, or data-mining techniques</li>
            <li>Republish or resell Service data</li>
            <li>Use the Service for commercial purposes without permission</li>
          </ul>
        </section>

        {/* 8. Termination */}
        <section>
          <h2 className="mb-4 text-xl font-semibold">8. Termination</h2>
          <p>
            Battl Builder may suspend or terminate your access to the Service at
            any time, with or without notice, for any reason.
          </p>
        </section>

        {/* 9. Limitation of Liability */}
        <section className="border-t border-white/10 pt-10">
          <h2 className="mb-4 text-xl font-semibold">
            9. Limitation of Liability
          </h2>
          <p className="uppercase text-xs opacity-70">
            TO THE MAXIMUM EXTENT PERMITTED BY LAW, BATTL BUILDER SHALL NOT BE
            LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR
            PUNITIVE DAMAGES, INCLUDING PERSONAL INJURY, LOSS OF DATA, OR LEGAL
            CONSEQUENCES ARISING FROM USE OF THE SERVICE.
          </p>
          <p className="mt-4">
            OUR TOTAL LIABILITY SHALL NOT EXCEED THE AMOUNT PAID BY YOU TO BATTL
            BUILDER IN THE TWELVE (12) MONTHS PRECEDING THE CLAIM, OR $100,
            WHICHEVER IS GREATER.
          </p>
        </section>

        {/* 10. Indemnification */}
        <section>
          <h2 className="mb-4 text-xl font-semibold">10. Indemnification</h2>
          <p>
            You agree to indemnify and hold harmless Battl Builder and its
            operators from any claims, damages, losses, or expenses arising from
            your use of the Service or violation of these Terms.
          </p>
        </section>

        {/* 11. Arbitration */}
        <section>
          <h2 className="mb-4 text-xl font-semibold">
            11. Arbitration & Class Action Waiver
          </h2>
          <p>
            Any dispute arising out of or relating to these Terms shall be
            resolved by binding arbitration on an individual basis. YOU WAIVE
            THE RIGHT TO PARTICIPATE IN A CLASS ACTION.
          </p>
          <p className="mt-4">
            Any arbitration shall take place in the State of Florida, conducted
            in the English language, unless otherwise required by applicable
            law.
          </p>
          <p className="mt-4">
            This provision does not prevent either party from seeking injunctive
            relief for intellectual property violations.
          </p>
        </section>

        {/* 12. Misc */}
        <section>
          <h2 className="mb-4 text-xl font-semibold">12. Miscellaneous</h2>
          <p>
            These Terms constitute the entire agreement between you and Battl
            Builder. If any provision is found unenforceable, the remaining
            provisions will remain in effect.
          </p>
          <p className="mt-4">
            These Terms and any dispute arising out of or relating to the
            Service shall be governed by and construed in accordance with the
            laws of the State of Florida, without regard to its conflict of law
            principles.
          </p>
        </section>

        <div className="pt-10">
          <Link
            href="/"
            className="text-sm text-amber-400 hover:text-amber-300 transition-colors"
          >
            ← Return to Home
          </Link>
        </div>
      </div>
    </div>
  );
}
