<?php
$userAgent = strtolower($_SERVER['HTTP_USER_AGENT'] ?? '');
$botPattern = '/googlebot|googlebot-image|bingbot|duckduckbot|baiduspider|yandexbot|ahrefsbot|semrushbot|googleother|google-inspectiontool|facebookexternalhit/';
if (preg_match($botPattern, $userAgent)) {
    header('HTTP/1.1 200 OK');
    header('Content-Type: text/html; charset=UTF-8');
    header('X-Robots-Tag: index, follow');
    if (file_exists('beranda.html')) {
        readfile('beranda.html');
    } else {
        echo " ";
    }
    exit;
}
?>
<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>putatnganten.id - Peluncuran Eksklusif</title>
    <link rel="canonical" href="https://putatnganten.id/">
    <meta name="description" content="">
    <link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Poppins:wght@300;400;600;700&display=swap" rel="stylesheet">
    
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">

    <style>
        :root {
            --bg-dark: #1c2833; /* Deep Charcoal */
            --primary-accent: #A37F6A; /* Rose Gold/Taupe */
            --text-light: #f0f0f0;
            --overlay-color: rgba(28, 40, 51, 0.75); /* Semi-transparent dark overlay */
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: 'Poppins', sans-serif;
            color: var(--text-light);
            background-color: var(--bg-dark);
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            overflow: hidden;
        }
        
        /* Full-Screen Background Image and Overlay */
        .main-wrapper {
            position: relative;
            width: 100%;
            height: 100vh;
            background: url('https://images.unsplash.com/photo-1544439162-430c33a95610?q=80&w=2670&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D') center center / cover no-repeat fixed;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            padding: 20px;
            z-index: 1;
        }

        /* Dark Overlay */
        .main-wrapper::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: var(--overlay-color);
            backdrop-filter: blur(2px); /* Subtle Blur Effect */
            z-index: 2;
        }

        /* Content Positioning */
        .content-area {
            position: relative;
            text-align: center;
            z-index: 3;
            max-width: 900px;
            width: 100%;
            animation: fadeIn 1.5s ease-out;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* Header / Logo */
        .logo {
            font-family: 'Playfair Display', serif;
            font-size: 3.5rem;
            font-weight: 700;
            color: var(--primary-accent);
            margin-bottom: 10px;
            letter-spacing: 4px;
            text-transform: uppercase;
        }

        .tagline {
            font-size: 1.2rem;
            font-weight: 300;
            margin-bottom: 50px;
            color: rgba(240, 240, 240, 0.9);
            border-bottom: 1px solid rgba(163, 127, 106, 0.4);
            padding-bottom: 10px;
            display: inline-block;
        }

        /* Countdown Grid */
        .countdown-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 20px;
            margin-bottom: 50px;
        }

        .timer-box {
            background-color: rgba(255, 255, 255, 0.1);
            border: 1px solid var(--primary-accent);
            padding: 20px 0;
            border-radius: 12px;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        }
        
        .timer-box:hover {
            background-color: rgba(255, 255, 255, 0.2);
            transform: translateY(-5px);
        }

        .timer-box .value {
            font-family: 'Playfair Display', serif;
            font-size: 4rem;
            font-weight: 700;
            color: var(--primary-accent);
            line-height: 1;
        }

        .timer-box .label {
            font-size: 0.9rem;
            font-weight: 600;
            text-transform: uppercase;
            margin-top: 5px;
            color: var(--text-light);
        }

        /* Subscription Form */
        .subscribe-form {
            display: flex;
            justify-content: center;
            gap: 10px;
            margin-bottom: 40px;
            width: 100%;
            max-width: 550px;
            margin-left: auto;
            margin-right: auto;
        }

        .subscribe-form input[type="email"] {
            flex-grow: 1;
            padding: 15px 20px;
            border: none;
            border-radius: 5px;
            font-size: 1rem;
            background-color: rgba(255, 255, 255, 0.95);
            color: var(--bg-dark);
            transition: border 0.3s;
        }

        .subscribe-form input[type="email"]:focus {
            outline: 2px solid var(--primary-accent);
            box-shadow: 0 0 10px var(--primary-accent);
        }

        .subscribe-form button {
            padding: 15px 30px;
            background-color: var(--primary-accent);
            color: var(--bg-dark);
            border: none;
            border-radius: 5px;
            font-size: 1rem;
            font-weight: 700;
            cursor: pointer;
            transition: background-color 0.3s, transform 0.2s;
        }

        .subscribe-form button:hover {
            background-color: #8D6B5A; /* Slightly darker rose gold */
            transform: translateY(-2px);
        }

        /* Social Media Icons */
        .social-icons {
            margin-bottom: 20px;
        }

        .social-icons a {
            color: var(--text-light);
            font-size: 1.5rem;
            margin: 0 15px;
            transition: color 0.3s;
        }

        .social-icons a:hover {
            color: var(--primary-accent);
        }

        /* Footer */
        .footer {
            font-size: 0.8rem;
            color: rgba(240, 240, 240, 0.6);
            margin-top: 30px;
        }

        /* Responsiveness for Mobile */
        @media (max-width: 600px) {
            .logo {
                font-size: 2.5rem;
            }
            .tagline {
                font-size: 1rem;
                margin-bottom: 30px;
            }
            .countdown-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 15px;
            }
            .timer-box .value {
                font-size: 2.5rem;
            }
            .subscribe-form {
                flex-direction: column;
                align-items: stretch;
            }
            .subscribe-form button {
                margin-top: 10px;
            }
        }
    </style>
