// LegalPages.jsx — Terms of Service, Privacy Policy (website), EULA, Cookie Banner

// ── Shared legal‑page styles ─────────────────────────────────────────────────
const legalPageStyles = {
  wrap: (mobile) => ({ maxWidth: 720, margin: '0 auto', padding: mobile ? '48px 20px 64px' : '80px 32px 96px' }),
  eyebrow: { fontFamily: 'var(--font-mono)', fontSize: 11, color: 'var(--brand)', letterSpacing: '0.08em', textTransform: 'uppercase', marginBottom: 16 },
  h1: (mobile) => ({ fontFamily: 'var(--font-sans)', fontSize: mobile ? 28 : 40, fontWeight: 600, color: 'var(--fg-1)', letterSpacing: '-0.02em', lineHeight: 1.15, marginBottom: 8 }),
  meta: { fontFamily: 'var(--font-sans)', fontSize: 13, color: 'var(--fg-4)', marginBottom: 32 },
  h2: (mobile) => ({ fontFamily: 'var(--font-sans)', fontSize: mobile ? 17 : 20, fontWeight: 600, color: 'var(--fg-1)', letterSpacing: '-0.01em', marginBottom: 10, marginTop: 36 }),
  h3: { fontFamily: 'var(--font-sans)', fontSize: 15, fontWeight: 600, color: 'var(--fg-2)', marginBottom: 8, marginTop: 24 },
  p: { fontFamily: 'var(--font-sans)', fontSize: 14, color: 'var(--fg-3)', lineHeight: 1.7, marginBottom: 14 },
  li: { fontFamily: 'var(--font-sans)', fontSize: 14, color: 'var(--fg-3)', lineHeight: 1.65, marginBottom: 6 },
  ul: { paddingLeft: 20, marginBottom: 16 },
  a: { color: 'var(--brand)', textDecoration: 'none', borderBottom: '1px solid var(--brand-subtle)' },
  table: { width: '100%', borderCollapse: 'collapse', marginBottom: 16, fontSize: 13 },
  th: { fontFamily: 'var(--font-sans)', fontSize: 12, fontWeight: 600, color: 'var(--fg-2)', textAlign: 'left', padding: '8px 10px', borderBottom: '2px solid var(--border)', background: 'var(--bg-section)' },
  td: { fontFamily: 'var(--font-sans)', fontSize: 13, color: 'var(--fg-3)', padding: '8px 10px', borderBottom: '1px solid var(--border)', lineHeight: 1.5, verticalAlign: 'top' },
};


