function TermsPage() {
  useReveal();
  const [activeSection, setActiveSection] = React.useState("");

  const sections = [
    { id: "nature", label: "The Services" },
    { id: "not-medical-care", label: "Not Medical Care" },
    { id: "emergency", label: "No Emergencies" },
    { id: "eligibility", label: "Eligibility and Your Account" },
    { id: "voice-recording-and-other-people", label: "Voice Recording and Other People" },
    { id: "ai-conversations", label: "AI Conversations" },
    { id: "your-content", label: "Your Content" },
    { id: "acceptable-use", label: "Acceptable Use" },
    { id: "fees-and-subscriptions", label: "Fees and Subscriptions" },
    { id: "ip", label: "Our Intellectual Property and Your License" },
    { id: "third-party-services-and-other-people", label: "Third-Party Services and Other People" },
    { id: "changes", label: "Changes to the Services and These Terms" },
    { id: "termination", label: "Ending These Terms" },
    { id: "disclaimers", label: "Disclaimers" },
    { id: "liability", label: "Limitation of Liability" },
    { id: "indemnification", label: "Indemnity" },
    { id: "governing", label: "Governing Law and Dispute Resolution" },
    { id: "apple-app-store-terms", label: "Apple App Store Terms" },
    { id: "general", label: "General" },
    { id: "contact-us", label: "Contact Us" },
  ];

  React.useEffect(() => {
    const els = sections.map(s => document.getElementById(s.id)).filter(Boolean);
    const io = new IntersectionObserver(entries => {
      entries.forEach(e => { if (e.isIntersecting) setActiveSection(e.target.id); });
    }, { rootMargin: "-100px 0px -60% 0px", threshold: 0 });
    els.forEach(el => io.observe(el));
    return () => io.disconnect();
  }, []);

  return (
    <>
      <Nav currentPage="terms" />
      <section className="legal-hero">
        <div className="container">
          <div className="reveal in"><span className="eyebrow">Legal</span></div>
          <h1 className="serif reveal in delay-1" style={{ marginTop: 22, maxWidth: '20ch' }}>Terms of Use</h1>
          <div className="version reveal in delay-2">Version 2.0 · Effective Date: October 17, 2026</div>
        </div>
      </section>

      <div className="legal-body">
        <div className="legal-layout">
          <nav className="legal-toc">
            {sections.map(s => (
              <a key={s.id} href={`#${s.id}`} className={activeSection === s.id ? "active" : ""}>{s.label}</a>
            ))}
          </nav>

          <div className="legal-content reveal in">
            <p>These Terms of Use ("Terms") are an agreement between you and Axonos, Inc. ("Brainbox," "we," "us," or "our"). They govern your use of the Brainbox mobile app ("App"), our website at <a href="/" style={{ color: 'var(--primary)' }}>brainboxapp.com</a>, and related services (together, the "Services").</p>
            <p>Please read them carefully. Section 17 requires most disputes between us to be resolved by individual binding arbitration, not in court or in a class action, unless you opt out within 30 days.</p>
            <p>By creating an account, tapping "I agree," or using the Services, you agree to these Terms and to our Privacy Policy, our Consumer Health Data Privacy Policy, and the Informed Consent and HIPAA Notice of Privacy Practices shown in the App. If you do not agree, do not use the Services.</p>

            <h2 id="nature">1. The Services</h2>
            <p>Brainbox is a speech-based brain-wellness app. You speak with Brainbox, in guided voice conversations or by letting it listen as you go about your day, and it summarizes characteristics of your speech as wellness scores you can follow over time, along with general tips. The Services are for your personal, non-commercial use.</p>

            <h2 id="not-medical-care">2. Not Medical Care</h2>
            <p className="important">IMPORTANT: Brainbox is NOT a medical device. It is not FDA-cleared or FDA-approved, and it does not diagnose, treat, cure, mitigate, or prevent any disease or condition, including dementia, Alzheimer's disease, or mild cognitive impairment.</p>
            <p>Scores, summaries, tips, and conversations are general wellness information. They can be wrong, and they can be affected by fatigue, illness, medication, background noise, your microphone, and many other things. Do not use them as the basis for medical, legal, insurance, employment, or other important decisions. Some messages may suggest talking to a healthcare professional; they are not a diagnosis.</p>
            <p>Talk to a qualified healthcare professional about any health concern, and never delay or ignore professional advice because of something in Brainbox.</p>

            <h2 id="emergency">3. No Emergencies</h2>
            <p className="important">Brainbox is not for emergencies and does not monitor you in real time. If you think you may have a medical emergency, call 911 or your local emergency number. If you are in crisis or thinking about harming yourself, call or text 988 in the United States, or contact your local crisis line.</p>

            <h2 id="eligibility">4. Eligibility and Your Account</h2>
            <ul>
              <li>You must be at least 18 years old, and old enough to form a binding contract where you live.</li>
              <li>Your account is for you alone. If you help another adult use Brainbox, the account must be theirs, set up with their permission, and you must have the legal authority to accept these Terms for them.</li>
              <li>You may have only one account, and you may not use anyone else's.</li>
              <li>Give accurate information, keep it up to date, and verify your email address when we ask.</li>
              <li><span>Keep your password secure. You are responsible for activity on your account. Tell us at <a href="mailto:support@brainboxapp.com" style={{ color: 'var(--primary)' }}>support@brainboxapp.com</a> if you think someone else has used it.</span></li>
            </ul>

            <h2 id="voice-recording-and-other-people">5. Voice Recording and Other People</h2>
            <p>Brainbox records what you say during voice chats and during Record and Listen sessions, and it may pick up anyone speaking near you. Some laws require everyone in a conversation to consent before it is recorded. You are responsible for telling people when Brainbox is on and for getting any consent the law requires. Do not use Listen or Record where recording is not allowed, or where people expect privacy, such as a meeting, a medical appointment, or someone else's home, without their agreement.</p>
            <p>Brainbox needs your voiceprint to recognize your voice. Our Privacy Policy explains how it is made, used, and deleted.</p>

            <h2 id="ai-conversations">6. AI Conversations</h2>
            <p>Brainbox's voice chat is an AI, not a person. It can misunderstand you, and it can say things that are inaccurate, incomplete, or inappropriate. It is not therapy, counseling, or medical advice, and you should not rely on it for decisions about your health.</p>
            <p>Conversations are processed by third-party AI providers as our Privacy Policy describes. Do not use the AI features to break the law or those providers' usage policies, or to try to make them produce harmful content.</p>

            <h2 id="your-content">7. Your Content</h2>
            <p>Your content means the recordings, transcripts, profile information, and feedback you provide.</p>
            <p>You own your content. You give us a worldwide, non-exclusive, royalty-free license to host, store, copy, process, and analyze it, and to create information from it such as transcripts, speech markers, and scores, in order to provide, secure, and support the Services and, unless you turn off "Help improve Brainbox," to develop and improve our models and Services. This license ends when your content is deleted under our Privacy Policy, except for models already trained with it and information that has been de-identified or aggregated.</p>
            <p>You are responsible for your content, and you confirm you have the right to provide it, including any recording of another person's voice.</p>
            <p>If you send us ideas, suggestions, or other feedback about the Services, we may use it freely, without paying you or giving you credit. This applies only to feedback, not to your recordings or health information.</p>

            <h2 id="acceptable-use">8. Acceptable Use</h2>
            <p>You agree not to:</p>
            <ul>
              <li>break the law, or use the Services to harm, harass, or deceive anyone;</li>
              <li>record, monitor, or analyze another person without their permission or the consent the law requires;</li>
              <li>submit someone else's voice as your own, or use someone else's account;</li>
              <li>copy, modify, reverse engineer, decompile, or try to extract the source code, models, or algorithms of the Services, except where the law allows this despite this restriction;</li>
              <li>access the Services with bots, scrapers, or other automated means, or collect data from them;</li>
              <li>use the Services, or anything they produce, to build or train a competing product or model;</li>
              <li>interfere with or overload the Services, get around their security, or test their vulnerability without our written permission;</li>
              <li>upload viruses or other harmful code;</li>
              <li>impersonate anyone or misrepresent your connection with anyone;</li>
              <li>sell, resell, rent, sublicense, or otherwise commercially exploit the Services, or use a buying or purchasing agent to make purchases in them; or</li>
              <li>help anyone else do any of these things.</li>
            </ul>
            <p>We may investigate suspected violations, remove content that breaks these Terms, and report unlawful activity to the authorities.</p>

            <h2 id="fees-and-subscriptions">9. Fees and Subscriptions</h2>
            <p>Brainbox is free today. If we offer paid features, we will show you the price and terms before you buy, and we will not charge you unless you agree.</p>
            <p>If you buy a subscription in the App:</p>
            <ul>
              <li><span><strong>Billing:</strong> Apple bills the subscription to your Apple Account, and Apple's terms apply to the payment.</span></li>
              <li><span><strong>Automatic renewal:</strong> the subscription renews automatically at the end of each period, at the then-current price, unless you cancel at least 24 hours before it renews.</span></li>
              <li><span><strong>Free trials:</strong> if a subscription starts with a free trial, it becomes a paid subscription when the trial ends unless you cancel at least 24 hours before then.</span></li>
              <li><span><strong>Canceling:</strong> you can cancel at any time in your device's Settings, under your Apple Account, then Subscriptions. Deleting the App or your account does not cancel a subscription. When you cancel, you keep access until the end of the period you paid for.</span></li>
              <li><span><strong>Refunds:</strong> Apple handles refund requests under its policies. We do not give refunds or credits for partial periods, except where the law requires.</span></li>
              <li><span><strong>Price changes:</strong> we will tell you before a new price applies to you, and you can cancel before it does.</span></li>
            </ul>

            <h2 id="ip">10. Our Intellectual Property and Your License</h2>
            <p>The Services, including our software, models, scores, content, designs, and trademarks, belong to Axonos, Inc. or its licensors and are protected by law.</p>
            <p>Subject to these Terms, we give you a personal, limited, non-exclusive, non-transferable, revocable license to download and use the App on Apple devices you own or control, and to use the Services, for your personal, non-commercial use. We keep all rights we do not expressly give you. These Terms do not give you any right to use our names, logos, or trademarks.</p>

            <h2 id="third-party-services-and-other-people">11. Third-Party Services and Other People</h2>
            <p>The Services rely on third-party services, such as Apple, Google, and our speech and AI providers, and may link to third-party websites. We are not responsible for services or websites we do not control; their own terms and policies apply to them.</p>
            <p>If we offer features that let you share information with, or connect with, other people, you are responsible for what you choose to share and with whom.</p>

            <h2 id="changes">12. Changes to the Services and These Terms</h2>
            <p>We may change, suspend, or stop any part of the Services. Where we reasonably can, we will tell you in advance about changes that significantly reduce what you can do. We may also correct errors or inaccuracies in the Services at any time.</p>
            <p>We may update these Terms. If a change is material, we will tell you in the App or by email before it takes effect and ask you to accept the new Terms. If you do not accept them, you can stop using the Services and delete your account. Other changes take effect when we post them, and the Effective Date at the top shows the latest version.</p>

            <h2 id="termination">13. Ending These Terms</h2>
            <p>You can stop using the Services and delete your account at any time in the App (Profile, then Delete Account). Our Privacy Policy explains what happens to your information when you do.</p>
            <p>We may suspend or end your access if you seriously or repeatedly break these Terms, if the law requires it, or if continuing would create risk or legal exposure for us or others. Where reasonable, we will tell you first and give you a chance to download your data.</p>
            <p>Sections that by their nature should continue after these Terms end, including Your Content, Disclaimers, Limitation of Liability, Indemnity, and Governing Law and Dispute Resolution, continue.</p>

            <h2 id="disclaimers">14. Disclaimers</h2>
            <p className="caps">THE SERVICES ARE PROVIDED "AS IS" AND "AS AVAILABLE." TO THE FULLEST EXTENT PERMITTED BY LAW, WE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, AND ANY WARRANTY THAT THE SERVICES OR ANY SCORE OR OTHER OUTPUT WILL BE ACCURATE, COMPLETE, UNINTERRUPTED, SECURE, OR ERROR-FREE.</p>
            <p>We back up information and take care to protect it, but we cannot guarantee it will never be lost. If you want your own copy, download your data from the App.</p>
            <p>Some places do not allow certain warranties to be excluded, so some of these exclusions may not apply to you.</p>

            <h2 id="liability">15. Limitation of Liability</h2>
            <p className="caps">TO THE FULLEST EXTENT PERMITTED BY LAW, AXONOS, INC. AND ITS DIRECTORS, OFFICERS, EMPLOYEES, AND AGENTS WILL NOT BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, EXEMPLARY, OR PUNITIVE DAMAGES, OR FOR ANY LOSS OF PROFITS, REVENUE, OR DATA, ARISING FROM OR RELATED TO THE SERVICES OR THESE TERMS, EVEN IF WE WERE TOLD THEY WERE POSSIBLE.</p>
            <p className="caps">OUR TOTAL LIABILITY FOR ALL CLAIMS RELATED TO THE SERVICES OR THESE TERMS IS LIMITED TO THE GREATER OF (A) THE AMOUNT YOU PAID US FOR THE SERVICES IN THE 12 MONTHS BEFORE THE EVENT GIVING RISE TO THE CLAIM, OR (B) US $100.</p>
            <p>These limits do not apply to liability that the law does not allow us to limit, such as liability for fraud, gross negligence, willful misconduct, or death or personal injury caused by our negligence. Some places do not allow these limits, so they may not apply to you.</p>

            <h2 id="indemnification">16. Indemnity</h2>
            <p>You agree to defend, indemnify, and hold harmless Axonos, Inc. and its directors, officers, employees, and agents from third-party claims, losses, and reasonable legal fees arising from: (a) your content; (b) your breach of these Terms or the law; or (c) your violation of anyone else's rights, including by recording them without the consent the law requires, or through anything you share with people you connect with through the Services. We will tell you about any such claim, and we may take over its defense at our own cost. This section does not apply to the extent a claim results from our own breach or negligence.</p>

            <h2 id="governing">17. Governing Law and Dispute Resolution</h2>
            <h3 id="governing-law">17.1 Governing law</h3>
            <p>California law governs these Terms and any dispute between you and us, without regard to its conflict-of-law rules, except that the Federal Arbitration Act governs Sections 17.3 to 17.7. If a dispute is not subject to arbitration, it will be decided only in the state or federal courts in Los Angeles County, California, and you and we consent to their jurisdiction.</p>
            <p>If you live in the European Economic Area, the United Kingdom, or Switzerland, Sections 17.2 to 17.8 do not apply to you. You keep the protection of the mandatory consumer laws where you live and may bring claims in your local courts.</p>
            <h3 id="informal-resolution-first">17.2 Informal resolution first</h3>
            <p>Before starting arbitration or a court case, you and we agree to try to resolve the dispute informally for at least 30 days after one of us sends the other written notice describing the dispute and the relief sought. Send your notice to <a href="mailto:support@brainboxapp.com" style={{ color: 'var(--primary)' }}>support@brainboxapp.com</a>; we will send ours to the email address on your account.</p>
            <h3 id="binding-individual-arbitration">17.3 Binding individual arbitration</h3>
            <p>If we do not resolve the dispute informally, it will be resolved by binding individual arbitration administered by the American Arbitration Association (AAA) under its Consumer Arbitration Rules, before a single arbitrator, in English. The arbitration will take place in the county where you live or by video, unless we both agree otherwise. Fees are paid as the AAA Consumer Arbitration Rules provide. The arbitrator may award any individual relief a court could award, and judgment on the award may be entered in any court with jurisdiction.</p>
            <h3 id="exceptions">17.4 Exceptions</h3>
            <p>Either of us may bring an individual claim in small claims court instead. Either of us may also ask a court to stop the infringement or misuse of intellectual property.</p>
            <h3 id="no-class-actions">17.5 No class actions</h3>
            <p>You and we may bring claims against each other only individually, not as a plaintiff or class member in any class, collective, or representative action, and an arbitrator may not combine more than one person's claims. If this waiver is found unenforceable for a particular claim, that claim will be decided in court, not in arbitration.</p>
            <h3 id="mass-arbitration">17.6 Mass arbitration</h3>
            <p>If 25 or more similar arbitration demands are filed against us by or with the help of the same law firm or organization, the AAA will administer them in batches of up to 25 demands at a time, and the remaining demands will wait until earlier batches are resolved. Time limits for bringing claims are paused while a demand waits.</p>
            <h3 id="your-right-to-opt-out">17.7 Your right to opt out</h3>
            <p>You can opt out of arbitration within 30 days after you first accept these Terms by emailing <a href="mailto:support@brainboxapp.com" style={{ color: 'var(--primary)' }}>support@brainboxapp.com</a> with your name, your account email address, and a clear statement that you opt out of arbitration. Opting out does not affect the rest of these Terms.</p>
            <h3 id="jury-trial-waiver">17.8 Jury trial waiver</h3>
            <p className="caps">IF A DISPUTE IS DECIDED IN COURT, YOU AND WE WAIVE ANY RIGHT TO A JURY TRIAL, TO THE EXTENT THE LAW ALLOWS.</p>

            <h2 id="apple-app-store-terms">18. Apple App Store Terms</h2>
            <p>If you downloaded the App from Apple's App Store:</p>
            <ul>
              <li>These Terms are between you and Axonos, Inc. only, not Apple. Axonos, Inc., not Apple, is responsible for the App and its content.</li>
              <li>Your license to use the App is limited to Apple-branded products you own or control, as allowed by the Usage Rules in Apple's Media Services Terms and Conditions. The App may also be used by other accounts associated with you through Family Sharing or volume purchasing, where Apple allows it.</li>
              <li>Apple has no obligation to provide any maintenance or support for the App.</li>
              <li>If the App fails to conform to any applicable warranty, you may notify Apple, and Apple will refund the purchase price of the App, if any. To the maximum extent the law allows, Apple has no other warranty obligation for the App, and any other claims, losses, liabilities, damages, costs, or expenses caused by a failure to conform to a warranty are our responsibility, to the extent these Terms do not exclude them.</li>
              <li>Apple is not responsible for addressing any claims by you or a third party relating to the App or your possession or use of it, including product liability claims, claims that the App fails to meet any legal or regulatory requirement, and claims under consumer protection, privacy, or similar laws.</li>
              <li>If a third party claims that the App or your possession or use of it infringes their intellectual property rights, we, not Apple, are responsible for investigating, defending, settling, and discharging that claim, to the extent these Terms require.</li>
              <li>You confirm that you are not located in a country subject to a U.S. Government embargo or designated by the U.S. Government as a "terrorist supporting" country, and that you are not on any U.S. Government list of prohibited or restricted parties.</li>
              <li>You must comply with any third-party terms that apply when you use the App, such as your wireless data service agreement.</li>
              <li>Apple and its subsidiaries are third-party beneficiaries of these Terms. Once you accept these Terms, Apple has the right, and is deemed to have accepted the right, to enforce them against you as a third-party beneficiary.</li>
              <li><span>Send any questions, complaints, or claims about the App to us at <a href="mailto:support@brainboxapp.com" style={{ color: 'var(--primary)' }}>support@brainboxapp.com</a> or the address in Section 20.</span></li>
            </ul>

            <h2 id="general">19. General</h2>
            <ul>
              <li><span><strong>Entire agreement:</strong> these Terms, together with our Privacy Policy, Consumer Health Data Privacy Policy, Informed Consent, and HIPAA Notice of Privacy Practices, are the entire agreement between you and us about the Services. They replace any earlier version, including our separate End User License Agreement.</span></li>
              <li><span><strong>Assignment:</strong> you may not transfer these Terms. We may transfer them as part of a merger, acquisition, or sale of all or part of our business.</span></li>
              <li><span><strong>Severability:</strong> if any part of these Terms is found unenforceable, the rest stays in effect.</span></li>
              <li><span><strong>No waiver:</strong> if we do not enforce a provision, we have not given up our right to do so later.</span></li>
              <li><span><strong>Relationship:</strong> these Terms do not create a partnership, joint venture, employment, or agency relationship.</span></li>
              <li><span><strong>Events beyond our control:</strong> we are not responsible for delays or failures caused by events beyond our reasonable control.</span></li>
              <li><span><strong>Electronic communications:</strong> you agree to receive notices and agreements from us electronically, and these satisfy any requirement that they be in writing.</span></li>
              <li><span><strong>Export and sanctions:</strong> you may not use or export the Services in violation of U.S. export control or sanctions laws.</span></li>
              <li><span><strong>Interpretation:</strong> headings are for convenience only, and "including" means "including without limitation."</span></li>
              <li><span><strong>California users:</strong> under California Civil Code Section 1789.3, you may contact the Complaint Assistance Unit of the Division of Consumer Services of the California Department of Consumer Affairs in writing at 1625 North Market Blvd., Suite N 112, Sacramento, CA 95834, or by telephone at (800) 952-5210.</span></li>
            </ul>

            <h2 id="contact-us">20. Contact Us</h2>
            <p>Axonos, Inc.<br />1223 Wilshire Blvd #3210<br />Santa Monica, CA 90403<br />United States</p>
            <p>Support: <a href="mailto:support@brainboxapp.com" style={{ color: 'var(--primary)' }}>support@brainboxapp.com</a><br />Privacy: <a href="mailto:privacy@brainboxapp.com" style={{ color: 'var(--primary)' }}>privacy@brainboxapp.com</a></p>

            <div className="legal-nav-strip">
              <a href="/privacy">← Privacy Policy</a>
              <span />
            </div>
          </div>
        </div>
      </div>

      <Footer />
    </>
  );
}

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