/* ============================================================
   COMPEO — boot loader ("Golden Hour")
   Full-screen boot overlay for index.html only. A pure-SVG dusk scene
   warms as it loads; the sun sets, windows light up, then the overlay
   lifts straight into the site with the Compeo lockup revealed.
   Vanilla port of compeo-loaders-lab/src/loaders/04-golden-hour.
   ============================================================ */

/* lock the page while the overlay is up */
html.boot-active,
html.boot-active body { overflow: hidden; }

#boot-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #17140f;
  color: var(--cream);
  display: grid;
  place-items: center;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.55s var(--ease);
}
#boot-loader.boot--lift { opacity: 0; pointer-events: none; }
#boot-loader.boot--gone { display: none; }

/* ---------------- SCENE ---------------- */
#boot-loader .gh-stage { position: absolute; inset: 0; overflow: hidden; }

#boot-loader .gh-svg {
  position: absolute; inset: 0;
  height: 100%; width: 100%;
  display: block;
}

/* drifting clouds */
@keyframes gh-drift  { from { transform: translateX(0); } to { transform: translateX(70px); } }
@keyframes gh-drift2 { from { transform: translateX(0); } to { transform: translateX(-52px); } }
#boot-loader .gh-cloud1 { animation: gh-drift  14s ease-in-out infinite alternate; }
#boot-loader .gh-cloud2 { animation: gh-drift2 19s ease-in-out infinite alternate; }

/* ---------------- LENS FLARE (reveal) ---------------- */
#boot-loader .gh-flare {
  position: absolute; inset: 0; pointer-events: none;
  opacity: 0;
  transition: opacity 0.7s var(--ease);
}
#boot-loader.is-revealed .gh-flare { opacity: 1; }
#boot-loader .gh-dot {
  position: absolute;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255,214,140,0.55), rgba(255,180,90,0));
}

/* ---------------- REVEAL LOCKUP + CAPTION ---------------- */
#boot-loader .gh-reveal {
  position: absolute; left: 0; right: 0; bottom: 13%;
  display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
  opacity: 0; transform: translateY(12px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
#boot-loader.is-revealed .gh-reveal { opacity: 1; transform: translateY(0); }

#boot-loader .gh-lockup {
  display: flex; align-items: center; gap: 0.55rem;
}
#boot-loader .gh-mark {
  height: 40px; width: 40px; display: block;
  filter: drop-shadow(0 2px 10px rgba(200,116,60,0.35));
}
#boot-loader .gh-word {
  font-family: var(--display);
  font-weight: 600;
  font-size: 30px;
  letter-spacing: 0.01em;
  color: var(--cream);
}
#boot-loader .gh-caption {
  font-family: var(--display);
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.34em;
  color: rgba(247,242,234,0.5);
}

/* ---------------- LOADING MICROCOPY (top) ---------------- */
#boot-loader .gh-top {
  position: absolute; left: 0; right: 0; top: 9%;
  display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
  opacity: 1;
  transition: opacity 0.5s ease;
}
#boot-loader.is-revealed .gh-top { opacity: 0; }
#boot-loader .gh-pct {
  font-family: var(--display);
  font-size: 1.5rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--cream);
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}
#boot-loader .gh-label {
  font-family: var(--display);
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.34em;
  color: rgba(247,242,234,0.45);
}

/* ---------------- reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
  #boot-loader .gh-cloud1,
  #boot-loader .gh-cloud2 { animation: none; }
  #boot-loader .gh-flare,
  #boot-loader .gh-reveal,
  #boot-loader .gh-top { transition: none; }
  #boot-loader { transition: opacity 0.35s ease; }
}