// ══════════════════════════════════════════════════════════════════════════════
//  TERMS OF SERVICE
// ══════════════════════════════════════════════════════════════════════════════
const TermsPage = ({ lang }) => {
  const mobile = window.useIsMobile(768);
  const S = legalPageStyles;

  return (
    <div style={S.wrap(mobile)}>
      <div style={S.eyebrow}>Legal</div>
      <h1 style={S.h1(mobile)}>Terms of Service</h1>
      <p style={S.meta}>Version 1.0 · Effective date: 16 June 2026 · strato-bim.com</p>

      <h2 style={S.h2(mobile)}>1. Acceptance of Terms</h2>
      <p style={S.p}>By accessing or using the StratoBIM website at strato-bim.com (the "Website"), you agree to be bound by these Terms of Service ("Terms"). If you do not agree to these Terms, do not use the Website.</p>
      <p style={S.p}>These Terms govern your use of the Website only. Each StratoBIM software product is governed by its own End-User License Agreement ("EULA") and product-specific Privacy Policy.</p>

      <h2 style={S.h2(mobile)}>2. Description of the Website</h2>
      <p style={S.p}>StratoBIM develops and publishes productivity add-ins for Autodesk Revit. The Website provides:</p>
      <ul style={S.ul}>
        <li style={S.li}>Information about StratoBIM products</li>
        <li style={S.li}>Links to product listings on the Autodesk App Store / Design and Make Marketplace</li>
        <li style={S.li}>Product documentation, release notes, and support resources</li>
        <li style={S.li}>Contact information for support and business inquiries</li>
      </ul>
      <p style={S.p}>The Website does not directly sell software. Purchases, subscriptions, trials, downloads, and entitlement handling are processed through Autodesk's marketplace and are subject to Autodesk's own terms, policies, and workflows.</p>

      <h2 style={S.h2(mobile)}>3. Eligibility</h2>
      <p style={S.p}>You must be at least 18 years of age, or the age of majority in your jurisdiction if higher, to use the Website or obtain StratoBIM products through linked services. By using the Website, you represent and warrant that you meet this requirement.</p>

      <h2 style={S.h2(mobile)}>4. Intellectual Property</h2>
      <p style={S.p}>All content on the Website, including text, graphics, logos, icons, screenshots, documentation, page design, and other materials, is owned by Zak Iljas Kosseifi (StratoBIM) or its licensors and is protected by applicable copyright, trademark, and other intellectual property laws.</p>
      <p style={S.p}>The StratoBIM name, logo, and related product names are used as brand identifiers for StratoBIM products. You may not copy, reproduce, distribute, modify, publish, display, or use Website content or StratoBIM branding without prior written permission, except where permitted by law or for accurate, non-commercial reference.</p>
      <p style={S.p}>Autodesk and Revit are trademarks of Autodesk, Inc. They are used on this Website for descriptive purposes only. StratoBIM is an independent publisher and is not affiliated with, endorsed by, or sponsored by Autodesk, Inc.</p>

      <h2 style={S.h2(mobile)}>5. Software Licensing</h2>
      <p style={S.p}>StratoBIM software products are licensed, not sold. Any purchase or download of a StratoBIM product through the Autodesk marketplace grants only the limited rights described in the applicable product EULA. No ownership of the software or its intellectual property is transferred to you.</p>

      <h2 style={S.h2(mobile)}>6. Permitted Use</h2>
      <p style={S.p}>You may use the Website only for lawful purposes. You agree not to:</p>
      <ul style={S.ul}>
        <li style={S.li}>Use the Website in violation of applicable laws or regulations</li>
        <li style={S.li}>Attempt to gain unauthorized access to the Website, its hosting environment, or related systems</li>
        <li style={S.li}>Interfere with, disrupt, or impair the Website or its infrastructure</li>
        <li style={S.li}>Use bots, scrapers, or other automated means to access the Website without prior written permission</li>
        <li style={S.li}>Upload, transmit, or submit harmful code, spam, or unlawful material through the Website</li>
        <li style={S.li}>Misrepresent your identity or falsely imply an affiliation with StratoBIM</li>
      </ul>

      <h2 style={S.h2(mobile)}>7. Third-Party Links and Services</h2>
      <p style={S.p}>The Website may link to third-party websites or services, including Autodesk marketplace pages and other external resources. These links are provided for convenience only. StratoBIM does not control and is not responsible for the content, availability, privacy practices, or terms of third-party websites or services.</p>

      <h2 style={S.h2(mobile)}>8. Product Information and Accuracy</h2>
      <p style={S.p}>We make reasonable efforts to keep product descriptions, screenshots, compatibility details, release notes, and other Website content accurate and current. However, the Website is provided for general informational purposes, and we do not guarantee that all information is complete, current, or error-free.</p>
      <p style={S.p}>For current pricing, availability, trial terms, supported versions, and marketplace-specific conditions, the relevant Autodesk marketplace listing is the authoritative source.</p>

      <h2 style={S.h2(mobile)}>9. Privacy</h2>
      <p style={S.p}>Your use of the Website is also governed by the StratoBIM Website Privacy Policy.</p>
      <p style={S.p}>Each StratoBIM software product may also have its own product-specific Privacy Policy describing how that product handles data when installed or used.</p>

      <h2 style={S.h2(mobile)}>10. Cookies</h2>
      <p style={S.p}>The Website may use essential cookies required for basic functionality, security, or preference storage. We do not use third-party advertising cookies.</p>
      <p style={S.p}>If non-essential analytics or marketing technologies are added in the future, we will update our privacy and cookie disclosures and request consent where required by law.</p>

      <h2 style={S.h2(mobile)}>11. Disclaimer of Warranties</h2>
      <p style={{ ...S.p, fontSize: 12, letterSpacing: '0.01em' }}>To the maximum extent permitted by applicable law, the Website and all content, information, and materials made available through it are provided on an "as is" and "as available" basis, without warranties of any kind, whether express or implied.</p>
      <p style={S.p}>We do not warrant that the Website will always be available, secure, uninterrupted, error-free, or suitable for any particular purpose.</p>

      <h2 style={S.h2(mobile)}>12. Limitation of Liability</h2>
      <p style={S.p}>To the maximum extent permitted by applicable law, StratoBIM shall not be liable for any indirect, incidental, special, consequential, or punitive damages, including loss of profits, loss of data, business interruption, or loss of goodwill, arising out of or in connection with your use of, or inability to use, the Website.</p>
      <p style={S.p}>Nothing in these Terms limits or excludes liability for fraud, gross negligence, willful misconduct, personal injury, or any other liability that cannot be excluded or limited under mandatory applicable law.</p>

      <h2 style={S.h2(mobile)}>13. Indemnification</h2>
      <p style={S.p}>To the maximum extent permitted by applicable law, you agree to indemnify and hold harmless Zak Iljas Kosseifi (StratoBIM) from and against third-party claims, damages, liabilities, costs, and expenses arising from your unlawful use of the Website, your breach of these Terms, your infringement of third-party rights, or your misuse of Website content or StratoBIM branding.</p>

      <h2 style={S.h2(mobile)}>14. Support and Contact</h2>
      <p style={S.p}>For support requests, legal notices, or general inquiries:</p>
      <p style={S.p}><strong>Zak Iljas Kosseifi (StratoBIM)</strong><br/>Email: <a href="mailto:support@strato-bim.com" style={S.a}>support@strato-bim.com</a><br/>Website: <a href="https://strato-bim.com/support" style={S.a}>strato-bim.com/support</a></p>

      <h2 style={S.h2(mobile)}>15. Changes to These Terms</h2>
      <p style={S.p}>We may update these Terms from time to time. The updated version will include a new "Effective date" at the top of the page.</p>
      <p style={S.p}>Your continued use of the Website after updated Terms are posted constitutes acceptance of those updated Terms.</p>

      <h2 style={S.h2(mobile)}>16. Governing Law and Jurisdiction</h2>
      <p style={S.p}>These Terms are governed by the laws of <strong>Italy</strong>, without regard to conflict-of-law rules.</p>
      <p style={S.p}>Any dispute arising out of or in connection with these Terms shall be submitted to the competent courts of Italy, except where mandatory consumer protection laws give you the right to bring proceedings in another jurisdiction.</p>

      <h2 style={S.h2(mobile)}>17. Severability</h2>
      <p style={S.p}>If any provision of these Terms is held invalid or unenforceable, the remaining provisions will remain in full force and effect.</p>

      <h2 style={S.h2(mobile)}>18. No Waiver</h2>
      <p style={S.p}>Failure by StratoBIM to enforce any provision of these Terms does not constitute a waiver of that provision or any other right.</p>

      <h2 style={S.h2(mobile)}>19. Entire Agreement</h2>
      <p style={S.p}>These Terms, together with the Website Privacy Policy and any applicable product EULA, constitute the entire agreement between you and StratoBIM regarding your use of the Website.</p>

      <h2 style={S.h2(mobile)}>20. Language</h2>
      <p style={S.p}>These Terms are drafted in English. If a translation is provided, the English version controls in the event of a conflict, to the extent permitted by applicable law.</p>
    </div>
  );
};


