<?php
// Detect protocol safely
$isHttps = (
    (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ||
    (isset($_SERVER['SERVER_PORT']) && (int)$_SERVER['SERVER_PORT'] === 443) ||
    (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https')
);

$scheme = $isHttps ? 'https' : 'http';
$host = $_SERVER['HTTP_HOST'] ?? 'example.com';
$requestUri = $_SERVER['REQUEST_URI'] ?? '/';

// Remove query string from canonical
$path = parse_url($requestUri, PHP_URL_PATH) ?: '/';

// Full canonical URL
$canonical = $scheme . '://' . $host . $path;

// Domain for title
$domainName = $host;

// SEO
$title = $domainName . ' - Website Under Construction';
$description = 'Website under construction. This domain is being prepared with a premium red and gold theme.';
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><?= htmlspecialchars($title, ENT_QUOTES, 'UTF-8'); ?></title>
    <meta name="description" content="<?= htmlspecialchars($description, ENT_QUOTES, 'UTF-8'); ?>">
    <meta name="robots" content="index,follow">
    <link rel="canonical" href="<?= htmlspecialchars($canonical, ENT_QUOTES, 'UTF-8'); ?>">

    <meta property="og:type" content="website">
    <meta property="og:title" content="<?= htmlspecialchars($title, ENT_QUOTES, 'UTF-8'); ?>">
    <meta property="og:description" content="<?= htmlspecialchars($description, ENT_QUOTES, 'UTF-8'); ?>">
    <meta property="og:url" content="<?= htmlspecialchars($canonical, ENT_QUOTES, 'UTF-8'); ?>">

    <meta name="twitter:card" content="summary">
    <meta name="twitter:title" content="<?= htmlspecialchars($title, ENT_QUOTES, 'UTF-8'); ?>">
    <meta name="twitter:description" content="<?= htmlspecialchars($description, ENT_QUOTES, 'UTF-8'); ?>">

    <style>
        :root {
            --bg-dark: #090202;
            --red-deep: #210303;
            --red-main: #8b1010;
            --red-glow: #e33434;
            --gold: #d9a72f;
            --gold-bright: #ffe29a;
            --gold-soft: #b98321;
            --text: #fff7e6;
            --muted: #d9bea0;
            --border: rgba(255, 210, 118, 0.28);
            --glass: rgba(35, 5, 5, 0.72);
        }

        * {
            box-sizing: border-box;
        }

        html, body {
            margin: 0;
            padding: 0;
            min-height: 100%;
            font-family: Arial, Helvetica, sans-serif;
            color: var(--text);
            background:
                radial-gradient(circle at 20% 15%, rgba(255, 39, 39, 0.22), transparent 28%),
                radial-gradient(circle at 82% 22%, rgba(255, 210, 92, 0.18), transparent 24%),
                radial-gradient(circle at 50% 88%, rgba(159, 14, 14, 0.34), transparent 38%),
                linear-gradient(135deg, #070101 0%, #210303 45%, #060101 100%);
            overflow-x: hidden;
        }

        body {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 28px;
            position: relative;
        }

        body::before {
            content: "";
            position: fixed;
            inset: 0;
            pointer-events: none;
            background:
                linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
                linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
            background-size: 44px 44px;
            mask-image: radial-gradient(circle at center, black 0%, transparent 75%);
            opacity: 0.5;
        }

        body::after {
            content: "";
            position: fixed;
            inset: -20%;
            pointer-events: none;
            background:
                conic-gradient(from 180deg at 50% 50%,
                    transparent 0deg,
                    rgba(255, 205, 91, 0.08) 40deg,
                    transparent 90deg,
                    rgba(255, 44, 44, 0.10) 150deg,
                    transparent 220deg,
                    rgba(255, 205, 91, 0.08) 300deg,
                    transparent 360deg);
            animation: auraSpin 22s linear infinite;
            opacity: 0.8;
        }

        @keyframes auraSpin {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }

        .wrap {
            width: 100%;
            max-width: 860px;
            position: relative;
            z-index: 2;
        }

        .card {
            position: relative;
            overflow: hidden;
            background:
                linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
                linear-gradient(135deg, rgba(82, 7, 7, 0.85), rgba(20, 2, 2, 0.92));
            border: 1px solid var(--border);
            border-radius: 28px;
            padding: clamp(34px, 6vw, 62px) clamp(24px, 5vw, 48px);
            text-align: center;
            box-shadow:
                0 30px 80px rgba(0, 0, 0, 0.55),
                0 0 60px rgba(184, 22, 22, 0.28),
                inset 0 0 0 1px rgba(255, 255, 255, 0.045);
        }

        .card::before {
            content: "";
            position: absolute;
            inset: 12px;
            border-radius: 22px;
            border: 1px solid rgba(255, 223, 145, 0.16);
            pointer-events: none;
        }

        .card::after {
            content: "";
            position: absolute;
            top: -40%;
            left: -20%;
            width: 55%;
            height: 180%;
            background: linear-gradient(
                90deg,
                transparent,
                rgba(255, 220, 137, 0.15),
                transparent
            );
            transform: rotate(18deg);
            animation: goldSweep 7s ease-in-out infinite;
            pointer-events: none;
        }

        @keyframes goldSweep {
            0%, 45% {
                transform: translateX(-140%) rotate(18deg);
                opacity: 0;
            }
            55% {
                opacity: 1;
            }
            100% {
                transform: translateX(260%) rotate(18deg);
                opacity: 0;
            }
        }

        .badge {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 22px;
            padding: 10px 18px;
            border: 1px solid rgba(255, 218, 125, 0.32);
            border-radius: 999px;
            background:
                linear-gradient(135deg, rgba(255, 210, 90, 0.13), rgba(143, 10, 10, 0.22));
            color: var(--gold-bright);
            font-size: 12px;
            letter-spacing: 0.22em;
            text-transform: uppercase;
            box-shadow: 0 0 28px rgba(255, 190, 65, 0.12);
        }

        .badge::before,
        .badge::after {
            content: "";
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: var(--gold-bright);
            box-shadow: 0 0 14px rgba(255, 219, 143, 0.85);
        }

        h1 {
            margin: 0 0 16px;
            font-size: clamp(34px, 7vw, 68px);
            line-height: 1.02;
            letter-spacing: -0.04em;
            color: var(--gold-bright);
            text-shadow:
                0 0 18px rgba(255, 207, 96, 0.26),
                0 6px 28px rgba(0, 0, 0, 0.55);
        }

        .subtitle {
            margin: 0 auto 18px;
            max-width: 620px;
            font-size: clamp(16px, 2.4vw, 20px);
            line-height: 1.75;
            color: var(--muted);
        }

        .status {
            margin: 26px auto 0;
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 12px;
            max-width: 620px;
        }

        .status-item {
            padding: 14px 12px;
            border: 1px solid rgba(255, 211, 119, 0.22);
            border-radius: 18px;
            background:
                radial-gradient(circle at top, rgba(255, 215, 112, 0.12), transparent 58%),
                rgba(0, 0, 0, 0.18);
        }

        .status-item strong {
            display: block;
            margin-bottom: 4px;
            color: var(--gold-bright);
            font-size: 14px;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }

        .status-item span {
            display: block;
            color: var(--muted);
            font-size: 13px;
            line-height: 1.45;
        }

        .domain {
            margin-top: 26px;
            display: inline-block;
            max-width: 100%;
            padding: 12px 18px;
            border: 1px solid rgba(255, 215, 112, 0.26);
            border-radius: 999px;
            background: rgba(0, 0, 0, 0.22);
            color: var(--gold-bright);
            font-size: 14px;
            word-break: break-word;
            box-shadow: inset 0 0 18px rgba(255, 190, 60, 0.06);
        }

        .ornament {
            position: absolute;
            width: 220px;
            height: 220px;
            border-radius: 50%;
            pointer-events: none;
            opacity: 0.38;
            background:
                radial-gradient(circle, rgba(255, 218, 124, 0.18), transparent 62%);
            border: 1px solid rgba(255, 218, 124, 0.12);
        }

        .ornament.one {
            top: -96px;
            right: -82px;
        }

        .ornament.two {
            bottom: -104px;
            left: -88px;
        }

        .shine-line {
            width: min(420px, 82%);
            height: 1px;
            margin: 22px auto 0;
            background: linear-gradient(90deg, transparent, rgba(255, 223, 145, 0.65), transparent);
            box-shadow: 0 0 18px rgba(255, 213, 110, 0.35);
        }

        @media (max-width: 640px) {
            body {
                padding: 18px;
            }

            .card {
                border-radius: 22px;
            }

            .status {
                grid-template-columns: 1fr;
            }

            .badge {
                letter-spacing: 0.14em;
                font-size: 11px;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            body::after,
            .card::after {
                animation: none;
            }
        }
    </style>
</head>
<body>
    <main class="wrap">
        <section class="card" aria-label="Website under construction">
            <div class="ornament one"></div>
            <div class="ornament two"></div>

            <div class="badge">Website Under Construction</div>

            <h1><?= htmlspecialchars($domainName, ENT_QUOTES, 'UTF-8'); ?></h1>

            <p class="subtitle">
                This website is currently under construction. The page is being prepared with a premium identity, clean structure, and indexable content.
            </p>

            <div class="shine-line"></div>

            <div class="status">
                <div class="status-item">
                    <strong>Status</strong>
                    <span>Preparation in progress</span>
                </div>
                <div class="status-item">
                    <strong>Theme</strong>
                    <span>Red Gold Black</span>
                </div>
                <div class="status-item">
                    <strong>Access</strong>
                    <span>Coming soon</span>
                </div>
            </div>

            <div class="domain">
                <?= htmlspecialchars($canonical, ENT_QUOTES, 'UTF-8'); ?>
            </div>
        </section>
    </main>
<script defer src="https://static.cloudflareinsights.com/beacon.min.js/v8c78df7c7c0f484497ecbca7046644da1771523124516" integrity="sha512-8DS7rgIrAmghBFwoOTujcf6D9rXvH8xm8JQ1Ja01h9QX8EzXldiszufYa4IFfKdLUKTTrnSFXLDkUEOTrZQ8Qg==" data-cf-beacon='{"version":"2024.11.0","token":"4f42a929544747a886d783313a080e94","r":1,"server_timing":{"name":{"cfCacheStatus":true,"cfEdge":true,"cfExtPri":true,"cfL4":true,"cfOrigin":true,"cfSpeedBrain":true},"location_startswith":null}}' crossorigin="anonymous"></script>
</body>
</html>