/* Legal — Brenda McPherson · Free to Thrive Life Coaching */
const { useState } = React;

const SECTIONS = [
  { id: "privacy", title: "Privacy Policy", body: [
    { kind: "p", text: "Last Updated: September 2026" },
    { kind: "p", text: "Brenda McPherson and Free to Thrive Life Coaching (\"I,\" \"me,\" or \"my\") are committed to protecting your privacy. The women who reach out to me often share some of the most tender parts of their lives. I take that trust seriously, and I handle your information with great care and discretion." },
    { kind: "p", text: "By using this website or participating in any coaching offering, you consent to the practices described in this policy. If anything is unclear, please ask me directly. I'd rather explain it plainly than hide behind legal language." },
  ] },
  { id: "info-collect", title: "Information We Collect", body: [
    { kind: "p", text: "I collect information you provide directly and information gathered automatically through your use of this website:" },
    { kind: "li", text: "Personal Data: Name, email, phone, and contact details from booking, the contact form, email signups, or purchase." },
    { kind: "li", text: "Coaching Session Information: Notes and records, kept strictly confidential and never shared except where the law requires it." },
    { kind: "li", text: "Payment Information: Processed through secure third-party processors. I do not store full card information." },
    { kind: "li", text: "Usage Data: Standard analytics such as pages visited, time on site, and device type, used only to improve the website." },
    { kind: "li", text: "Cookies: Small data files that enhance your browsing experience. You can disable them in your browser settings." },
  ] },
  { id: "info-use", title: "How We Use Your Information", body: [
    { kind: "p", text: "Your information is used only to serve you well. Specifically:" },
    { kind: "li", text: "To provide coaching services and program delivery" },
    { kind: "li", text: "To process bookings, enrollments, and payments" },
    { kind: "li", text: "To respond personally to your questions and messages" },
    { kind: "li", text: "To send emails you have opted into (you may unsubscribe at any time)" },
    { kind: "li", text: "To improve this website and the quality of Free to Thrive offerings" },
    { kind: "li", text: "To comply with applicable legal obligations" },
    { kind: "p", text: "I do not sell, rent, or share your personal information with third parties for marketing purposes. Ever." },
  ] },
  { id: "terms", title: "Terms of Service", body: [
    { kind: "p", text: "Last Updated: September 2026" },
    { kind: "p", text: "By accessing this site or its services, you agree to these Terms. Use this site lawfully; do not reproduce its content commercially without written permission; and keep any account credentials secure." },
    { kind: "p", text: "All content on this website, including text, the Free to Thrive logo and framework, teachings, and program materials, is the intellectual property of Brenda McPherson and Free to Thrive Life Coaching and may not be reproduced, distributed, or used without permission." },
    { kind: "p", text: "Behavior that is disrespectful, harmful, or contrary to the well-being of others in shared spaces (such as a small-group circle), including sharing another member's story outside the group, may result in the end of services without refund." },
    { kind: "p", text: "I may update these terms from time to time. Continued use of this website or these services after changes means you accept the revised terms." },
  ] },
  { id: "coaching", title: "Coaching Disclaimer", body: [
    { kind: "p", text: "Brenda McPherson and Free to Thrive Life Coaching provide faith-based life coaching. Coaching is not therapy, counseling, psychiatry, or any form of licensed mental health treatment, and it is not medical care or medical advice. Somatic and nervous-system practices shared in coaching are general wellness tools, not treatment for any condition." },
    { kind: "p", text: "The work we do together is designed to complement, not replace, professional mental health and medical care. If you are in therapy or under a doctor's care, I warmly encourage you to continue alongside coaching, and to talk with your doctor about any physical symptoms." },
    { kind: "p", text: "If you are in crisis or having thoughts of suicide, call or text 988 (Suicide & Crisis Lifeline). If you are in immediate danger, call 911. The National Domestic Violence Hotline is available at 1-800-799-7233, and the RAINN National Sexual Assault Hotline at 1-800-656-4673." },
    { kind: "p", text: "Results from coaching vary with individual circumstances, commitment, and willingness to engage in the process, and healing is rarely linear. Stories shared on this site reflect individual experiences and are not guarantees of specific outcomes." },
  ] },
  { id: "refund", title: "Refund Policy", body: [
    { kind: "p", text: "Refunds are considered on a case-by-case basis within the first 30 days of program enrollment." },
    { kind: "li", text: "1:1 Coaching (Free to Thrive 1:1): If within 30 days the coaching isn't the right fit for reasons within my control, email me and we'll have an honest conversation." },
    { kind: "li", text: "Small-Group Circle (The Still Waters Circle): Prorated refund within the first 30 days of a circle's start. Membership is otherwise non-refundable because group size is limited." },
    { kind: "li", text: "Self-Paced (Finding Your Bearings): Because this offering gives immediate digital access, refunds are not available after enrollment. Contact me right away with any technical issues and I will resolve them." },
    { kind: "p", text: "No refunds after 30 days or for missed sessions due to client conflicts. The free discovery session carries no purchase obligation whatsoever." },
  ] },
  { id: "contact", title: "Contact Information", body: [
    { kind: "p", text: "Questions about these policies, or concerns about how your information is used? Reach out directly:" },
    { kind: "li", text: `Email: ${EMAIL}` },
    { kind: "li", text: "Location: Leesburg, Alabama (meeting with clients online)" },
    { kind: "li", text: "Response Time: Personally, usually within a day or two. No bots, no team." },
  ] },
];

