/* ---------------------------------------------------------------------------
   Preloader — full-screen splash shown while the page's images load.

   The green bar (top) and the logo's opacity are driven by the SAME ratio in
   js/preloader.js, so they always read 0→100% together: bar at full width
   is the visual promise that the logo is also fully opaque, i.e. the site is
   ready. White background, not the brand cream, to read as a distinct
   "before the site" state rather than a section of the page.
   --------------------------------------------------------------------------- */

.preloader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ilp-white);
  opacity: 1;
  transition: opacity var(--dur-slower) var(--ease-standard);
}

.is-loading { overflow: hidden; }

.preloader--done { opacity: 0; pointer-events: none; }

.preloader__track {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: var(--ilp-cream-200);
}

.preloader__fill {
  height: 100%;
  width: 0%;
  background: var(--ilp-green-500);
  /* No transition here: js/preloader.js repaints this every animation
     frame, so a CSS transition would only add lag behind values that are
     already moving smoothly. */
}

.preloader__logo {
  width: min(60vw, 420px);
  height: auto;
  opacity: 0;
}
