import type { Metadata } from "next";
import { LegalLayout } from "@/components/sections/LegalLayout";
import { siteConfig } from "@/lib/site-config";

export const metadata: Metadata = {
  title: `Terms & Conditions – ${siteConfig.guideName}`,
  description: `Terms and Conditions for ${siteConfig.appName} and the ${siteConfig.guideName} website.`,
  alternates: { canonical: `${siteConfig.url}terms` },
};

export default function TermsPage() {
  return (
    <LegalLayout title="Terms & Conditions" lastUpdated={siteConfig.lastUpdated}>
        <section>
          <h2 className="text-[1.2rem] font-extrabold mb-3">1. Acceptance of Terms</h2>
          <p>
            By downloading, installing, or using {siteConfig.appName} (&quot;the App&quot;),
            you agree to be bound by these Terms &amp; Conditions. If you do not
            agree, do not use the App.
          </p>
        </section>

        <section>
          <h2 className="text-[1.2rem] font-extrabold mb-3">2. Description of Service</h2>
          <p>
            {siteConfig.appName} provides a virtual private network (VPN) service for
            macOS. The App is available as a free version with optional Premium
            subscription upgrades through the Apple App Store.
          </p>
        </section>

        <section>
          <h2 className="text-[1.2rem] font-extrabold mb-3">3. Subscriptions &amp; Billing</h2>
          <p>
            VPN SuperFast Premium is an auto-renewing subscription available through
            the Apple App Store:
          </p>
          <ul className="list-disc pl-5 space-y-1.5 mt-2">
            <li>Premium Monthly: $11.99/month</li>
            <li>Premium Yearly: $69.99/year</li>
            <li>Each plan includes a 3-day free trial</li>
          </ul>
          <p className="mt-2">
            Your subscription renews automatically unless cancelled at least 24 hours
            before the end of the current period. Payment is charged to your Apple
            Account at confirmation of purchase. Manage or cancel anytime in your
            App Store account settings. Any unused part of a free trial is forfeited
            when you purchase a Premium subscription.
          </p>
        </section>

        <section>
          <h2 className="text-[1.2rem] font-extrabold mb-3">4. Acceptable Use</h2>
          <p>You agree not to use the App to:</p>
          <ul className="list-disc pl-5 space-y-1.5 mt-2">
            <li>Engage in any illegal activity</li>
            <li>Transmit harmful, abusive, or objectionable content</li>
            <li>Interfere with or disrupt our servers or networks</li>
            <li>Attempt to gain unauthorised access to any system or network</li>
            <li>Violate any applicable laws or regulations</li>
          </ul>
          <p className="mt-2">
            We reserve the right to suspend or terminate your access if you violate
            these terms.
          </p>
        </section>

        <section>
          <h2 className="text-[1.2rem] font-extrabold mb-3">5. Privacy</h2>
          <p>
            Your use of the App is also governed by our{" "}
            <a href="/privacy-policy" className="text-brand hover:underline">
              Privacy Policy
            </a>
            , which describes how we handle your data. We follow a strict no-logs
            policy — we do not track or store your browsing activity.
          </p>
        </section>

        <section>
          <h2 className="text-[1.2rem] font-extrabold mb-3">6. Intellectual Property</h2>
          <p>
            The App, its design, features, and content are owned by {siteConfig.operator} and
            are protected by intellectual property laws. You may not copy, modify,
            distribute, or reverse engineer the App.
          </p>
        </section>

        <section>
          <h2 className="text-[1.2rem] font-extrabold mb-3">7. Disclaimer of Warranties</h2>
          <p>
            The App is provided &quot;as is&quot; without warranties of any kind. We do not
            guarantee that the App will be uninterrupted, error-free, or completely
            secure. Your use of the App is at your own risk.
          </p>
        </section>

        <section>
          <h2 className="text-[1.2rem] font-extrabold mb-3">8. Limitation of Liability</h2>
          <p>
            To the maximum extent permitted by law, {siteConfig.operator} shall not be
            liable for any indirect, incidental, special, or consequential damages
            arising from your use of the App.
          </p>
        </section>

        <section>
          <h2 className="text-[1.2rem] font-extrabold mb-3">9. Changes to These Terms</h2>
          <p>
            We may update these Terms from time to time. Changes will be posted on
            this page with an updated &quot;Last updated&quot; date. Continued use of the
            App after changes constitutes acceptance of the revised terms.
          </p>
        </section>
    </LegalLayout>
  );
}
