<?php
require_once __DIR__ . '/includes/auth.php';
chat247_start_session();
$signedIn = !empty($_SESSION['bearer']);
$lastUpdated = '2026-05-30';
?><!doctype html>
<html lang="en">
<head>
<base href="https://<?= htmlspecialchars($_SERVER['HTTP_HOST'] ?? '', ENT_QUOTES) ?>/">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Privacy Policy — 247ch.at</title>
<link rel="icon" href="/favicon.ico?v=<?= @filemtime(__DIR__ . '/favicon.ico') ?: time() ?>">
<style>
  :root { --brand:#3b82f6; --bg:#0b0f1a; --panel:#111827; --fg:#f3f4f6; --muted:#9ca3af; --border:#1f2937; }
  * { box-sizing:border-box; }
  html,body { margin:0; padding:0; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; background:var(--bg); color:var(--fg); line-height:1.6; }
  header { display:flex; align-items:center; justify-content:space-between; padding:18px 32px; border-bottom:1px solid var(--border); }
  header .logo { font-weight:700; font-size:20px; }
  header .logo a { text-decoration:none; color:var(--fg); }
  header nav a { color:var(--fg); margin-left:18px; text-decoration:none; }
  header nav a.btn { background:var(--brand); padding:8px 16px; border-radius:6px; }
  main { max-width:820px; margin:0 auto; padding:48px 24px; }
  h1 { font-size:36px; margin:0 0 8px; }
  .updated { color:var(--muted); margin:0 0 32px; font-size:14px; }
  h2 { font-size:20px; margin:32px 0 12px; }
  h3 { font-size:16px; margin:20px 0 8px; color:#e5e7eb; }
  p, ul { color:#d1d5db; font-size:15px; }
  ul { padding-left:20px; }
  li { margin-bottom:6px; }
  a { color:var(--brand); }
  strong { color:#f3f4f6; }
</style>
</head>
<body>
<header>
  <div class="logo"><a href="/">247ch.at</a></div>
  <nav>
    <a href="/pricing">Pricing</a>
    <?php if ($signedIn): ?>
      <a href="/dashboard" class="btn">Dashboard</a>
    <?php else: ?>
      <a href="/login">Sign in</a>
      <a href="/signup" class="btn">Create account</a>
    <?php endif; ?>
  </nav>
</header>

<main>
  <h1>Privacy Policy</h1>
  <p class="updated">Effective Date: <?= htmlspecialchars($lastUpdated) ?></p>

  <p>247ch.at ("we," "us," "our") respects your privacy. This Privacy Policy describes the personal information we collect, how we use it, when we share it, and the rights you have under U.S. and EU/UK law. By using 247ch.at, the embeddable widget, the operator desktop app, or any related service (the "Services"), you agree to this Policy. For terms of use, see our <a href="/terms">Terms of Service</a>.</p>

  <h2>1. Information We Collect</h2>
  <h3>1.1 Information You Provide (Operators)</h3>
  <ul>
    <li><strong>Account data:</strong> email address, display name, password hash (or Google account ID if you signed up with Google).</li>
    <li><strong>Site config:</strong> the domains you configure for the widget, plus branding and routing settings.</li>
    <li><strong>Billing data (Pro only):</strong> Stripe handles payment processing. We store your Stripe customer ID and plan status. We never see or store your full card number or Cash App PIN.</li>
    <li><strong>SMS opt-in data (operator):</strong> mobile phone number, opt-in timestamp, opt-in source, and your notification preferences.</li>
    <li><strong>Support tickets &amp; contact-form messages.</strong></li>
  </ul>
  <h3>1.2 Information We Collect About Visitors (on Operator Sites)</h3>
  <ul>
    <li><strong>Chat transcripts:</strong> messages visitors send through the widget and operator replies.</li>
    <li><strong>Optional contact info:</strong> name, email, and/or phone number, when a visitor enters them into the chat widget for callback or SMS delivery.</li>
    <li><strong>SMS opt-in data (visitor):</strong> mobile phone number, opt-in timestamp, and the specific chat session associated with the consent.</li>
    <li><strong>Session metadata:</strong> IP address, user-agent, page URL, timestamps.</li>
  </ul>
  <h3>1.3 Automatically Collected</h3>
  <ul>
    <li><strong>Operator app:</strong> IP address you connect from, basic device info, session token.</li>
    <li><strong>Cookies:</strong> session cookie for dashboard login; widget cookie on operator sites so a returning visitor lands back in the same conversation. No third-party trackers, no ad pixels.</li>
    <li><strong>Web server / application logs:</strong> standard request logs for security and debugging.</li>
  </ul>

  <h2>2. How We Use Information</h2>
  <ul>
    <li>To operate the service — route messages between visitors and operators, keep operators signed in, restore transcripts.</li>
    <li>To bill correctly if the operator is on Pro.</li>
    <li>To prevent fraud and abuse (rate limiting, suspending compromised accounts).</li>
    <li>To send transactional email and SMS (verification, password reset, billing receipts, offline-message pings, two-factor codes).</li>
    <li>To send opt-in operator notifications by SMS when a visitor starts a chat or leaves an offline message.</li>
    <li>To deliver opt-in visitor replies by SMS when a visitor has chosen that as their preferred channel.</li>
    <li>To respond to support requests.</li>
    <li>To comply with legal obligations.</li>
  </ul>

  <h2>3. Text Messaging (SMS) — Specific Notice</h2>
  <p>If you opt in to SMS — as an operator or as a visitor on an operator's chat widget — we collect your mobile phone number along with the timestamp and source of your consent. We use this information only to deliver the text messages you requested, to honor your STOP/HELP requests, and to keep an audit record of consent as required by U.S. telecommunications regulations (TCPA / CTIA / The Campaign Registry).</p>
  <p><strong>We do not sell, rent, lease, share, or otherwise disclose your SMS opt-in information (mobile number and the fact that you consented to receive text messages) to any third party for marketing or promotional purposes.</strong> SMS opt-in data is shared only with our messaging service provider (currently Twilio) strictly as necessary to deliver, route, and report on the messages you requested. Visitor phone numbers collected through an operator's chat widget are NOT shared with anyone other than the operator who runs that widget and our messaging provider.</p>
  <p>You can opt out at any time by replying <strong>STOP</strong> (or END, CANCEL, UNSUBSCRIBE, QUIT) to any 247ch.at text. Reply <strong>HELP</strong> or email <a href="mailto:support@247ch.at">support@247ch.at</a> for assistance. Msg &amp; data rates may apply. See <a href="/terms#sms">Terms of Service §8</a> for full SMS-program detail.</p>

  <h2>4. Who We Share With</h2>
  <ul>
    <li><strong>Stripe</strong> — payment processing for Pro subscribers. See <a href="https://stripe.com/privacy" rel="noopener" target="_blank">stripe.com/privacy</a>.</li>
    <li><strong>Anthropic / OpenAI / ElevenLabs</strong> — when AI auto-reply or voice features are enabled, the visitor's message and recent transcript are sent to the AI provider to generate a reply. They process the data under our API agreement and do not use it for training.</li>
    <li><strong>Twilio</strong> — for SMS delivery (operator notifications, visitor replies, account security codes).</li>
    <li><strong>Email provider</strong> — for transactional email delivery (verification, receipts, offline pings).</li>
    <li><strong>Nobody else.</strong> We don't sell or share your data, your visitors' messages, or your contact info to advertisers, brokers, or anyone else.</li>
  </ul>
  <p>We <strong>do not sell</strong> personal information (as that term is defined under California, Virginia, Colorado, or Connecticut law), and we do not "share" personal information for cross-context behavioral advertising.</p>

  <h2>5. Data Retention</h2>
  <ul>
    <li><strong>Visitor chat transcripts:</strong> 90 days by default, or until you delete them from the dashboard.</li>
    <li><strong>Operator account:</strong> kept as long as the account exists. Delete the account and we wipe it within 30 days.</li>
    <li><strong>Billing records:</strong> Stripe retains payment data per their own policy. We keep subscription history for 7 years for tax purposes.</li>
    <li><strong>SMS opt-in audit log:</strong> at least 4 years after opt-out (carrier / TCR audit requirement).</li>
    <li><strong>Web server logs:</strong> 90 days.</li>
    <li><strong>Support tickets:</strong> 2 years.</li>
  </ul>

  <h2>6. Your Rights</h2>
  <p>You can access, export, or delete your data any time. Email <a href="mailto:support@247ch.at">support@247ch.at</a> from your account email and we'll handle it within 7 days.</p>
  <h3>6.1 California (CCPA / CPRA)</h3>
  <p>California residents have the rights to know, delete, correct, and portability, plus the right to opt out of sale or sharing (we do neither). We do not discriminate against users who exercise these rights. We respond within 45 days.</p>
  <h3>6.2 EU / UK (GDPR / UK GDPR)</h3>
  <p>Articles 15–22 of the GDPR give you rights of access, rectification, erasure, restriction, portability, and objection. Our lawful bases are: (a) contract — to operate your account; (b) legitimate interest — security and aggregate analytics; (c) consent — marketing email and SMS; (d) legal obligation — tax and recordkeeping. The data controller is 247ch.at. We respond within 30 days.</p>

  <h2>7. Cookies, Analytics &amp; Tracking</h2>
  <p>We use one session cookie to keep operators signed in to the dashboard. The widget optionally drops a small cookie on operator sites so a returning visitor lands back in the same conversation. No third-party trackers, no ad pixels, no cross-site behavioral advertising.</p>

  <h2>8. Children's Privacy (COPPA)</h2>
  <p>247ch.at is not directed at children under 13 and we don't knowingly collect data from them. If you believe a child has signed up, email <a href="mailto:support@247ch.at">support@247ch.at</a> and we'll delete the account. Operators who embed the widget on sites directed to children under 13 are responsible for their own COPPA compliance and verifiable parental consent.</p>

  <h2>9. International Transfers</h2>
  <p>247ch.at is based in the United States; personal information you provide is processed in the U.S. If you are located in the EU/UK/EEA, transfers rely on the EU Standard Contractual Clauses or equivalent safeguards through our processors.</p>

  <h2>10. Security</h2>
  <p>We use TLS for all data in transit, hashed and salted passwords, least-privilege database access, segmented production credentials, regular software updates, and access logging. No system is perfectly secure; if you suspect a vulnerability, please report it to <a href="mailto:security@247ch.at">security@247ch.at</a>.</p>

  <h2>11. Changes to This Policy</h2>
  <p>We may update this Privacy Policy from time to time. Material changes will be announced here (with a new effective date) and, where required, by email or in-app notice at least 14 days in advance.</p>

  <h2 id="contact">12. Contact</h2>
  <p>
    247ch.at<br>
    Privacy / Support: <a href="mailto:support@247ch.at">support@247ch.at</a><br>
    Toll-free: <a href="tel:+18333193160">(833) 319-3160</a>
  </p>
  <p>See also: <a href="/terms">Terms of Service</a>.</p>
</main>

<?php include __DIR__ . '/includes/footer.php'; ?>
</body>
</html>
