<?php session_start(); ?><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Veritune - Copyright Your Music</title>
    
    <?php
    // Read project preview data from environment
    $projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? 'Instantly copyright your music with Veritune. Get 20 free certificates daily.';
    $projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? '';
    ?>
    <meta name="description" content="<?= htmlspecialchars($projectDescription) ?>">
    <?php if ($projectDescription): ?>
    <!-- Open Graph meta tags -->
    <meta property="og:description" content="<?= htmlspecialchars($projectDescription) ?>" />
    <!-- Twitter meta tags -->
    <meta property="twitter:description" content="<?= htmlspecialchars($projectDescription) ?>" />
    <?php endif; ?>
    <?php if ($projectImageUrl): ?>
    <!-- Open Graph image -->
    <meta property="og:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
    <!-- Twitter image -->
    <meta property="twitter:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
    <?php endif; ?>

    <!-- Bootstrap CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">

    <!-- Google Fonts -->
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@600;700&family=Inter:wght@400;500&display=swap" rel="stylesheet">
    
    <!-- Custom CSS -->
    <link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">

    <!-- PWA Manifest -->
    <link rel="manifest" href="manifest.json">
    <meta name="theme-color" content="#4F46E5">
</head>
<body>

    <?php include 'includes/header.php'; ?>

    <!-- Hero Section -->
    <header class="hero text-center">
        <div class="container">
            <h1 class="display-3">Copyright Your Music, Instantly.</h1>
            <p class="lead mb-4">Veritune provides 20 free song copyright certificates a day on our free plan. <br>Secure your work and get peace of mind.</p>
            <a href="#upload" class="btn btn-secondary btn-lg">Get Started for Free</a>
        </div>
    </header>

    <!-- Features Section -->
    <section id="features" class="section">
        <div class="container">
            <div class="row text-center">
                <div class="col-lg-8 mx-auto">
                    <h2 class="mb-4">Everything You Need to Protect Your Art</h2>
                    <p class="lead mb-5">From instant certificates to commercial usage rights, we've got you covered.</p>
                </div>
            </div>
            <div class="row g-4">
                <div class="col-md-4">
                    <div class="feature-card">
                        <div class="feature-icon">
                            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z"></path><path d="m9 12 2 2 4-4"></path></svg>
                        </div>
                        <h3>Instant Certificates</h3>
                        <p>Upload your song and receive a copyright certificate ID in seconds. It's that simple.</p>
                    </div>
                </div>
                <div class="col-md-4">
                    <div class="feature-card">
                        <div class="feature-icon">
                            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2H2v10l9.29 9.29a1 1 0 0 0 1.41 0l10-10a1 1 0 0 0 0-1.41L12 2z"></path><circle cx="8.5" cy="8.5" r="1.5"></circle></svg>
                        </div>
                        <h3>Commercial Use Included</h3>
                        <p>All our plans, including the free tier, allow you to use your copyrighted songs for commercial purposes.</p>
                    </div>
                </div>
                <div class="col-md-4">
                    <div class="feature-card">
                         <div class="feature-icon">
                            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="17 8 12 3 7 8"></polyline><line x1="12" y1="3" x2="12" y2="15"></line></svg>
                        </div>
                        <h3>Secure Upload & Download</h3>
                        <p>Easily upload your audio files and download official PDF certificates directly to your device.</p>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Pricing Section -->
    <section id="pricing" class="section bg-white">
        <div class="container">
            <div class="row text-center">
                 <div class="col-lg-8 mx-auto">
                    <h2 class="mb-4">Simple, Transparent Pricing</h2>
                    <p class="lead mb-5">Choose a plan that works for you. Cancel anytime.</p>
                </div>
            </div>
            <div class="row justify-content-center">
                <!-- Free Plan -->
                <div class="col-lg-4 mb-4">
                    <div class="card pricing-card h-100">
                        <div class="card-header text-center p-4">
                            <h3 class="h4">Free</h3>
                            <p class="h1 fw-bold mb-0">$0<span class="fs-6 fw-normal">/mo</span></p>
                        </div>
                        <div class="card-body p-4">
                            <ul class="list-unstyled">
                                <li class="mb-3"><svg class="me-2" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="var(--secondary-color)" class="bi bi-check-circle-fill" viewBox="0 0 16 16"><path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"/></svg> 20 Certificates / Day</li>
                                <li class="mb-3"><svg class="me-2" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="var(--secondary-color)" class="bi bi-check-circle-fill" viewBox="0 0 16 16"><path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"/></svg> Commercial Use License</li>
                                <li class="mb-3 text-muted"><svg class="me-2" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="#6c757d" class="bi bi-x-circle-fill" viewBox="0 0 16 16"><path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.354 4.646a.5.5 0 1 0-.708.708L7.293 8l-2.647 2.646a.5.5 0 0 0 .708.708L8 8.707l2.646 2.647a.5.5 0 0 0 .708-.708L8.707 8l2.647-2.646a.5.5 0 0 0-.708-.708L8 7.293 5.354 4.646z"/></svg> Unlimited Certificates</li>
                            </ul>
                        </div>
                        <div class="card-footer p-4 border-top-0 bg-transparent">
                            <a href="register.php" class="btn btn-outline-primary w-100">Get Started</a>
                        </div>
                    </div>
                </div>
                 <!-- Paid Plan -->
                <div class="col-lg-4 mb-4">
                    <div class="card pricing-card h-100 border-primary">
                         <div class="card-header text-center p-4 bg-primary text-white">
                            <h3 class="h4">Pro</h3>
                            <p class="h1 fw-bold mb-0">$19<span class="fs-6 fw-normal">/mo</span></p>
                        </div>
                        <div class="card-body p-4">
                            <ul class="list-unstyled">
                                <li class="mb-3"><svg class="me-2" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="var(--secondary-color)" class="bi bi-check-circle-fill" viewBox="0 0 16 16"><path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"/></svg> <strong>Unlimited</strong> Certificates</li>
                                <li class="mb-3"><svg class="me-2" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="var(--secondary-color)" class="bi bi-check-circle-fill" viewBox="0 0 16 16"><path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"/></svg> Commercial Use License</li>
                                <li class="mb-3"><svg class="me-2" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="var(--secondary-color)" class="bi bi-check-circle-fill" viewBox="0 0 16 16"><path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"/></svg> Priority Support</li>
                            </ul>
                        </div>
                        <div class="card-footer p-4 border-top-0 bg-transparent">
                            <a href="subscribe.php?plan=pro" class="btn btn-primary w-100">Choose Pro</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
    
    <!-- Footer -->
    <footer class="footer pt-5 pb-4">
        <div class="container text-center">
            <p>&copy; <?php echo date("Y"); ?> Veritune. All Rights Reserved.</p>
            <p>
                <a href="#">Privacy Policy</a> &middot; <a href="#">Terms of Service</a>
            </p>
        </div>
    </footer>

    <!-- Bootstrap JS -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
    <!-- Custom JS -->
    <script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
</body>
</html>