/* wow this was harder to make than expected */

@font-face {
  font-family: 'ComicSans';
  src: url('/assets/fonts/COMIC.TTF') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'ComicSans';
  src: url('/assets/fonts/COMICBD.TTF') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background-color: #0750a8;
  background-image: url('/assets/imgs/FAAHomepagesmall.png');
  background-repeat: repeat;
}

body {
  min-height: 100vh;
  margin: 0;
  color: white;
  font-family: 'ComicSans', sans-serif;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* i can't forget the spaghetti */

#spaghetti {
  position: absolute;
  top: 0;
  right: 0;
  width: auto;
  height: 150px;
}

#container {
  width: 675px;
  max-width: 100%;
  margin: 0 auto;
}

.header {
  width: 100%;
  min-height: 60px;
  background-color: #FF8800;
  border: 4px solid #5CA1BE;
  border-radius: 15px;
  padding: 0 12px;
  margin-top: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.header .logo {
  display: flex;
  align-items: center;
  min-width: 0;
}

.header .logo:visited,
.header .logo:hover,
.header .logo:active {
  color: inherit;
}

.header a {
  text-decoration: none;
}

.header img {
  display: block;
  width: auto;
  height: 24px;
  max-width: 100%;
  filter: drop-shadow(4px 4px 4px rgba(0, 0, 0, 0.25));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-links img {
  height: 17px;
  width: auto;
  filter: drop-shadow(4px 4px 4px rgba(0, 0, 0, 0.25));
}

.speaking {
  position: relative;
  isolation: isolate;
  width: 100%;
  aspect-ratio: 885 / 670;
  margin-top: 0;
  background-color: transparent;
}

.speecharea {
  position: absolute;
  z-index: 5;
  top: 3%;
  left: 25%;
  width: 75%;
}

.bubble {
  position: relative;
  width: 100%;
  padding: 16px;
  border-radius: 23px;
  background: #fff;
  color: #111;
  font-size: clamp(14px, 2.7vw, 21px);
  font-weight: 700;
  line-height: 1.08;
  overflow-wrap: anywhere;
  filter: drop-shadow(4px 4px 4px rgba(0, 0, 0, 0.25));
}

.bubble p {
  margin: 0 0 18px;
}

.bubble p:last-child {
  margin-bottom: 0;
}

.bubble::after {
  content: "";
  position: absolute;
  z-index: 2;
  left: -19px;
  bottom: -19px;
  width: 45px;
  height: 40px;
  background-image: url('/assets/imgs/tail.png');
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

.bubble a {
  color: #FA8148;
  text-decoration: underline;
}

.bubble a:hover {
  color: #F5A22E;
}

.updated {
  margin: 8px 0 0 30px;
  color: #fff;
  font-size: clamp(10px, 1.9vw, 14px);
  font-weight: 700;
  -webkit-text-stroke: 3px #000;
  paint-order: stroke fill;
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.25));
}

.updated strong {
  color: #F5A22E;
  -webkit-text-stroke: 3px #000;
  paint-order: stroke fill;
}

.character {
  position: absolute;
  z-index: 2;
  display: block;
  height: auto;
  object-fit: contain;
  object-position: center bottom;
  user-select: none;
  -webkit-user-drag: none;
}

.character-left {
  bottom: 2%;
  height: 400px;
  filter: drop-shadow(4px 4px 4px rgba(0, 0, 0, 0.5));
}

.character-lightbulb {
  left: 73%;
  bottom: 3%;
  width: 13%;
  max-height: 52%;
  transform: scaleX(-1);
  filter: drop-shadow(4px 4px 4px rgba(0, 0, 0, 0.5));
}

.character-martian {
  left: 87%;
  bottom: 3%;
  width: 13%;
  max-height: 55%;
  transform: scaleX(-1);
  filter: drop-shadow(4px 4px 4px rgba(0, 0, 0, 0.5));
}

.facing-left {
  transform: scaleX(-1);
}

.grass {
  position: absolute;
  z-index: -5;
  bottom: 0;
  height: 35px;
  object-fit: fill;
  pointer-events: none;
}

.disclaimer {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 9%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 94%;
  margin: 0;
  color: white;
  font-size: clamp(11px, 2vw, 16px);
  font-weight: 700;
  text-align: center;
  -webkit-text-stroke: 3px #000;
  paint-order: stroke fill;
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.25));
}

.atabook {
  outline: none;
  border: none;
  width: 675px;
  height: 1000px;
  margin-bottom: 25px;
  border-radius: 0 0 40px 40px;
}

#dirt {
  background-color: #30210A;
  width: 675px;
  height: 100px;
  border-radius: 0 0 30px 30px;
}

@media (max-width: 600px) {
  #spaghetti {
    display: none; /* sorry spaghetti */
  }
  
  #container {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .header {
    width: calc(100% - 20px);
    min-height: 52px;
    margin: 12px auto 0;
    padding: 0 8px;
    gap: 6px;
    border-radius: 12px;
  }

  .header .logo {
    flex-shrink: 1;
    min-width: 0;
  }

  .header .logo img {
    max-width: 100%;
    height: auto;
    max-height: 22px;
  }

  .nav-links {
    flex-shrink: 0;
    gap: 5px;
  }

  .nav-links img {
    height: 13px;
    width: auto;
  }

  .speaking {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 885 / 670;
    margin-top: 0;
  }

  .speecharea {
    top: 18px;
    left: 29%;
    width: 68%;
  }

  .bubble {
    padding: 12px;
    border-radius: 17px;
    font-size: clamp(13px, 3.5vw, 17px);
    line-height: 1.15;
  }

  .bubble p {
    margin-bottom: 12px;
  }

  .bubble p:last-child {
    margin-bottom: 0;
  }

  .bubble::after {
    left: -12px;
    bottom: -15px;
    width: 32px;
    height: 30px;
  }

  .updated {
    margin: 6px 0 0 25px;
    font-size: clamp(10px, 2.6vw, 12px);
    -webkit-text-stroke: 1.5px #000;
    paint-order: stroke fill;
  }

  .updated strong {
    -webkit-text-stroke: 1.5px #000;
    paint-order: stroke fill;
  }

  .character-left {
    left: 10px;
    bottom: 10px;
    height: 66%;
    object-fit: contain;
    object-position: left bottom;
  }

  .character-lightbulb {
    left: 70%;
    bottom: 20px;
    width: 13%;
    max-height: 40%;
  }

  .character-martian {
    left: 85%;
    bottom: 20px;
    width: 13%;
    max-height: 38%;
  }

  .grass {
    left: 0;
    bottom: 0;
    width: 100%;
    height: 28px;
    object-fit: fill;
  }

  .disclaimer {
    left: 48%;
    bottom: 35px;
    max-width: 96%;
    font-size: clamp(10px, 2.8vw, 13px);
    -webkit-text-stroke: 1.5px #000;
    paint-order: stroke fill;
  }

  .atabook {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 850px;
    margin: 0 0 15px;
    border-radius: 0 0 20px 20px;
  }
}

@media (max-width: 380px) {
  .header {
    padding: 0 6px;
    gap: 4px;
  }

  .nav-links {
    gap: 3px;
  }

  .nav-links img {
    height: 11px;
  }

  .speecharea {
    left: 27%;
    width: 71%;
  }

  .bubble {
    padding: 10px;
    font-size: 13px;
  }

  .character-lightbulb {
    left: 73%;
    width: 14%;
  }

  .character-martian {
    left: 84%;
    width: 14%;
  }
}