
<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <?php
    $baseDir = rtrim(dirname($_SERVER['SCRIPT_NAME']), '/\\');
    // Ensure base ends with /
    $baseHref = ($baseDir === '' || $baseDir === '/') ? '/' : $baseDir . '/';
    // If inside a subfolder script, extract the root ecosystem folder
    if (preg_match('#^(/[^/]+)#', $_SERVER['REQUEST_URI'] ?? '', $m)) {
        if (strpos($_SERVER['REQUEST_URI'], '/NesvraEcosystem') !== false) {
            $baseHref = '/NesvraEcosystem/';
        }
    }
    ?>
    <base href="<?= htmlspecialchars($baseHref) ?>">
    <title><?php echo htmlspecialchars($pagetitle ?? 'Nesvra'); ?></title>
    
    <!-- SEO Meta Tags -->
    <meta name="description" content="Nesvra - Enterprise-grade fintech infrastructure for remittance, digital wallets, and cross-border payments. Launch your platform in weeks with full IP ownership.">
    <meta name="keywords" content="fintech, remittance platform, digital wallet, cross-border payments, money transfer, FinTech infrastructure, white-label solution">
    <meta name="author" content="Nesvra">
    <meta name="robots" content="index, follow">
    <link rel="canonical" href="<?php echo htmlspecialchars($_SERVER['REQUEST_URI'] ?? 'https://nesvra.com'); ?>">
    
    <!-- Open Graph / Facebook -->
    <meta property="og:type" content="website">
    <meta property="og:url" content="<?php echo htmlspecialchars($_SERVER['REQUEST_URI'] ?? 'https://nesvra.com'); ?>">
    <meta property="og:title" content="<?php echo htmlspecialchars($pagetitle ?? 'Nesvra - FinTech Infrastructure'); ?>">
    <meta property="og:description" content="Enterprise-grade fintech infrastructure for remittance, digital wallets, and cross-border payments. Launch your platform in weeks.">
    <meta property="og:image" content="Asset/favicon.png">
    <meta property="og:site_name" content="Nesvra">
    
    <!-- Twitter -->
    <meta name="twitter:card" content="summary_large_image">
    <meta name="twitter:url" content="<?php echo htmlspecialchars($_SERVER['REQUEST_URI'] ?? 'https://nesvra.com'); ?>">
    <meta name="twitter:title" content="<?php echo htmlspecialchars($pagetitle ?? 'Nesvra - FinTech Infrastructure'); ?>">
    <meta name="twitter:description" content="Enterprise-grade fintech infrastructure for remittance, digital wallets, and cross-border payments.">
    <meta name="twitter:image" content="Asset/favicon.png">
    
    <!-- Additional SEO -->
    <meta name="language" content="English">
    <meta name="revisit-after" content="7 days">
    <meta name="distribution" content="global">

    <script src="https://cdn.tailwindcss.com"></script>

    <link rel="icon" type="image/png" sizes="32x32" href="Asset/favicon.png">
    <link rel="apple-touch-icon" href="Asset/favicon.png">
    <meta name="theme-color" content="#081F5C">
    <meta name="msapplication-TileColor" content="#081F5C">
    <meta name="msapplication-TileImage" content="Asset/favicon.png">

    <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=Geist+Mono:wght@100..900&family=Geist:wght@100..900&display=swap"
        rel="stylesheet">

    <link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
    <script src="https://unpkg.com/lucide@latest/dist/umd/lucide.js"></script>

    <link href="https://cdn.jsdelivr.net/npm/remixicon@4.2.0/fonts/remixicon.css" rel="stylesheet" />

    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        royal: '#081F5C',
                        electric: '#2563FF',
                        brandOrange: '#FF8A00',
                        soft: '#666666', // Your abducted subtext gray
                        dark: '#000000', // Your abducted headline black
                    },
                    fontFamily: {
                        sans: ['Geist', 'sans-serif'],
                        mono: ['Geist Mono', 'monospace'],
                    },
                },
            },
        };
    </script>
    <script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>

    <style>
        body {
            font-family: 'Geist', sans-serif;
            font-feature-settings: "cv02", "cv03", "cv04";
            -webkit-font-smoothing: antialiased;
        }

        /* Premium AOS tweak: slightly smoother transitions */
        [data-aos] {
            pointer-events: none;
        }

        .aos-animate {
            pointer-events: auto;
        }

        /* Add this to your <style> block */
        @keyframes shimmer {
            0% {
                transform: translateX(-100%);
            }

            100% {
                transform: translateX(100%);
            }
        }

        .shimmer-effect {
            position: relative;
            overflow: hidden;
        }

        .shimmer-effect::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
            animation: shimmer 3s infinite;
        }



        @keyframes marquee {
            0% {
                transform: translateX(0);
            }

            100% {
                transform: translateX(-50%);
            }
        }

        .animate-marquee {
            display: flex;
            width: max-content;
            animation: marquee 40s linear infinite;
            /* Slower for a more premium feel */
        }

        /* Updated Fades for White Background */
        .fade-left {
            background: linear-gradient(to right, white, transparent);
        }

        .fade-right {
            background: linear-gradient(to left, white, transparent);
        }




        /* Typography and Container */
        .chat-container {
            perspective: 1000px;
        }

        .chat-text-small {
            font-size: 13px;
            /* Precise, small but readable */
            line-height: 1.4;
            letter-spacing: -0.01em;
        }

        /* Animations */
        .chat-entry {
            opacity: 0;
            transform: translateY(10px) scale(0.98);
            transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .chat-entry.active {
            opacity: 1;
            transform: translateY(0) scale(1);
        }

        /* Glassmorphism Logic */
        .glass-action {
            background: rgba(255, 255, 255, 0.15);
            backdrop-filter: blur(8px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            transition: background 0.3s ease;
        }

        .glass-action:hover {
            background: rgba(255, 255, 255, 0.25);
        }

        @media (max-width: 700px) {
            .chat-container {
                display: none !important;
            }
        }
    </style>
</head>

<script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script>
<script>
    document.addEventListener('DOMContentLoaded', function() {
        AOS.init({
            duration: 1000, // Smooth, sophisticated entrance
            easing: 'ease-out-quart', // Custom elite curve
            once: true, // Animation only happens once while scrolling down
            offset: 50, // Trigger slightly before element is in view
        });
        // ── Lucide ─────────────────────────────────────
        if (typeof lucide !== 'undefined') lucide.createIcons();


    });
</script>