'use client'

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

const sections = [
  {
    title: '1. Introduction',
    content: `
      <p>Gugger Digital Services ("Company", "we", "us", or "our") operates the Pounce platform (the "Service"). This Privacy Policy explains how we collect, use, disclose, and safeguard your information when you use our Service.</p>
      <p>We are committed to protecting your privacy and ensuring the security of your personal data. This Privacy Policy complies with the Swiss Federal Act on Data Protection (FADP), the EU General Data Protection Regulation (GDPR), and other applicable data protection laws.</p>
      <p>By using the Service, you consent to the collection and use of information in accordance with this Privacy Policy. If you do not agree with the practices described in this policy, please do not use our Service.</p>
    `,
  },
  {
    title: '2. Data Controller',
    content: `
      <p>For the purposes of applicable data protection laws, the data controller is:</p>
      <ul>
        <li><strong>Company:</strong> Gugger Digital Services</li>
        <li><strong>Address:</strong> Holzmoosrütisteig 1b, 8820 Wädenswil, Switzerland</li>
        <li><strong>Email:</strong> hello@pounce.ch</li>
      </ul>
      <p>If you have any questions about this Privacy Policy or our data practices, please contact us using the information above.</p>
    `,
  },
  {
    title: '3. Information We Collect',
    content: `
      <p><strong>3.1 Information You Provide:</strong></p>
      <ul>
        <li><strong>Account Information:</strong> When you create an account, we collect your email address and password (stored securely using industry-standard encryption)</li>
        <li><strong>Profile Information:</strong> Optional information you provide such as your name, company name, and profile preferences</li>
        <li><strong>Payment Information:</strong> When you subscribe, payment information is collected and processed by our payment processor (Stripe). We do not store your full credit card details</li>
        <li><strong>Domain Data:</strong> Information about domains you add to your watchlist, portfolio, or list for sale</li>
        <li><strong>Communications:</strong> Information you provide when contacting us or participating in support requests</li>
      </ul>
      <p><strong>3.2 Information Collected Automatically:</strong></p>
      <ul>
        <li><strong>Usage Data:</strong> Information about how you use the Service, including features used, pages viewed, and actions taken</li>
        <li><strong>Device Information:</strong> Browser type, operating system, device identifiers, and IP address</li>
        <li><strong>Log Data:</strong> Server logs including access times, pages viewed, and referring URLs</li>
        <li><strong>Cookies:</strong> Information stored in cookies and similar technologies (see our Cookie Policy for details)</li>
      </ul>
      <p><strong>3.3 Information from Third Parties:</strong></p>
      <ul>
        <li><strong>OAuth Providers:</strong> If you sign in using Google OAuth, we receive your email address and basic profile information</li>
        <li><strong>Domain Registries:</strong> Publicly available WHOIS and RDAP data about domains</li>
      </ul>
    `,
  },
  {
    title: '4. How We Use Your Information',
    content: `
      <p>We use the information we collect for the following purposes:</p>
      <ul>
        <li><strong>Provide the Service:</strong> To operate, maintain, and improve the Pounce platform</li>
        <li><strong>Account Management:</strong> To create and manage your account, process subscriptions, and authenticate users</li>
        <li><strong>Communication:</strong> To send service-related notifications, security alerts, and support messages</li>
        <li><strong>Marketing:</strong> To send promotional communications (only with your consent, which you can withdraw at any time)</li>
        <li><strong>Analytics:</strong> To analyze usage patterns, improve user experience, and develop new features</li>
        <li><strong>Security:</strong> To detect, prevent, and address fraud, abuse, and security issues</li>
        <li><strong>Legal Compliance:</strong> To comply with legal obligations and enforce our terms</li>
        <li><strong>Personalization:</strong> To customize your experience based on your preferences and usage</li>
      </ul>
    `,
  },
  {
    title: '5. Legal Basis for Processing (GDPR)',
    content: `
      <p>For users in the European Economic Area (EEA), we process your personal data based on the following legal grounds:</p>
      <ul>
        <li><strong>Contract Performance:</strong> Processing necessary to provide the Service you requested (e.g., account creation, subscription management)</li>
        <li><strong>Legitimate Interests:</strong> Processing necessary for our legitimate business interests (e.g., fraud prevention, analytics, service improvement)</li>
        <li><strong>Consent:</strong> Where you have given explicit consent (e.g., marketing communications)</li>
        <li><strong>Legal Obligation:</strong> Processing necessary to comply with legal requirements</li>
      </ul>
    `,
  },
  {
    title: '6. Data Sharing and Disclosure',
    content: `
      <p>We do not sell your personal information. We may share your information in the following circumstances:</p>
      <p><strong>6.1 Service Providers:</strong></p>
      <ul>
        <li><strong>Stripe:</strong> For payment processing (EU/US-based, Privacy Shield certified)</li>
        <li><strong>PostHog:</strong> For analytics (EU-hosted)</li>
        <li><strong>Email Service Providers:</strong> For transactional emails</li>
        <li><strong>Cloud Infrastructure:</strong> For hosting and data storage</li>
      </ul>
      <p><strong>6.2 Other Disclosures:</strong></p>
      <ul>
        <li><strong>Legal Requirements:</strong> When required by law, subpoena, or other legal process</li>
        <li><strong>Protection of Rights:</strong> To protect our rights, privacy, safety, or property</li>
        <li><strong>Business Transfers:</strong> In connection with a merger, acquisition, or sale of assets</li>
        <li><strong>Consent:</strong> When you have given your explicit consent</li>
      </ul>
      <p><strong>6.3 Pounce Direct:</strong> If you list domains for sale, certain information (domain name, asking price, verified seller status) will be publicly visible to potential buyers.</p>
    `,
  },
  {
    title: '7. International Data Transfers',
    content: `
      <p>Your information may be transferred to and processed in countries other than Switzerland, including the United States and other countries where our service providers operate.</p>
      <p>When we transfer data outside Switzerland or the EEA, we ensure appropriate safeguards are in place:</p>
      <ul>
        <li>Standard Contractual Clauses approved by the European Commission</li>
        <li>Transfers to countries with an adequacy decision</li>
        <li>Service providers certified under relevant privacy frameworks</li>
      </ul>
    `,
  },
  {
    title: '8. Data Retention',
    content: `
      <p>We retain your personal data for as long as necessary to fulfill the purposes outlined in this Privacy Policy, unless a longer retention period is required or permitted by law.</p>
      <ul>
        <li><strong>Account Data:</strong> Retained while your account is active and for 30 days after deletion</li>
        <li><strong>Usage Logs:</strong> Generally retained for 90 days for security and analytics purposes</li>
        <li><strong>Payment Records:</strong> Retained for 7 years as required by Swiss tax law</li>
        <li><strong>Marketing Preferences:</strong> Retained until you withdraw consent</li>
      </ul>
      <p>After the retention period, your data will be securely deleted or anonymized.</p>
    `,
  },
  {
    title: '9. Your Rights',
    content: `
      <p>Depending on your location, you may have the following rights regarding your personal data:</p>
      <ul>
        <li><strong>Access:</strong> Request a copy of the personal data we hold about you</li>
        <li><strong>Rectification:</strong> Request correction of inaccurate or incomplete data</li>
        <li><strong>Erasure:</strong> Request deletion of your personal data ("right to be forgotten")</li>
        <li><strong>Portability:</strong> Request a copy of your data in a machine-readable format</li>
        <li><strong>Restriction:</strong> Request restriction of processing in certain circumstances</li>
        <li><strong>Objection:</strong> Object to processing based on legitimate interests</li>
        <li><strong>Withdraw Consent:</strong> Withdraw consent at any time where processing is based on consent</li>
      </ul>
      <p>To exercise these rights, please contact us at hello@pounce.ch. We will respond to your request within 30 days.</p>
      <p>If you are in the EEA and believe we have not addressed your concerns, you have the right to lodge a complaint with your local data protection authority.</p>
    `,
  },
  {
    title: '10. Data Security',
    content: `
      <p>We implement appropriate technical and organizational measures to protect your personal data against unauthorized access, alteration, disclosure, or destruction.</p>
      <p>Our security measures include:</p>
      <ul>
        <li><strong>Encryption:</strong> All data transmitted to and from our Service is encrypted using TLS/SSL</li>
        <li><strong>Password Hashing:</strong> Passwords are stored using industry-standard bcrypt hashing</li>
        <li><strong>Access Controls:</strong> Strict access controls and authentication for our systems</li>
        <li><strong>Regular Audits:</strong> Periodic security reviews and vulnerability assessments</li>
        <li><strong>Secure Infrastructure:</strong> Hosted on secure cloud infrastructure with regular backups</li>
      </ul>
      <p>While we strive to protect your information, no method of transmission or storage is 100% secure. We cannot guarantee absolute security.</p>
    `,
  },
  {
    title: '11. Cookies and Tracking Technologies',
    content: `
      <p>We use cookies and similar tracking technologies to collect information about your browsing activities. Please refer to our Cookie Policy for detailed information about:</p>
      <ul>
        <li>Types of cookies we use</li>
        <li>Purposes for which we use cookies</li>
        <li>How to manage your cookie preferences</li>
      </ul>
      <p>You can control cookies through your browser settings and our cookie consent mechanism.</p>
    `,
  },
  {
    title: '12. Children\'s Privacy',
    content: `
      <p>Our Service is not intended for individuals under the age of 18. We do not knowingly collect personal information from children. If you are a parent or guardian and believe your child has provided us with personal information, please contact us immediately.</p>
    `,
  },
  {
    title: '13. Third-Party Links',
    content: `
      <p>Our Service may contain links to third-party websites, services, or content. We are not responsible for the privacy practices of these third parties. We encourage you to read the privacy policies of any third-party services you access.</p>
    `,
  },
  {
    title: '14. Changes to This Privacy Policy',
    content: `
      <p>We may update this Privacy Policy from time to time to reflect changes in our practices or applicable laws. We will notify you of any material changes by:</p>
      <ul>
        <li>Posting the updated policy on our website</li>
        <li>Sending an email notification to registered users</li>
        <li>Displaying a prominent notice in the Service</li>
      </ul>
      <p>Your continued use of the Service after such modifications constitutes your acknowledgment and acceptance of the modified Privacy Policy.</p>
    `,
  },
  {
    title: '15. Contact Us',
    content: `
      <p>If you have any questions, concerns, or requests regarding this Privacy Policy or our data practices, please contact us:</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>
      <p>We will respond to your inquiry within a reasonable timeframe and no later than 30 days.</p>
    `,
  },
]

export default function PrivacyPage() {
  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">
              <Shield 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">
              Privacy Policy
            </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">
              Your privacy is important to us. This Privacy Policy explains how Pounce collects, uses, 
              and protects your personal information when you use our platform.
            </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>
  )
}
