/* Legal — Christa Niering · Refined Life Coaching */
const { useState } = React;

const SECTIONS = [
  { id: "privacy", title: "Privacy Policy", body: [
    { kind: "p", text: "Last Updated: July 2026" },
    { kind: "p", text: "Christa Niering and Refined Life Coaching (\"I,\" \"me,\" or \"my\") is committed to protecting your privacy. The women who reach out are often sharing deeply personal things. I take that trust seriously, and I handle your information accordingly." },
    { 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 reach out directly — I'd much rather explain it plainly than hide behind legal language." },
  ] },
  { id: "info-collect", title: "Information I 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: "Session Information: Notes and records from our work together, kept strictly confidential and never shared." },
    { kind: "li", text: "Payment Information: Processed through secure third-party processors. I do not store full card information on my servers." },
    { kind: "li", text: "Usage Data: Standard analytics — pages visited, time on site, device type — used only to improve the website." },
    { kind: "li", text: "Cookies: Small data files that enhance your browsing experience. You may disable them in your browser settings if you prefer." },
  ] },
  { id: "info-use", title: "How I 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 deliver the offering you've chosen" },
    { 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 opted-in encouragement emails (you may unsubscribe at any time)" },
    { kind: "li", text: "To improve this website and the quality of what I offer" },
    { 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: July 2026" },
    { kind: "p", text: "By accessing this site or these services, you agree to these Terms. Lawful use only; no commercial reproduction without explicit written permission; you are responsible for the security of your account credentials." },
    { kind: "p", text: "All content on this website — including text, frameworks, teachings, and program materials — is the intellectual property of Christa Niering and Refined 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 other women in shared spaces (such as The Sisterhood, when it opens) may result in ending of services without refund." },
    { kind: "p", text: "I reserve the right to update these terms. Continued use of this website or these services following changes constitutes acceptance of the revised terms." },
  ] },
  { id: "coaching", title: "Coaching Disclaimer", body: [
    { kind: "p", text: "Christa Niering and Refined Life Coaching provide faith-based life coaching and spiritual mentorship. This is not therapy, counseling, psychiatry, or any form of licensed mental-health treatment. I am not a licensed therapist, psychologist, or medical professional, and I do not diagnose or treat any condition." },
    { kind: "p", text: "The work we do together helps women gently explore their emotions, tend to the parts of them that are hurting, and rebuild what they believe about themselves and about God. It is designed to complement — never replace — professional mental-health care." },
    { kind: "p", text: "If you are experiencing a mental-health crisis, thoughts of harming yourself, or acute trauma symptoms, please contact a licensed professional or call or text 988 (the Suicide & Crisis Lifeline) immediately. I warmly encourage clients who are in therapy to continue alongside our work." },
    { kind: "p", text: "Results from coaching vary based on individual circumstances, willingness, and engagement in the process. Any stories or reviews shared on this site reflect individual experiences and are not guarantees of specific outcomes." },
  ] },
  { id: "refund", title: "Refund Policy", body: [
    { kind: "p", text: "I want you to feel at peace with your decision. Refunds are considered thoughtfully and case-by-case." },
    { kind: "li", text: "1:1 Coaching (The Refining Room): If, after your first paid session, you feel it isn't the right fit, reach out and we'll have an honest conversation about a fair refund of any unused sessions." },
    { kind: "li", text: "The Sisterhood (when it opens): Membership may be paused or ended at any time; the current month is non-refundable due to the limited size of each circle." },
    { kind: "li", text: "The First Thread (self-paced, when it opens): Due to the immediate digital access of this offering, refunds are not available after purchase. Please contact me right away with any access issues and I'll make it right." },
    { kind: "p", text: "No refunds are offered for sessions missed due to client scheduling conflicts. Free conversations carry no cost and no obligation." },
  ] },
  { id: "contact", title: "Contact Information", body: [
    { kind: "p", text: "Questions about these policies? Concerns about how your information is used? Please reach out directly:" },
    { kind: "li", text: "Email: christa@refinedlifesc.com" },
    { kind: "li", text: "Phone: (919) 600-3923" },
    { kind: "li", text: "Location: South Carolina (serving women online, nationwide)" },
    { kind: "li", text: "Response Time: Usually within 24–48 hours, personally — 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. Please review these at your convenience — and if anything is unclear, just ask. I'd rather explain it directly than hide behind legal language."
        />
        <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>{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 />);