// ══════════════════════════════════════════════════════════════════════════════
//  PRIVACY POLICY (WEBSITE)
// ══════════════════════════════════════════════════════════════════════════════
const PrivacyPolicyPage = ({ lang }) => {
  const mobile = window.useIsMobile(768);
  const S = legalPageStyles;

  return (
    <div style={S.wrap(mobile)}>
      <div style={S.eyebrow}>Privacy</div>
      <h1 style={S.h1(mobile)}>Website Privacy Policy</h1>
      <p style={S.meta}>Version 1.0 · Effective date: 16 June 2026 · strato-bim.com</p>

      <h2 style={S.h2(mobile)}>1. Overview</h2>
      <p style={S.p}>This Privacy Policy explains how StratoBIM handles information when you visit and use the strato-bim.com website (the "Website"). It applies only to the Website.</p>
      <p style={S.p}>Each StratoBIM software product may have its own product-specific Privacy Policy and End-User License Agreement describing how that product handles data when installed or used. Product-specific legal documents may be published on this Website, on the Autodesk marketplace listing, or both.</p>
      <p style={S.p}>For the purposes of the EU General Data Protection Regulation (GDPR), the data controller is Zak Iljas Kosseifi, based in Italy.</p>

      <h2 style={S.h2(mobile)}>2. Summary</h2>
      <p style={S.p}>The Website is an informational site for StratoBIM products. We collect minimal data, do not sell personal information, and do not use advertising trackers. The Website does not directly process software purchases; purchases, trials, subscriptions, downloads, and entitlement handling are managed through Autodesk's marketplace workflows.</p>

      <h2 style={S.h2(mobile)}>3. Information We Collect</h2>

      <h3 style={S.h3}>3.1 Information You Provide</h3>
      <p style={S.p}>If you contact us through the Website (via email or a contact form), we collect the information you choose to provide, such as your name, email address, and the content of your message. We use this information solely to respond to your inquiry.</p>
      <div style={{ overflowX: 'auto', marginBottom: 16 }}>
        <table style={S.table}>
          <thead>
            <tr><th style={S.th}>Information</th><th style={S.th}>Purpose</th><th style={S.th}>Legal Basis (GDPR)</th><th style={S.th}>Retention</th></tr>
          </thead>
          <tbody>
            <tr><td style={S.td}>Name and email address (from contact form or email)</td><td style={S.td}>Respond to your inquiry</td><td style={S.td}>Legitimate interest (Art. 6(1)(f)) or consent (Art. 6(1)(a))</td><td style={S.td}>Until the inquiry is resolved, then deleted within 12 months unless an ongoing support or business relationship requires longer retention</td></tr>
            <tr><td style={S.td}>Message content</td><td style={S.td}>Understand and respond to your request</td><td style={S.td}>Legitimate interest (Art. 6(1)(f))</td><td style={S.td}>Same as above</td></tr>
          </tbody>
        </table>
      </div>

      <h3 style={S.h3}>3.2 Information Collected Automatically</h3>
      <p style={S.p}>When you visit the Website, our hosting provider may automatically collect standard server log data, including:</p>
      <div style={{ overflowX: 'auto', marginBottom: 16 }}>
        <table style={S.table}>
          <thead>
            <tr><th style={S.th}>Information</th><th style={S.th}>Purpose</th><th style={S.th}>Legal Basis</th><th style={S.th}>Retention</th></tr>
          </thead>
          <tbody>
            <tr><td style={S.td}>IP address</td><td style={S.td}>Server security, abuse prevention</td><td style={S.td}>Legitimate interest (Art. 6(1)(f))</td><td style={S.td}>Per hosting provider policy (typically 30–90 days)</td></tr>
            <tr><td style={S.td}>Browser type and version</td><td style={S.td}>Compatibility, troubleshooting</td><td style={S.td}>Legitimate interest (Art. 6(1)(f))</td><td style={S.td}>Per hosting provider policy</td></tr>
            <tr><td style={S.td}>Pages visited and timestamps</td><td style={S.td}>Website performance monitoring</td><td style={S.td}>Legitimate interest (Art. 6(1)(f))</td><td style={S.td}>Per hosting provider policy</td></tr>
            <tr><td style={S.td}>Referring URL</td><td style={S.td}>Understanding traffic sources</td><td style={S.td}>Legitimate interest (Art. 6(1)(f))</td><td style={S.td}>Per hosting provider policy</td></tr>
          </tbody>
        </table>
      </div>
      <p style={S.p}>This data is collected and processed by our hosting provider as part of standard web server operations. We do not combine server logs with other personal data to identify individual visitors.</p>

      <h3 style={S.h3}>3.3 Cookies</h3>
      <p style={S.p}>The Website may use essential cookies required for basic functionality, security, or storing preferences such as cookie choices. We do not use third-party advertising or profiling cookies.</p>
      <p style={S.p}>If non-essential analytics or marketing technologies are added in the future, this policy will be updated and consent will be obtained where required by law.</p>
      <p style={S.p}>You can control or delete cookies through your browser settings. Blocking essential cookies may affect Website functionality.</p>

      <h2 style={S.h2(mobile)}>4. Information We Do Not Collect</h2>
      <p style={S.p}>The Website does not collect:</p>
      <ul style={S.ul}>
        <li style={S.li}>Payment card information or direct purchase data handled through Autodesk's marketplace</li>
        <li style={S.li}>Autodesk account credentials or User IDs</li>
        <li style={S.li}>Revit project data, model content, or file names</li>
        <li style={S.li}>Personal documents or files from your computer</li>
        <li style={S.li}>Location data beyond what is available from your IP address</li>
      </ul>

      <h2 style={S.h2(mobile)}>5. How We Use Information</h2>
      <p style={S.p}>We use the information described in Section 3 to:</p>
      <ul style={S.ul}>
        <li style={S.li}>Respond to support inquiries and contact form submissions</li>
        <li style={S.li}>Maintain the security and availability of the Website</li>
        <li style={S.li}>Monitor Website performance and fix technical issues</li>
        <li style={S.li}>Comply with legal obligations</li>
      </ul>
      <p style={S.p}>We do not use personal information for automated decision-making, profiling, or direct marketing unless you specifically opt in.</p>

      <h2 style={S.h2(mobile)}>6. Data Sharing</h2>
      <p style={S.p}>We do not sell your personal information.</p>
      <p style={S.p}>Information may be shared only when necessary to:</p>
      <ul style={S.ul}>
        <li style={S.li}>Operate the Website (with our hosting provider, which processes server logs as part of standard hosting services)</li>
        <li style={S.li}>Respond to a support request (if we need to involve a third party to resolve your issue, we will inform you first)</li>
        <li style={S.li}>Comply with a legal obligation, court order, or lawful government request</li>
        <li style={S.li}>Protect the security or integrity of the Website</li>
      </ul>

      <h2 style={S.h2(mobile)}>7. Third-Party Links</h2>
      <p style={S.p}>The Website contains links to third-party websites, including Autodesk marketplace pages (apps.autodesk.com) and other external resources. We do not control these websites and are not responsible for their privacy practices. We encourage you to review the privacy policies of any third-party website you visit.</p>

      <h2 style={S.h2(mobile)}>8. International Data Transfers</h2>
      <p style={S.p}>Our hosting provider may process data in locations outside the European Economic Area (EEA), including the United States. Where such transfers occur, they are subject to appropriate safeguards in accordance with the GDPR (such as Standard Contractual Clauses or an adequacy decision).</p>
      <p style={S.p}>We do not independently transfer your personal data internationally beyond what occurs through standard web hosting.</p>

      <h2 style={S.h2(mobile)}>9. Data Security</h2>
      <p style={S.p}>We use reasonable technical and organisational measures to protect personal information processed through the Website, including HTTPS encryption for data in transit. No method of transmission or storage is completely secure, and we cannot guarantee absolute security.</p>

      <h2 style={S.h2(mobile)}>10. Your Rights</h2>
      <p style={S.p}>If you are in the European Economic Area, you have the following rights under the GDPR:</p>
      <ul style={S.ul}>
        <li style={S.li}><strong>Access:</strong> Request a copy of the personal data we hold about you.</li>
        <li style={S.li}><strong>Rectification:</strong> Request correction of inaccurate or incomplete personal data.</li>
        <li style={S.li}><strong>Erasure:</strong> Request deletion of your personal data where there is no compelling reason for continued processing.</li>
        <li style={S.li}><strong>Restriction:</strong> Request restriction of processing in certain circumstances.</li>
        <li style={S.li}><strong>Objection:</strong> Object to processing based on legitimate interest.</li>
        <li style={S.li}><strong>Data portability:</strong> Request transfer of your data in a structured, machine-readable format.</li>
        <li style={S.li}><strong>Withdraw consent:</strong> Where processing is based on consent, withdraw it at any time without affecting the lawfulness of prior processing.</li>
        <li style={S.li}><strong>Lodge a complaint:</strong> File a complaint with a supervisory authority. In Italy, this is the Garante per la Protezione dei Dati Personali (<a href="https://www.garanteprivacy.it" target="_blank" rel="noopener noreferrer" style={S.a}>garanteprivacy.it</a>).</li>
      </ul>
      <p style={S.p}>To exercise any of these rights, contact <a href="mailto:support@strato-bim.com" style={S.a}>support@strato-bim.com</a>. We will respond within 30 days.</p>

      <h2 style={S.h2(mobile)}>11. Age Requirement</h2>
      <p style={S.p}>The Website is intended for professionals and is not directed to individuals under the age of 18. We do not knowingly collect personal data from individuals under 18. If we become aware that we have collected personal data from a person under 18, we will take steps to delete that data promptly.</p>

      <h2 style={S.h2(mobile)}>12. Changes to This Policy</h2>
      <p style={S.p}>We may update this Privacy Policy when the Website, data handling practices, or applicable law changes. The updated version will include a new "Effective date" at the top of this page.</p>
      <p style={S.p}>For material changes, we will make reasonable efforts to provide notice through the Website.</p>

      <h2 style={S.h2(mobile)}>13. Relation to Product Privacy Policies</h2>
      <p style={S.p}>This Privacy Policy covers the Website only. Each StratoBIM software product may have its own product-specific Privacy Policy describing how that product handles data when installed and used in Revit. Product Privacy Policies may be available:</p>
      <ul style={S.ul}>
        <li style={S.li}>On the Autodesk marketplace product listing</li>
        <li style={S.li}>Within the product documentation</li>
        <li style={S.li}>On this Website, where published</li>
      </ul>

      <h2 style={S.h2(mobile)}>14. Contact</h2>
      <p style={S.p}><strong>Zak Iljas Kosseifi (StratoBIM)</strong><br/>Email: <a href="mailto:support@strato-bim.com" style={S.a}>support@strato-bim.com</a><br/>Website: <a href="https://strato-bim.com/support" style={S.a}>strato-bim.com/support</a></p>
    </div>
  );
};


