const { Eyebrow, Divider, Icon } = window.SolasEyeDesignSystem_10f8ce;

const UPDATED = '3 October 2026';

/* ---------- Document primitives ---------- */

function Clause({ n, title, children, light }) {
  return (
    <section style={{ marginTop: 'var(--space-9)', scrollMarginTop: '96px' }} id={`s${n}`}>
      <div style={{ display: 'flex', alignItems: 'baseline', gap: 'var(--space-4)' }}>
        <span style={{ fontFamily: 'var(--font-body)', fontSize: 'var(--type-caption-size)', letterSpacing: 'var(--tracking-wider)', fontWeight: 600, color: light ? 'var(--amber-ink)' : 'var(--text-accent)' }}>{String(n).padStart(2, '0')}</span>
        <h2 style={{ fontSize: 'var(--type-h3-size)', margin: 0, letterSpacing: '.03em' }}>{title}</h2>
      </div>
      <div style={{ marginTop: 'var(--space-5)', display: 'grid', gap: 'var(--space-4)' }}>{children}</div>
    </section>
  );
}

function P({ children }) {
  return <p style={{ margin: 0, fontSize: 'var(--type-body-size)', lineHeight: 1.85, color: 'var(--text-body)' }}>{children}</p>;
}

function Sub({ children }) {
  return <h3 style={{ margin: 'var(--space-4) 0 0', fontFamily: 'var(--font-body)', fontSize: 'var(--type-caption-size)', letterSpacing: 'var(--tracking-wider)', textTransform: 'uppercase', fontWeight: 600, color: 'var(--text-secondary)' }}>{children}</h3>;
}

function List({ items }) {
  return (
    <ul style={{ listStyle: 'none', margin: 0, padding: 0, display: 'grid', gap: 'var(--space-3)' }}>
      {items.map((it, i) => (
        <li key={i} style={{ display: 'grid', gridTemplateColumns: '14px 1fr', gap: 'var(--space-3)', fontSize: 'var(--type-body-size)', lineHeight: 1.8, color: 'var(--text-body)' }}>
          <span style={{ color: 'var(--text-accent)' }}>·</span><span>{it}</span>
        </li>
      ))}
    </ul>
  );
}

function Note({ children, light }) {
  return (
    <div style={{ padding: 'var(--space-5)', border: `1px solid ${light ? 'rgba(122,85,39,.42)' : 'var(--line-accent)'}`, background: light ? 'rgba(201,149,85,.10)' : 'var(--amber-04)', display: 'grid', gap: 'var(--space-3)' }}>
      {children}
    </div>
  );
}

/* Tables scroll rather than crush on narrow screens. */
function PolicyTable({ head, rows, light }) {
  const line = light ? 'rgba(8,9,16,.16)' : 'var(--line-hairline)';
  return (
    <div style={{ overflowX: 'auto', marginTop: 'var(--space-3)' }}>
      <table style={{ width: '100%', minWidth: head.length > 2 ? 720 : 520, borderCollapse: 'collapse', textAlign: 'left' }}>
        <thead>
          <tr>
            {head.map(h => (
              <th key={h} style={{ padding: 'var(--space-4) var(--space-4) var(--space-3) 0', borderBottom: `1px solid ${light ? 'rgba(122,85,39,.42)' : 'var(--line-accent)'}`, fontFamily: 'var(--font-body)', fontSize: 'var(--type-caption-size)', letterSpacing: 'var(--tracking-wider)', textTransform: 'uppercase', fontWeight: 600, color: light ? 'var(--amber-ink)' : 'var(--text-accent)', verticalAlign: 'bottom' }}>{h}</th>
            ))}
          </tr>
        </thead>
        <tbody>
          {rows.map((r, i) => (
            <tr key={i}>
              {r.map((c, j) => (
                <td key={j} style={{ padding: 'var(--space-5) var(--space-5) var(--space-5) 0', borderBottom: `1px solid ${line}`, fontSize: 'var(--type-small-size)', lineHeight: 1.75, color: j === 0 ? 'var(--text-display)' : 'var(--text-body)', verticalAlign: 'top', width: j === 0 && head.length === 2 ? '42%' : undefined }}>{c}</td>
              ))}
            </tr>
          ))}
        </tbody>
      </table>
    </div>
  );
}

