/* Storage Agreement (public copy) page (agreement.html) */

const TOC = [
  { id: "parties", title: "The parties" },
  { id: "unit", title: "The unit" },
  { id: "term", title: "Term and notice" },
  { id: "fees", title: "Fees and payment" },
  { id: "access", title: "Access" },
  { id: "obligations-cust", title: "Customer obligations" },
  { id: "prohibited", title: "Prohibited items" },
  { id: "insurance", title: "Insurance" },
  { id: "liability-ag", title: "Liability" },
  { id: "default", title: "Default and abandonment" },
  { id: "changes-ag", title: "Changes to fees" },
  { id: "law-ag", title: "Governing law" },
];

const AgreementPage = () => (
  <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 · Storage Agreement</div>
          <h1>Storage Agreement</h1>
          <div className="updated">Last updated: [to be confirmed before launch]</div>

          <div className="legal-disclaimer">
            <b>Public reference copy.</b> This is the agreement customers sign during booking, shown here so you can review what you're committing to before signing up. The final wording must be drafted by a qualified Australian commercial lawyer familiar with self-storage operations and the Australian Consumer Law before this page goes live.
          </div>

          <h2 id="parties">1 · The parties</h2>
          <p>This Storage Agreement is between Storage Cartel Pty Ltd ABN [TBC] of 45 Hughes Road, Blairgowrie VIC 3942 ("Storage Cartel", "we", "us") and the customer named in the account ("you").</p>

          <h2 id="unit">2 · The unit</h2>
          <p>We agree to provide you exclusive use of the storage unit listed in your account on the terms set out in this agreement. The unit number, size and monthly fee are recorded in your account and on your booking confirmation.</p>

          <h2 id="term">3 · Term and notice</h2>
          <p>This agreement runs month to month with no fixed term. Either party may end it with 14 days written notice given through your account or to the contact details on file.</p>
          <p>If you wish to move out you must book a move-out window through your account within the notice period. No exit fee applies.</p>

          <h2 id="fees">4 · Fees and payment</h2>
          <p>The monthly fee is charged in advance on your billing date each month. You authorise us to charge the card on file. Optional services (premium callouts, deliveries, inventory work) are charged at the prices in effect when you request them.</p>
          <p>If a payment fails we will notify you and retry in three business days. Persistent non-payment is treated as default — see clause 10.</p>

          <h2 id="access">5 · Access</h2>
          <p>Standard access to your unit is on Fridays and Saturdays during our published office hours, booked through your account at least 24 hours in advance.</p>
          <p>Premium callouts outside standard windows are available subject to manager availability for an additional fee, set out on our Pricing page.</p>

          <h2 id="obligations-cust">6 · Customer obligations</h2>
          <p>You agree to keep your unit clean, dry and free from prohibited items. You must not modify the unit (e.g. attach fittings to walls) or sublet it.</p>
          <p>You are responsible for the conduct of anyone you authorise to access your unit.</p>

          <h2 id="prohibited">7 · Prohibited items</h2>
          <p>You must not store:</p>
          <ul>
            <li>Hazardous, flammable, explosive or toxic materials</li>
            <li>Illegal items</li>
            <li>Perishable goods, food or anything that may attract pests</li>
            <li>Live animals</li>
            <li>Currency, bullion or other negotiable instruments</li>
            <li>Anything for which you do not have legal ownership or authority to store</li>
          </ul>

          <h2 id="insurance">8 · Insurance</h2>
          <p>You are responsible for insuring your own goods. Storage Cartel insures the facility and its operations, not the contents of your unit. We can recommend insurance options on request.</p>

          <h2 id="liability-ag">9 · Liability</h2>
          <p>To the extent permitted by law, our liability is limited to direct losses caused by our negligence. We are not liable for indirect, consequential or business losses. Nothing in this agreement excludes any non-excludable rights you have under the Australian Consumer Law.</p>

          <h2 id="default">10 · Default and abandonment</h2>
          <p>If your account is in arrears for more than 14 days we may suspend access to your unit and add reasonable recovery costs to your account.</p>
          <p>If your account remains in arrears for 60 days and we are unable to reach you, the unit may be treated as abandoned. We will follow the procedures set out in applicable law before disposing of contents, and will always attempt to contact you first.</p>

          <h2 id="changes-ag">11 · Changes to fees</h2>
          <p>We may change the monthly fee with 60 days written notice to your account email. You may terminate this agreement before the change takes effect with no penalty.</p>

          <h2 id="law-ag">12 · Governing law</h2>
          <p>This agreement is governed by the laws of the State of Victoria, Australia. Any dispute will be heard in the courts of Victoria.</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(<AgreementPage />);
