@font-face {
  font-family: 'Pieces of Eight';
  src: url('/public/Pieces\ of\ Eight.ttf') format('truetype');
  font-display: swap;
}

html,
body {
  padding: 0;
  margin: 0;
  font-family: 'Times New Roman', Times, serif;
}

a {
  color: inherit;
  text-decoration: none;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  color: white;
  background: black;
}

/* Layout */
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.main {
  min-height: 100vh;
  padding: 4rem 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: url('/public/bg_texture_notQuiteAsDark.png') repeat;
  background-size: 500px;
  box-shadow: black 0 -100px 50rem 200px inset,
    inset 0px 5rem 10rem 0 #000000;
  max-width: 100%;
}

.content {
  max-width: 50rem;
  margin: 5rem 10rem;
  text-align: justify;
}

.content ul {
  padding-left: 1rem;
}

.content li {
  list-style: none;
}

.content .image {
  padding: 4rem 1rem 0 1rem;
}

.content li::before {
  content: '';
  display: inline-block;
  height: 32px;
  width: 30px;
  background-image: url('/public/menu/compass.png');
  position: relative;
  bottom: -0.25rem;
  margin-right: 0.75rem;
}

/* Typography */
.title {
  margin: 0;
  line-height: 1.15;
  font-size: 6rem;
  text-align: center;
  font-family: 'Pieces of Eight';
}

.title a {
  color: #0070f3;
  text-decoration: none;
}

.title a:hover,
.title a:focus,
.title a:active {
  text-decoration: underline;
}

.description {
  margin: 4rem 0;
  line-height: 1.8;
  font-size: 1.5rem;
}

.centeredDescription {
  margin: 4rem 0;
  line-height: 1.8;
  font-size: 1.5rem;
  text-align: center;
}

.disclaimer {
  margin: 4rem 0;
  line-height: 1.0;
  font-size: 1.0rem;
  text-align: center;
}

/* Menu */
.menu {
  font-family: 'Pieces of Eight';
  font-size: 3em;
  width: 100%;
  height: 70vh;
  padding: 0;
  margin: 0;
  display: block;
  overflow: hidden;
  pointer-events: none;
}

.menuItem {
  position: relative;
  top: 15vh;
  left: calc(50vw - 50%);
  margin: 20px;
  pointer-events: auto;
  text-shadow: 0 0 .1em black;
  transition: text-shadow 0.5s;
  color: #EEE;
}

.menuItem.active, .menuItem:hover {
  text-shadow: 0 0 .1em white;
}

.menuItem:after {
  position: absolute;
  content: '';
  height: 1px;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0 1rem 0 1.5rem;
  border-bottom: 3px solid transparent;
  transition: border-bottom 0.5s;
}

.menuItem.active:after, .menuItem:hover:after {
  border-bottom: 3px solid white;
}

.transitionLayer {
  width: 100%;
  height: 100%;
  box-shadow: inset 0px -5rem 5rem 0 #000000;
}

.background > img {
  position: relative;
  top: -630px;
  left: -20px;
  width: 110%;
  transform: scaleX(-1);
}

.frontWave > div {
  background-image: url('/public/menu/wave-paint.png');
  width: 150vw;
  height: 300px;
  position: relative;
  left: -25vw;
}

.wave > *, .frontWave > *, .ship > * {
  animation: wave 7s linear infinite;
}

.ship {
  animation: sway 10s ease-in-out infinite;
}

@keyframes sway {
  from { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
  to { transform: rotate(-5deg); }
}

@keyframes wave {
  from { transform: rotate(0deg) translateX(20px) rotate(0deg); }
  to   { transform: rotate(360deg) translateX(20px) rotate(-360deg); }
}

.wave > div {
  background-image: url('/public/menu/wave-plain.png');
  width: 150vw;
  height: 300px;
  position: relative;
  left: -25vw;
}

.ship > img {
  position: relative;
  top: 5vh;
  left: 10vw;
  width: 270px;
}

.wave[data-depth="0.0"] > div {
  top: 20vh;
  animation-delay: -1s;
}

.wave[data-depth="0.2"] > div {
  top: 25vh;
  left: -15vw;
  animation-delay: -2s;
}

.wave[data-depth="0.4"] > div {
  top: 30vh;
  animation-delay: -3s;
}

.wave[data-depth="0.6"] > div {
  top: 35vh;
  left: -15vw;
  animation-delay: -4s;
}

.frontWave[data-depth="0.8"] > div {
  top: 40vh;
  animation-delay: -5s;
}

/* Crew Grid */
@media only screen and (min-device-width: 480px) {
  .frameGrid {
    display: grid;
    width: 100%;
    grid-auto-columns: 10px;
    grid-auto-rows: 10px;
    grid-auto-flow: column;
    column-gap: 10px;
    row-gap: 15px;
  }
}

.gridItemFrame {
  padding: 0px;
}

.nameTag {
  background-image: url(/public/crew/sign.png);
  word-wrap: break-word;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  height: auto;
  display: flex;
  text-align: center;
  justify-content: center;
  align-items: center;
  color: rgb(245, 245, 245);
  font-weight: bold;
  padding-right: 1rem;
  position: relative;
  z-index: 10;
}

/* Footer */
.footer {
  flex: 1;
  width: 40rem;
  max-width: 100%;
  border-top: 1px solid #111;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  grid-template-rows: 1fr 1fr;
  grid-auto-flow: row;
}

.footer > * {
  margin: 1.5rem;
  padding: 0;
}

.footer ul {
  margin: 0;
  padding: 0.5rem 0 0 1rem;
}

.footer ul li {
  list-style: none;
}

.footer > span {
  text-align: justify;
}

.footer p {
  margin-top: 0;
}

/* Schedule */
.scheduleDay {
  max-width: 80%;
  margin: 2rem;
}

/* Responsive */
.onlyMobile {
  display: none;
}

.onlyDesktop {
  display: initial;
}

@media only screen and (max-device-width: 480px) {
  .title {
    font-size: 5rem;
  }

  .onlyMobile {
    display: initial;
  }

  .onlyDesktop {
    display: none;
  }

  .menuItem {
    top: 5vh;
    display: flow-root;
    width: 85%;
    text-align: center;
  }

  .ship {
    filter: brightness(0.5)
  }
}

@media (max-width: 600px) {
  .grid {
    width: 100%;
    flex-direction: column;
  }
}

@media (prefers-color-scheme: dark) {
  .card,
  .footer {
    border-color: #222;
  }
  .code {
    background: #111;
  }
  .logo img {
    filter: invert(1);
  }
}
