<?php

require_once __DIR__ . '/app/helpers.php';
require_once __DIR__ . '/app/analytics.php';
require_once __DIR__ . '/app/public-layout.php';

sparrow_record_analytics_event(
    'page_view',
    'page',
    null,
    'Privacy Policy',
    '',
    '/privacy-policy.php'
);

$policy_css = <<<'CSS'
.policy-page h1,
.policy-page h2,
.policy-page h3 {
    color: var(--sparrow-purple-dark);
}

.policy-page-section {
    margin-top: 22px;
}

.policy-anchor-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.policy-anchor-nav a {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--sparrow-soft-pink);
    border: 1px solid var(--sparrow-border);
    color: var(--sparrow-purple-dark);
    font-weight: bold;
    font-size: 13px;
    text-decoration: none;
}

.policy-anchor-nav a:hover {
    background: #ffffff;
    text-decoration: none;
}

.policy-card {
    background: var(--sparrow-card);
    border: 1px solid var(--sparrow-border);
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 8px 30px rgba(70, 35, 60, 0.06);
}

.policy-card p,
.policy-card li {
    color: var(--sparrow-muted);
    line-height: 1.7;
}

.policy-card p:first-child {
    margin-top: 0;
}

.policy-card p:last-child,
.policy-card ul:last-child {
    margin-bottom: 0;
}

.policy-card a {
    font-weight: bold;
}

.policy-back-top {
    margin-top: 10px;
    text-align: right;
}

.policy-back-top a {
    color: var(--sparrow-purple-dark);
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
}

.policy-back-top a:hover {
    text-decoration: underline;
}

.policy-page .public-hero {
    text-align: center;
}

@media (max-width: 850px) {
    .policy-anchor-nav {
        justify-content: center;
    }
}
CSS;

sparrow_public_header(
    'Privacy Policy',
    'privacy-policy',
    $policy_css
);
?>

<div class="policy-page" id="top">

<section class="public-card public-hero">
    <h1>Privacy Policy</h1>

    <p>
        Your trust matters to Sparrow &amp; Seed Creations. This policy explains
        what information this website collects, why it is used, and the choices
        you have concerning your information.
    </p>

    <p><strong>Last Updated:</strong> July 31, 2026</p>

    <div class="policy-anchor-nav">
        <a href="#information">Information</a>
        <a href="#use">How It Is Used</a>
        <a href="#sharing">Sharing</a>
        <a href="#analytics">Cookies &amp; Analytics</a>
        <a href="#uploads">Photos &amp; Uploads</a>
        <a href="#choices">Your Choices</a>
        <a href="#contact">Contact</a>
    </div>
</section>

<section class="policy-page-section" id="information">
    <h2>Information I Collect</h2>

    <div class="policy-card">
        <p>
            I collect information you choose to provide when you request an order,
            send a message, communicate about an existing order, or use customer
            account or portal features when available.
        </p>

        <p>This information may include:</p>

        <ul>
            <li>Your name, email address, phone number, and preferred contact method.</li>
            <li>Order details, requested dates, sizes, colors, quantities, notes, and group or event information.</li>
            <li>Delivery or shipping information needed to complete your order.</li>
            <li>Design files, inspiration images, photos, approval responses, and change requests you submit.</li>
            <li>Contact messages, order communications, payment status, and order history.</li>
            <li>Login or account information used to provide secure access to private areas of the website.</li>
        </ul>

        <p>
            Please do not submit Social Security numbers, full payment card numbers,
            medical information, government identification, or other sensitive
            information through the website forms or file uploads.
        </p>
    </div>

    <div class="policy-back-top"><a href="#top">Back to top</a></div>
</section>

