@font-face {
  font-family: 'generic-mobile-system';
  src: url('../fonts/generic-mobile-system.woff2') format('woff2');
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  width: 100%;
  user-select: none;
  -webkit-user-select: none; /* u gotta be kidding me */
}

body {
  background: #0a5;
  cursor: grab;
  font-family: 'generic-mobile-system';
  overflow: hidden;
}

canvas {
  display: block;
  height: 100%;
  position: relative;
  width: 100%;
}

.card,
.waste,
.talon,
.foundation {
  /* width and height for these elements is set dynamically */
  image-rendering: pixelated;
  left: 0;
  perspective: 500px;
  position: absolute;
  top: 0;
}

.card:hover::after {
  /* the box shadow looks weird with the flip transition; would need to turn shadow off */
  box-shadow: 0 0.2rem 0.2rem rgba(0, 0 , 0, 0.3);
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 0.5rem;
}

.card > img {
  backface-visibility: hidden;
  height: 100%;
  image-rendering: pixelated;
  position: absolute;
  transform-style: preserve-3d;
  width: 100%;
}

.card .front { transform: rotateY(180deg); }
.card .back { transform: rotateY(0deg); }

#menu {
  align-items: center;
  background-color: white;
  border-bottom: 1px solid black;
  box-sizing: border-box;
  cursor: default;
  display: flex;
  height: 4%;
  position: absolute;
  top: 0;
  width: 100%;
}

button {
  background-color: white;
  border: 0;
  color: black;
  display: block;
  font-family: 'generic-mobile-system';
  font-size: 3vh;
  height: 100%;
  padding: 0 1rem;
  cursor: pointer;
}

button:hover,
button:active {
  background-color: #010caa;
  color: white;
}

#status {
  align-items: center;
  background-color: white;
  border-top: 1px solid black;
  bottom: 0;
  box-sizing: border-box;
  display: flex;
  font-size: 3vh;
  height: 4%;
  justify-content: space-between;
  position: absolute;
  width: 100%;
}

#status span {
  display: block;
  margin: 0 0.5rem;
}

@keyframes burst {
    0% {
      box-shadow: 0 0 1rem transparent;
    }
    50% {
      box-shadow: 0 0 1rem white;
    }
    100% {
      box-shadow: 0 0 2rem transparent;
    }
  }

#about {
  display: none;
  background: navy;
  cursor: default;
  font-size: 1.5rem;
  position: absolute;
  left: 20%;
  top: 20%;
  width: 60%;
  z-index: 53;
}

#about main {
  box-sizing: border-box;
  margin: 0.5rem;
  border: 2px solid white;
  background: white;
  height: calc(100% - 1rem); /* such lazy */
  color: black;
}

#about main h1 {
  background: navy;
  border-bottom: 2px solid black;
  color: white;
  font-size: 2.5rem;
  font-weight: normal;
  margin-top: 0;
  text-align: center;
  width: 100%;
  line-height: 110%;
}

#about .close {
  background-color: lightgray;
  color: white;
  display: block;
  height: 100%;
  float: left;
  width: 2.8rem;
}
#about .close .bar {
  width: 50%;
  display: inline-block;
  height: 2px;
  border: 1px solid black;
  box-shadow: 2px 2px 0 #7b7f83;
  background-color: white;
  vertical-align: 0.5rem;
}

#about .content {
  padding: 0 1.5rem 1.5rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2.5rem;
}

#about .content img {
  width: 6rem;
}

#about .content p {
  margin-top: 0;
}

#about h3 {
  margin-bottom: 0.5rem;
  font-weight: normal;
}

#about ul {
  margin-top: 0;
}

#about button {
  background-color: #bbbfc4;
  border-bottom: 0.25rem solid #7b7f83;
  border-left: 0.25rem solid #fff;
  border-radius: 0.1rem;
  border-right: 0.25rem solid #7b7f83;
  border-top: 0.25rem solid #fff;
  box-shadow: 0 0 0 0.25rem #000;
  cursor: pointer;
  min-width: 8rem;
  height: auto;
}

#about button .text {
  border: 2px solid #bbbfc4;
  display: inline-block;
}

#about button:hover {
  background-color: #bbbfc4;
  color: #000;
}

#about button:hover .text {
  border: 2px dotted #7b7f83;
}

#about button:active {
  border-bottom: 0.25rem solid #fff;
  border-left: 0.25rem solid #7b7f83;
  border-right: 0.25rem solid #fff;
  border-top: 0.25rem solid #7b7f83;
}

@media (orientation: portrait) {
  #menu {
    height: 5%;
  }

  #menu button {
    font-size: 4vh;
  }

  #status {
    height: 5%;
    font-size: 4vh;
  }

  #about {
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
  }

  #about .content {
    flex-direction: column;
  }

  #about .content img {
    display: none;
  }
}
