:root {
  --color-primary: #ffd735;
  --background-tile-width: 250px;
  --background-tile-height: calc(0.3662 * var(--background-tile-width));
}

html {
  color: white;
  background-color: transparent !important;
}
html::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("media/stars.gif");
  background-size: var(--background-tile-width) var(--background-tile-height);

  /* TODO: write into image */
  filter: brightness(3);

  animation: pan 50s infinite linear;
  z-index: -1;
}

body {
  position: fixed;
  inset: 0;
  text-align: center;
  background-color: none !important;

  display: flex;
  flex-flow: column nowrap;
  align-items: center;
  justify-content: center;
}

#content {
  display: flex;
  flex-flow: column nowrap;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  max-height: 500px;
  max-width: 500px;
}

a {
  color: lch(53 96 150);
}
a:hover {
  background-color: white;
}

.box {
  padding: 4px 12px;
  display: inline-block;
  border: 2px solid var(--color-primary);
  background-color: black;
}
.tile {
  max-width: 180px;
  text-align: justify;
  position: fixed;
}

h1 {
  font-family: Baskerville, serif;
  font-weight: normal;
  font-variant-caps: small-caps;
  letter-spacing: 2px;
}

#the-earth {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  /* filter: grayscale(80%); */

  background: url("media/earth.gif");
  width: 45px;
  height: 45px;
  background-size: contain;
  background-repeat: no-repeat;
  animation: 100s 10s infinite change-image;
}

/* HACK: load all of the the background images before switching to them to cache */
#the-earth::after {
  content: url("media/8ball.gif") url("media/basketbal.gif")
    url("media/earth.gif") url("media/earth2.gif") url("media/eyeball.gif")
    url("media/globe2.gif") url("media/soccerball.gif");
  position: absolute;
  width: 0;
  height: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

@keyframes change-image {
  0% {
    background-image: url("media/earth.gif");
  }
  14% {
    background-image: url("media/basketbal.gif");
  }
  28% {
    background-image: url("media/eyeball.gif");
  }
  42% {
    background-image: url("media/8ball.gif");
  }
  56% {
    background-image: url("media/earth2.gif");
  }
  70% {
    background-image: url("media/soccerball.gif");
  }
  84% {
    background-image: url("media/globe2.gif");
  }
}

#cta {
  /* position: fixed; */
  /* bottom: 0; */
  /* left: 50%; */
  /* transform: translateX(-50%); */
  margin: 22px 0;

  display: flex;
  flex-flow: column;
  gap: 8px;
  align-items: center;
}

#waitlist-btn {
  color: var(--color-primary);
  font-weight: bold;
  font-size: 24px;
  text-decoration: none;
  padding: 12px;
}
#waitlist-btn:hover {
  animation: pulse 0.5s infinite alternate;
}

@keyframes pulse {
  from {
    opacity: 1;
  }
  to {
    opacity: 0.8;
  }
}

@keyframes pan {
  from {
    background-position-x: 0;
    background-position-y: 0;
  }
  to {
    background-position-x: calc(var(--background-tile-width) * 3);
    background-position-y: calc(var(--background-tile-height) * 1);
  }
}
