<?php
session_start();

// Check if user is authenticated
if (!isset($_SESSION['nda_authenticated']) || $_SESSION['nda_authenticated'] !== true) {
    header('Location: login.php');
    exit;
}

// Session timeout after 2 hours
if (isset($_SESSION['nda_login_time']) && (time() - $_SESSION['nda_login_time'] > 7200)) {
    session_destroy();
    header('Location: login.php?timeout=1');
    exit;
}

// Refresh session time
$_SESSION['nda_login_time'] = time();
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Non-Disclosure Agreement - Adam Powell</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <div class="container">
        <header>
            <h1>MUTUAL NON-DISCLOSURE, NON-USE, NON-CIRCUMVENTION,<br>NON-COMPETE & CONFIDENTIALITY AGREEMENT</h1>
            <p class="subtitle">(Perpetual – Worldwide – Florida Law)</p>
        </header>

        <div class="agreement-content">
            <p>This Agreement ("Agreement") is entered into as of the Effective Date below, by and between:</p>

            <div class="party-info">
                <h3>Disclosing Party:</h3>
                <p>Adam Powell, an individual, and Adam Powell, LLC, a Florida Limited Liability Company, collectively referred to as "Disclosing Party," having principal business operations in the State of Florida.</p>
            </div>

            <div class="party-info">
                <h3>Receiving Party:</h3>
                <p id="receiving-party-display">To be completed below</p>
            </div>

            <div class="section">
                <h2>1. Purpose</h2>
                <p>The Disclosing Party possesses confidential, proprietary, and trade secret information, including but not limited to business strategies, concepts, designs, intellectual property, code, processes, systems, client data, and discussions ("Confidential Information"). The Receiving Party wishes to receive such information for limited purposes and agrees to maintain strict confidentiality.</p>
            </div>

            <div class="section">
                <h2>2. Definition of Confidential Information</h2>
                <p>For purposes of this Agreement, "Confidential Information" shall include any and all data or information, tangible or intangible, verbal or written, disclosed before or after the Effective Date, including but not limited to:</p>
                <ul>
                    <li>Business plans, strategies, trade secrets, designs, methods, processes, know-how, inventions, software, code, documentation, client data, and research;</li>
                    <li>Any discussions, verbal exchanges, digital communications, or ideas shared between the parties, whether in person, online, by email, text, or any other medium;</li>
                    <li>Any concept, idea, or development discussed or implied, whether or not later realized;</li>
                    <li>Information disclosed by third parties connected to the Disclosing Party.</li>
                </ul>
                <p>All such information shall remain the sole and exclusive property of the Disclosing Party.</p>
            </div>

            <div class="section">
                <h2>3. Non-Disclosure & Non-Use Obligations</h2>
                <p>The Receiving Party agrees to:</p>
                <ul>
                    <li>a) Keep all Confidential Information strictly confidential and not disclose, copy, publish, or disseminate it in any form;</li>
                    <li>b) Not use the Confidential Information for their own benefit or for any third party;</li>
                    <li>c) Not attempt to replicate, reverse-engineer, or develop derivative works based on any information received;</li>
                    <li>d) Take all reasonable precautions to prevent any unauthorized disclosure;</li>
                    <li>e) Not disclose, discuss, or acknowledge to any third party the fact that meetings, discussions, communications, or any interactions have taken place between the parties, regardless of the subject matter or outcome of such interactions.</li>
                </ul>
                <p>These obligations shall apply indefinitely.</p>
            </div>

            <div class="section">
                <h2>4. Non-Compete Clause</h2>
                <p>The Receiving Party agrees that they will not, directly or indirectly, for themselves or any third party, engage in, create, advise, consult, or participate in any business, product, or service that competes with the Disclosing Party's business or intellectual property, whether existing or future, without prior written consent. This restriction is worldwide and perpetual in scope.</p>
            </div>

            <div class="section">
                <h2>5. Non-Solicitation Clause</h2>
                <p>The Receiving Party shall not, directly or indirectly, solicit, contact, divert, or attempt to entice any of the Disclosing Party's clients, customers, employees, contractors, vendors, partners, or affiliates for any purpose that competes with or interferes with the Disclosing Party's operations.</p>
            </div>

            <div class="section">
                <h2>6. Non-Circumvention</h2>
                <p>The Receiving Party shall not bypass or attempt to circumvent the Disclosing Party for the purpose of commercial gain, partnerships, contracts, or introductions made through or by the Disclosing Party.</p>
            </div>

            <div class="section">
                <h2>7. Ownership and Return of Materials</h2>
                <p>All Confidential Information remains the sole and exclusive property of the Disclosing Party. Upon request, the Receiving Party shall immediately return or permanently delete all materials containing Confidential Information.</p>
            </div>

            <div class="section">
                <h2>8. Remedies for Breach</h2>
                <p>The Receiving Party acknowledges that any breach of this Agreement will cause irreparable harm to the Disclosing Party. Accordingly, the Disclosing Party shall be entitled to:</p>
                <ul>
                    <li>Immediate injunctive relief (temporary and permanent) without bond;</li>
                    <li>Actual and punitive damages, including consequential and special damages;</li>
                    <li>Recovery of attorney's fees and legal costs;</li>
                    <li>Cease and desist orders, and</li>
                    <li>Any other remedies available at law or equity.</li>
                </ul>
                <p>These remedies are cumulative and not exclusive.</p>
            </div>

            <div class="section">
                <h2>9. Duration & Survival</h2>
                <p>This Agreement and all obligations herein are perpetual, surviving the death, dissolution, merger, or reorganization of either party. There is no expiration or termination date.</p>
            </div>

            <div class="section">
                <h2>10. Governing Law & Venue</h2>
                <p>This Agreement shall be governed by and construed in accordance with the laws of the State of Florida, without regard to conflicts of law principles. Any disputes shall be brought exclusively in the state or federal courts located in Miami-Dade County, Florida, and the parties hereby consent to personal jurisdiction and venue therein.</p>
            </div>

            <div class="section">
                <h2>11. Severability</h2>
                <p>If any provision of this Agreement is held to be invalid or unenforceable, the remaining provisions shall remain in full force and effect.</p>
            </div>

            <div class="section">
                <h2>12. Entire Agreement</h2>
                <p>This Agreement constitutes the entire understanding between the parties and supersedes all prior or contemporaneous discussions, communications, or agreements, whether oral or written.</p>
            </div>

            <div class="section">
                <h2>13. Amendments</h2>
                <p>No modification, amendment, or waiver of any provision of this Agreement shall be effective unless made in writing and signed by both parties.</p>
            </div>

            <div class="section">
                <h2>14. Non-Disclosure of Agreement</h2>
                <p>The Receiving Party shall not disclose, reveal, or acknowledge the existence of this Agreement to any third party without the prior written consent of the Disclosing Party. This includes, but is not limited to, the fact that discussions have occurred, that a confidentiality agreement exists between the parties, or that any business relationship or communication has taken place. This obligation applies indefinitely and survives any termination or expiration of business discussions between the parties.</p>
            </div>
        </div>

        <div class="signature-section">
            <h2>15. Signatures</h2>

            <form id="nda-form" method="POST" action="submit.php">
                <div class="form-group">
                    <label for="receiving_party_name"><strong>Receiving Party Full Legal Name:</strong></label>
                    <input type="text" id="receiving_party_name" name="receiving_party_name" required placeholder="Enter your full legal name">
                    <p class="help-text">This name will be used as the Receiving Party in this agreement</p>
                </div>

                <div class="form-group">
                    <label for="receiving_party_email"><strong>Email Address:</strong></label>
                    <input type="email" id="receiving_party_email" name="receiving_party_email" required placeholder="your@email.com">
                </div>

                <div class="form-group">
                    <label for="receiving_party_phone"><strong>Phone Number:</strong></label>
                    <input type="tel" id="receiving_party_phone" name="receiving_party_phone" required placeholder="Enter your phone number">
                </div>

                <div class="signature-type-selector">
                    <h3>Choose Signature Method:</h3>
                    <div class="radio-group">
                        <label>
                            <input type="radio" name="signature_type" value="drawn" checked onchange="toggleSignatureMethod()">
                            Draw Signature (Handwritten)
                        </label>
                        <label>
                            <input type="radio" name="signature_type" value="typed" onchange="toggleSignatureMethod()">
                            Type Signature
                        </label>
                    </div>
                </div>

                <div id="drawn-signature-container" class="signature-container">
                    <h3>Receiving Party Signature:</h3>
                    <p class="help-text">Please sign below using your mouse, trackpad, or touchscreen</p>
                    <div class="signature-pad-wrapper">
                        <canvas id="signature-pad" width="600" height="200"></canvas>
                    </div>
                    <button type="button" onclick="clearSignature()" class="btn-secondary">Clear Signature</button>
                    <input type="hidden" id="signature_data" name="signature_data">
                </div>

                <div id="typed-signature-container" class="signature-container" style="display: none;">
                    <h3>Type Your Signature:</h3>
                    <input type="text" id="typed_signature" name="typed_signature" placeholder="Type your full legal name" class="signature-input">
                    <p class="help-text">By typing your name, you agree that this constitutes a legal signature</p>
                </div>

                <div class="form-group checkbox-group">
                    <label>
                        <input type="checkbox" id="agreement_consent" name="agreement_consent" required>
                        <strong>I have read, understood, and agree to be bound by all terms and conditions of this Non-Disclosure Agreement</strong>
                    </label>
                </div>

                <div class="form-group checkbox-group">
                    <label>
                        <input type="checkbox" id="legal_authority" name="legal_authority" required>
                        <strong>I certify that I have the legal authority to enter into this Agreement</strong>
                    </label>
                </div>

                <button type="submit" class="btn-primary" id="submit-btn">Sign Agreement</button>
            </form>
        </div>

        <footer>
            <p class="footer-text">This document will be legally binding upon submission. A copy will be sent to your email address.</p>
            <p class="footer-text">Questions? Contact: <a href="mailto:Adam@adamantanesthesia.com">Adam@adamantanesthesia.com</a> | <a href="logout.php">Logout</a></p>
        </footer>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/signature_pad@4.1.7/dist/signature_pad.umd.min.js"></script>
    <script src="script.js"></script>
</body>
</html>
