// Privacy & Terms pages — long-form legal content
const { useEffect: useEffectL } = React;

/* =====================================================================
   Shared layout: a quiet, editorial long-form page
   ===================================================================== */
const LegalLayout = ({ title, lastUpdated, effectiveDate, children }) => (
  <>
    <section className="subhero">
      <div className="container-narrow subhero-inner">
        <Reveal as="span" className="eyebrow">Legal</Reveal>
        <Reveal as="h1" delay={1} style={{
          fontFamily:"var(--font-display)", fontWeight:700,
          fontSize:"clamp(40px, 5.4vw, 72px)", lineHeight:1.04,
          letterSpacing:"-0.028em", color:"var(--ink-900)",
          margin:"18px 0 18px", textWrap:"balance"
        }}>{title}</Reveal>
        <Reveal delay={2} as="div" className="legal-meta">
          <span><strong>Last updated:</strong> {lastUpdated}</span>
          <span className="legal-sep">·</span>
          <span><strong>Effective date:</strong> {effectiveDate}</span>
        </Reveal>
      </div>
    </section>

    <section className="section" style={{paddingTop: "clamp(24px, 3vw, 40px)"}}>
      <div className="container-narrow">
        <article className="legal-doc">{children}</article>
      </div>
    </section>

    <CtaBand
      title="Questions?"
      body="We'd rather answer in plain language than hide behind legalese. Email hi@copowr.com and we'll respond."
      primaryLabel="Get in touch"
    />
  </>
);

/* A tiny paragraph builder that supports **bold** inline */
const P = ({ children, ...rest }) => <p {...rest}>{children}</p>;
const B = ({ children }) => <strong>{children}</strong>;

/* =====================================================================
   PRIVACY POLICY
   ===================================================================== */
const PrivacyPage = () => {
  useEffectL(() => { window.scrollTo(0,0); }, []);
  return (
    <LegalLayout
      title="CoPowr Privacy Policy"
      lastUpdated="April 19, 2026"
      effectiveDate="April 19, 2026"
    >
      <P>This Privacy Policy describes how CoPowr LLC ("CoPowr," "we," "us," or "our") collects, uses, and shares information when you visit our website at copowr.com, submit an inquiry, or engage our services.</P>
      <P>We believe in clarity. If anything in this policy is unclear, email us at <a href="mailto:hi@copowr.com">hi@copowr.com</a> and we will explain it directly.</P>

      <h2>1. Information We Collect</h2>

      <h3>Information You Give Us</h3>
      <ul>
        <li><B>Contact information</B> you submit through forms on our website, including name, email address, company name, role, and any additional details you choose to share.</li>
        <li><B>Information shared during engagements.</B> If you become a client, we collect additional information necessary to provide services, including workflow details, system access credentials (temporarily, for implementation), and other business information.</li>
        <li><B>Communications.</B> The content of emails, forms, and messages you send us.</li>
      </ul>

      <h3>Information Collected Automatically</h3>
      <ul>
        <li><B>Usage data</B> such as pages visited, time on site, and referral source, collected through standard analytics tools.</li>
        <li><B>Device and browser information</B> such as IP address, browser type, and device type.</li>
        <li><B>Cookies and similar technologies</B> used by our website and analytics tools.</li>
      </ul>

      <h2>2. How We Use Information</h2>
      <P>We use the information we collect to:</P>
      <ul>
        <li>Respond to your inquiries and provide the services you requested</li>
        <li>Deliver client services under signed agreements</li>
        <li>Send you information you requested or that relates to a current engagement</li>
        <li>Improve our website and services</li>
        <li>Comply with legal obligations</li>
      </ul>
      <P>We do not sell your personal information. We do not share your information with third parties for marketing purposes. We do not use your information to build advertising profiles.</P>

      <h2>3. Sharing of Information</h2>
      <P>We share information only in the following limited circumstances:</P>
      <ul>
        <li><B>With service providers</B> who help us operate our business, such as our email provider, calendar booking tool, and accounting software. These providers are bound by confidentiality obligations and are not permitted to use your information for their own purposes.</li>
        <li><B>During a client engagement,</B> we may share information as necessary to perform the services (for example, configuring integrations between your systems).</li>
        <li><B>If required by law,</B> we may disclose information in response to valid legal process.</li>
        <li><B>In connection with a business transfer</B> such as a merger, acquisition, or sale of assets, your information would be transferred under the same protections stated here.</li>
      </ul>

      <h2>4. How We Protect Information</h2>
      <P>We take reasonable technical and organizational measures to protect the information we collect, including encryption of sensitive information in transit and at rest where feasible, access controls limiting who can view client information, and routine review of our security practices.</P>
      <P>No system is perfectly secure. If we become aware of a breach that may affect your personal information, we will notify you consistent with applicable law.</P>

      <h2>5. Data Retention</h2>
      <P>We retain information for as long as necessary to provide services, comply with legal obligations, resolve disputes, and enforce agreements. Retention periods vary depending on the nature of the information and applicable legal requirements.</P>
      <P>You can request deletion of your information at any time (see Section 7), subject to obligations we have to retain certain records by law.</P>

      <h2>6. Cookies and Tracking</h2>
      <P>Our website uses a limited set of cookies and similar technologies to support essential functionality and to understand how visitors use our site. We do not use advertising cookies, tracking pixels for third-party ad networks, or cross-site tracking technologies.</P>
      <P>You can disable cookies in your browser settings. Doing so may affect website functionality.</P>

      <h2>7. Your Rights</h2>
      <P>Depending on your location, you may have the following rights regarding your personal information:</P>
      <ul>
        <li><B>Access</B> — request a copy of the personal information we hold about you</li>
        <li><B>Correction</B> — request that we correct inaccurate information</li>
        <li><B>Deletion</B> — request that we delete your personal information, subject to legal retention obligations</li>
        <li><B>Opt-out</B> — opt out of any non-essential uses of your information</li>
        <li><B>Portability</B> — request a copy of your information in a portable format</li>
        <li><B>Withdraw consent</B> — where we rely on consent, withdraw it at any time</li>
      </ul>
      <P>To exercise any of these rights, email us at <a href="mailto:hi@copowr.com">hi@copowr.com</a>. We will respond within 30 days, or as required by applicable law.</P>

      <h3>For California Residents</h3>
      <P>California residents have additional rights under the California Consumer Privacy Act and related laws, including the right to know what personal information is collected, the right to request deletion, and the right to non-discrimination for exercising these rights. We do not sell personal information as defined under California law.</P>

      <h3>For European Union and United Kingdom Residents</h3>
      <P>If you are in the European Union or United Kingdom, you have additional rights under applicable data protection law, including the right to lodge a complaint with your local data protection authority. Our lawful bases for processing include consent, performance of a contract, and legitimate interests such as improving our services.</P>

      <h2>8. Minimum Age</h2>
      <P>Our services are not intended for individuals under 18, and we do not knowingly collect personal information from individuals under 18. If we learn we have collected such information, we will delete it.</P>

      <h2>9. Changes to This Policy</h2>
      <P>We may update this Privacy Policy from time to time. When we do, we will update the "Last updated" date at the top. For material changes, we will provide prominent notice, for example by email to current clients or a banner on our website.</P>

      <h2>10. Contact Us</h2>
      <P>If you have questions about this Privacy Policy or our privacy practices, contact us:</P>
      <div className="legal-contact">
        <B>CoPowr LLC</B><br/>
        Email: <a href="mailto:hi@copowr.com">hi@copowr.com</a>
      </div>
    </LegalLayout>
  );
};

