<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <link rel="icon" type="image/x-icon" href="/favicon.png" />
  <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
  <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
  <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
  <link rel="manifest" href="/site.webmanifest" />
  <link rel="apple-touch-icon" href="/apple-touch-icon.png" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <meta name="theme-color" content="#031774" />
  <meta name="msapplication-TileColor" content="#031774" />

  <!-- One-time Cache API purge per generation (does not wipe auth or sessionStorage) -->
  <script>
    (function () {
      var CACHE_GEN_KEY = 'aakhri_pal_cache_gen';
      var CACHE_GEN = '2026-05-02-2';

      try {
        var needsCleanup = localStorage.getItem(CACHE_GEN_KEY) !== CACHE_GEN;

        if (needsCleanup && 'serviceWorker' in navigator) {
          navigator.serviceWorker.getRegistrations().then(function (registrations) {
            registrations.forEach(function (registration) {
              registration.unregister();
            });
          });
        }

        if (needsCleanup && window.caches && caches.keys) {
          caches.keys().then(function (names) {
            return Promise.all(names.map(function (name) {
              return caches.delete(name);
            }));
          }).catch(function () {}).finally(function () {
            try {
              localStorage.setItem(CACHE_GEN_KEY, CACHE_GEN);
            } catch (e2) {}
          });
        }
      } catch (e) {
        console.warn('Cache generation update skipped:', e);
      }

      window.addEventListener('error', function (e) {
        var msg = e && e.message ? String(e.message) : '';
        if (msg.includes('Loading chunk') || msg.includes('dynamically imported')) {
          if (window.caches && caches.keys) {
            caches.keys().then(function (names) {
              names.forEach(function (name) { caches.delete(name); });
            }).finally(function () {
              window.location.reload();
            });
          } else {
            window.location.reload();
          }
        }
      });
    })();
  </script>

  <!-- Basic SEO Meta Tags (will be overridden by react-helmet-async) -->
  <title>Aakhri Pal - Digital End-of-Life Planning Platform</title>
  <meta name="description"
    content="Secure your legacy with India's trusted digital end-of-life planning platform. Create legal wills, manage assets, and ensure your final wishes are honored." />
  <meta name="keywords"
    content="digital will India, end-of-life planning, estate planning, legal will creation, asset management, final wishes, legacy planning" />

  <!-- Open Graph / Facebook -->
  <meta property="og:type" content="website" />
  <meta property="og:title" content="Aakhri Pal - Digital End-of-Life Planning Platform" />
  <meta property="og:description"
    content="Secure your legacy with India's trusted digital end-of-life planning platform. Create legal wills, manage assets, and ensure your final wishes are honored." />
  <meta property="og:image" content="https://aakhripal.com/og-image.jpg" />
  <meta property="og:url" content="https://aakhripal.com/" />
  <meta property="og:site_name" content="Aakhri Pal" />
  <meta property="og:locale" content="en_IN" />

  <!-- Twitter Card -->
  <meta name="twitter:card" content="summary_large_image" />
  <meta name="twitter:title" content="Aakhri Pal - Digital End-of-Life Planning Platform" />
  <meta name="twitter:description"
    content="Secure your legacy with India's trusted digital end-of-life planning platform. Create legal wills, manage assets, and ensure your final wishes are honored." />
  <meta name="twitter:image" content="https://aakhripal.com/og-image.jpg" />
  <meta name="twitter:site" content="@aakhripal" />
  <meta name="twitter:creator" content="@aakhripal" />

  <!-- Preconnect to external domains for faster loading -->
  <link rel="preconnect" href="https://fonts.googleapis.com" crossorigin />
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
  <link rel="dns-prefetch" href="https://www.googletagmanager.com" />

  <!-- Google Analytics -->
  <script async src="https://www.googletagmanager.com/gtag/js?id=G-EXL6J4WL9J"></script>
  <script>
    window.dataLayer = window.dataLayer || [];
    function gtag() { dataLayer.push(arguments); }
    gtag('js', new Date());
    gtag('config', 'G-EXL6J4WL9J');
  </script>
  <script type="module" crossorigin src="/assets/index-CTUsvtol.js"></script>
  <link rel="stylesheet" crossorigin href="/assets/index-B1O458Wo.css">
</head>

<body>
  <div id="root">
    <div
      style="height: 100vh; width: 100vw; display: flex; flex-direction: column; align-items: center; justify-content: center; background-color: #031774; color: white; font-family: system-ui, -apple-system, Segoe UI, sans-serif;">
      <p style="font-size: 1.125rem; font-weight: 600; margin-bottom: 0.5rem;">Aakhri Pal</p>
      <p style="font-size: 0.95rem; opacity: 0.9;">Loading…</p>
      <div
        style="width: 40px; height: 40px; border: 4px solid rgba(255,255,255,0.3); border-radius: 50%; border-top-color: white; animation: spin 1s ease-in-out infinite; margin-top: 20px;">
      </div>
      <style>
        @keyframes spin {
          to {
            transform: rotate(360deg);
          }
        }
      </style>
    </div>
  </div>
</body>

</html>