<section class="policy-page-section" id="use">
    <h2>How Your Information Is Used</h2>

    <div class="policy-card">
        <p>I use the information collected to:</p>

        <ul>
            <li>Review order requests and prepare quotes.</li>
            <li>Create, customize, fulfill, deliver, or ship orders.</li>
            <li>Send order updates and respond by email, phone, or text according to your preferences.</li>
            <li>Provide invoices, packing slips, approval images, and customer portal information.</li>
            <li>Provide customer service, handle repairs or returns, and resolve concerns.</li>
            <li>Protect the website, prevent misuse, and maintain business records.</li>
            <li>Understand which pages, products, stories, and gallery categories are most helpful or interesting to visitors.</li>
            <li>Meet tax, accounting, legal, and other legitimate business obligations.</li>
        </ul>
    </div>

    <div class="policy-back-top"><a href="#top">Back to top</a></div>
</section>

<section class="policy-page-section" id="sharing">
    <h2>When Information May Be Shared</h2>

    <div class="policy-card">
        <p>
            <strong>I do not sell or rent your personal information.</strong>
            I also do not use your information for targeted advertising.
        </p>

        <p>
            Information may be shared only when reasonably necessary with service
            providers that help operate the business, such as:
        </p>

        <ul>
            <li>Website hosting, database, security, backup, and technical service providers.</li>
            <li>Email, phone, or text services used to communicate with you.</li>
            <li>Shipping carriers or delivery services when an order must be shipped.</li>
            <li>Payment service providers when you choose to pay through one of their services.</li>
            <li>Professional advisers or government authorities when required by law or needed to protect legal rights.</li>
        </ul>

        <p>
            These providers receive only the information reasonably needed to
            perform their services and may have their own privacy policies.
        </p>
    </div>

    <div class="policy-back-top"><a href="#top">Back to top</a></div>
</section>

<section class="policy-page-section" id="analytics">
    <h2>Cookies, Website Logs, and Analytics</h2>

    <div class="policy-card">
        <p>
            The website may use essential session cookies to support secure login
            and customer portal features. These cookies help the website remember
            an authenticated session and are not used for advertising.
        </p>

        <p>
            The website also records basic activity information, such as pages
            viewed, gallery or product interactions, referring page, browser or
            device information, and the date and time of activity. An IP address
            may be used by the web server for security and may be stored by the
            website only as a one-way hash for basic analytics. The hash is used
            to recognize general activity patterns without storing the plain IP
            address in the website's analytics table.
        </p>

        <p>
            Hosting providers may also keep standard server and security logs under
            their own policies. If additional analytics tools are added later, this
            policy will be updated before they are used in a materially different way.
        </p>
    </div>

    <div class="policy-back-top"><a href="#top">Back to top</a></div>
</section>

<section class="policy-page-section" id="uploads">
    <h2>Designs, Photos, and Other Uploads</h2>

    <div class="policy-card">
        <p>
            Files submitted with an order request are used to understand and create
            your requested design. They are not automatically published in the
            public Gallery.
        </p>

        <p>
            When you submit an image, artwork, design element, or other material,
            you confirm that you own it or have permission to provide it for the
            requested use. You keep any ownership rights you have in the material.
        </p>

        <p>
            Unless you identify submitted material as <strong>Private Use Only</strong>
            in the order request, order notes, or Contact form, you give Sparrow
            &amp; Seed Creations a non-exclusive, royalty-free right to reproduce,
            edit, adapt, combine, and reuse generic or non-personal material in
            other designs, products, samples, Gallery posts, and business marketing.
        </p>

        <p>
            Personal photographs, family photographs, portraits, and images that
            identify a private individual are treated as private by default. They
            will be used only to complete your order unless you separately give
            clear permission for another use. You may also request private-only
            treatment for any other submitted material by stating that request in
            the order or Contact form.
        </p>

        <p>
            This permission does not give Sparrow &amp; Seed Creations ownership of
            your material, and it does not give either party rights that belong to
            someone else. Material may be declined or removed if there is a concern
            about copyright, trademark, privacy, or permission to use it.
        </p>

        <p>
            If you choose to submit a photo or other content for possible public
            display, it may be reviewed before it appears on the website. Personal
            contact information will not be intentionally included in a public
            Gallery post. Please make sure you have permission to share any image
            or content you submit, especially when it includes another person or a child.
        </p>

        <p>
            If you would like a photo or Gallery item involving you or your order
            removed, please send a privacy request through the Contact page.
        </p>
    </div>

    <div class="policy-back-top"><a href="#top">Back to top</a></div>