/* =====================================================================
   TERMS OF SERVICE
   ===================================================================== */
const TermsPage = () => {
  useEffectL(() => { window.scrollTo(0,0); }, []);
  return (
    <LegalLayout
      title="CoPowr Terms of Service"
      lastUpdated="April 19, 2026"
      effectiveDate="April 19, 2026"
    >
      <P>These Terms of Service ("Terms") govern your use of the CoPowr website at copowr.com and any related services provided by CoPowr ("Website" or "Services"). By accessing or using the Website, or by engaging CoPowr for services, you agree to these Terms. If you do not agree, please do not use the Website or engage our services.</P>
      <P>For paid client engagements, these Terms apply in addition to any separate signed services agreement between you and CoPowr. If there is a conflict between these Terms and a signed services agreement for a specific engagement, the signed services agreement controls for that engagement.</P>

      <h2>1. About CoPowr</h2>
      <P>CoPowr is operated by CoPowr LLC, an Arizona limited liability company.</P>

      <h2>2. Who These Terms Apply To</h2>
      <P>These Terms apply to:</P>
      <ul>
        <li><B>Visitors</B> who browse the Website, read content, or submit inquiry forms.</li>
        <li><B>Clients</B> who engage CoPowr for paid services. Clients are also subject to a separate signed services agreement that governs the specific engagement.</li>
      </ul>

      <h2>3. Use of the Website</h2>
      <P>You may use the Website for lawful purposes only. You agree not to:</P>
      <ul>
        <li>Attempt to gain unauthorized access to any portion of the Website or our systems</li>
        <li>Use the Website to transmit harmful code, spam, or malicious content</li>
        <li>Scrape, data-mine, or automate access to the Website without written permission</li>
        <li>Misrepresent your identity or affiliation when submitting forms</li>
        <li>Use the Website in any way that could damage, disable, or impair it</li>
      </ul>

      <h2>4. Intellectual Property</h2>
      <P>The Website, including its design, text, graphics, logos, and code, is owned by CoPowr or its licensors and is protected by copyright, trademark, and other intellectual property laws.</P>
      <P>You may view and print materials from the Website for your personal, non-commercial use. You may not reproduce, distribute, modify, or create derivative works without written permission.</P>
      <P>The CoPowr name, logo, and related marks are trademarks of CoPowr LLC. Use without permission is prohibited.</P>
      <P>For paid client engagements, intellectual property ownership of specific deliverables is governed by the signed services agreement for that engagement.</P>

      <h2>5. Forms and Submissions</h2>
      <P>When you submit information through a form on our Website, you represent that:</P>
      <ul>
        <li>The information is accurate and complete</li>
        <li>You have the authority to submit it</li>
        <li>You are not submitting information about third parties without their consent where required</li>
      </ul>
      <P>Submitted information is subject to our Privacy Policy. Submitting an inquiry does not create a contractual relationship with CoPowr. Any paid engagement begins only after a separate written services agreement is signed.</P>

      <h2>6. Client Engagements</h2>
      <P>If you engage CoPowr for paid services, the terms of that engagement are governed by a separate signed services agreement. These Terms do not replace that agreement. They apply in addition to it and provide baseline terms for use of the Website, communications, and related activities that occur before, during, and after the engagement.</P>
      <P>Fees, scope, timelines, deliverables, intellectual property ownership of deliverables, confidentiality, and other engagement-specific terms are addressed in your signed services agreement.</P>

      <h2>7. Third-Party Links and Services</h2>
      <P>The Website may link to third-party websites or services. Those third parties have their own terms and privacy practices, and we are not responsible for them.</P>

      <h2>8. Disclaimers</h2>
      <P className="legal-caps">THE WEBSITE AND ITS CONTENT ARE PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTY OF ANY KIND. TO THE MAXIMUM EXTENT PERMITTED BY LAW, COPOWR DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.</P>
      <P>Content on the Website, including articles, case studies, and descriptions of services, is for informational purposes. It is not professional advice and does not create a client relationship.</P>

      <h2>9. Limitation of Liability</h2>
      <P className="legal-caps">TO THE MAXIMUM EXTENT PERMITTED BY LAW, COPOWR WILL NOT BE LIABLE FOR ANY INDIRECT, INCIDENTAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES ARISING OUT OF OR RELATED TO YOUR USE OF THE WEBSITE OR OUR SERVICES.</P>
      <P>For Website visitors who have not engaged CoPowr for paid services, CoPowr's total liability arising out of your use of the Website will not exceed one hundred dollars ($100).</P>
      <P>For paid client engagements, limitations of liability are governed by the signed services agreement for that engagement.</P>
      <P>These limits do not apply to liability that cannot be limited under applicable law.</P>

      <h2>10. Indemnification</h2>
      <P>You agree to indemnify and hold CoPowr harmless from any third-party claim arising from your breach of these Terms or your misuse of the Website.</P>

      <h2>11. Governing Law and Disputes</h2>
      <P>These Terms are governed by the laws of the State of Arizona, without regard to conflict of law principles. Any dispute arising out of these Terms will be resolved in the state or federal courts located in Maricopa County, Arizona, and you consent to that jurisdiction.</P>

      <h2>12. Minimum Age</h2>
      <P>You must be at least 18 years old to use the Website or engage CoPowr for services. By using the Website or engaging our services, you represent that you are at least 18.</P>

      <h2>13. Changes to These Terms</h2>
      <P>We may update these Terms from time to time. When we do, we will update the "Last updated" date at the top. Continued use of the Website or engagement of our services after changes means you accept the updated Terms. For material changes, we will provide prominent notice.</P>

      <h2>14. Termination</h2>
      <P>We may restrict or terminate your access to the Website at any time, with or without notice, if we believe you have violated these Terms. Termination of a paid client engagement is governed by the signed services agreement for that engagement.</P>

      <h2>15. Severability</h2>
      <P>If any provision of these Terms is found unenforceable, the rest of the Terms remain in effect.</P>

      <h2>16. Entire Agreement</h2>
      <P>These Terms, together with our Privacy Policy and any signed services agreement, constitute the entire agreement between you and CoPowr regarding your use of the Website and services.</P>

      <h2>17. Contact</h2>
      <P>Questions about these Terms? Reach out:</P>
      <div className="legal-contact">
        <B>CoPowr LLC</B><br/>
        Email: <a href="mailto:hi@copowr.com">hi@copowr.com</a>
      </div>
    </LegalLayout>
  );
};

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