'use client'

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

const sections = [
  {
    title: '1. Acceptance of Terms',
    content: `
      <p>By accessing or using the Pounce platform ("Service"), operated by Gugger Digital Services ("Company", "we", "us", or "our"), you agree to be bound by these Terms of Service ("Terms"). If you do not agree to these Terms, you may not access or use the Service.</p>
      <p>These Terms constitute a legally binding agreement between you and the Company regarding your use of the Service. We reserve the right to modify these Terms at any time, and such modifications will be effective immediately upon posting. Your continued use of the Service following any modifications indicates your acceptance of the modified Terms.</p>
      <p>You must be at least 18 years old and have the legal capacity to enter into binding contracts to use our Service. By using the Service, you represent and warrant that you meet these requirements.</p>
    `,
  },
  {
    title: '2. Description of Service',
    content: `
      <p>Pounce is a domain intelligence and management platform that provides:</p>
      <ul>
        <li><strong>Domain Discovery:</strong> Tools to find available domains, track auctions, and identify opportunities in the domain market</li>
        <li><strong>Domain Analysis:</strong> DNS, WHOIS, and SEO analysis tools for domain evaluation</li>
        <li><strong>Portfolio Management:</strong> Tools to manage, track, and optimize your domain portfolio</li>
        <li><strong>Marketplace:</strong> A platform to list and discover domains for sale ("Pounce Direct")</li>
        <li><strong>Yield Services:</strong> Domain monetization tools through affiliate redirects and parking</li>
        <li><strong>Alerts & Monitoring:</strong> Automated notifications for domain opportunities and portfolio changes</li>
      </ul>
      <p>The Service is provided on a subscription basis with different tiers (Scout, Trader, Tycoon) offering varying levels of features and capabilities as described on our pricing page.</p>
    `,
  },
  {
    title: '3. User Accounts',
    content: `
      <p><strong>3.1 Account Creation:</strong> To access certain features of the Service, you must create an account. You agree to provide accurate, current, and complete information during registration and to update such information to keep it accurate, current, and complete.</p>
      <p><strong>3.2 Account Security:</strong> 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 or any other breach of security.</p>
      <p><strong>3.3 Account Sharing:</strong> Account credentials are for your personal use only. You may not share your account credentials with any third party or allow multiple users to access the Service through a single account unless explicitly authorized under an enterprise agreement.</p>
      <p><strong>3.4 Account Termination:</strong> We reserve the right to suspend or terminate your account at any time for any reason, including but not limited to violation of these Terms, fraudulent activity, or extended periods of inactivity. You may terminate your account at any time through your account settings.</p>
    `,
  },
  {
    title: '4. Subscription and Payment',
    content: `
      <p><strong>4.1 Subscription Plans:</strong> The Service offers various subscription plans with different features and pricing. Plan details and pricing are available on our website and may be changed at any time with reasonable notice to subscribers.</p>
      <p><strong>4.2 Payment:</strong> Subscription fees are billed in advance on a monthly or annual basis depending on your chosen plan. You authorize us to charge your payment method for all applicable fees. All payments are processed through Stripe, a third-party payment processor.</p>
      <p><strong>4.3 Automatic Renewal:</strong> Your subscription will automatically renew at the end of each billing period unless you cancel before the renewal date. You may cancel your subscription at any time through your account settings.</p>
      <p><strong>4.4 Refunds:</strong> We offer a 14-day money-back guarantee for new subscriptions. After this period, subscription fees are non-refundable except where required by applicable law. Downgrading or cancelling your subscription will not result in a refund for the current billing period.</p>
      <p><strong>4.5 Price Changes:</strong> We may change subscription prices at any time. Price changes will be communicated in advance and will take effect at the start of your next billing period.</p>
    `,
  },
  {
    title: '5. Acceptable Use Policy',
    content: `
      <p>You agree to use the Service only for lawful purposes and in accordance with these Terms. You agree NOT to:</p>
      <ul>
        <li>Use the Service for any illegal purpose or in violation of any local, state, national, or international law</li>
        <li>Violate or attempt to violate the security of the Service, including attempting to probe, scan, or test vulnerabilities</li>
        <li>Access data not intended for you or log into a server or account you are not authorized to access</li>
        <li>Use automated tools, bots, scrapers, or similar technology to access the Service beyond the intended API usage</li>
        <li>Reverse engineer, decompile, disassemble, or otherwise attempt to derive the source code of the Service</li>
        <li>Interfere with or disrupt the Service or servers or networks connected to the Service</li>
        <li>Resell, redistribute, or make the Service available to third parties without our express written consent</li>
        <li>Use the Service to engage in domain squatting, cybersquatting, or trademark infringement</li>
        <li>Submit false, misleading, or fraudulent information through the Service</li>
        <li>Harass, abuse, or harm another person or entity through the Service</li>
      </ul>
      <p>Violation of this Acceptable Use Policy may result in immediate termination of your account without refund.</p>
    `,
  },
  {
    title: '6. Pounce Direct Marketplace',
    content: `
      <p><strong>6.1 Listing Domains:</strong> If you list domains for sale on Pounce Direct, you represent and warrant that you are the lawful owner of such domains and have the right to sell them. You are solely responsible for the accuracy of your listing information.</p>
      <p><strong>6.2 DNS Verification:</strong> Domains listed on Pounce Direct must undergo DNS verification to confirm ownership. This process requires adding a specific TXT record to your domain DNS settings.</p>
      <p><strong>6.3 Transactions:</strong> Pounce Direct facilitates connections between buyers and sellers but is not a party to any transaction. All domain transfers and payments occur between the buyer and seller directly or through third-party escrow services.</p>
      <p><strong>6.4 Fees:</strong> Pounce does not charge commission on domain sales through Pounce Direct. However, we may charge listing fees or promotional placement fees as disclosed on our platform.</p>
      <p><strong>6.5 Prohibited Listings:</strong> You may not list domains that infringe on trademarks, are associated with illegal activities, or violate our content policies.</p>
    `,
  },
  {
    title: '7. Intellectual Property',
    content: `
      <p><strong>7.1 Our Intellectual Property:</strong> The Service and its original content (excluding content provided by users), features, and functionality are and will remain the exclusive property of Gugger Digital Services and its licensors. The Service is protected by copyright, trademark, and other laws of Switzerland and foreign countries.</p>
      <p><strong>7.2 Your Content:</strong> You retain all rights to any content you submit, post, or display on or through the Service. By submitting content, you grant us a worldwide, non-exclusive, royalty-free license to use, reproduce, modify, and display such content solely for the purpose of operating and providing the Service.</p>
      <p><strong>7.3 Feedback:</strong> If you provide us with any feedback, suggestions, or ideas regarding the Service, you grant us the right to use such feedback without any obligation to you.</p>
    `,
  },
  {
    title: '8. Third-Party Services and Links',
    content: `
      <p>The Service may contain links to third-party websites, services, or content that are not owned or controlled by Gugger Digital Services. This includes but is not limited to:</p>
      <ul>
        <li>Domain registrars and marketplace platforms</li>
        <li>Payment processors (Stripe)</li>
        <li>Analytics providers (PostHog)</li>
        <li>Affiliate networks and partners</li>
      </ul>
      <p>We have no control over, and assume no responsibility for, the content, privacy policies, or practices of any third-party websites or services. You acknowledge and agree that we shall not be responsible or liable for any damage or loss caused by or in connection with the use of any such third-party services.</p>
    `,
  },
  {
    title: '9. Disclaimer of Warranties',
    content: `
      <p><strong>THE SERVICE IS PROVIDED ON AN "AS IS" AND "AS AVAILABLE" BASIS WITHOUT WARRANTIES OF ANY KIND, WHETHER EXPRESS OR IMPLIED.</strong></p>
      <p>We disclaim all warranties, including but not limited to:</p>
      <ul>
        <li>Implied warranties of merchantability, fitness for a particular purpose, and non-infringement</li>
        <li>Warranties that the Service will be uninterrupted, timely, secure, or error-free</li>
        <li>Warranties regarding the accuracy or reliability of any information obtained through the Service</li>
        <li>Warranties that defects in the Service will be corrected</li>
      </ul>
      <p>Domain data, including availability, pricing, and ownership information, is sourced from third parties and may not be accurate or current. You acknowledge that domain investments carry inherent risks and that we do not provide investment advice.</p>
    `,
  },
  {
    title: '10. Limitation of Liability',
    content: `
      <p><strong>TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, GUGGER DIGITAL SERVICES SHALL NOT BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES, OR ANY LOSS OF PROFITS OR REVENUES, WHETHER INCURRED DIRECTLY OR INDIRECTLY, OR ANY LOSS OF DATA, USE, GOODWILL, OR OTHER INTANGIBLE LOSSES.</strong></p>
      <p>In no event shall our total liability to you for all claims arising out of or relating to the Service exceed the amount you paid us for the Service during the twelve (12) months preceding the claim.</p>
      <p>These limitations apply to any theory of liability, whether based on warranty, contract, tort (including negligence), strict liability, or any other legal theory.</p>
      <p>Some jurisdictions do not allow the exclusion of implied warranties or limitation of liability for incidental or consequential damages. In such jurisdictions, our liability is limited to the greatest extent permitted by law.</p>
    `,
  },
  {
    title: '11. Indemnification',
    content: `
      <p>You agree to defend, indemnify, and hold harmless Gugger Digital Services, its officers, directors, employees, contractors, agents, licensors, and suppliers from and against any claims, liabilities, damages, judgments, awards, losses, costs, expenses, or fees (including reasonable attorneys fees) arising out of or relating to:</p>
      <ul>
        <li>Your violation of these Terms</li>
        <li>Your use of the Service</li>
        <li>Your violation of any third-party right, including any intellectual property or privacy right</li>
        <li>Any content you submit through the Service</li>
        <li>Any domain transactions you engage in through or in connection with the Service</li>
      </ul>
    `,
  },
  {
    title: '12. Governing Law and Dispute Resolution',
    content: `
      <p><strong>12.1 Governing Law:</strong> These Terms shall be governed by and construed in accordance with the laws of Switzerland, without regard to its conflict of law provisions.</p>
      <p><strong>12.2 Jurisdiction:</strong> Any legal action or proceeding arising out of or relating to these Terms or the Service shall be brought exclusively in the courts located in Zurich, Switzerland, and you consent to the personal jurisdiction of such courts.</p>
      <p><strong>12.3 Dispute Resolution:</strong> Before filing any legal claim, you agree to first contact us at hello@pounce.ch to attempt to resolve the dispute informally. We will attempt to resolve the dispute within 30 days of receiving your notice.</p>
      <p><strong>12.4 Class Action Waiver:</strong> You agree that any disputes shall be resolved individually and that you will not bring or participate in any class action, consolidated action, or representative action against us.</p>
    `,
  },
  {
    title: '13. Changes to Terms',
    content: `
      <p>We reserve the right to modify these Terms at any time. If we make material changes to these Terms, we will notify you by email and/or by posting a notice on our website prior to the changes taking effect.</p>
      <p>Your continued use of the Service following the posting of revised Terms means that you accept and agree to the changes. If you do not agree to the new Terms, you must stop using the Service.</p>
    `,
  },
  {
    title: '14. General Provisions',
    content: `
      <p><strong>14.1 Entire Agreement:</strong> These Terms, together with our Privacy Policy and any other policies referenced herein, constitute the entire agreement between you and Gugger Digital Services regarding the Service.</p>
      <p><strong>14.2 Severability:</strong> If any provision of these Terms is found to be unenforceable or invalid, that provision will be limited or eliminated to the minimum extent necessary so that these Terms will otherwise remain in full force and effect.</p>
      <p><strong>14.3 Waiver:</strong> Our failure to enforce any right or provision of these Terms will not be considered a waiver of such right or provision.</p>
      <p><strong>14.4 Assignment:</strong> You may not assign or transfer your rights or obligations under these Terms without our prior written consent. We may assign our rights and obligations under these Terms without restriction.</p>
      <p><strong>14.5 Force Majeure:</strong> We shall not be liable for any failure or delay in performing our obligations where such failure or delay results from causes beyond our reasonable control.</p>
    `,
  },
  {
    title: '15. Contact Information',
    content: `
      <p>If you have any questions about these Terms, please contact us at:</p>
      <ul>
        <li><strong>Email:</strong> hello@pounce.ch</li>
        <li><strong>Address:</strong> Gugger Digital Services, Holzmoosrütisteig 1b, 8820 Wädenswil, 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">
          <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">
              <Scale 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 16, 2024</span>
            </div>
          </div>

          <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 the Pounce platform. 
              By accessing or using our Service, you agree to be bound by these terms.
            </p>
          </div>

          <div className="space-y-10">
            {sections.map((section, i) => (
              <section key={section.title} className="animate-slide-up" style={{ animationDelay: \`\${i * 30}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>
  )
}
