/* Terms of Service page (terms.html) */

const TOC = [
  { id: "acceptance", title: "Acceptance of terms" },
  { id: "account", title: "Account creation and use" },
  { id: "services", title: "Storage services and agreement" },
  { id: "payment", title: "Payment terms" },
  { id: "obligations-you", title: "Customer obligations" },
  { id: "obligations-us", title: "Our obligations and limitations" },
  { id: "termination", title: "Termination" },
  { id: "liability", title: "Liability" },
  { id: "law", title: "Governing law" },
  { id: "changes", title: "Changes to these terms" },
  { id: "contact-legal", title: "Contact" },
];

const TermsPage = () => (
  <Page>
    <main className="legal-page">
      <div className="legal-grid">
        <aside className="legal-toc">
          <div className="toc-label">Contents</div>
          <ol>
            {TOC.map((t) => (
              <li key={t.id}><a href={`#${t.id}`}>{t.title}</a></li>
            ))}
          </ol>
        </aside>

        <article className="legal-body">
          <div className="meta">Legal · Terms of Service</div>
          <h1>Terms of Service</h1>
          <div className="updated">Last updated: [to be confirmed before launch]</div>

          <div className="legal-disclaimer">
            <b>Draft for review.</b> This document is a structural placeholder. The final wording must come from a qualified Australian commercial lawyer familiar with self-storage operations and the Australian Consumer Law before this page goes live.
          </div>

          <h2 id="acceptance">1 · Acceptance of terms</h2>
          <p>By creating an account, booking a storage unit, or using any service provided by Storage Cartel Pty Ltd ("we", "us", "Storage Cartel"), you agree to these Terms of Service together with our Privacy Policy and the Storage Agreement signed at the point of booking.</p>
          <p>If you do not agree to any of these documents, you should not use the service.</p>

          <h2 id="account">2 · Account creation and use</h2>
          <p>To book a storage unit you must create an account and provide accurate personal information including a valid form of identification at the point of move-in. You must be at least 18 years old.</p>
          <p>You are responsible for the security of your account credentials and for any activity on your account. Notify us immediately if you suspect unauthorised access.</p>

          <h2 id="services">3 · Storage services and agreement</h2>
          <p>The Storage Agreement signed during booking is the primary contract for the storage of your goods at our facility. These Terms of Service govern your broader relationship with Storage Cartel, including use of our website, customer portal and any optional services.</p>

          <h2 id="payment">4 · Payment terms</h2>
          <p>Your first month is charged at signup. Subsequent months are charged automatically on your billing date via the card on file. You may update your payment method at any time through your account.</p>
          <p>Optional services (premium callouts, deliveries, inventory work) are charged at the prices listed on the Pricing page at the time you request the service.</p>

          <h2 id="obligations-you">5 · Customer obligations</h2>
          <p>You agree not to store hazardous, flammable, illegal, perishable or live items. A non-exhaustive list of prohibited items is published on our FAQ page.</p>
          <p>You are responsible for insuring your own goods. Storage Cartel's insurance covers the facility and its operations, not the contents of your unit.</p>

          <h2 id="obligations-us">6 · Our obligations and limitations</h2>
          <p>We will provide secure, dry storage in line with the Storage Agreement, manager-attended access during published windows, and reasonable assistance with booked services.</p>
          <p>We do not guarantee continuous access outside published windows. Premium callouts and short-notice bookings are subject to manager availability.</p>

          <h2 id="termination">7 · Termination</h2>
          <p>Either party may terminate the Storage Agreement with 14 days written notice. No exit fee applies. We may terminate immediately for serious breaches including storage of prohibited items, non-payment, or behaviour that endangers staff or other customers.</p>

          <h2 id="liability">8 · Liability</h2>
          <p>To the extent permitted by law, Storage Cartel's liability for any loss or damage is limited to direct losses caused by our negligence. We are not liable for indirect, consequential or business losses. Nothing in these terms excludes any non-excludable rights you have under the Australian Consumer Law.</p>

          <h2 id="law">9 · Governing law</h2>
          <p>These terms are governed by the laws of the State of Victoria, Australia. Any dispute will be heard in the courts of Victoria.</p>

          <h2 id="changes">10 · Changes to these terms</h2>
          <p>We may update these terms from time to time. Material changes are communicated through your account and by email at least 30 days before they take effect. Continued use of the service after the change date constitutes acceptance.</p>

          <h2 id="contact-legal">11 · Contact</h2>
          <p>Questions about these terms: <a href="mailto:hello@storagecartel.com.au" style={{ color: "var(--red)" }}>hello@storagecartel.com.au</a> or 03 5988 0000.</p>

          <p style={{ marginTop: 48, fontSize: 14, fontStyle: "italic", color: "var(--ink-2)" }}>
            Storage Cartel Pty Ltd. ABN [to be added]. 45 Hughes Road, Blairgowrie VIC 3942.
          </p>
        </article>
      </div>
    </main>
  </Page>
);

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