/* The one loading screen: navy with the white E mark, no words. index.html draws it inside
   #root before any JavaScript runs (React replaces it on first render), and LoadingScreen.tsx
   draws the same mark while the app starts (ban check, route chunks, session check). The
   mark is public/mark-e-white.svg inlined, so it paints with the first frame.
   An external file, never a <style> block or style attribute: 'unsafe-inline' in style-src
   is kept for the static legal pages only (CLAUDE.md, Content-Security-Policy).

   It matches the native splash: the iOS launch image is a square navy field with the mark
   about 25.6% of its side, scaled to fill the screen height, so the mark is about 25.6% of
   the screen height wide. In the app the webview starts below the status bar, hence the
   extra 14px; 56vw keeps it inside a narrow screen, 240px caps it on a desktop. */
.boot-splash {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0F172A;
}

.boot-splash-mark {
  display: block;
  width: min(calc(25.6vh + 14px), 56vw, 240px);
  height: auto;
}

/* A slow network: after the native splash's 1.2s the mark breathes, so the screen does not
   look frozen. Nothing moves for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .boot-splash-mark { animation: boot-splash-breathe 1.8s ease-in-out 1.2s infinite; }
}

/* The marketing page's own HTML, written into #root by the build (seoPlugin in vite.config.js)
   so crawlers that run no JavaScript read its text and links. Never shown: the boot splash
   above is what a visitor sees, and createRoot clears both on first render.
   docs/investigations/prerender-plan.md */
.boot-prerender { display: none; }

@keyframes boot-splash-breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
