/* Privacy and Terms — short, plain-language pages.
   Small DIY studio, single artist. No fancy legalese. */

function LegalShell({ navigate, eyebrow, title, intro, sections, lastUpdated }) {
  return (
    <div className="page-enter paper-bg" style={{ paddingTop: 120, paddingBottom: 80 }}>
      <article style={{ maxWidth: 720, margin: "0 auto", padding: "0 24px" }}>
        <div style={{ textAlign: "center", marginBottom: 36 }}>
          <div className="eyebrow" style={{ color: "var(--gold-deep)" }}>{eyebrow}</div>
          <h1 className="h-display" style={{ fontSize: "clamp(34px, 5vw, 60px)", marginTop: 14, fontStyle: "italic" }}>
            {title}
          </h1>
        </div>
        <p style={{ fontFamily: "var(--serif)", fontStyle: "italic", fontSize: 17, lineHeight: 1.7, color: "var(--ink)", textAlign: "center" }}>
          {intro}
        </p>

        <div style={{ marginTop: 48 }}>
          {sections.map((s, i) => (
            <section key={i} style={{ marginBottom: 36 }}>
              <h2 style={{
                fontFamily: "var(--serif)", fontSize: 22, lineHeight: 1.3,
                margin: 0, color: "var(--ink)",
              }}>{s.heading}</h2>
              {s.paragraphs.map((p, j) => (
                <p key={j} style={{ marginTop: 12, color: "var(--ink-soft)", fontSize: 15.5, lineHeight: 1.75 }}>
                  {p}
                </p>
              ))}
            </section>
          ))}
        </div>

        <div style={{ marginTop: 56, paddingTop: 24, borderTop: "1px solid var(--line)", textAlign: "center", fontSize: 12, letterSpacing: "0.2em", textTransform: "uppercase", color: "var(--ink-mute)" }}>
          Last updated · {lastUpdated}
        </div>

        <div style={{ marginTop: 36, textAlign: "center" }}>
          <button className="btn btn-ghost" onClick={() => navigate("home")}>
            ← Back to the Studio
          </button>
        </div>
      </article>
    </div>
  );
}

function PrivacyPage({ navigate }) {
  window.useSeo({
    title: "Privacy · Larissa Fine Art",
    description: "A plain-language note about how the Larissa Fine Art studio handles your information.",
    canonical: "https://larissaart.com/privacy",
  });
  return (
    <LegalShell
      navigate={navigate}
      eyebrow="Privacy"
      title={<>A short note <em style={{ fontStyle: "italic" }}>about privacy</em>.</>}
      intro="This is a tiny studio. I don't run trackers or sell your details. If you buy a painting, I only see what I need to send it to you. Here's the plain version."
      lastUpdated="May 2026"
      sections={[
        {
          heading: "What I collect",
          paragraphs: [
            "If you purchase a painting, Stripe (my checkout partner) collects your name, email, shipping address and phone so the painting can be sent. I see the same information so I can write to you, pack the painting and ship it.",
            "Stripe handles your card details directly — I never see them.",
          ],
        },
        {
          heading: "What I do with it",
          paragraphs: [
            "Only what's needed to send you the painting: a note from the studio, the shipping label, and (very occasionally) a follow-up email to make sure it arrived safely.",
            "I won't add you to any mailing list, sell your details, or share them with anyone besides the shipping company.",
          ],
        },
        {
          heading: "Cookies",
          paragraphs: [
            "The site uses a few small, technical cookies that come with Firebase (the platform the site runs on) — these keep things working. No advertising cookies. No analytics tracking you across the web.",
          ],
        },
        {
          heading: "If you want to be forgotten",
          paragraphs: [
            "Write to hello@larissaart.com and I'll delete the records I have on you. Stripe keeps a record of paid invoices for tax purposes — I can't remove those, but I can tell you exactly what is held.",
          ],
        },
        {
          heading: "Children",
          paragraphs: [
            "This studio is for grown-ups buying art. I don't knowingly collect anything from anyone under 16.",
          ],
        },
        {
          heading: "Questions",
          paragraphs: [
            "Just write — hello@larissaart.com. A real person reads everything.",
          ],
        },
      ]}
    />
  );
}

function TermsPage({ navigate }) {
  window.useSeo({
    title: "Terms · Larissa Fine Art",
    description: "The plain-language terms for purchasing original paintings from Larissa Fine Art.",
    canonical: "https://larissaart.com/terms",
  });
  return (
    <LegalShell
      navigate={navigate}
      eyebrow="Terms"
      title={<>The plain <em style={{ fontStyle: "italic" }}>terms</em>.</>}
      intro="This is a small one-artist studio. The rules below are written for people, not lawyers. If anything seems unfair, write to me and we'll talk."
      lastUpdated="May 2026"
      sections={[
        {
          heading: "The art is mine",
          paragraphs: [
            "Every painting on this website was painted by Larissa, by hand, in her studio in Highlands, Ontario. The images, paintings and written words on this site belong to her and are protected by copyright.",
            "You're welcome to share photos of the paintings online — please credit Larissa and link back to this site. Please don't reprint them on products to sell, or use them to train AI models. Each painting is one of one and is never reproduced as a print.",
          ],
        },
        {
          heading: "When you buy a painting",
          paragraphs: [
            "You're buying that single, physical painting — not the right to reproduce or resell prints of it. The painting is yours to keep, gift, hang, photograph for your own use, and eventually pass on or resell as a one-of-a-kind original.",
            "Once a sale completes, the painting is set aside under your name and the website will show it as Reserved. Allow about five business days for the studio to crate and ship.",
          ],
        },
        {
          heading: "Shipping",
          paragraphs: [
            "Paintings ship from Highlands, Ontario. A flat shipping fee is added at checkout (currently $160 CAD for most paintings; some may differ). The package is tracked. International buyers cover any customs duties at delivery.",
            "If the painting arrives damaged in transit, please write within 7 days with photos and we'll work it out.",
          ],
        },
        {
          heading: "If it isn't right",
          paragraphs: [
            "If the painting doesn't feel right in your home, you can send it back within 14 days of arrival, in its original packaging. The studio refunds the painting price once it's safely back. Return shipping is paid by you unless the painting was damaged.",
          ],
        },
        {
          heading: "Prices",
          paragraphs: [
            "Prices are in Canadian dollars and may change. The price shown when you buy is the price you pay.",
          ],
        },
        {
          heading: "A simple promise",
          paragraphs: [
            "This is a personal studio, not a big shop. If something goes wrong, write to hello@larissaart.com — Larissa or the studio helper will reply, usually the same week.",
          ],
        },
      ]}
    />
  );
}

window.PrivacyPage = PrivacyPage;
window.TermsPage = TermsPage;