/* ---------- Content ---------- */

const LAWFUL_BASES = [
  ['Respond to enquiries and take requested steps before a booking', 'Contact details and enquiry content', 'Article 6(1)(b): steps at your request before entering a contract. For general enquiries not connected with a prospective booking, Article 6(1)(f): our legitimate interest in responding.'],
  ['Arrange and provide sessions or workshops, communicate about attendance, and manage cancellations', 'Contact, booking, attendance and correspondence data', 'Article 6(1)(b): performance of a contract or steps taken at your request.'],
  ['Receive, reconcile and document payments', 'Payment confirmation and transaction records', 'Article 6(1)(b): performance of a contract; Article 6(1)(c): tax, accounting and other legal obligations.'],
  ['Operate, protect and troubleshoot the website and prevent misuse', 'Technical, security and usage information', 'Article 6(1)(f): our legitimate interests in providing a secure, reliable website and protecting the business and users.'],
  ['Use optional analytics, preference or marketing technologies', 'Cookie identifiers and website interaction data', 'Article 6(1)(a): consent, together with applicable Irish ePrivacy requirements. Non-essential technologies will not be used before consent where consent is required.'],
  ['Send electronic marketing, if offered', 'Name, email address and marketing preferences', 'Article 6(1)(a): consent. Any marketing sign-up must be separate and optional.'],
  ['Establish, exercise or defend legal claims and comply with lawful requests', 'Relevant contact, booking, payment and correspondence records', 'Article 6(1)(f): legitimate interests in protecting legal rights; or Article 6(1)(c): legal obligation, as applicable.'],
  ['Process necessary health information collected separately', 'Minimum health-related information required for the service', 'Article 6(1)(a) and Article 9(2)(a): explicit consent, unless another lawful basis and Article 9 condition are identified and documented.']
];

const RETENTION = [
  ['Enquiries that do not lead to a booking', 'Up to 12 months after the last substantive contact.'],
  ['Booking, attendance and service correspondence', 'Up to 24 months after the session or workshop, unless needed for an ongoing matter, complaint or legal claim.'],
  ['Invoices, receipts and payment or accounting records', 'Generally six years after the end of the relevant accounting period, or longer where applicable law requires.'],
  ['Marketing consent and contact details', 'Until consent is withdrawn or the marketing activity ends. We may retain minimal suppression information to respect an opt-out.'],
  ['Website and security logs', 'According to the relevant provider’s documented retention settings and only for as long as needed for security, diagnostics or consented analytics.'],
  ['Health information collected separately', 'For the shortest documented period necessary for the relevant service and any applicable legal requirement; the specific period will be communicated when collected.']
];

