// =============================================================================
// Astovia · Legal pages — Impressum & Privacy Policy (English)
// =============================================================================

const legalHeading = {
  fontFamily: 'var(--font-sans)',
  fontWeight: 400,
  fontSize: 13,
  letterSpacing: '0.12em',
  textTransform: 'uppercase',
  color: 'var(--bronze)',
  margin: '36px 0 10px'
};

const legalSubHeading = {
  fontFamily: 'var(--font-sans)',
  fontWeight: 600,
  fontSize: 16,
  color: 'var(--paper)',
  margin: '28px 0 8px',
  lineHeight: 1.4
};

const legalBody = {
  fontSize: 15,
  color: 'var(--paper-70)',
  lineHeight: 1.75,
  margin: '0 0 14px'
};

const legalRule = {
  border: 'none',
  borderTop: '1px solid var(--rule)',
  margin: '32px 0'
};

// -----------------------------------------------------------------------------
// Impressum (Legal Notice)
// -----------------------------------------------------------------------------
function ImpressumPage({ go }) {
  return (
    <main data-screen-label="Impressum">
      <section className="page-header" data-screen-label="Impressum header">
        <div className="container">
          <div className="two-col" style={{ alignItems: 'end' }}>
            <h1>Impressum<span className="serif-em">.</span></h1>
            <p className="lede">Legal notice pursuant to German law.</p>
          </div>
        </div>
      </section>

      <section className="section">
        <div className="container">
          <div style={{ maxWidth: 720 }}>

            <p style={legalBody}>
              Information pursuant to § 5 TMG (German Telemedia Act)
            </p>

            <hr style={legalRule} />

            <div style={legalHeading}>Company</div>
            <p style={legalBody}>
              <strong style={{ color: 'var(--paper)' }}>ASTOVIA Beratung GmbH</strong><br />
              Represented by: Alexander Stoll, Managing Director<br />
              Ostweg 5/1<br />
              72250 Freudenstadt<br />
              Germany
            </p>

            <hr style={legalRule} />

            <div style={legalHeading}>Contact</div>
            <p style={legalBody}>
              Phone: 0000000<br />
              Email: <a href="mailto:info@astovia.de" style={{ color: 'var(--bronze)' }}>info@astovia.de</a><br />
              Website: <a href="https://www.astovia.de" style={{ color: 'var(--bronze)' }}>www.astovia.de</a>
            </p>

            <hr style={legalRule} />

            <div style={legalHeading}>Commercial Register</div>
            <p style={legalBody}>
              Commercial Register B, Local Court Stuttgart<br />
              Registration Number: 0000000
            </p>

            <hr style={legalRule} />

            <div style={legalHeading}>VAT Identification</div>
            <p style={legalBody}>
              VAT identification number pursuant to § 27a UStG: [to be added upon issuance]
            </p>

            <hr style={legalRule} />

            <div style={legalHeading}>Responsible for Content</div>
            <p style={legalBody}>
              Pursuant to § 55 para. 2 RStV:<br />
              Alexander Stoll, address as above.
            </p>

          </div>
        </div>
      </section>
    </main>
  );
}

