// legal.jsx — Privacy, Terms, Cookies pages

const LegalPage = ({ eyebrow, title, updated, children }) => (
  <article className="legal wrap">
    <div className="legal__head">
      <span className="eyebrow">{eyebrow}</span>
      <h1 className="legal__title">{title}</h1>
      <div className="legal__updated">Last updated · {updated}</div>
    </div>
    <div className="legal__prose">
      {children}
    </div>
  </article>
);

const PrivacyPage = () => (
  <LegalPage eyebrow="N° 07 · Legal" title="Privacy." updated="27 May 2026">
    <h2>Who we are</h2>
    <p>Serendria Private Limited is a travel-design studio registered in Sri Lanka, with offices at No. 117/01, Kottawa, Pannipitiya. In this policy, "we", "us", and "our" refer to Serendria Private Limited. You can reach us at <a href="mailto:hello@serendria.com">hello@serendria.com</a> or <a href="tel:+94773106248">+94 77 310 6248</a>.</p>

    <h2>What we collect</h2>
    <p>When you submit an enquiry through this site, we ask you to share:</p>
    <ul>
      <li>Your full name</li>
      <li>Your email address</li>
      <li>Your country of residence</li>
      <li>The number of travellers and your approximate dates</li>
      <li>A budget range and a list of interests</li>
      <li>Any further notes you choose to add</li>
    </ul>
    <p>Our web server also keeps short-term logs of standard request data — your IP address, the time of the request, and your browser's user agent — for security and operational reasons. We do not currently set any cookies on your device.</p>

    <h2>Why we collect it</h2>
    <p>We collect this information for one purpose: to answer your enquiry well. We use what you tell us to design a thoughtful proposal, to coordinate with the hotels and ground operators who will host you, and — should you choose to travel with us — to make the practical arrangements of your trip.</p>
    <p>We do not use your information for advertising. We do not sell, rent, or trade enquiry data.</p>

    <h2>Who we share it with</h2>
    <p>To plan and operate a journey, we share relevant parts of your details with a small number of trusted parties:</p>
    <ul>
      <li><strong>Hotels and resort partners</strong> — names, dates, traveller count, and any preferences (dietary, accessibility, occasion) relevant to your stay.</li>
      <li><strong>Ground operators</strong> — drivers, naturalists, and cultural guides who need to know who is travelling, when, and where.</li>
      <li><strong>Payment processors</strong> — only if and when a booking proceeds; payment details are handled by a regulated processor and never stored on this website.</li>
      <li><strong>Our email service provider</strong> — the inbox at <a href="mailto:hello@serendria.com">hello@serendria.com</a> is hosted by a third-party email provider, which means your message passes through their infrastructure under their own privacy terms.</li>
    </ul>
    <p>We share only what is needed and only with parties who need it. We do not pass your details to anyone else without your consent, unless required by law.</p>

    <h2>How long we keep it</h2>
    <p>Enquiries that do not progress to a booking: we keep these for up to 24 months in case you write again — most of our guests take time to plan. Bookings: we keep records for the duration of the trip and for seven years after, as required for tax, audit, and consumer-protection reasons under Sri Lankan law.</p>
    <p>You can ask us to delete your data sooner; we will do so unless we are legally required to retain it.</p>

    <h2>Your rights</h2>
    <p>Whether you are in Sri Lanka or writing from abroad, you can ask us to:</p>
    <ul>
      <li>Tell you what personal data we hold about you</li>
      <li>Send you a copy of that data in a readable format</li>
      <li>Correct anything that's wrong</li>
      <li>Delete it (subject to legal retention obligations)</li>
      <li>Stop a particular use, or restrict it</li>
      <li>Help you lodge a complaint with the Data Protection Authority of Sri Lanka, or with the data-protection regulator in your country of residence</li>
    </ul>
    <p>Your formal statutory entitlement to each of these depends on the law of your country of residence; where local law gives you more, we will follow that. To make a request, email <a href="mailto:hello@serendria.com">hello@serendria.com</a>. We aim to respond within one working week and, at the latest, within 30 days.</p>

    <h2>Security</h2>
    <p>This site is served over HTTPS. Enquiry data is read by a small team and stored in standard business systems with access limited to those who need it. We do not handle payment card details directly on the website — those go through a regulated processor when you book.</p>

    <h2>Children</h2>
    <p>Our service is intended for adults arranging travel, including family travel. We do not knowingly collect personal data from children directly. If you believe a child has submitted a form, please write to us and we will delete the entry.</p>

    <h2>Changes to this policy</h2>
    <p>We may update this policy from time to time. The "Last updated" date at the top of this page always reflects the current version. For material changes, we will flag the update at the top of the page for at least 60 days.</p>

    <h2>Legal basis and jurisdiction</h2>
    <p>This policy is anchored in the Sri Lanka Personal Data Protection Act, No. 9 of 2022. The rights described above are written in plain language for international travellers and apply regardless of where you live; depending on your jurisdiction, you may have additional rights under your local law, and we will honour those in good faith.</p>

    <h2>Contact</h2>
    <p>Questions, requests, complaints — all welcome.</p>
    <address>
      Serendria Private Limited<br />
      No. 117/01, Kottawa, Pannipitiya<br />
      Sri Lanka<br />
      <a href="mailto:hello@serendria.com">hello@serendria.com</a> · <a href="tel:+94773106248">+94 77 310 6248</a>
    </address>
  </LegalPage>
);