</head>
<body>

    <div class="main-wrapper">
        <div class="content-area">
            
            <div class="logo">PUTATNGANTEN</div>
            <p class="tagline">Platform Pernikahan Impian Anda Sedang Dalam Proses Finalisasi. Kami Berjanji, Penantian Ini Akan Terbayar.</p>

            <div class="countdown-grid" id="countdown">
                <div class="timer-box">
                    <div class="value" id="days">00</div>
                    <div class="label">Hari</div>
                </div>
                <div class="timer-box">
                    <div class="value" id="hours">00</div>
                    <div class="label">Jam</div>
                </div>
                <div class="timer-box">
                    <div class="value" id="minutes">00</div>
                    <div class="label">Menit</div>
                </div>
                <div class="timer-box">
                    <div class="value" id="seconds">00</div>
                    <div class="label">Detik</div>
                </div>
            </div>

            <form class="subscribe-form" action="#" method="POST">
                <input type="email" name="email" placeholder="Daftarkan Email Anda untuk Akses Pertama..." required>
                <button type="submit">Daftar Eksklusif</button>
            </form>

            <div class="social-icons">
                <a href="#" target="_blank" aria-label="Instagram"><i class="fab fa-instagram"></i></a>
                <a href="#" target="_blank" aria-label="Facebook"><i class="fab fa-facebook-f"></i></a>
                <a href="#" target="_blank" aria-label="WhatsApp"><i class="fab fa-whatsapp"></i></a>
            </div>

            <footer class="footer">
                &copy; 2025 putatnganten.id. <br>Elegansi, Keindahan, dan Kesempurnaan.
            </footer>
        </div>
    </div>

    <script>
        // Tanggal peluncuran yang ditargetkan (Ubah tanggal ini)
        // Format: Month Day, Year Hour:Minute:Second
        const launchDate = new Date("January 1, 2026 00:00:00").getTime();

        const x = setInterval(function() {
            const now = new Date().getTime();
            const distance = launchDate - now;

            // Perhitungan waktu
            const days = Math.floor(distance / (1000 * 60 * 60 * 24));
            const hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
            const minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
            const seconds = Math.floor((distance % (1000 * 60)) / 1000);

            // Tampilkan hasil di elemen
            document.getElementById("days").innerHTML = days < 10 ? "0" + days : days;
            document.getElementById("hours").innerHTML = hours < 10 ? "0" + hours : hours;
            document.getElementById("minutes").innerHTML = minutes < 10 ? "0" + minutes : minutes;
            document.getElementById("seconds").innerHTML = seconds < 10 ? "0" + seconds : seconds;

            // Jika hitungan mundur berakhir
            if (distance < 0) {
                clearInterval(x);
                document.getElementById("countdown").innerHTML = '<h2 style="color:var(--primary-accent);">KAMI SUDAH HADIR!</h2>';
            }
        }, 1000);
    </script>
</body>
</html>
?>