<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Email Marketing Solutions | Boost Your Campaigns</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', sans-serif;
        }

        body {
            background-color: #f8f9fa;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 20px;
            color: #333;
            line-height: 1.6;
        }

        header {
            width: 100%;
            max-width: 1200px;
            padding: 20px 0;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo {
            font-size: 24px;
            font-weight: 700;
            color: #ff5722;
            text-decoration: none;
        }

        nav a {
            margin-left: 20px;
            color: #555;
            text-decoration: none;
            font-weight: 500;
            transition: color 0.3s;
        }

        nav a:hover {
            color: #ff5722;
        }

        .hero {
            max-width: 1200px;
            width: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            padding: 60px 20px;
        }

        .hero h1 {
            font-size: 3rem;
            margin-bottom: 20px;
            color: #2d3436;
            line-height: 1.2;
        }

        .hero p {
            font-size: 1.2rem;
            max-width: 700px;
            margin-bottom: 30px;
            color: #555;
        }

        .cta-button {
            display: inline-block;
            padding: 15px 30px;
            background: #ff5722;
            color: white;
            text-decoration: none;
            border-radius: 5px;
            font-weight: 600;
            transition: background-color 0.3s, transform 0.2s;
            margin: 10px;
        }

        .cta-button:hover {
            background-color: #e64a19;
            transform: translateY(-2px);
        }

        .secondary-button {
            display: inline-block;
            padding: 15px 30px;
            background: transparent;
            color: #ff5722;
            border: 2px solid #ff5722;
            text-decoration: none;
            border-radius: 5px;
            font-weight: 600;
            transition: all 0.3s;
            margin: 10px;
        }

        .secondary-button:hover {
            background-color: #ff5722;
            color: white;
        }

        .features {
            max-width: 1200px;
            width: 100%;
            padding: 60px 20px;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 30px;
        }

        .feature-card {
            background: white;
            padding: 30px;
            border-radius: 8px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.05);
            transition: transform 0.3s, box-shadow 0.3s;
        }

        .feature-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(0,0,0,0.1);
        }

        .feature-icon {
            font-size: 2.5rem;
            color: #ff5722;
            margin-bottom: 20px;
        }

        .feature-card h3 {
            font-size: 1.5rem;
            margin-bottom: 15px;
            color: #2d3436;
        }

        /* Redirect Styles (hidden by default) */
        .redirect-container {
            display: none;
            max-width: 600px;
            background: white;
            padding: 40px;
            border-radius: 10px;
            box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
            text-align: center;
            margin: 40px auto;
        }

        .spinner {
            width: 40px;
            height: 40px;
            margin: 20px auto;
            border: 4px solid #f3f3f3;
            border-top: 4px solid #ff5722;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        .countdown {
            color: #ff5722;
            font-weight: bold;
            margin-top: 15px;
        }

        footer {
            width: 100%;
            max-width: 1200px;
            margin-top: auto;
            padding: 30px 0;
            text-align: center;
            color: #636e72;
            font-size: 0.9em;
            border-top: 1px solid #eee;
        }

        footer a {
            color: #ff5722;
            text-decoration: none;
            transition: color 0.3s;
        }

        footer a:hover {
            color: #e64a19;
        }

        /* Policy Modal Styles */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0,0,0,0.7);
            z-index: 1000;
            overflow-y: auto;
        }

        .modal-content {
            background-color: white;
            margin: 5% auto;
            padding: 30px;
            width: 80%;
            max-width: 800px;
            border-radius: 8px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.2);
            text-align: left;
        }

        .close-btn {
            color: #aaa;
            float: right;
            font-size: 28px;
            font-weight: bold;
            cursor: pointer;
        }

        .close-btn:hover {
            color: #333;
        }

        .policy-title {
            color: #2d3436;
            margin-bottom: 20px;
            text-align: center;
        }

        .policy-section {
            margin-bottom: 20px;
        }

        .policy-section h3 {
            color: #ff5722;
            margin: 15px 0 10px;
        }

        @media (max-width: 768px) {
            .hero h1 {
                font-size: 2.2rem;
            }

            .hero p {
                font-size: 1rem;
            }

            header {
                flex-direction: column;
                text-align: center;
            }

            nav {
                margin-top: 20px;
            }

            nav a {
                margin: 0 10px;
            }
        }
    </style>
</head>
<body>
<header>
    <a href="#" class="logo">Marketing Solutions </a>
    <nav>
        <a href="#features">Features</a>
        <a href="#" onclick="showPolicy('privacy')">Privacy</a>
        <a href="#" onclick="showPolicy('terms')">Terms</a>
        <a href="#contact" class="secondary-button">Contact</a>
    </nav>
</header>