const TermsPage = () => (
  <LegalPage eyebrow="N° 08 · Legal" title="Terms." updated="27 May 2026">
    <h2>Who we are</h2>
    <p>Serendria Private Limited is a travel-design studio registered in Sri Lanka, with offices at No. 117/01, Kottawa, Pannipitiya. In these terms, "we", "us", and "our" mean Serendria; "you" means the person submitting an enquiry or making a booking with us.</p>

    <h2>What this site is</h2>
    <p>This website is an information and enquiry service. Browsing the site, reading our journals, or submitting an enquiry does not create a confirmed booking, a contract, or a guarantee of availability.</p>

    <h2>Enquiries and proposals</h2>
    <p>When you submit an enquiry, we will write back, personally, within two working days. Our reply is an indicative proposal — a starting point for a conversation. A booking only becomes a contract once a written booking agreement has been countersigned by both sides and we have received the agreed deposit.</p>

    <h2>Pricing</h2>
    <p>All prices shown on this site are indicative, quoted in United States dollars, per traveller, and based on shared occupancy unless otherwise stated. They exclude international flights, visas, travel insurance, personal expenses, and discretionary tips — unless we have explicitly told you otherwise in writing. Prices can change at any time until a booking is confirmed; once confirmed, the price is fixed in the booking agreement.</p>

    <h2>Third-party suppliers</h2>
    <p>We are a designer and coordinator. The hotels, resorts, drivers, naturalists, cultural guides, and other suppliers who deliver elements of your journey are independent businesses, each with their own terms and conditions. We select our partners carefully and have worked with most of them for years — but they are not our employees, and we cannot accept liability for their independent acts or omissions beyond what local consumer-protection law requires.</p>

    <h2>Force majeure</h2>
    <p>Trips can sometimes be disrupted by events outside anyone's control — severe weather, civil unrest, public-health emergencies, government action, infrastructure failure, and the like. If something of that nature affects your booking, we will work with you and our partners to rearrange, postpone, or refund the affected elements in line with the specific terms of your booking agreement. Compensation beyond those terms is not guaranteed.</p>

    <h2>Liability</h2>
    <p>We take reasonable care in designing your journey and selecting the suppliers who deliver it. Nothing in these terms excludes or limits our liability for death or personal injury caused by our negligence, for fraud, or for anything else where exclusion is prohibited by law.</p>
    <p>Subject to that, our total liability for any claim arising out of or in connection with a booking is limited to the total amount you paid us for that booking.</p>

    <h2>Intellectual property</h2>
    <p>The text and design of this site are © 2026 Serendria Private Limited. Photography and illustrations are sourced from royalty-free image libraries — primarily <a href="https://www.pexels.com" target="_blank" rel="noopener noreferrer">Pexels</a>, <a href="https://pixabay.com" target="_blank" rel="noopener noreferrer">Pixabay</a>, and <a href="https://unsplash.com" target="_blank" rel="noopener noreferrer">Unsplash</a> — and used under those services' free-use licences; the underlying images remain the property of their respective photographers and contributors.</p>
    <p>Itineraries and proposals we send you by email are for your personal use in planning a journey with us; please don't republish them or share them with competing operators.</p>

    <h2>Privacy</h2>
    <p>How we handle your personal data is set out in our <a href="/privacy" onClick={(e) => { e.preventDefault(); window.__nav('privacy'); }}>Privacy Policy</a>.</p>

    <h2>Governing law</h2>
    <p>These terms are governed by the laws of the Democratic Socialist Republic of Sri Lanka. Any dispute arising out of or in connection with these terms — or with a journey designed by us — will be subject to the exclusive jurisdiction of the courts of Colombo, unless a different forum is required by mandatory consumer-protection law in your country of residence.</p>

    <h2>Changes to these terms</h2>
    <p>We may update these terms from time to time. The "Last updated" date at the top of this page reflects the current version. For material changes, we will flag the update at the top of the page for at least 60 days. Terms in force at the time of your booking are the ones that govern that booking.</p>

    <h2>Contact</h2>
    <p>Questions about these terms — write to <a href="mailto:hello@serendria.com">hello@serendria.com</a>.</p>
  </LegalPage>
);