function App() {
  const [active, setActive] = useState("privacy");
  const section = SECTIONS.find((s) => s.id === active);
  return (
    <>
      <Nav current="" />
      <main>
        <PageHero
          eyebrow="Legal"
          title="Terms &"
          italic="privacy."
          subtitle="The fine print, kept honest and plain. I believe in being straightforward about how I handle your information and what you can expect from working with me. If anything is unclear, just ask."
        />
        <section className="section" style={{ background: "var(--cream)", paddingTop: 20 }}>
          <div className="container" style={{ display: "grid", gridTemplateColumns: "1fr 2.4fr", gap: 64, alignItems: "start" }}>
            <aside style={{ position: "sticky", top: 120 }}>
              <div className="smallcaps" style={{ color: "var(--terracotta)", marginBottom: 16 }}>✦ Quick navigation</div>
              <ol style={{ listStyle: "none", display: "flex", flexDirection: "column", gap: 0, borderTop: "1px solid var(--rule)" }}>
                {SECTIONS.map((s, i) => (
                  <li key={s.id}>
                    <button onClick={() => setActive(s.id)} style={{ background: "transparent", border: "none", display: "flex", gap: 14, alignItems: "center", width: "100%", padding: "14px 0", borderBottom: "1px solid var(--rule)", cursor: "pointer", textAlign: "left", color: active === s.id ? "var(--terracotta)" : "var(--walnut)" }}>
                      <span className="mono" style={{ fontSize: 11, color: "var(--terracotta)" }}>{String(i + 1).padStart(2, "0")}</span>
                      <span className="grotesk" style={{ fontSize: 14.5, fontWeight: active === s.id ? 500 : 400 }}>{s.title}</span>
                      {active === s.id && <span style={{ marginLeft: "auto", color: "var(--terracotta)" }}>→</span>}
                    </button>
                  </li>
                ))}
              </ol>
            </aside>
            <div>
              <article>
                <div className="smallcaps" style={{ color: "var(--terracotta)", marginBottom: 12 }}>Section · {section.id}</div>
                <h2 className="display" style={{ fontSize: "clamp(40px, 5vw, 64px)", color: "var(--walnut)", lineHeight: 0.98, fontWeight: 500, marginBottom: 40 }}>{section.title}</h2>
                <div style={{ maxWidth: 740, fontSize: 17, lineHeight: 1.7, color: "var(--walnut-soft)" }}>
                  {section.body.map((b, i) => b.kind === "li"
                    ? <div key={i} style={{ display: "grid", gridTemplateColumns: "32px 1fr", gap: 12, padding: "12px 0", borderBottom: "1px solid var(--rule)" }}>
                        <span className="mono" style={{ fontSize: 11, color: "var(--terracotta)", paddingTop: 6 }}>{String(i + 1).padStart(2, "0")}</span>
                        <p style={{ wordBreak: "break-word" }}>{b.text}</p>
                      </div>
                    : <p key={i} style={{ marginBottom: 22 }}>{b.text}</p>
                  )}
                </div>
              </article>
            </div>
          </div>
        </section>
      </main>
      <Footer />
      <PaletteTweaksPanel />
    </>
  );
}

ReactDOM.createRoot(document.getElementById("root")).render(<App />);
