/* ============================================================
   The Carnation — legal pages
   Privacy Policy · Terms of Use
   Styled to match the trust/accountability pages.
   ============================================================ */

const LEGAL_UPDATED = "June 2026";

/* ===================== PRIVACY POLICY ===================== */
function PrivacyPage() {
  useEffect(() => { window.scrollTo(0, 0); }, []);
  const items = [
    { h: "What we collect", p: "Only what you choose to give us. If you subscribe to the dispatch we keep your email. If you become a member we keep the details you enter. If you submit a story lead, nominate a business, answer an Open Question, or report a correction, we keep what you wrote and any contact details you include. We don't ask for more than a given action needs." },
    { h: "Where your information lives", p: "Saved stories, reading activity, and local display preferences stay in your browser. Newsletter signups, membership interest, corrections, tips, nominations, and submissions may be sent to The Carnation's private newsroom database so editors can read and respond to them. Public Open Question responses may appear on the site when submitted for publication." },
    { h: "How we use it", p: "Email addresses are used to send the Dispatch and, for members, the occasional city briefing — nothing else. Submissions and Open Question responses are used to inform and, where you've agreed, publish our coverage. Reading activity is used only to show you your saved list and surface what's most-read." },
    { h: "What we never do", p: "We don't sell, rent, or trade your information. We don't run third-party advertising trackers or surveillance pixels. We don't build profiles of you to sell to anyone. A local publication should be the last place that does that to its readers." },
    { h: "Open Questions & anonymity", p: "Open Questions are a public forum by design — responses you submit may be shown publicly on the site. You can answer anonymously; if you do, don't include identifying details you wouldn't want read aloud. Don't submit other people's private information." },
    { h: "Cookies & local storage", p: "We use your browser's local storage to remember your preferences, your saved stories, and your signups so the site works across visits. We don't set advertising or cross-site tracking cookies." },
    { h: "Your control", p: "You can unsubscribe from the dispatch at any time, ask us to remove information you've sent, or clear local saved-story and reading data by clearing this site's data in your browser. To request removal from the newsroom database, email privacy@carnationpost.com." },
    { h: "Children", p: "The Carnation is a general-audience publication and is not directed at children under 13. We don't knowingly collect information from them." },
    { h: "Changes to this policy", p: "If we materially change how we collect, store, or publish information, we'll update this page and the date above. Questions: privacy@carnationpost.com." },
  ];
  return (
    <main className="route">
      <section className="phead">
        <div className="wrap">
          <div className="phead__kick">Legal</div>
          <h1 className="phead__title">Privacy Policy</h1>
          <p className="phead__dek">We ask the city to be transparent about who pays for things. Here's the same honesty about what we do with your information: as little as possible.</p>
          <p className="note" style={{marginTop:"16px"}}>Last updated {LEGAL_UPDATED}</p>
          <hr className="rule rule--double phead__rule" />
        </div>
      </section>

      <section className="section section--tight">
        <div className="wrap wrap--mid">
          <Reveal>
            <div className="standards rise">
              {items.map((e, i) => (
                <div className="standard" key={e.h}>
                  <span className="standard__n">{String(i + 1).padStart(2, "0")}</span>
                  <div>
                    <h3 className="standard__h">{e.h}</h3>
                    <p className="standard__p">{e.p}</p>
                  </div>
                </div>
              ))}
            </div>
          </Reveal>
          <div style={{ marginTop: "34px", display: "flex", gap: "14px", flexWrap: "wrap" }}>
            <a className="btn btn--line" href="#/terms">Read the Terms of Use <span className="arw">→</span></a>
            <a className="btn btn--line" href="#/funding">How we're funded</a>
            <a className="btn btn--line" href="#/contact">Contact us</a>
          </div>
        </div>
      </section>
    </main>
  );
}

/* ===================== TERMS OF USE ===================== */
function TermsPage() {
  useEffect(() => { window.scrollTo(0, 0); }, []);
  const items = [
    { h: "Agreement", p: "By using The Carnation you agree to these terms. If you don't agree, please don't use the site. They sit alongside our Privacy Policy, which explains how we handle your information." },
    { h: "Who we are", p: "The Carnation is an independent civic and cultural publication for Alliance, Ohio, published by Alliance Renaissance. You can reach us at hello@carnationpost.com." },
    { h: "Using the site", p: "You may read, share, and link to our work freely for personal and non-commercial purposes. Don't use the site to break the law, harass others, scrape it at scale, attempt to disrupt it, or misrepresent yourself as us." },
    { h: "What you send us", p: "When you submit a story lead, nomination, event, correction, or Open Question response, you keep ownership of what you wrote. You grant us a non-exclusive license to publish, edit for length and clarity, and republish it in connection with The Carnation. Only submit material you have the right to share." },
    { h: "Community conduct", p: "Open Questions are a shared civic space. Keep it good-faith: no harassment, hate, threats, doxxing, spam, or knowingly false claims about real people or businesses. We may decline to publish, edit, or remove submissions at our discretion to keep the forum useful." },
    { h: "Accuracy & corrections", p: "We work to be accurate and we correct mistakes in public on our Corrections page. Even so, the site is provided 'as is.' Details — hours, dates, availability — change; confirm anything you plan to act on with the source." },
    { h: "Memberships & support", p: "Memberships are voluntary support that keep the journalism free to read. There is no paywall. When real billing is connected, the terms, pricing, and cancellation details for any paid tier will be stated clearly at the point of signup." },
    { h: "Our content", p: "Articles, photographs, and the design of The Carnation are owned by us or our contributors and are protected by copyright. You may quote and link with attribution; please ask before republishing a full piece." },
    { h: "Links to others", p: "We link to local businesses, institutions, and other sites as a service. We don't control them and aren't responsible for their content, accuracy, or practices." },
    { h: "Limitation of liability", p: "To the extent the law allows, The Carnation and Alliance Renaissance aren't liable for indirect or incidental damages arising from your use of the site. Nothing here limits rights you have that can't be waived under Ohio law." },
    { h: "Changes", p: "We may update these terms as the publication grows. We'll revise the date above and, for material changes, note them clearly. Continuing to use the site means you accept the current terms. Questions: hello@carnationpost.com." },
  ];
  return (
    <main className="route">
      <section className="phead">
        <div className="wrap">
          <div className="phead__kick">Legal</div>
          <h1 className="phead__title">Terms of Use</h1>
          <p className="phead__dek">The plain-language rules for reading, sharing, and contributing to The Carnation. We've kept them short and human.</p>
          <p className="note" style={{marginTop:"16px"}}>Last updated {LEGAL_UPDATED}</p>
          <hr className="rule rule--double phead__rule" />
        </div>
      </section>

      <section className="section section--tight">
        <div className="wrap wrap--mid">
          <Reveal>
            <div className="standards rise">
              {items.map((e, i) => (
                <div className="standard" key={e.h}>
                  <span className="standard__n">{String(i + 1).padStart(2, "0")}</span>
                  <div>
                    <h3 className="standard__h">{e.h}</h3>
                    <p className="standard__p">{e.p}</p>
                  </div>
                </div>
              ))}
            </div>
          </Reveal>
          <div style={{ marginTop: "34px", display: "flex", gap: "14px", flexWrap: "wrap" }}>
            <a className="btn btn--line" href="#/privacy">Read the Privacy Policy <span className="arw">→</span></a>
            <a className="btn btn--line" href="#/ethics">Ethics &amp; Standards</a>
            <a className="btn btn--line" href="#/contact">Contact us</a>
          </div>
        </div>
      </section>
    </main>
  );
}

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