const CookiesPage = () => (
  <LegalPage eyebrow="N° 09 · Legal" title="Cookies." updated="27 May 2026">
    <h2>The short version</h2>
    <p>We do not currently use tracking, advertising, or analytics cookies on this site. We do not set cookies of any kind at this time. There is nothing for you to accept or reject.</p>

    <h2>What we set today</h2>
    <p>Nothing. The site is a static page served over HTTPS and does not write to your cookie store. If you have visited Serendria before, your browser may have remembered some display preferences locally (for example, your chosen colour theme) — these are kept in your browser's local storage, never sent to us, and you can clear them at any time from your browser settings.</p>

    <h2>Third parties on the page</h2>
    <p>Our typography is loaded from Google Fonts. Loading a font file means your browser makes a request to <strong>fonts.googleapis.com</strong> and <strong>fonts.gstatic.com</strong>, which lets Google see your IP address and the page you are viewing. In our current configuration, those requests do not set cookies on your device. If this concerns you, browser extensions such as uBlock Origin or Privacy Badger can block them; the site will fall back to your system serif.</p>
    <p>The site also loads the React framework and Babel from <strong>unpkg.com</strong> (a Cloudflare-backed content delivery network), which similarly sees your IP address and browser headers but does not set cookies in this configuration.</p>
    <p>We do not embed any analytics, social-media, advertising, or chat widgets on the site.</p>

    <h2>What may change</h2>
    <p>If we later add analytics (to understand how the site is used), embedded video, or any other feature that requires non-essential cookies, we will update this page <strong>before</strong> those cookies are set and add a consent mechanism so you can choose. We'd rather under-promise here than surprise you later.</p>

    <h2>Controlling cookies in your browser</h2>
    <p>Every modern browser lets you see, block, and delete cookies — usually under Settings → Privacy. The site <a href="https://www.aboutcookies.org" target="_blank" rel="noopener noreferrer">aboutcookies.org</a> has clear instructions for each major browser.</p>

    <h2>Contact</h2>
    <p>Questions about cookies or tracking — write to <a href="mailto:hello@serendria.com">hello@serendria.com</a>.</p>
  </LegalPage>
);

Object.assign(window, { PrivacyPage, TermsPage, CookiesPage });
