import React from 'react'
import LegalLayout, { Section, Para, BulletList } from '../components/LegalLayout'

export default function PrivacyPolicy() {
  return (
    <LegalLayout title="Privacy Policy" updated="April 29, 2026">
      <Section title="1. Introduction">
        <Para>
          Nova40 ("we", "our", "us") is committed to protecting your privacy. This Privacy Policy explains how we collect, use, and safeguard your information when you use our mobile application.
        </Para>
      </Section>

      <Section title="2. Information We Collect">
        <Para>We collect the following types of information:</Para>
        <BulletList items={[
          'Account information (email address, password)',
          'Identity and habit data you create within the app',
          'Daily journal entries, mood data, and reflections',
          'Game scores and progress statistics',
          'Device information for crash reporting (via Firebase Crashlytics)',
        ]} />
      </Section>

      <Section title="3. How We Use Your Information">
        <Para>Your information is used to:</Para>
        <BulletList items={[
          'Provide and maintain the Nova40 service',
          'Generate AI-powered identity reflections and habit suggestions',
          'Track your 40-day transformation progress',
          'Improve app stability through crash reports',
          'Send important service notifications',
        ]} />
      </Section>

      <Section title="4. AI-Generated Content">
        <Para>
          Nova40 uses artificial intelligence (Google Gemini / Claude AI) to generate personalized identity statements, habit suggestions, and daily reflections. Your story and journal entries are sent to AI services for processing. We do not store AI-processed data on third-party servers beyond the generation session.
        </Para>
      </Section>

      <Section title="5. Data Storage">
        <Para>
          Your data is stored securely using Supabase (cloud database) and locally on your device via AsyncStorage. Data stored locally remains on your device and is not transmitted unless you explicitly use cloud features.
        </Para>
      </Section>

      <Section title="6. Data Sharing">
        <Para>We do not sell, trade, or share your personal information with third parties, except:</Para>
        <BulletList items={[
          'Firebase (Google) — for crash reporting and analytics',
          'AI service providers — for generating personalized content',
          'When required by law or legal process',
        ]} />
      </Section>

      <Section title="7. Data Security">
        <Para>
          We implement industry-standard security measures to protect your data, including encrypted connections (HTTPS), secure authentication, and row-level security policies on our database.
        </Para>
      </Section>

      <Section title="8. Your Rights">
        <Para>You have the right to:</Para>
        <BulletList items={[
          'Access your personal data',
          'Delete your account and all associated data',
          'Export your journal and progress data',
          'Opt out of analytics collection',
        ]} />
      </Section>

      <Section title="9. Data Retention">
        <Para>
          We retain your data as long as your account is active. When you delete your account or reset your journey, associated data is permanently removed from our systems.
        </Para>
      </Section>

      <Section title="10. Children's Privacy">
        <Para>
          Nova40 is not intended for children under 13 years of age. We do not knowingly collect information from children under 13.
        </Para>
      </Section>

      <Section title="11. Changes to This Policy">
        <Para>
          We may update this Privacy Policy from time to time. Changes will be posted within the app and take effect immediately upon posting.
        </Para>
      </Section>

      <Section title="12. Contact Us">
        <Para>
          If you have questions about this Privacy Policy, please contact us at: support@nova40.app
        </Para>
      </Section>
    </LegalLayout>
  )
}