// -----------------------------------------------------------------------------
// Privacy Policy
// -----------------------------------------------------------------------------
function PrivacyPage({ go }) {
  return (
    <main data-screen-label="Privacy Policy">
      <section className="page-header" data-screen-label="Privacy header">
        <div className="container">
          <div className="two-col" style={{ alignItems: 'end' }}>
            <h1>Privacy Policy<span className="serif-em">.</span></h1>
            <p className="lede">How we handle your data — transparently and in accordance with GDPR.</p>
          </div>
        </div>
      </section>

      <section className="section">
        <div className="container">
          <div style={{ maxWidth: 720 }}>

            {/* 1 */}
            <div style={legalHeading}>1. Controller</div>
            <p style={legalBody}>
              <strong style={{ color: 'var(--paper)' }}>Alexander Stoll, ASTOVIA Beratung GmbH (in formation)</strong><br />
              Ostweg 5/1, 72250 Freudenstadt, Germany<br />
              Email: <a href="mailto:info@astovia.de" style={{ color: 'var(--bronze)' }}>info@astovia.de</a><br />
              Phone: 00000000
            </p>

            <hr style={legalRule} />

            {/* 2 */}
            <div style={legalHeading}>2. Access Data and Hosting</div>
            <p style={legalBody}>
              When you visit our website, technical information is automatically collected by our
              hosting provider — including your IP address, date and time of access, and browser
              type. This data is used solely for the technical operation and security of the website
              and is deleted after a maximum of 30 days.
            </p>
            <p style={{ ...legalBody }}>
              <strong style={{ color: 'var(--paper)' }}>Hosting provider:</strong><br />
              Our website is hosted by Hostinger International Ltd., 61 Lordou Vironos Street,
              Larnaca 6023, Cyprus. A Data Processing Agreement (DPA) is in place with Hostinger.
            </p>

            <hr style={legalRule} />

            {/* 3 */}
            <div style={legalHeading}>3. Contact</div>
            <p style={legalBody}>
              When you contact us via the contact form or by email, the information you provide
              is stored for the purpose of processing your enquiry and any follow-up communication.
              Your data will not be shared with third parties beyond what is described in this
              policy and will be deleted once your enquiry has been resolved.
            </p>

            <hr style={legalRule} />

            {/* 4 */}
            <div style={legalHeading}>4. Cookies and Web Analytics</div>
            <p style={legalBody}>
              Our website uses cookies — small text files stored on your device that contain
              certain information. They are used to ensure the functionality of the website,
              save your preferences, and analyse user behaviour.
            </p>

            <p style={legalSubHeading}>Types of cookies</p>
            <p style={legalBody}>
              <strong style={{ color: 'var(--paper)' }}>Technically necessary cookies:</strong> This website uses only technically necessary
              cookies required for its operation — for example, to ensure secure page delivery
              via our hosting provider. No analytics, tracking, or marketing cookies are used.
            </p>


            <hr style={legalRule} />

            {/* 5 */}
            <div style={legalHeading}>5. Contact Form</div>
            <p style={legalBody}>
              When you submit an enquiry via our contact form, the information you provide —
              including your first name, last name, and email address — is stored for the purpose
              of processing your request and any follow-up questions. This data will not be
              shared without your consent.
            </p>
            <p style={legalBody}>
              <strong style={{ color: 'var(--paper)' }}>Legal basis:</strong> Processing is based on our legitimate interest in responding
              to your enquiry (Art. 6(1)(f) GDPR). As a business contacting a professional
              services provider, both parties have a clear and mutual interest in the
              communication being processed and answered. This interest is not overridden by
              your rights and freedoms, given that data is used solely to respond to your
              message and is not shared or used for marketing purposes.
            </p>
            <p style={legalBody}>
              <strong style={{ color: 'var(--paper)' }}>Right to object:</strong> You have the right to object to processing based on
              legitimate interest at any time by contacting us at{' '}
              <a href="mailto:info@astovia.de" style={{ color: 'var(--bronze)' }}>info@astovia.de</a>.
              We will then cease processing your data unless we can demonstrate compelling
              legitimate grounds that override your interests.
            </p>
            <p style={legalBody}>
              <strong style={{ color: 'var(--paper)' }}>Retention period:</strong> Data submitted via the contact form will be retained
              only for as long as necessary to handle your enquiry and any related follow-up,
              after which it will be deleted.
            </p>

            <p style={legalSubHeading}>Form delivery via Web3Forms</p>
            <p style={legalBody}>
              Our contact form uses <strong style={{ color: 'var(--paper)' }}>Web3Forms</strong> to
              deliver your submission to us. Web3Forms acts as a data processor on our behalf,
              temporarily processing the data you enter — your first name, last name, email
              address, and message — solely for the purpose of forwarding it to our inbox.
              Web3Forms does not store your data beyond what is technically necessary for
              delivery and does not use it for any other purpose.
            </p>
            <p style={legalBody}>
              <strong style={{ color: 'var(--paper)' }}>Provider:</strong> Web3Forms —{' '}
              <a href="https://web3forms.com" target="_blank" rel="noopener noreferrer" style={{ color: 'var(--bronze)' }}>web3forms.com</a>
            </p>
            <p style={legalBody}>
              <strong style={{ color: 'var(--paper)' }}>Legal basis:</strong> Art. 6(1)(f) GDPR (legitimate interest in processing
              and responding to your enquiry). A Data Processing Agreement (DPA) is in place
              with Web3Forms in accordance with Art. 28 GDPR.
            </p>
            <p style={legalBody}>
              For more information on Web3Forms' data handling practices, please refer to
              their privacy policy:{' '}
              <a href="https://web3forms.com/privacy" target="_blank" rel="noopener noreferrer" style={{ color: 'var(--bronze)' }}>
                web3forms.com/privacy
              </a>
            </p>

            <hr style={legalRule} />

            {/* 6 */}
            <div style={legalHeading}>6. Social Media — LinkedIn</div>
            <p style={legalBody}>
              Our website contains a link to our LinkedIn page. Clicking this link will redirect
              you to LinkedIn, where LinkedIn's own privacy policy applies.
            </p>
            <p style={legalBody}>
              <strong style={{ color: 'var(--paper)' }}>Provider:</strong> LinkedIn Ireland Unlimited Company, Wilton Place, Dublin 2, Ireland.
            </p>
            <p style={legalBody}>
              Please note that LinkedIn may collect personal data once you visit their platform.
              We have no influence over LinkedIn's data processing practices. For more information,
              see:{' '}
              <a href="https://www.linkedin.com/legal/privacy-policy" target="_blank" rel="noopener noreferrer" style={{ color: 'var(--bronze)' }}>
                linkedin.com/legal/privacy-policy
              </a>
            </p>

            <hr style={legalRule} />

            {/* 7 */}
            <div style={legalHeading}>7. Your Rights</div>
            <p style={legalBody}>
              You have the right to access, rectification, erasure, restriction of processing,
              data portability, and objection regarding your personal data. If you have questions
              or complaints, you may contact the relevant data protection supervisory authority.
            </p>

            <hr style={legalRule} />

            {/* 8 */}
            <div style={legalHeading}>8. Changes to This Privacy Policy</div>
            <p style={legalBody}>
              We reserve the right to update this Privacy Policy as necessary. The current
              version is always available on our website.
            </p>

          </div>
        </div>
      </section>
    </main>
  );
}

Object.assign(window, { ImpressumPage, PrivacyPage });
