@property --boot-share {
  syntax: "<integer>";
  inherits: true;
  initial-value: 0;
}

#boot-loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--t-spacing-5);
  background: var(--t-background-primary);
  opacity: 0;
  animation: boot-in var(--t-animation-duration-short) var(--t-animation-easing-out-practical)
    1000ms forwards;
  transition: opacity var(--t-animation-duration-medium) var(--t-animation-easing-out-practical);
}

#boot-loader[data-leaving] {
  opacity: 0 !important;
  animation: none;
}

.boot-logo {
  display: block;
  height: var(--t-spacing-12);
  width: auto;
}

.boot-logo-dark,
.dark .boot-logo-light {
  display: none;
}

.dark .boot-logo-dark {
  display: block;
}

.boot-meter {
  display: flex;
  flex-direction: column;
  gap: var(--t-spacing-2);
  width: calc(var(--t-spacing-20) * 3);
  animation: boot-share 9s cubic-bezier(0.1, 0.7, 0.2, 1) 1000ms both;
}

#boot-loader[data-done] .boot-meter {
  --boot-share: 100;
  animation: none;
}

.boot-track {
  height: var(--t-spacing-1_5);
  border-radius: var(--t-border-radius-pill);
  overflow: hidden;
  background: var(--t-background-tertiary);
}

.boot-fill {
  height: 100%;
  width: calc(var(--boot-share) * 1%);
  border-radius: var(--t-border-radius-pill);
  background: var(--t-accent-accent9);
  transition: width var(--t-animation-duration-long) var(--t-animation-easing-linear);
}

.boot-percent {
  text-align: center;
  font-size: var(--t-font-size-md);
  color: var(--t-font-color-tertiary);
  counter-reset: boot-share var(--boot-share);
}

.boot-percent::after {
  content: counter(boot-share) "%";
}

@keyframes boot-in {
  to {
    opacity: 1;
  }
}

@keyframes boot-share {
  from {
    --boot-share: 0;
  }
  to {
    --boot-share: 92;
  }
}