// ══════════════════════════════════════════════════════════════════════════════
//  EULA
// ══════════════════════════════════════════════════════════════════════════════
const EulaPage = ({ lang }) => {
  const mobile = window.useIsMobile(768);
  const S = legalPageStyles;

  return (
    <div style={S.wrap(mobile)}>
      <div style={S.eyebrow}>Legal</div>
      <h1 style={S.h1(mobile)}>End-User License Agreement</h1>
      <p style={S.meta}>Version 1.1 · Last updated: 11 June 2026 · StratoBIM Filter Sort</p>
      <p style={S.p}>This End-User License Agreement ("Agreement") is a legal agreement between you ("User" or "you") and <strong>Zak Iljas Kosseifi</strong> ("Publisher", "we", "us"), based in Italy, governing your use of StratoBIM software products and all associated files, documentation, and resources (collectively, the "Software").</p>
      <p style={S.p}>By installing, activating, or using the Software, you agree to be bound by this Agreement. If you do not agree, do not install or use the Software. The Software is distributed through the <strong>Autodesk App Store</strong> (Design and Make Marketplace).</p>

      <h2 style={S.h2(mobile)}>1. Definitions</h2>
      <ul style={S.ul}>
        <li style={S.li}><strong>"Software"</strong> — the StratoBIM Revit add-in, including all tools, modules, resources, updates, and documentation.</li>
        <li style={S.li}><strong>"Publisher"</strong> — Zak Iljas Kosseifi, sole developer and owner.</li>
        <li style={S.li}><strong>"Entitlement"</strong> — the verified right to use the Software, confirmed by Autodesk's entitlement API.</li>
      </ul>

      <h2 style={S.h2(mobile)}>2. Grant of Licence</h2>
      <p style={S.p}>Subject to your compliance and maintenance of a valid Entitlement, the Publisher grants you a <strong>personal, non-exclusive, non-transferable, limited licence</strong> to install and use the Software on machines where you have a licensed copy of Revit, solely for your own internal business or professional purposes.</p>

      <h2 style={S.h2(mobile)}>3. Permitted Use</h2>
      <ul style={S.ul}>
        <li style={S.li}>Install the Software on multiple machines you personally use, each covered by an active Entitlement</li>
        <li style={S.li}>Make a backup copy solely for archival purposes</li>
        <li style={S.li}>Use in a studio or enterprise environment, provided each user holds an individual Entitlement</li>
      </ul>

      <h2 style={S.h2(mobile)}>4. Restrictions</h2>
      <ul style={S.ul}>
        <li style={S.li}>Do not reverse engineer, decompile, or disassemble the Software</li>
        <li style={S.li}>Do not remove or circumvent any licence verification mechanism</li>
        <li style={S.li}>Do not modify, adapt, or create derivative works without prior written consent</li>
        <li style={S.li}>Do not distribute, sell, sublicence, or transfer the Software</li>
        <li style={S.li}>Do not use the Software for unlawful purposes or to develop a competing product</li>
      </ul>

      <h2 style={S.h2(mobile)}>5. Entitlement and Licence Verification</h2>
      <p style={S.p}>The Software verifies your Entitlement via the Autodesk entitlement API. This requires an active internet connection and a valid Autodesk account. If the check cannot be completed, a limited offline grace period of up to 14 days is provided. Your Entitlement is personal and may not be shared or transferred.</p>

      <h2 style={S.h2(mobile)}>6. Intellectual Property</h2>
      <p style={S.p}>The Software and all intellectual property rights therein remain the exclusive property of the Publisher. "Autodesk" and "Revit" are trademarks of Autodesk, Inc., used for descriptive purposes only.</p>

      <h2 style={S.h2(mobile)}>7. Third-Party Components</h2>
      <p style={S.p}>The Software interacts with the Revit API and may incorporate open-source libraries under permissive licences (MIT, Apache 2.0). Such components are subject to their own terms.</p>

      <h2 style={S.h2(mobile)}>8. Updates and New Versions</h2>
      <p style={S.p}>The Publisher may release updates that change features, UI, or functionality. The Publisher reserves the right to discontinue support for older Revit versions or discontinue the Software with reasonable notice.</p>

      <h2 style={S.h2(mobile)}>9. No Warranty</h2>
      <p style={{ ...S.p, fontSize: 12, letterSpacing: '0.01em' }}>The Software is provided "as is" and "as available", without warranty of any kind, express or implied, to the maximum extent permitted by applicable law.</p>

      <h2 style={S.h2(mobile)}>10. Limitation of Liability</h2>
      <p style={S.p}>The Publisher's total cumulative liability shall not exceed the amount you paid for the Software in the twelve (12) months preceding the claim. In no event shall the Publisher be liable for indirect, incidental, special, consequential, or punitive damages.</p>

      <h2 style={S.h2(mobile)}>10A. Assumption of Risk</h2>
      <p style={S.p}>You are solely responsible for reviewing and verifying all changes the Software makes to your Revit models. You are responsible for maintaining adequate backups. The Software is a productivity tool and does not replace professional judgment.</p>

      <h2 style={S.h2(mobile)}>10B. Indemnification</h2>
      <p style={S.p}>You agree to indemnify and hold harmless the Publisher from claims arising out of your use of the Software, breach of this Agreement, or violation of applicable law.</p>

      <h2 style={S.h2(mobile)}>10C. Autodesk Marketplace Required Terms</h2>
      <p style={S.p}>The Software is distributed through the Autodesk Design and Make Marketplace. You acknowledge that this Agreement is between you and the Publisher only, not any Autodesk entity. The Publisher is solely responsible for the Software, warranties, and claims resolution. Autodesk Parties are third-party beneficiaries of this Agreement.</p>
      <p style={S.p}>Contact for questions or complaints:<br/><strong>Zak Iljas Kosseifi</strong> — <a href="mailto:support@strato-bim.com" style={S.a}>support@strato-bim.com</a></p>

      <h2 style={S.h2(mobile)}>11. Term and Termination</h2>
      <p style={S.p}>This Agreement is effective from first install and continues while you hold a valid Entitlement. The Publisher may terminate immediately for material breach. You may terminate at any time by uninstalling the Software. Upon termination, all rights cease and you must destroy any copies.</p>

      <h2 style={S.h2(mobile)}>12. Governing Law</h2>
      <p style={S.p}>This Agreement is governed by the laws of <strong>Italy</strong>. Disputes shall be submitted to the courts of Italy. EU consumers may use the <a href="https://ec.europa.eu/odr" target="_blank" rel="noopener noreferrer" style={S.a}>EU Online Dispute Resolution platform</a>.</p>

      <h2 style={S.h2(mobile)}>13. General</h2>
      <ul style={S.ul}>
        <li style={S.li}><strong>Entire agreement</strong> — this Agreement plus the App Store Terms constitute the full agreement.</li>
        <li style={S.li}><strong>Severability</strong> — invalid provisions do not affect the remainder.</li>
        <li style={S.li}><strong>No waiver</strong> — failure to enforce does not waive rights.</li>
        <li style={S.li}><strong>Language</strong> — English controls in case of translation conflicts.</li>
        <li style={S.li}><strong>Assignment</strong> — you may not assign without consent; the Publisher may assign in connection with a merger or acquisition.</li>
      </ul>

      <h2 style={S.h2(mobile)}>14. Contact</h2>
      <p style={S.p}><strong>Zak Iljas Kosseifi</strong><br/>Email: <a href="mailto:support@strato-bim.com" style={S.a}>support@strato-bim.com</a><br/>Web: <a href="https://strato-bim.com/support" style={S.a}>strato-bim.com/support</a></p>
    </div>
  );
};


