/* Legal — combined Privacy Policy and Terms of Use. Generic, plain-English
   copy aligned to the site's intent (editorial music site + affiliate vinyl
   links + optional accounts for collection tracking). Not legal advice;
   should be reviewed by a solicitor before relying on it commercially. */

function Legal({ onHome }) {
  const updated = "June 2026";
  return (
    <main className="legal-page">
      <div className="legal-wrap">
        <button className="legal-back" onClick={onHome}>← Back to The Lead-In</button>

        <h1 className="legal-h1">Privacy &amp; Terms</h1>
        <p className="legal-updated">Last updated {updated}</p>

        <p className="legal-intro">
          The Lead-In is an independent editorial publication about recorded music. This page explains
          how we handle your information and the terms on which we offer the site. We have tried to keep
          it short and readable. If anything is unclear, get in touch before using the site.
        </p>

        {/* ============ PRIVACY ============ */}
        <section className="legal-section">
          <h2 className="legal-h2">Privacy Policy</h2>

          <h3 className="legal-h3">Who we are</h3>
          <p>
            The Lead-In is the data controller for the personal information described here. References to
            "we", "us" and "our" mean The Lead-In.
          </p>

          <h3 className="legal-h3">What we collect</h3>
          <p>We collect only what we need to run the site:</p>
          <ul className="legal-list">
            <li><b>Account information.</b> If you create an account, we store your email address and any display name you choose, so you can sign in and we can save your collection.</li>
            <li><b>Your collection and wishlist.</b> The records you add, the pressings and conditions you select, and related notes are stored against your account so they persist between visits.</li>
            <li><b>Technical information.</b> Standard server and analytics data such as approximate location, device and browser type, and the pages you visit, used to keep the site secure and understand what readers find useful.</li>
            <li><b>Communications.</b> If you subscribe to our newsletter or contact us, we keep that correspondence and your email address.</li>
          </ul>

          <h3 className="legal-h3">How we use it</h3>
          <p>
            We use your information to provide and maintain your account and collection, to send the
            newsletter if you have asked for it, to measure and improve the site, and to comply with our
            legal obligations. We do not sell your personal information.
          </p>

          <h3 className="legal-h3">Cookies and similar technologies</h3>
          <p>
            We use a small number of cookies and similar local storage to keep you signed in, remember
            your preferences, and gather aggregate analytics. You can clear or block these in your
            browser, though some features may not work as well if you do.
          </p>

          <h3 className="legal-h3">Affiliate links</h3>
          <p>
            Some links to buy vinyl are affiliate links. If you buy through them we may earn a commission,
            at no extra cost to you. Following an affiliate link may pass standard referral information to
            the retailer, whose own privacy policy then applies to your purchase.
          </p>

          <h3 className="legal-h3">Sharing</h3>
          <p>
            We share personal information only with service providers who help us run the site (for
            example hosting, authentication, email and analytics providers), and only as needed for them
            to provide their service. We may also disclose information where required by law.
          </p>

          <h3 className="legal-h3">Retention</h3>
          <p>
            We keep your account information for as long as your account is active. You can delete your
            collection entries at any time, and you can ask us to delete your account and associated data.
          </p>

          <h3 className="legal-h3">Your rights</h3>
          <p>
            Depending on where you live, you may have rights to access, correct, export, or delete your
            personal information, and to object to or restrict certain processing. To exercise any of
            these, email us at <a href="mailto:info@theleadin.com">info@theleadin.com</a>.
          </p>

          <h3 className="legal-h3">Children</h3>
          <p>
            The site is intended for adults. We do not knowingly collect personal information from
            children.
          </p>
        </section>

        {/* ============ TERMS ============ */}
        <section className="legal-section">
          <h2 className="legal-h2">Terms of Use</h2>

          <h3 className="legal-h3">Acceptance</h3>
          <p>
            By using The Lead-In you agree to these terms. If you do not agree, please do not use the
            site.
          </p>

          <h3 className="legal-h3">Our content</h3>
          <p>
            The reviews, rankings, essays, scoring, images and other material on the site are our
            editorial work and are protected by copyright. You are welcome to read, link to, and quote
            short extracts with attribution. You may not republish substantial portions, or reproduce the
            site's content commercially, without our permission.
          </p>

          <h3 className="legal-h3">Editorial independence</h3>
          <p>
            Our rankings and opinions are our own. Affiliate relationships do not determine what we
            include or how we rank it. Where we earn commission, we disclose it.
          </p>

          <h3 className="legal-h3">Valuations and pressing data</h3>
          <p>
            Pressing details, price estimates and collector data shown on the site are indicative only,
            drawn from public marketplace sources and editorial judgement. They are not appraisals,
            investment advice, or guarantees of value. Always do your own research before buying or
            selling a record.
          </p>

          <h3 className="legal-h3">Your account and content</h3>
          <p>
            You are responsible for keeping your sign-in details secure and for the information you add to
            your collection. Do not use the site to upload unlawful content or to misuse other people's
            information.
          </p>

          <h3 className="legal-h3">Third-party links and retailers</h3>
          <p>
            The site links to third-party retailers and resources. We are not responsible for their
            content, products, prices, or practices, and your dealings with them are governed by their
            own terms.
          </p>

          <h3 className="legal-h3">Availability and changes</h3>
          <p>
            We may change, suspend, or withdraw features at any time, and we may update these terms. If we
            make material changes we will update the date at the top of this page. Continued use after a
            change means you accept the updated terms.
          </p>

          <h3 className="legal-h3">No warranties and liability</h3>
          <p>
            The site is provided on an "as is" basis. To the extent permitted by law, we exclude implied
            warranties and are not liable for losses arising from your use of the site or reliance on its
            content, including any valuation or pressing information. Nothing in these terms limits
            liability that cannot be limited by law.
          </p>

          <h3 className="legal-h3">Governing law</h3>
          <p>
            These terms are governed by the laws of England and Wales, and the courts of England and Wales
            have exclusive jurisdiction, unless mandatory local law provides otherwise.
          </p>

          <h3 className="legal-h3">Contact</h3>
          <p>
            For privacy requests, content permissions, or any question about these terms, contact us
            at <a href="mailto:info@theleadin.com">info@theleadin.com</a>. We aim to respond within a reasonable time.
          </p>
        </section>

        <p className="legal-foot-note">
          This page is provided for general information and is not legal advice. If you need a policy you
          can rely on commercially, have it reviewed by a qualified solicitor for your jurisdiction.
        </p>
      </div>
    </main>
  );
}

window.Legal = Legal;