function Page() {
  return (
    <React.Fragment>
      <Header />
      <main id="main">
        <Section backdrop="atlantic" pattern="soft" patternScale={560} width="var(--container-text)"
          eyebrow="Privacy policy" heading="How your information is handled" level={1} pad="var(--space-9)"
          lead="This policy explains how we collect, use, disclose and protect personal data when you visit this website, contact us, enquire about or book a healing session or workshop, or use an external payment link.">
          <p style={{ marginTop: 'var(--space-6)', fontFamily: 'var(--font-body)', fontSize: 'var(--type-caption-size)', letterSpacing: 'var(--tracking-wide)', textTransform: 'uppercase', color: 'var(--text-muted)' }}>Last updated {UPDATED}</p>
        </Section>

        <Section backdrop="tide" pattern="subtle" patternScale={420} width="var(--container-text)" pad="var(--space-7)">
          <Clause n={1} title="Who we are">
            <P>In this policy, “we”, “us” and “our” refer to the data controller identified below.</P>
            <PolicyTable head={['Detail', 'Value']} rows={[
              ['Legal name', 'SolasEye'],
              ['Trading as', 'SolasEye'],
              ['Website', <a key="w" href="https://solaseye.com">solaseye.com</a>],
              ['Correspondence address', '1 Coolkellure Lawn, Lehenaghmore, Cork, Ireland'],
              ['Privacy email', <a key="e" href="mailto:privacy@solaseye.com">privacy@solaseye.com</a>]
            ]} />
          </Clause>

          <Clause n={2} title="Personal data we collect">
            <Sub>Information you provide</Sub>
            <P>Depending on how you interact with us, we may collect:</P>
            <List items={[
              'your name and contact details, such as your email address and telephone number;',
              'the service or workshop you are interested in, preferred dates and the content of your enquiry;',
              'booking, attendance, cancellation and service-related correspondence;',
              'payment confirmation information made available to us by the payment provider, such as the payer name, amount, date, transaction reference and payment status; and',
              'any other information you choose to provide in correspondence with us.'
            ]} />
            <Sub>Website and device information</Sub>
            <P>When you use the website, our hosting platform and any technologies enabled on the site may process technical information such as your IP address, browser and device type, operating system, pages viewed, referral source, approximate location, timestamps, interaction data and security or diagnostic logs. Some of this information is collected using cookies or similar technologies. See section 8.</P>
            <Sub>Health and other sensitive information</Sub>
            <Note>
              <p style={{ margin: 0, fontSize: 'var(--type-body-size)', lineHeight: 1.8, color: 'var(--text-display)' }}><strong style={{ fontWeight: 600, color: 'var(--text-accent)' }}>Please do not submit health information through the general contact form. </strong>The form is intended for ordinary enquiries and booking information only. Do not include medical diagnoses, treatment details or other sensitive information unless we specifically request it through a separate, appropriate process.</p>
            </Note>
            <P>If information concerning health or another special category of personal data is genuinely necessary for a particular service, we will collect it separately, explain why it is needed and, where required, ask for your explicit consent under Article 9(2)(a) GDPR. We will collect only the minimum information needed. You may withdraw consent at any time, although this may affect our ability to provide a service that genuinely requires that information.</P>
          </Clause>

          <Clause n={3} title="How and why we use personal data">
            <P>We process personal data only where we have a lawful basis. The principal purposes and lawful bases are set out below.</P>
            <PolicyTable head={['Purpose', 'Personal data', 'Lawful basis']} rows={LAWFUL_BASES} />
            <P>Where we rely on legitimate interests, we consider the necessity of the processing and balance our interests against your rights and reasonable expectations. You may object to processing based on legitimate interests; see section 11.</P>
          </Clause>

          <Clause n={4} title="Contact forms and enquiries">
            <P>When you submit the contact form, the information you enter is transmitted through our hosting platform and made available to us so that we can respond. Fields marked as required are necessary for us to process the enquiry. If you do not provide them, we may be unable to respond or arrange the requested service.</P>
            <P>Submitting an enquiry does not subscribe you to marketing. If we later offer a newsletter or promotional messages, we will provide a separate, unticked opt-in and an easy way to withdraw consent.</P>
          </Clause>

          <Clause n={5} title="Bookings, workshops and communications">
            <P>We use booking and attendance information to reserve places, prepare and deliver the requested session or workshop, communicate practical arrangements, manage changes or cancellations and respond to service-related questions. Service messages are not marketing messages.</P>
            <P>If you provide information about another person, you must have authority to do so and should make this policy available to them.</P>
          </Clause>

          <Clause n={6} title="Payments and external payment links">
            <P>Payments are completed on the website or app of an external payment provider. When you follow a payment link, that provider collects and processes payment and account information under its own privacy notice and terms. We do not receive or store your full payment-card number, security code, online-banking credentials or other payment authentication details.</P>
            <P>We may receive limited transaction information needed to identify the payment, fulfil the booking, issue receipts, reconcile accounts, manage refunds or disputes and comply with tax and accounting obligations.</P>
            <P>The current payment provider is PayPal (Europe) S.à r.l. et Cie, S.C.A., which acts as an independent controller for the data it collects for its payment services. PayPal’s secure checkout is embedded in this website and is loaded only when you open a payment panel; at that point PayPal may set its own cookies and collect device information needed to process the payment and prevent fraud. Card and account details are entered directly into PayPal’s secure fields and are never seen or stored by us. You should review the <a href="https://www.paypal.com/ie/legalhub/paypal/privacy-full" rel="noopener noreferrer" target="_blank">PayPal Privacy Statement</a> before completing payment.</P>
          </Clause>

          <Clause n={7} title="Who receives personal data">
            <P>We do not sell personal data. We may disclose it only as reasonably necessary to:</P>
            <List items={[
              'our website hosting platform, which hosts the website and processes website, form and related information. It generally acts as our processor for information we control, and may also act as an independent controller for limited usage and security information processed for its own purposes;',
              'Google, where Google Business Profile, Google Workspace, Google Analytics, Google Maps or another Google service is actually enabled. Google may act as our processor or as an independent controller depending on the service;',
              'PayPal or another external payment provider, which processes payment information under its own privacy terms;',
              'professional advisers and service providers such as accountants, legal advisers or IT support, where necessary and subject to appropriate confidentiality and data-protection obligations; and',
              'courts, regulators, law-enforcement bodies, Revenue or other public authorities where disclosure is required or permitted by law.'
            ]} />
            <P>Links to third-party sites are provided for convenience. Their privacy practices are governed by their own notices, not this policy.</P>
          </Clause>

          <Clause n={8} title="Cookies and similar technologies">
            <P>The website may use cookies and similar technologies. Strictly necessary technologies may be used without consent where they are required to provide a service requested by you, secure the website or remember privacy choices. Analytics, advertising and other non-essential technologies will be used only after consent where consent is required.</P>
        <P>This website uses one optional technology: the Google Ads tag (gtag.js, provided by Google Ireland Limited), which sets advertising cookies such as _gcl_au so we can measure how visitors reach the site through our Google ads and whether they go on to make an enquiry. It is loaded only after you select Accept in the cookie banner. If you select Reject, or make no choice, it is not loaded and no advertising cookies are set.</P>
        <P>We also use Vercel Web Analytics (provided by our hosting platform, Vercel Inc.) to count page views and see which pages are visited, the referring site, and the visitor&apos;s country, browser and device type. It sets no cookies and stores nothing on your device. Visitors are counted using an anonymised identifier that is discarded every 24 hours, so it cannot be used to recognise you across days or other websites. We use it on the basis of our legitimate interest in understanding how the website is used, and it does not require cookie consent.</P>
        <P>Your choice is remembered in your browser&apos;s local storage under the name se-cookie-consent. This is strictly necessary to respect your decision and is not shared with anyone. You can change or withdraw your consent at any time using the Cookie settings link in the footer of every page; withdrawing consent stops the tag and removes the cookies it set on this site.</P>
        <P>If other analytics, embedded media, maps, social feeds, scheduling or advertising technologies are added later, they will also be presented in the consent banner before they load, and this section will be updated to list them.</P>
          </Clause>

          <Clause n={9} title="International transfers">
            <P>Some service providers or their subprocessors may process personal data outside Ireland or the European Economic Area. Where GDPR requires safeguards for such transfers, we rely on an adequacy decision, approved Standard Contractual Clauses or another lawful transfer mechanism, together with additional safeguards where appropriate.</P>
          </Clause>

          <Clause n={10} title="How long we keep personal data">
            <P>We keep personal data only for as long as reasonably necessary for the purpose for which it was collected and to meet legal, accounting and dispute-resolution requirements. Unless a longer period is required or justified, our intended retention periods are:</P>
            <PolicyTable head={['Record', 'Intended retention period']} rows={RETENTION} />
            <P>We may retain information for longer where reasonably necessary to establish, exercise or defend legal claims, respond to a complaint, comply with a legal hold or meet another documented legal obligation. When retention is no longer justified, information will be deleted or anonymised.</P>
          </Clause>
        </Section>

        <Section backdrop="bone" pattern="subtle" patternScale={400} tone="light" width="var(--container-text)" pad="var(--space-7)">
          <Clause n={11} title="Your data-protection rights" light>
            <P>Subject to the conditions and exceptions in applicable law, you may have the right to:</P>
            <List items={[
              'obtain confirmation that we process your personal data and request access to it;',
              'ask us to correct inaccurate or incomplete personal data;',
              'ask us to erase personal data;',
              'ask us to restrict processing;',
              'receive certain personal data in a portable format and transmit it to another controller;',
              'object to processing based on legitimate interests or to direct marketing;',
              'withdraw consent at any time, without affecting the lawfulness of processing before withdrawal; and',
              'lodge a complaint with the Data Protection Commission or another competent supervisory authority.'
            ]} />
            <P>To exercise a right, contact us using the privacy email in section 1. We may need to verify your identity. We will respond within the period required by law. Rights are not absolute, and we will explain any lawful reason for not fully complying with a request.</P>
            <Note light>
              <p style={{ margin: 0, fontSize: 'var(--type-small-size)', lineHeight: 1.8, color: 'var(--text-body)' }}>You may contact the Irish Data Protection Commission at <a href="https://www.dataprotection.ie" rel="noopener noreferrer" target="_blank">dataprotection.ie</a>. You may also complain to the supervisory authority in the EU or EEA country where you live, work or believe an infringement occurred.</p>
            </Note>
          </Clause>
        </Section>

        <Section backdrop="dawn" pattern="soft" patternScale={340} width="var(--container-text)" pad="var(--space-7)">
          <Clause n={12} title="Security">
            <P>We use reasonable technical and organisational measures appropriate to the nature of the personal data and the risks involved. These may include access controls, account protection, software and service-provider security measures, secure communications and limiting access to those who need the information. No online transmission or storage system is completely secure, so absolute security cannot be guaranteed.</P>
          </Clause>

          <Clause n={13} title="Automated decisions">
            <P>We do not use personal data to make decisions based solely on automated processing that produce legal or similarly significant effects, and we do not profile visitors for this purpose.</P>
          </Clause>

          <Clause n={14} title="Children’s data">
            <P>The general website contact form is not intended for children to submit personal data independently. A parent or legal guardian should contact us before providing information about a person under 18 or booking a service for them. Where services are offered to children, we use an age-appropriate process and obtain any consent or authorisation required by law.</P>
          </Clause>

          <Clause n={15} title="Changes to this policy">
            <P>We may update this policy when our services, website technologies, providers or legal obligations change. The current version is published here with its “last updated” date. We will draw attention to material changes where appropriate.</P>
          </Clause>

          <Clause n={16} title="Contact us">
            <P>Questions, requests or concerns about this policy or our use of personal data should be sent to:</P>
            <PolicyTable head={['Channel', 'Detail']} rows={[
              ['Email', <a key="e" href="mailto:privacy@solaseye.com">privacy@solaseye.com</a>],
              ['Post', 'SolasEye, 1 Coolkellure Lawn, Lehenaghmore, Cork, Ireland']
            ]} />
          </Clause>

          <Divider variant="glow" spacing="var(--space-8)" />
          <p style={{ margin: 0, fontSize: 'var(--type-caption-size)', lineHeight: 1.8, color: 'var(--text-muted)' }}>
            SolasEye services are spiritual and energetic wellbeing practices. They do not diagnose, treat or cure medical or psychological conditions. See also the <a href="workshops.html#policies">cancellation and deposit policy</a>.
          </p>
        </Section>
      </main>
      <Footer />
    </React.Fragment>
  );
}

ReactDOM.createRoot(document.getElementById('root')).render(<Page />);