// ══════════════════════════════════════════════════════════════════════════════
//  COOKIE BANNER
// ══════════════════════════════════════════════════════════════════════════════
const CookieBanner = ({ lang }) => {
  const [dismissed, setDismissed] = React.useState(() => {
    try { return localStorage.getItem('stratobim_cookie_ok') === '1'; } catch { return false; }
  });
  const mobile = window.useIsMobile(768);
  if (dismissed) return null;

  const dismiss = () => {
    try { localStorage.setItem('stratobim_cookie_ok', '1'); } catch {}
    setDismissed(true);
  };

  const it = lang === 'it';
  return (
    <div style={{
      position: 'fixed', bottom: 0, left: 0, right: 0, zIndex: 10000,
      background: 'var(--neutral-800)', borderTop: '1px solid var(--neutral-700)',
      padding: mobile ? '16px 20px' : '14px 32px',
      display: 'flex', alignItems: mobile ? 'flex-start' : 'center',
      flexDirection: mobile ? 'column' : 'row',
      gap: mobile ? 12 : 20,
      justifyContent: 'center',
    }}>
      <p style={{
        fontFamily: 'var(--font-sans)', fontSize: 13, color: 'var(--neutral-300)',
        lineHeight: 1.5, margin: 0, flex: '0 1 auto',
      }}>
        {it
          ? 'Questo sito utilizza solo cookie essenziali per il funzionamento di base.'
          : 'This site uses essential cookies only.'}
      </p>
      <button onClick={dismiss} style={{
        background: 'var(--brand)', color: 'var(--white)',
        border: 'none', borderRadius: 'var(--radius-sm)',
        padding: '8px 20px', fontFamily: 'var(--font-sans)', fontSize: 13,
        fontWeight: 500, cursor: 'pointer', flexShrink: 0,
        transition: 'background 120ms',
      }}
      onMouseEnter={e => e.currentTarget.style.background = 'var(--brand-hover)'}
      onMouseLeave={e => e.currentTarget.style.background = 'var(--brand)'}>
        {it ? 'OK' : 'Got it'}
      </button>
    </div>
  );
};


Object.assign(window, { TermsPage, PrivacyPolicyPage, EulaPage, CookieBanner });
