<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1" />
    <title>Replit for Startups — Up to $25K in Credits</title>
    <link rel="icon" type="image/webp" href="https://replit-startups.replit.app/api/static/favicon.webp" />
    <meta property="og:type" content="website" />

    <!-- 1. Preload the font -->
    <link rel="preload" href="https://replit-startups.replit.app/api/static/replit_brand_kit/fonts/diatype-variable.woff2"
          as="font" type="font/woff2" crossorigin />

    <!-- 2. Hide page until font loads (font-face defined in index.css, rebased by Vite) -->
    <style>
      html { opacity: 0; background-color: #FAF6F1; }
      html.fonts-ready { opacity: 1; transition: opacity 0.1s ease; }
    </style>

    <!-- 3. Font readiness gate -->
    <script>
      (function() {
        if (document.fonts && document.fonts.load) {
          document.fonts.load('400 1em Diatype').then(function() {
            document.documentElement.classList.add('fonts-ready');
          }).catch(function() {
            document.documentElement.classList.add('fonts-ready');
          });
          setTimeout(function() {
            document.documentElement.classList.add('fonts-ready');
          }, 1500);
        } else {
          document.documentElement.classList.add('fonts-ready');
        }
      })();
    </script>
    <script>
(function() {
  var WISTIA_HOSTS = ['fast.wistia.com','fast.wistia.net','embed-ssl.wistia.com','embed-cloudfront.wistia.com','distillery.wistia.com','pipedream.wistia.com'];
  var OPT_IN = {AT:1,BE:1,BG:1,HR:1,CY:1,CZ:1,DK:1,EE:1,FI:1,FR:1,DE:1,GR:1,HU:1,IE:1,IT:1,LV:1,LT:1,LU:1,MT:1,NL:1,PL:1,PT:1,RO:1,SK:1,SI:1,ES:1,SE:1,GB:1,IS:1,LI:1,NO:1,CH:1,CA:1,JP:1};

  // --- Wistia blocker state ---
  var _wObserver = null;
  var _lsOrig = null;

  function installWistiaBlockers() {
    // 1. Block dynamically injected Wistia <script> tags.
    _wObserver = new MutationObserver(function(mutations) {
      for (var i = 0; i < mutations.length; i++) {
        var added = mutations[i].addedNodes;
        for (var j = 0; j < added.length; j++) {
          var node = added[j];
          if (node.nodeName === 'SCRIPT') {
            var src = node.src || '';
            for (var k = 0; k < WISTIA_HOSTS.length; k++) {
              if (src.indexOf(WISTIA_HOSTS[k]) !== -1) {
                if (node.parentNode) node.parentNode.removeChild(node);
                break;
              }
            }
          }
        }
      }
    });
    _wObserver.observe(document.documentElement, { childList: true, subtree: true });

    // 2. Block Wistia localStorage writes (wistia-*, wistia-video-progress-*, __distillery).
    try {
      _lsOrig = Storage.prototype.setItem;
      Storage.prototype.setItem = function(key, val) {
        if (/^wistia/i.test(key) || key === '__distillery') return;
        _lsOrig.call(this, key, val);
      };
    } catch (_e) {}

    // 3. Suppress window._wq (Wistia's command queue) so embed scripts can't queue commands.
    try {
      Object.defineProperty(window, '_wq', {
        get: function() { return []; },
        set: function() {},
        configurable: true,
      });
    } catch (_e) {}
  }

  function removeWistiaBlockers() {
    if (_wObserver) { _wObserver.disconnect(); _wObserver = null; }
    try {
      if (_lsOrig) { Storage.prototype.setItem = _lsOrig; _lsOrig = null; }
    } catch (_e) {}
    try { delete window._wq; } catch (_e) {}
  }

  // Install blockers SYNCHRONOUSLY before any async work.
  // They are torn down below only if the geo+consent check passes.
  // Wrapped in try-catch so any installation error does not prevent PostHog from
  // running — the Wistia gate would simply be inoperative for that page load.
  try { installWistiaBlockers(); } catch (_e) {}

  // --- Async geo + consent gate ---
  (async function() {
    var consented = /(?:^|;)\s*replit_consent\s*=\s*1\s*(?:;|$)/.test(document.cookie);
    // Fail closed: default to opt-in region so tracking is blocked on any error.
    var inOptInRegion = true;
    try {
      var _r = await fetch('/cdn-cgi/trace', { credentials: 'omit' });
      if (_r.ok) {
        var _t = await _r.text();
        // Cloudflare trace always starts with "fl=" (never "<").
        // If the response is HTML (dev server / SPA fallback / direct .replit.app URL),
        // we are not at the replit.com Cloudflare origin where this gate applies.
        // Treat as non-opt-in so tracking is allowed; Replit's own compliance system
        // covers the .replit.app origin.
        if (_t.length > 0 && _t[0] === '<') {
          inOptInRegion = false;
        } else {
          // Real Cloudflare trace: parse loc= and apply fail-closed per spec.
          var _m = _t.match(/^loc=([A-Z0-9]+)$/m);
          var _c = _m && _m[1];
          // Only update if country code is present and not a sentinel value.
          if (_c && _c !== 'XX' && _c !== 'T1') { inOptInRegion = !!OPT_IN[_c]; }
          // If _c is absent / 'XX' / 'T1': inOptInRegion stays true (fail closed).
        }
      }
    } catch (_e) {}

    if (inOptInRegion && !consented) {
      // Blocked: Wistia blockers remain active; PostHog must not init.
      return;
    }

    // Allowed: tear down Wistia blockers so the player can load normally.
    removeWistiaBlockers();

    // Init PostHog (no-op if no token was baked in at build time).
    
  })();
})();
            </script>
    <script type="module" crossorigin src="https://replit-startups.replit.app/api/static/assets/index-CA_2ehf5.js"></script>
    <link rel="stylesheet" crossorigin href="https://replit-startups.replit.app/api/static/assets/index-C79vA8HT.css">
  </head>
  <body>
    <div id="root"></div>
  <script>(function(){function c(){var b=a.contentDocument||(a.contentWindow&&a.contentWindow.document);if(b){var d=b.createElement('script');d.innerHTML="window.__CF$cv$params={r:'a219fb41eef738da',t:'MTc4NTEzNzg3NA=='};var a=document.createElement('script');a.src='/cdn-cgi/challenge-platform/scripts/jsd/main.js';document.getElementsByTagName('head')[0].appendChild(a);";b.getElementsByTagName('head')[0].appendChild(d)}}if(document.body){var a=document.createElement('iframe');a.height=1;a.width=1;a.style.position='absolute';a.style.top=0;a.style.left=0;a.style.border='none';a.style.visibility='hidden';document.body.appendChild(a);if('loading'!==document.readyState)c();else if(window.addEventListener)document.addEventListener('DOMContentLoaded',c);else{var e=document.onreadystatechange||function(){};document.onreadystatechange=function(b){e(b);'loading'!==document.readyState&&(document.onreadystatechange=e,c())}}}})();</script></body>
</html>
