/* Greybox boot loader (js/boot.js + static #gx-boot in index.html) — the
 * branded first-paint screen every fresh visitor sees.
 *
 * The #gx-boot markup sits at the TOP of <body>, so it paints with the very
 * first frame, before any script runs, and covers every intermediate loading
 * state underneath (hero "Loading…" copy, skeleton shelf rows, empty grid)
 * until js/boot.js confirms the page has REAL content to reveal. This file
 * owns the LOOK only; the dismissal contract lives in js/boot.js.
 *
 * - The lockup is the site's own .gx-wordmark-* classes from css/style.css
 *   (pearl Grey + poppy-red Box, specular sweep) — the loader is literally
 *   the header logo, big and centered.
 * - Background is always the dark cinematic base (never the light theme):
 *   the wordmark gradients are light-on-dark by design, so a light-theme
 *   visitor briefly sees the same dark screen as everyone else instead of a
 *   blank white flash.
 * - z-index 340: above the first-visit splash (splash.css .gxsplash = 300),
 *   so a brand-new visitor sees ONE thing at a time — loader, then the
 *   ad-support card, then the page.
 * - No emoji, no icon font: the sweep bar is pure CSS (site convention).
 * - Reduced motion: site-prefers pair (prefers-reduced-motion +
 *   html[data-motion="reduced"] from css/splash.css) freezes the sweep into
 *   a static full-width bar — still reads as progress, no animation. */

.gxboot {
  position: fixed;
  inset: 0;
  z-index: 340;
  display: grid;
  place-items: center;
  background: #07080b;
  opacity: 1;
  transition: opacity .45s ease;
}

/* Soft poppy-red brand glow behind the lockup — cinematic, not flat black. */
.gxboot::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 58% 44% at 50% 44%, rgba(255, 70, 84, .13), transparent 72%);
  pointer-events: none;
}

.gxboot-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  animation: gxboot-rise .55s cubic-bezier(.2, .7, .3, 1) both;
}

.gxboot-mark {
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1;
}

/* Indeterminate sweep bar: honest motion (nothing to report a % on), quiet
 * track + accent thumb — the "something is arriving" signal other services
 * use, no ring spinner, no copy. */
.gxboot-track {
  position: relative;
  width: min(210px, 52vw);
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .09);
  overflow: hidden;
}

.gxboot-thumb {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 38%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff8b93, #ff3d4a 55%, #ff6b75);
  box-shadow: 0 0 12px rgba(255, 70, 84, .65);
  animation: gxboot-sweep 1.15s cubic-bezier(.5, 0, .35, 1) infinite;
}

@keyframes gxboot-sweep {
  0% { left: -42%; }
  100% { left: 104%; }
}

@keyframes gxboot-rise {
  0% { opacity: 0; transform: translateY(14px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Dismiss: js/boot.js adds .is-done (fade), then removes the node. */
.gxboot.is-done { opacity: 0; pointer-events: none; }

/* Motion preferences — both switches, same pair as css/splash.css. */
@media (prefers-reduced-motion: reduce) {
  .gxboot { transition: none; }
  .gxboot-inner { animation: none; }
  .gxboot-thumb { animation: none; left: 0; width: 100%; }
}
html[data-motion="reduced"] .gxboot { transition: none; }
html[data-motion="reduced"] .gxboot-inner { animation: none; }
html[data-motion="reduced"] .gxboot-thumb { animation: none; left: 0; width: 100%; }
