// Privacy Policy — Never Forget
// Tone: clear, friendly, plain-language. Matches landing page voice.

const PRIVACY_SECTIONS = [
  {
    id: "tldr",
    title: "The short version",
    body: (
      <>
        <p>
          Never Forget is designed to keep your reps on your device. We don't sell your data, we don't run ads, and we don't build profiles of you. The whole point of the app is to remember things — not to remember you.
        </p>
        <LegalCallout icon="✓" title="What this means in practice">
          Your reps, schedules, categories, and notes live in iCloud under your Apple ID. We never see them. The only data that reaches our servers is the minimum needed to deliver reminders, run Premium subscriptions, and fix crashes — and it's all listed below.
        </LegalCallout>
      </>
    )
  },
  {
    id: "data-we-collect",
    title: "What we collect",
    body: (
      <>
        <p>
          We try to collect as little as possible. Here's the full list of categories that touch our infrastructure, and why they're there:
        </p>
        <div className="legal-data-table">
          <div>Subscription status</div>
          <div>Whether you're on free or Premium, handled through Apple's StoreKit. We see a receipt token, not your card details.</div>
          <div>Push notification token</div>
          <div>An anonymous device token from Apple, used only to deliver the reminders you scheduled. It can't be reversed into a phone number or email.</div>
          <div>Crash & diagnostic logs</div>
          <div>If the app crashes, Apple sends us a stack trace with no personal content from your reps. You can disable this in iOS Settings → Privacy → Analytics.</div>
          <div>Support emails</div>
          <div>If you write to us, we keep the thread so we can answer you. We delete it when the issue is closed.</div>
        </div>
        <p>
          That's it. We don't collect your name, location, contacts, photos, microphone, browsing history, or anything else iOS would prompt you for.
        </p>
      </>
    )
  },
  {
    id: "your-content",
    title: "Your reps stay yours",
    body: (
      <>
        <p>
          The titles, categories, schedules, colors, and notes you create live in two places: locally on your device, and — if you've enabled iCloud sync — inside your private iCloud container. Apple controls that container; we have no key to it and no way to read it.
        </p>
        <p>
          When you delete a rep, it's gone from the device immediately and from iCloud after Apple's standard sync interval. When you delete the app, your iCloud data goes with it on Apple's schedule.
        </p>
        <LegalCallout icon="🔒" title="No back-channel">
          We don't have a backdoor "admin view" of your reps. There is no dashboard somewhere with your reading list on it. If we wanted to look, we couldn't.
        </LegalCallout>
      </>
    )
  },
  {
    id: "third-parties",
    title: "Who else is in the loop",
    body: (
      <>
        <p>
          The app is a single binary, but a few services help it work. We picked each one for its privacy posture:
        </p>
        <ul>
          <li><strong>Apple iCloud</strong> — sync, push notifications, and subscription receipts. Governed by Apple's privacy policy.</li>
          <li><strong>Apple Crash Reporter</strong> — opt-in diagnostic reports. Stripped of personal content before we see them.</li>
          <li><strong>RevenueCat</strong> — manages Premium subscription state. Receives an anonymous user identifier and your subscription status; never sees the contents of your reps.</li>
        </ul>
        <p>
          We don't use Google Analytics, Facebook SDK, ad networks, attribution SDKs, or fingerprinting libraries. There are no third-party trackers in the binary.
        </p>
      </>
    )
  },
  {
    id: "your-rights",
    title: "Your rights",
    body: (
      <>
        <p>
          If you're in the EU, UK, California, or any of the growing list of places with real privacy laws, you have specific rights — and frankly, we think everyone should have them. So we honor them globally.
        </p>
        <ul>
          <li><strong>Access</strong> — ask us what we have on file linked to your account. We'll send the actual records, not a summary.</li>
          <li><strong>Correction</strong> — tell us if anything we have is wrong, and we'll fix it.</li>
          <li><strong>Deletion</strong> — ask us to delete your support history, subscription metadata, and crash logs. Done within 30 days.</li>
          <li><strong>Portability</strong> — request a copy of your data in a machine-readable format.</li>
          <li><strong>Withdraw consent</strong> — disable iCloud sync, opt out of diagnostics, or unsubscribe from emails at any time.</li>
        </ul>
        <p>
          To exercise any of these, email <a href="mailto:hello@titansboost.app">hello@titansboost.app</a>. We'll get back to you within a few days, usually faster.
        </p>
      </>
    )
  },
  {
    id: "children",
    title: "Children",
    body: (
      <p>
        Never Forget is not directed at children under 13 (or under 16 in the EEA), and we don't knowingly collect data from them. If you're a parent and believe your child has used the app, write to us and we'll delete anything tied to that account.
      </p>
    )
  },
  {
    id: "changes",
    title: "Changes to this policy",
    body: (
      <>
        <p>
          If we change anything material — new data category, new vendor, new region — we'll update this page and bump the date at the top. For changes that affect existing users, we'll also surface a one-time notice in the app the next time you open it.
        </p>
        <p>
          We won't quietly broaden what we collect. If we want to do something new with your data, we'll ask.
        </p>
      </>
    )
  },
  {
    id: "contact",
    title: "Get in touch",
    body: (
      <>
        <p>
          Questions, complaints, requests, or just curious — write to us at <a href="mailto:hello@titansboost.app">hello@titansboost.app</a>. A real person reads every email.
        </p>
        <p>
          Titans Boost Ltd. · Registered in England & Wales · Company No. 12345678
        </p>
      </>
    )
  }
];

const PrivacyApp = () =>
  <LegalPage
    current="privacy"
    eyebrow="Privacy Policy"
    title="Your reps are yours."
    lede="A spaced repetition app shouldn't need to know much about you. Here's exactly what Never Forget collects, what it doesn't, and how to opt out of any of it."
    updated="May 6, 2026"
    sections={PRIVACY_SECTIONS}
    cross={
      <LegalCross
        to="terms.html"
        label="Read Terms"
        title="Terms of Service"
        desc="The other half of the deal — how the app works, what we promise, and what we don't." />
    } />;

const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(<PrivacyApp />);
