/* OS loader
   1. The brand flower (traced from the logo) blooms petal by petal
   2. It glides onto its place in the wordmark and stays there, as the words wipe in
   3. To open, the flower becomes a window onto the OS and grows to fill the screen */
.boot { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; cursor: default; color: var(--cream); }
.boot-bg { position: absolute; inset: 0; display: block; }
#boot-hole { transform-box: view-box; transform-origin: 0 0; transform: scale(0); }

.boot-stage { position: relative; width: 240px; height: 120px; }
.boot-word { position: absolute; inset: 0; }
.boot-word img { display: block; width: 240px; height: 120px; clip-path: inset(0 100% 0 0); animation: wipe 476ms 966ms cubic-bezier(0.65, 0, 0.35, 1) forwards; }
.boot-os {
  position: absolute; left: 100%; top: 20px; margin-left: 6px; height: 22px; padding: 0 7px; border-radius: 5px;
  background: var(--yellow); color: var(--deep); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center;
  opacity: 0; transform: translateY(6px) scale(0.9); animation: tag 266ms 1372ms cubic-bezier(0.34, 1.5, 0.64, 1) forwards;
}

/* The flower is 132px while it blooms in the middle, then lands at the wordmark's flower position and size */
.boot-flower {
  position: absolute; left: 50%; top: 50%; width: 132px; height: 132px; margin: -66px 0 0 -66px; overflow: visible;
  animation: land 490ms 805ms cubic-bezier(0.65, 0, 0.35, 1) forwards;
}
/* The flower opens as one shape: every petal grows from the same small bud with only a whisper of stagger,
   so there are never gaps between petals, and the whole head turns as it opens */
.boot-spin { transform-box: view-box; transform-origin: 0 0; animation: spin 910ms 56ms cubic-bezier(0.16, 1, 0.3, 1) both; }
.petal {
  transform-box: view-box; transform-origin: 0 0; transform: scale(0.1) rotate(-16deg); opacity: 0;
  animation: bloom 735ms calc(84ms + var(--d)) cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.boot-core { fill: var(--green); transform-box: view-box; transform-origin: 0 0; transform: scale(0.1); opacity: 0; animation: core 735ms 84ms cubic-bezier(0.22, 1, 0.36, 1) forwards; }

@keyframes bloom {
  0% { transform: scale(0.1) rotate(-16deg); opacity: 0; }
  18% { opacity: 1; }
  100% { transform: none; opacity: 1; }
}
@keyframes core { 0% { transform: scale(0.1); opacity: 0; } 18% { opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes spin { from { transform: rotate(-70deg) scale(0.92); } to { transform: none; } }
@keyframes land { to { transform: translate(var(--fx), var(--fy)) scale(var(--land)); } }
@keyframes wipe { to { clip-path: inset(0 0 0 0); } }
@keyframes tag { to { opacity: 1; transform: none; } }

.boot-bar { position: absolute; left: 50%; bottom: 96px; width: 160px; height: 2px; margin-left: -80px; border-radius: 1px; background: rgba(255, 243, 230, 0.12); overflow: hidden; }
.boot-bar span { display: block; height: 100%; width: 100%; background: var(--yellow); transform-origin: left; transform: scaleX(0); animation: fill 1470ms 140ms cubic-bezier(0.45, 0, 0.2, 1) forwards; }
@keyframes fill { to { transform: scaleX(1); } }

.boot-skip { position: absolute; left: 0; right: 0; bottom: 40px; margin: 0; text-align: center; font-size: 12px; color: var(--on-green-3); opacity: 0; animation: hint 280ms 350ms ease forwards; }
.boot-skip kbd { display: inline-block; padding: 1px 6px; margin-right: 4px; border-radius: 4px; font-family: var(--font); font-size: 11px; font-weight: 600; color: var(--on-green-2); box-shadow: inset 0 0 0 1px rgba(255, 243, 230, 0.2), 0 1px 0 rgba(255, 243, 230, 0.12); }
@keyframes hint { to { opacity: 1; } }

/* Exit: words and chrome fade, the cream flower gives way to the window of the same shape */
.boot.out { pointer-events: none; }
.boot.out .boot-word, .boot.out .boot-bar, .boot.out .boot-skip { animation: fadeout 154ms ease forwards; }
.boot.out .boot-word img { animation: none; clip-path: inset(0 0 0 0); }
.boot.out .boot-flower { animation-play-state: paused; }
.boot.out .boot-flower { opacity: 0; transition: opacity 112ms ease 42ms; }
@keyframes fadeout { to { opacity: 0; } }

.boot.out ~ .shell .content { animation: fadein 350ms 210ms var(--ease) both; }
