/*
 * The screen itself: wallpaper, boot, lock, power screens and display effects.
 */

html,
body {
  height: 100%;
}

html {
  background: #000;
}

body {
  overflow: hidden;
  background: #000;
}

.screen {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

/* -------------------------------------------------------------- wallpaper */

.wallpaper {
  position: absolute;
  inset: 0;
  background: #000;
}

.wallpaper-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .5s ease;
}

.wallpaper-layer.is-visible {
  opacity: 1;
}

/* ---------------------------------------------------------------- effects */

.fx {
  position: fixed;
  inset: 0;
  z-index: 60000;
  pointer-events: none;
}

.fx-dim {
  background: #000;
  opacity: 0;
  transition: opacity .15s linear;
}

.fx-night {
  background: #ff9329;
  mix-blend-mode: multiply;
  opacity: 0;
  transition: opacity .8s ease;
}

.fx-night.is-on {
  opacity: .28;
}

/* ------------------------------------------------------------------- boot */

.boot {
  position: fixed;
  inset: 0;
  z-index: 50000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #000;
  color: #fff;
  transition: opacity .6s ease;
}

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

.boot-logo {
  width: 6rem;
  height: 6rem;
  margin-bottom: 14vh;
}

.boot-spinner {
  position: absolute;
  bottom: 20%;
}

.boot-message {
  position: absolute;
  bottom: 9%;
  max-width: 37.6rem;
  margin: 0;
  padding: 0 1.6rem;
  color: rgba(255, 255, 255, .82);
  text-align: center;
}

.boot.has-error .boot-spinner {
  display: none;
}

noscript .boot-message {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 50001;
  max-width: none;
}

/* ------------------------------------------------------------------ power */

.power {
  position: fixed;
  inset: 0;
  z-index: 50000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.6rem;
  background: #000;
  color: #fff;
  animation: power-in .35s ease;
}

@keyframes power-in {
  from {
    opacity: 0;
  }
}

.power.is-busy {
  background: color-mix(in srgb, var(--accent-base) 62%, #000);
}

.power-spinner {
  display: grid;
}

.power-message {
  margin: 0;
  font: 400 1.2rem/1.8rem var(--font-display);
}

.power.is-off .power-message {
  font-size: 0.8rem;
  opacity: .6;
}

.power-on {
  display: grid;
  place-items: center;
  width: 4.6rem;
  height: 4.6rem;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  color: #fff;
  transition: background-color .15s;
}

.power-on:hover {
  background: rgba(255, 255, 255, .16);
}

.power-on:focus-visible {
  outline-color: #fff;
}

/* ------------------------------------------------------------ lock screen */

.lock {
  position: fixed;
  inset: 0;
  z-index: 40000;
  overflow: hidden;
  background: #000;
  color: #fff;
  transition: opacity .35s ease, transform .35s ease;
}

.lock.is-leaving {
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none;
}

.lock-bg {
  position: absolute;
  inset: 0;
  transition: filter .35s ease, transform .35s ease;
}

.lock.is-login .lock-bg {
  filter: blur(1.8rem) brightness(.82);
  transform: scale(1.14); /* pushes the soft, see-through edge of the blur off screen */
}

.lock-clock {
  position: absolute;
  top: 12%;
  left: 0;
  right: 0;
  text-align: center;
  text-shadow: 0 2px 0.8rem rgba(0, 0, 0, .28);
  transition: transform .35s var(--ease-out), opacity .2s linear;
}

.lock.is-login .lock-clock {
  opacity: 0;
  transform: translateY(-5.6rem);
}

.lock-time {
  font: 600 clamp(4rem, 12vw, 8.2rem)/1.1 var(--font-display);
  letter-spacing: -.01em;
}

.lock-date {
  margin-top: 0.2rem;
  font: 600 clamp(1.2rem, 2.3vw, 1.8rem)/1.3 var(--font-display);
}

.lock-login {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transform: translateY(1.8rem);
  transition: opacity .25s linear, transform .35s var(--ease-out), visibility 0s .3s;
}

.lock.is-login .lock-login {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition-delay: 0s;
}

.lock-avatar {
  width: 10rem;
  height: 10rem;
  border-radius: 50%;
  box-shadow: 0 0.6rem 1.8rem rgba(0, 0, 0, .28);
}

.lock-name {
  max-width: 80%;
  margin: 1.2rem 0 1.6rem;
  overflow: hidden;
  font: 400 2rem/2.6rem var(--font-display);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lock-signin {
  min-width: 9.2rem;
  border-color: rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .2);
  color: #fff;
}

.lock-signin:hover {
  background: rgba(255, 255, 255, .3);
}

.lock-signin:active {
  background: rgba(255, 255, 255, .14);
  color: #fff;
}

.lock-signin:focus-visible {
  outline-color: #fff;
}

.lock-hint {
  margin: 1rem 0 0;
  font-size: 0.8rem;
  opacity: .8;
}

.lock-status {
  position: absolute;
  inset-inline-end: 1.8rem;
  bottom: 1.6rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

/* The frames of the apps that run without a window: they are there, and nothing of them is seen. */
#background {
  position: fixed;
  width: 0;
  height: 0;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
}