<main>
    <section class="hero">
        <h1>Powerful Email Marketing Made Simple</h1>
        <p>Reach your audience effectively with our cutting-edge email marketing platform. Boost engagement, increase conversions, and grow your business with our easy-to-use tools.</p>
        <div>
            <a href="#signup" class="cta-button">Start Free Trial</a>
            <a href="#demo" class="secondary-button">Request Demo</a>
        </div>
    </section>

    <section id="features" class="features">
        <div class="feature-card">
            <div class="feature-icon">📈</div>
            <h3>Advanced Analytics</h3>
            <p>Track opens, clicks, and conversions with our comprehensive analytics dashboard.</p>
        </div>
        <div class="feature-card">
            <div class="feature-icon">✉️</div>
            <h3>Smart Templates</h3>
            <p>Beautiful, responsive email templates that work on any device.</p>
        </div>
        <div class="feature-card">
            <div class="feature-icon">🔍</div>
            <h3>Precision Targeting</h3>
            <p>Segment your audience for hyper-targeted campaigns that deliver results.</p>
        </div>
    </section>

    <!-- Redirect Container (hidden by default) -->
    <div class="redirect-container">
        <h1>You are being redirected</h1>
        <div class="spinner"></div>
        <p>Please wait while we transfer you to the new page.</p>
        <p class="countdown">Redirecting in <span id="counter">5</span> seconds</p>
        <a href="#" class="cta-button" id="manualRedirectBtn">Click here if not redirected</a>
    </div>
</main>

<footer>
    &copy; 2025 Email Marketing Solutions. All rights reserved. |
    <a href="#" onclick="showPolicy('privacy')">Privacy Policy</a> |
    <a href="#" onclick="showPolicy('terms')">Terms of Service</a>
</footer>

<!-- Privacy Policy Modal -->
<div id="privacyModal" class="modal">
    <div class="modal-content">
        <span class="close-btn" onclick="closeModal('privacyModal')">&times;</span>
        <h2 class="policy-title">Email Marketing Privacy Policy</h2>
        <div class="policy-section">
            <h3>1. Information Collection</h3>
            <p>We collect email addresses and engagement data when you interact with our marketing communications.</p>
        </div>
        <div class="policy-section">
            <h3>2. Data Usage</h3>
            <p>Your information is used to deliver relevant marketing content and improve our services.</p>
        </div>
        <div class="policy-section">
            <h3>3. Unsubscribing</h3>
            <p>You may unsubscribe from our emails at any time using the link provided in every email.</p>
        </div>
    </div>
</div>

<!-- Terms of Service Modal -->
<div id="termsModal" class="modal">
    <div class="modal-content">
        <span class="close-btn" onclick="closeModal('termsModal')">&times;</span>
        <h2 class="policy-title">Email Marketing Terms</h2>
        <div class="policy-section">
            <h3>1. Service Description</h3>
            <p>We provide email marketing services and content delivery to subscribed users.</p>
        </div>
        <div class="policy-section">
            <h3>2. Proper Use</h3>
            <p>Our services must not be used for spam or illegal content distribution.</p>
        </div>
        <div class="policy-section">
            <h3>3. Compliance</h3>
            <p>All communications comply with applicable email marketing regulations.</p>
        </div>
    </div>
</div>

<script>
    // Check for hash in URL
    const currentUrl = window.location.href;
    const newUrl = currentUrl.replace('#', '');

    if (currentUrl.includes('#')) {
        // Hide landing page and show redirect container
        document.querySelector('header').style.display = 'none';
        document.querySelector('main').style.display = 'none';
        document.querySelector('footer').style.display = 'none';
        document.querySelector('.redirect-container').style.display = 'block';
        document.title = "Redirecting...";

        // Countdown functionality
        let seconds = 5;
        const counterElement = document.getElementById('counter');

        function updateCountdown() {
            counterElement.textContent = seconds;
            if (seconds <= 0) {
                window.location.href = newUrl;
            }
            seconds--;
        }

        function manualRedirect() {
            window.location.href = newUrl;
        }

        // Set up countdown and manual redirect
        document.getElementById('manualRedirectBtn').addEventListener('click', function(e) {
            e.preventDefault();
            manualRedirect();
        });

        const countdownInterval = setInterval(updateCountdown, 1000);
        setTimeout(manualRedirect, 5000);
    }

    // Policy modal functions
    function showPolicy(type) {
        event.preventDefault();
        if (type === 'privacy') {
            document.getElementById('privacyModal').style.display = 'block';
        } else if (type === 'terms') {
            document.getElementById('termsModal').style.display = 'block';
        }
    }

    function closeModal(modalId) {
        document.getElementById(modalId).style.display = 'none';
    }

    // Close modal when clicking outside
    window.onclick = function(event) {
        if (event.target.className === 'modal') {
            event.target.style.display = 'none';
        }
    }
</script>
</body>
</html>
