/*
 * EXPERIENCE — XP boot screen.
 *
 * The Windows XP startup sequence, played as `windowsxp.gif` from
 * docs/reference/windows-xp-template-master. The reference's own loader is
 * simply the GIF at full viewport size:
 *
 *   .windows-loader     { height: 100vh; width: 100vw; }
 *   .windows-loader img { height: 100%;  width: 100%;  }
 *
 * This file does the same, with one deliberate difference: the reference
 * stretches the image to the viewport (`width:100%; height:100%`), which
 * distorts the logo on any screen that is not 16:9. `object-fit: contain` keeps
 * the GIF's aspect ratio and letterboxes it against the black field instead —
 * and since the GIF's own background is black, the letterboxing is invisible.
 *
 * Everything is scoped under #xp-boot. This file must never restyle the
 * desktop, the login screen, or anything else.
 */

/*
 * Above every other shell surface: the login screen sits at 15000, and the boot
 * screen precedes it. Below the full-screen effect overlays at 20000+, which
 * only run once the user is well past this.
 */
#xp-boot {
  position: fixed;
  inset: 0;
  z-index: 16000;

  /* Shows while the GIF decodes, and behind the letterboxing. */
  background: #000;

  display: flex;
  align-items: center;
  justify-content: center;

  user-select: none;
  cursor: default;
  overflow: hidden;
}

/*
 * There is deliberately no exit transition. Fading this surface out would
 * reveal the bare page body behind it — a flash of white on the way to the
 * login screen — so js/bootScreen.js removes it outright, and the login
 * surface mounts in the same frame. XP cuts straight from the boot sequence
 * to the Welcome screen.
 */

/*
 * Fills the viewport without distortion. The GIF is 1920x1080; `contain` keeps
 * that ratio at every size, so the logo and progress bar never stretch.
 */
.xp-boot__animation {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Decorative, and must not intercept the skip click — that listener lives
     on #xp-boot itself. */
  pointer-events: none;
}

/*
 * Reduced motion needs nothing here: there is no transition to disable, and an
 * animated GIF cannot be paused from CSS. The module's skip affordance (click,
 * tap or any key) is the escape hatch for anyone who would rather not watch it.
 */
