import os

def create_landing_page():
    html_content = """<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>AgileAdapt | AI Voice Widget Demo</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <style>
        .hero-gradient {
            background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
        }
    </style>
</head>
<body class="bg-gray-50 text-gray-900">
    <!-- Hero Section -->
    <header class="hero-gradient text-white py-20 px-6">
        <div class="max-w-4xl mx-auto text-center">
            <h1 class="text-5xl font-extrabold mb-6 tracking-tight">Your Website Can Talk Back (And Stay Compliant)</h1>
            <p class="text-xl mb-8 font-medium text-blue-100">The first AI Voice Widget built for the December 2026 AU Privacy Act ADM reforms.</p>
            
            <div class="bg-white p-8 rounded-2xl shadow-2xl max-w-lg mx-auto transform transition hover:scale-105">
                <p class="text-gray-700 font-bold mb-4 text-left">Experience the Zero-Touch Demo:</p>
                <div class="flex flex-col gap-4">
                    <input type="url" placeholder="Enter your business website (e.g., https://yourbiz.com)" class="p-4 border border-gray-300 rounded-lg text-gray-900 focus:ring-2 focus:ring-blue-500 outline-none">
                    <button id="start-demo" class="bg-blue-600 hover:bg-blue-700 text-white font-bold py-4 rounded-lg shadow-lg transition duration-300">
                        Generate Your AI Voice Clone (30s)
                    </button>
                </div>
                <p class="mt-4 text-xs text-gray-500">We'll scrape your brand, voice, and services automatically.</p>
            </div>
        </div>
    </header>

    <!-- 9-Layer Shield Section -->
    <section class="py-20 px-6 max-w-6xl mx-auto">
        <h2 class="text-3xl font-bold text-center mb-16">The AgileAdapt 9-Layer Shield</h2>
        <div class="grid md:grid-cols-3 gap-10">
            <div class="p-8 bg-white border border-gray-100 rounded-xl shadow-sm hover:shadow-md transition">
                <h3 class="font-bold text-xl mb-3 text-blue-600">Compliance First</h3>
                <p class="text-gray-600">Pre-built for the Dec 2026 Privacy Act reforms. Don't risk catastrophic liability.</p>
            </div>
            <div class="p-8 bg-white border border-gray-100 rounded-xl shadow-sm hover:shadow-md transition">
                <h3 class="font-bold text-xl mb-3 text-blue-600">Zero Hallucination</h3>
                <p class="text-gray-600">Our 9-patent-pending real-time catch system ensures your AI speaks only the truth.</p>
            </div>
            <div class="p-8 bg-white border border-gray-100 rounded-xl shadow-sm hover:shadow-md transition">
                <h3 class="font-bold text-xl mb-3 text-blue-600">Browser-Native</h3>
                <p class="text-gray-600">No phone numbers. No delays. High-speed Australian servers for clear voice calls.</p>
            </div>
        </div>
    </section>

    <!-- Pricing (AUD/mo) -->
    <section class="bg-gray-100 py-20 px-6">
        <div class="max-w-6xl mx-auto">
            <h2 class="text-3xl font-bold text-center mb-16">Choose Your Shield</h2>
            <div class="grid md:grid-cols-3 gap-8">
                <!-- Starter Tier -->
                <div class="p-10 bg-white border border-gray-200 rounded-2xl flex flex-col items-center">
                    <h3 class="text-xl font-bold mb-2">Starter Tier</h3>
                    <p class="text-4xl font-extrabold mb-6">$497 <span class="text-base font-normal text-gray-500">/mo</span></p>
                    <ul class="text-gray-600 space-y-3 mb-8 text-center">
                        <li>500 AI Minutes</li>
                        <li>Basic 9-Layer Shield</li>
                        <li>Browser Widget</li>
                    </ul>
                    <button class="w-full bg-blue-600 text-white font-bold py-3 rounded-lg hover:bg-blue-700 transition">Get Started</button>
                </div>
                <!-- Pro Tier (Highlighted) -->
                <div class="p-10 bg-white border-2 border-blue-500 rounded-2xl flex flex-col items-center relative shadow-xl transform scale-105">
                    <span class="absolute top-0 right-1/2 translate-x-1/2 -translate-y-1/2 bg-blue-500 text-white px-4 py-1 rounded-full text-sm font-bold">MOST POPULAR</span>
                    <h3 class="text-xl font-bold mb-2">Pro Tier</h3>
                    <p class="text-4xl font-extrabold mb-6">$997 <span class="text-base font-normal text-gray-500">/mo</span></p>
                    <ul class="text-gray-600 space-y-3 mb-8 text-center">
                        <li>2,000 AI Minutes</li>
                        <li>Advanced 9-Layer Shield</li>
                        <li>GHL / CRM Integration</li>
                    </ul>
                    <button class="w-full bg-blue-600 text-white font-bold py-3 rounded-lg hover:bg-blue-700 transition">Get Started</button>
                </div>
                <!-- Enterprise Tier -->
                <div class="p-10 bg-white border border-gray-200 rounded-2xl flex flex-col items-center">
                    <h3 class="text-xl font-bold mb-2">Enterprise Tier</h3>
                    <p class="text-4xl font-extrabold mb-6">$1,497 <span class="text-base font-normal text-gray-500">/mo</span></p>
                    <ul class="text-gray-600 space-y-3 mb-8 text-center">
                        <li>Unlimited Minutes</li>
                        <li>Custom Compliance Policy</li>
                        <li>Direct Technical Concierge</li>
                    </ul>
                    <button class="w-full bg-blue-600 text-white font-bold py-3 rounded-lg hover:bg-blue-700 transition">Get Started</button>
                </div>
            </div>
        </div>
    </section>

    <!-- Telnyx Voice Agent Placeholder (Visible after demo start) -->
    <div id="demo-widget-container" class="hidden fixed bottom-10 right-10 z-50">
        <!-- UUID will be injected here -->
        <telnyx-ai-agent agent-id="PLACEHOLDER-UUID" vad='{"silenceDurationMs":500,"minSpeechDurationMs":80}'></telnyx-ai-agent>
    </div>

    <!-- Closer Widget (Sticky Bottom-Right for direct closure) -->
    <div class="fixed bottom-6 right-6 z-40 bg-white p-6 rounded-xl shadow-2xl border border-gray-200 max-w-xs transition transform translate-y-0 opacity-100 hover:-translate-y-1">
        <div class="flex items-start gap-4 mb-4">
            <div class="w-10 h-10 bg-blue-500 rounded-full flex items-center justify-center text-white font-bold">G</div>
            <div>
                <p class="font-bold text-sm">Growth Director AI</p>
                <p class="text-xs text-gray-500">AgileAdapt HQ</p>
            </div>
        </div>
        <p class="text-sm text-gray-700 mb-4 italic">"Protect your agency and your clients with our 9-Layer Shield. Start with the $497 Starter Tier today and bridge the liability gap before Dec 2026."</p>
        <button class="w-full bg-green-600 hover:bg-green-700 text-white text-sm font-bold py-2 rounded shadow transition">
            Close the Gap Now
        </button>
    </div>

    <script async src="https://unpkg.com/@telnyx/ai-agent-widget"></script>
    <script>
        document.getElementById('start-demo').addEventListener('click', function() {
            const url = document.querySelector('input').value;
            if(!url) { alert('Please enter a business URL'); return; }
            
            this.innerText = 'Scraping site & Training AI...';
            this.disabled = true;
            
            // Simulating the 30s scrape
            setTimeout(() => {
                alert('Success! Your AI Voice Agent is now trained on your site. Click the widget in the bottom right to talk to it.');
                document.getElementById('demo-widget-container').classList.remove('hidden');
                this.innerText = 'Demo Active';
            }, 30000);
        });
    </script>
</body>
</html>
"""
    output_path = "/mnt/e/genesis-system/Sunaiva/talking-widget/demo-landing.html"
    os.makedirs(os.path.dirname(output_path), exist_ok=True)
    with open(output_path, "w") as f:
        f.write(html_content)
    print(f"Landing page created at {output_path}")

if __name__ == "__main__":
    create_landing_page()
