'use client'

import { Header } from '@/components/Header'
import { Footer } from '@/components/Footer'
import { FileText, Calendar } from 'lucide-react'

const sections = [
  {
    title: '1. Acceptance of Terms',
    content: `
      <p>By accessing or using pounce ("Service"), you agree to be bound by these Terms of Service ("Terms"). If you disagree with any part of the terms, you may not access the Service.</p>
      <p>These Terms apply to all visitors, users, and others who access or use the Service.</p>
    `,
  },
  {
    title: '2. Description of Service',
    content: `
      <p>pounce provides domain monitoring and intelligence services, including:</p>
      <ul>
        <li>Domain availability monitoring and alerts</li>
        <li>WHOIS and DNS lookup services</li>
        <li>TLD pricing information and comparisons</li>
        <li>Domain expiration tracking</li>
        <li>API access for programmatic use (Enterprise plans)</li>
      </ul>
      <p>We reserve the right to modify, suspend, or discontinue any aspect of the Service at any time.</p>
    `,
  },
  {
    title: '3. User Accounts',
    content: `
      <p>When you create an account with us, you must provide accurate, complete, and current information. Failure to do so constitutes a breach of the Terms.</p>
      <p>You are responsible for:</p>
      <ul>
        <li>Maintaining the confidentiality of your account and password</li>
        <li>Restricting access to your account</li>
        <li>All activities that occur under your account</li>
      </ul>
      <p>You must notify us immediately upon becoming aware of any breach of security or unauthorized use of your account.</p>
    `,
  },
  {
    title: '4. Subscription and Billing',
    content: `
      <p><strong>Free Tier:</strong> Basic features are available at no cost with limitations on the number of domains monitored.</p>
      <p><strong>Paid Plans:</strong> Subscription fees are billed in advance on a monthly basis. The subscription automatically renews unless cancelled.</p>
      <p><strong>Refunds:</strong> We offer a 14-day money-back guarantee on all paid plans. After this period, subscriptions are non-refundable.</p>
      <p><strong>Price Changes:</strong> We reserve the right to modify subscription fees. Changes will be communicated at least 30 days in advance.</p>
    `,
  },
  {
    title: '5. Acceptable Use',
    content: `
      <p>You agree not to use the Service to:</p>
      <ul>
        <li>Violate any applicable laws or regulations</li>
        <li>Infringe upon intellectual property rights</li>
        <li>Transmit malware, spam, or other harmful code</li>
        <li>Attempt to gain unauthorized access to any systems</li>
        <li>Interfere with or disrupt the Service</li>
        <li>Scrape or harvest data without authorization</li>
        <li>Use automated systems to access the Service excessively</li>
        <li>Resell or redistribute the Service without permission</li>
      </ul>
    `,
  },
  {
    title: '6. Intellectual Property',
    content: `
      <p>The Service and its original content, features, and functionality are owned by pounce AG and are protected by international copyright, trademark, patent, trade secret, and other intellectual property laws.</p>
      <p>You retain ownership of any data you provide to the Service. By using the Service, you grant us a license to use this data solely to provide and improve the Service.</p>
    `,
  },
  {
    title: '7. Data Accuracy',
    content: `
      <p>While we strive to provide accurate domain information, we cannot guarantee the accuracy, completeness, or timeliness of all data. Domain availability information is based on queries to public databases (WHOIS, RDAP, DNS) and may not reflect real-time status.</p>
      <p>You acknowledge that:</p>
      <ul>
        <li>Domain registration decisions should not be based solely on our Service</li>
        <li>We are not responsible for failed domain acquisitions</li>
        <li>Pricing information is provided for reference and may vary</li>
      </ul>
    `,
  },
  {
    title: '8. Limitation of Liability',
    content: `
      <p>To the maximum extent permitted by law, pounce AG shall not be liable for any indirect, incidental, special, consequential, or punitive damages, including but not limited to:</p>
      <ul>
        <li>Loss of profits, data, or business opportunities</li>
        <li>Service interruptions or downtime</li>
        <li>Failed domain registrations or acquisitions</li>
        <li>Inaccurate information provided by the Service</li>
      </ul>
      <p>Our total liability shall not exceed the amount paid by you for the Service in the twelve months preceding the claim.</p>
    `,
  },
  {
    title: '9. Termination',
    content: `
      <p>We may terminate or suspend your account immediately, without prior notice, for any reason, including breach of these Terms.</p>
      <p>Upon termination:</p>
      <ul>
        <li>Your right to use the Service will immediately cease</li>
        <li>We may delete your account data</li>
        <li>Provisions that by their nature should survive will remain in effect</li>
      </ul>
    `,
  },
  {
    title: '10. Governing Law',
    content: `
      <p>These Terms shall be governed by and construed in accordance with the laws of Switzerland, without regard to conflict of law provisions.</p>
      <p>Any disputes arising from these Terms or the Service shall be subject to the exclusive jurisdiction of the courts in Zurich, Switzerland.</p>
    `,
  },
  {
    title: '11. Changes to Terms',
    content: `
      <p>We reserve the right to modify or replace these Terms at any time. Material changes will be notified at least 30 days before taking effect.</p>
      <p>By continuing to access or use our Service after revisions become effective, you agree to be bound by the revised terms.</p>
    `,
  },
  {
    title: '12. Contact Information',
    content: `
      <p>For any questions about these Terms, please contact us at:</p>
      <ul>
        <li>Email: legal@pounce.dev</li>
        <li>Address: pounce AG, Zurich, Switzerland</li>
      </ul>
    `,
  },
]

export default function TermsPage() {
  return (
    <div className="min-h-screen bg-background relative flex flex-col">
      <Header />

      <main className="relative pt-32 sm:pt-36 pb-20 px-4 sm:px-6 flex-1">
        <div className="max-w-3xl mx-auto">
          {/* Hero */}
          <div className="mb-12 animate-fade-in">
            <div className="inline-flex items-center gap-2 px-3 py-1.5 bg-background-secondary/80 backdrop-blur-sm border border-border rounded-full mb-6">
              <FileText className="w-4 h-4 text-accent" />
              <span className="text-ui-sm text-foreground-muted">Legal</span>
            </div>
            <h1 className="font-display text-[2.25rem] sm:text-[3rem] leading-[1.1] tracking-[-0.035em] text-foreground mb-4">
              Terms of Service
            </h1>
            <div className="flex items-center gap-2 text-body-sm text-foreground-muted">
              <Calendar className="w-4 h-4" />
              <span>Last Updated: December 8, 2025</span>
            </div>
          </div>

          {/* Introduction */}
          <div className="prose-custom mb-12 animate-slide-up">
            <p className="text-body-lg text-foreground-muted leading-relaxed">
              Please read these Terms of Service carefully before using pounce. 
              Your access to and use of the Service is conditioned on your acceptance of these Terms.
            </p>
          </div>

          {/* Sections */}
          <div className="space-y-10">
            {sections.map((section, i) => (
              <section
                key={section.title}
                className="animate-slide-up"
                style={{ animationDelay: `${i * 50}ms` }}
              >
                <h2 className="text-heading-sm font-medium text-foreground mb-4">
                  {section.title}
                </h2>
                <div
                  className="prose-custom text-body text-foreground-muted leading-relaxed [&_ul]:list-disc [&_ul]:pl-5 [&_ul]:space-y-2 [&_li]:text-foreground-muted [&_strong]:text-foreground [&_p]:mb-4"
                  dangerouslySetInnerHTML={{ __html: section.content }}
                />
              </section>
            ))}
          </div>
        </div>
      </main>

      <Footer />
    </div>
  )
}

