:host {
  all: initial;
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
    'Segoe UI Symbol';
}

.logo {
  width: 45px;
  height: 45px;
  stroke: white;
  stroke-opacity: 0.7;
  stroke-width: 20;
  fill: none;
}
.homeLink {
  font-size: 0;
  display: block;
  position: fixed;
  z-index: 1000;
  height: 50px;
  width: 50px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s;
  right: 10px;
  bottom: 10px;
  transform: translateZ(0);

  &:hover {
    background-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
  }

  &:active {
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
    transform: translateZ(0) scale(0.9);
  }

  &:focus {
    outline: none;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.5), 0 0 0 5px rgba(79, 161, 167, 0.3);
  }

  .logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -46.667%);
    transition: all 0.2s;
  }

  &.blockScreen {
    right: 50%;
    bottom: 50%;
    width: 142vmax;
    height: 142vmax;
    margin: -71vmax;
    background-color: black;
    box-shadow: none;
    pointer-events: none;
    transition: all 0.5s;

    svg {
      transform: scale(2) translate(-50%, -50%);
    }
  }
}
.homeLink:not(.blockScreen):hover .logo {
  stroke: black;
}

/* HACK: offset-path percentages ignore Chrome Windows scrollbar */
.screenBlockerWrapper {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1001;
}
.screenBlocker {
  position: absolute;
  offset-path: ellipse(
    calc(50% - 35px) calc(50% - 35px) at calc(100% - 35px) 50%
  );
  offset-rotate: 0deg;
  animation: block-screen 0.5s forwards;

  .logo {
    position: absolute;
    animation: logo 0.5s forwards;
  }
}
.screenBlockerCircle {
  position: absolute;
  width: 50px;
  height: 50px;
  margin: -25px;
  border-radius: 50%;
  background-color: black;
  animation: block-screen-circle 0.5s forwards;
}
@keyframes block-screen {
  from {
    offset-distance: 25%;
  }
  to {
    offset-distance: 50%;
  }
}
@keyframes block-screen-circle {
  from {
    scale: 1;
  }
  to {
    scale: var(--max-scale);
  }
}
@keyframes logo {
  from {
    transform: translate(-50%, -46.667%) scale(1);
  }
  to {
    transform: translate(-50%, -50%) scale(2);
  }
}
