<!doctype html>
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        <meta name="theme-color" content="#08080b" />

        <!--
          SEO meta tags are set per-page via react-helmet-async.
          Only the <title> tag below is kept as a fallback for crawlers
          that don't execute JS. All other meta/OG/Twitter tags are
          managed by Helmet in each page component.
        -->
        <title>Vedain CRM — $10/user/month, Everything Included</title>

        <!-- Favicon -->
        <link rel="icon" type="image/svg+xml" href="/favicon-v3.svg" />
        <link rel="apple-touch-icon" href="/favicon-v3.svg" />

        <!-- Self-hosted fonts — Geist (body), Instrument Serif (display), JetBrains Mono (labels) -->
        <link rel="preload" href="/fonts/geist-latin-400.woff2" as="font" type="font/woff2" crossorigin />
        <link rel="preload" href="/fonts/instrument-serif-regular.woff2" as="font" type="font/woff2" crossorigin />
        <link rel="preload" href="/fonts/jetbrains-mono-latin-400.woff2" as="font" type="font/woff2" crossorigin />

        <!-- Google Fonts — async preload for font picker (off critical path) -->
        <link rel="preconnect" href="https://fonts.googleapis.com" />
        <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
        <link rel="preload" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=DM+Sans:wght@400;500;600;700&family=Poppins:wght@400;500;600;700&family=Work+Sans:wght@400;500;600;700&family=Lato:wght@400;700&family=Josefin+Sans:wght@400;500;600;700&display=swap" as="style" onload="this.onload=null;this.rel='stylesheet'" />
        <noscript><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=DM+Sans:wght@400;500;600;700&family=Poppins:wght@400;500;600;700&family=Work+Sans:wght@400;500;600;700&family=Lato:wght@400;700&family=Josefin+Sans:wght@400;500;600;700&display=swap" /></noscript>

        <!-- Structured Data: Organization -->
        <script type="application/ld+json">
        {
          "@context": "https://schema.org",
          "@type": "Organization",
          "name": "Vedain",
          "url": "https://vedain.com",
          "logo": "https://vedain.com/og-image.png",
          "description": "Vedain is a modern CRM for growing sales teams. Manage leads, contacts, deals, email campaigns, and workflows all in one place.",
          "sameAs": [
            "https://twitter.com/vedaincrm",
            "https://www.linkedin.com/company/vedain"
          ],
          "contactPoint": {
            "@type": "ContactPoint",
            "contactType": "customer support",
            "url": "https://vedain.com/contact"
          }
        }
        </script>

        <!-- SoftwareApplication schema is set per-page via react-helmet-async (Home.jsx) -->

        <!-- Google Analytics — fully deferred until idle/5s to keep it off the critical path -->
        <script>
          window.dataLayer = window.dataLayer || [];
          function gtag(){dataLayer.push(arguments);}
          function _loadGA() {
            if (window._gaLoaded) return;
            window._gaLoaded = true;
            var s = document.createElement('script');
            s.src = 'https://www.googletagmanager.com/gtag/js?id=G-4QMXG6N2HY';
            s.async = true;
            document.head.appendChild(s);
            gtag('js', new Date());
            gtag('config', 'G-4QMXG6N2HY');
          }
          if (typeof requestIdleCallback === 'function') {
            requestIdleCallback(_loadGA, { timeout: 5000 });
          } else {
            setTimeout(_loadGA, 5000);
          }
        </script>

        <!-- Meta Pixel — stub initialises immediately so fbq() calls queue safely;
             fbevents.js script loads deferred to stay off the critical path
             (Vedain CRM Connection, ID 1042630678420129) -->
        <script>
          !function(f,b,e,v,n,t,s){
            if(f.fbq)return;n=f.fbq=function(){n.callMethod?
            n.callMethod.apply(n,arguments):n.queue.push(arguments)};
            if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
            n.queue=[];
          }(window,document,'script','https://connect.facebook.net/en_US/fbevents.js');
          fbq('init','1042630678420129');
          fbq('track','PageView');
          // Defer loading the heavy fbevents.js until idle
          function _loadFbScript(){
            if(window._fbScriptLoaded)return;
            window._fbScriptLoaded=true;
            var t=document.createElement('script');
            t.async=true;t.src='https://connect.facebook.net/en_US/fbevents.js';
            document.head.appendChild(t);
          }
          if(typeof requestIdleCallback==='function'){
            requestIdleCallback(_loadFbScript,{timeout:5000});
          }else{
            setTimeout(_loadFbScript,5000);
          }
        </script>
      <script type="module" crossorigin src="/assets/index-BXmt3U-w.js"></script>
      <link rel="stylesheet" crossorigin href="/assets/index-CA4P4bUP.css">
    </head>
    <body>
        <script>
          (function(){var t=localStorage.getItem('vedain_crm_theme');document.documentElement.setAttribute('data-theme',t||'confident-dark');var f=localStorage.getItem('vedain_crm_font')||'Lato';var m={'JetBrains Mono':'ui-monospace, monospace','Inter':'system-ui, sans-serif','Geist':'system-ui, sans-serif','DM Sans':'system-ui, sans-serif','Poppins':'system-ui, sans-serif','Work Sans':'system-ui, sans-serif','Lato':'system-ui, sans-serif','Roboto':'system-ui, sans-serif','Josefin Sans':'system-ui, sans-serif','SF Pro':'-apple-system, BlinkMacSystemFont, system-ui, sans-serif'};document.documentElement.style.setProperty('--crm-font',"'"+f+"', "+(m[f]||'system-ui, sans-serif'));})();
        </script>
        <noscript>You need to enable JavaScript to run this app.</noscript>
        <!-- Meta Pixel noscript fallback -->
        <noscript><img height="1" width="1" alt="" style="display:none" src="https://www.facebook.com/tr?id=1042630678420129&ev=PageView&noscript=1" /></noscript>
        <div id="root"></div>
        <!-- Vedain live chat widget — public visitors only (skipped for logged-in
             users, non-vedain hosts, and react-snap/puppeteer pre-rendering) -->
        <script>
          (function () {
            try {
              if (navigator.webdriver) return;
              if (!/(^|\.)vedain\.com$/.test(location.hostname)) return;
              if (localStorage.getItem('access_token') || localStorage.getItem('token')) return;
              // App routes (incl. pre-login pages that lead into the app) — the
              // marketing widget must never appear there, and it would otherwise
              // persist across SPA navigation into /setup etc. (overlapped the
              // Setup Assistant footer buttons).
              if (/^\/(login|register|setup|dashboard|forgot-password|reset-password|verify-email|accept-invite|proxy-auth|compose|superadmin)(\/|$)/.test(location.pathname)) return;
              var key = location.hostname === 'test.vedain.com'
                ? '03ff8968-6e2d-46' : '5a0bf5f6-326f-43';
              var load = function () {
                var s = document.createElement('script');
                s.src = '/api/lead-capture/chat-widget/' + key + '.js';
                s.async = true;
                document.body.appendChild(s);
              };
              ('requestIdleCallback' in window) ? requestIdleCallback(load, { timeout: 4000 }) : setTimeout(load, 2000);
            } catch (e) { /* never break the page */ }
          })();
        </script>
    </body>
</html>