</section>

<section class="policy-page-section" id="payments">
    <h2>Payment Information</h2>

    <div class="policy-card">
        <p>
            This website may record payment method, payment amount, payment status,
            discounts, shipping charges, and balance information for order management.
            It does not currently store full debit or credit card numbers.
        </p>

        <p>
            When a third-party payment service is used, that provider processes the
            payment under its own terms and privacy policy.
        </p>
    </div>

    <div class="policy-back-top"><a href="#top">Back to top</a></div>
</section>

<section class="policy-page-section" id="security">
    <h2>Storage, Retention, and Security</h2>

    <div class="policy-card">
        <p>
            I keep personal information only as long as reasonably necessary to
            complete orders, provide customer service, maintain business and tax
            records, resolve disputes, and meet legal obligations.
        </p>

        <p>
            Reasonable administrative and technical safeguards are used to protect
            stored information. However, no website, electronic transmission, or
            storage system can be guaranteed to be completely secure.
        </p>
    </div>

    <div class="policy-back-top"><a href="#top">Back to top</a></div>
</section>

<section class="policy-page-section" id="choices">
    <h2>Your Choices and Privacy Requests</h2>

    <div class="policy-card">
        <p>
            You may ask whether I have personal information about you or request
            access, correction, or deletion of that information. You may also ask
            to update your communication preference or request removal of content
            you submitted for public display.
        </p>

        <p>
            Some information may need to be kept when required for taxes, accounting,
            fraud prevention, order records, legal compliance, or the resolution of
            a dispute. I may need to verify your identity before completing a request.
        </p>

        <p>
            To make a request, use the
            <a href="<?php echo sparrow_escape(sparrow_url('/contact.php')); ?>">Contact page</a>
            and write <strong>Privacy Request</strong> in the subject or message.
        </p>
    </div>

    <div class="policy-back-top"><a href="#top">Back to top</a></div>
</section>

<section class="policy-page-section" id="children">
    <h2>Children's Privacy</h2>

    <div class="policy-card">
        <p>
            This website is not directed to children under 13, and I do not knowingly
            collect personal information directly from children under 13. A parent or
            guardian who believes a child has submitted personal information may contact
            me to request its removal.
        </p>
    </div>

    <div class="policy-back-top"><a href="#top">Back to top</a></div>
</section>

<section class="policy-page-section" id="links">
    <h2>Links to Other Websites</h2>

    <div class="policy-card">
        <p>
            The website may link to social media, payment services, shipping carriers,
            or other third-party websites. Sparrow &amp; Seed Creations is not responsible
            for the privacy practices or content of those websites.
        </p>
    </div>

    <div class="policy-back-top"><a href="#top">Back to top</a></div>
</section>

<section class="policy-page-section" id="changes">
    <h2>Changes to This Policy</h2>

    <div class="policy-card">
        <p>
            This policy may be updated as the website or business services change.
            The Last Updated date at the top of this page will show when revisions
            were made.
        </p>
    </div>

    <div class="policy-back-top"><a href="#top">Back to top</a></div>
</section>

<section class="policy-page-section" id="contact">
    <h2>Questions or Requests</h2>

    <div class="policy-card">
        <p>
            If you have a question about this Privacy Policy or how your information
            is handled, please use the
            <a href="<?php echo sparrow_escape(sparrow_url('/contact.php')); ?>">Contact page</a>.
        </p>

        <p>
            Thank you for trusting Sparrow &amp; Seed Creations with your order and
            supporting my small business.
        </p>
    </div>
</section>

</div>

<?php sparrow_public_footer(); ?>
