@font-face {
  font-family: scriptFont;
  src: url(../assets/fonts/ABCHoneymoonVariableVF-Trial.ttf) format("truetype");
}

@font-face {
  font-family: bodyFont;
  src: url(../assets/fonts/LWSTemporaVF.ttf) format("truetype");
}

* {
  box-sizing: border-box;
}

.body-font,
* {
  font-family: bodyFont, Cambria, Cochin, Georgia, Times, "Times New Roman",
    serif;
}
.script-font,
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: scriptFont, serif;
  font-weight: 500;
}

button {
  margin: 0;
  padding: 0;
}

:root {
  --black-def: #000;
  --white-def: #fff;

  --primary-blue: #5a9bcd;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0px;
  line-height: 1.27;
}

canvas {
  position: relative;
  width: 100dvw;
  height: 100dvh;
}

* {
  user-select: none;
}

body {
  background-color: var(--black-def);
  color: var(--white-def);
}

body,
main {
  width: 100vw;
  min-height: 100vh;
}

.scrim {
  position: fixed;
  width: 100%;
  height: 100%;
  z-index: 10000000;
  left: 0;
  top: 0;
  background-color: var(--black-def);

  opacity: 0;
  transition: 800ms;
  pointer-events: none;
  transition-delay: 200ms;
}

[x-cloak] .scrim {
  opacity: 1;
}

.scrim.scrim-active {
  pointer-events: all;
  opacity: 1;
}

h1 {
  font-size: 10rem;
  font-weight: 500;
  margin: 0;
}

/* INTRO */
.intro-container {
  width: 100vw;
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

/* CHAT */
.chat-screen {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;
}
.chatbox-container {
  position: absolute;
  width: 100%;
  bottom: 0;
  max-width: 506px;
  height: 86px;

  display: flex;
  padding: 15px;
  margin: 15px;
  margin-bottom: 24px;
  justify-content: center;
  align-items: flex-end;
  gap: 16px;
  flex-shrink: 0;
  overflow: hidden;

  border-radius: 12px;
  border: 1px solid #40424793;
  background: radial-gradient(
      118.88% 50.99% at 50% 0%,
      rgba(89, 205, 255, 0.127) 0%,
      rgba(24, 213, 255, 0) 100%
    ),
    rgb(1 50 55 / 27%);
  backdrop-filter: blur(15px);
  transition: 800ms ease-in-out;
  z-index: 400;
}

.chatbox-container:has(textarea:focus) {
  background: radial-gradient(
      118.88% 50.99% at 50% 0%,
      rgba(89, 205, 255, 0.127) 0%,
      rgba(24, 213, 255, 0) 100%
    ),
    #364b613d;
}

.chatbox-container:has(textarea:disabled) {
  pointer-events: none;
  transform: translate3d(0, 200%, 0);
  opacity: 0;
  filter: blur(32px);
}

textarea {
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  background-color: transparent;
  color: var(--white-def);
  font-size: 1rem;
  font-feature-settings: "swsh" on;
  line-height: 1.27;
  text-align: left;
  resize: none;
  overflow: hidden;
}

button.send-button {
  width: 34px;
  height: 48px;
  flex-shrink: 0;
  aspect-ratio: 17/24;
  padding: 0;
  background-color: transparent;
  border: none;
  outline: none;
  cursor: pointer;
}

button > img {
  width: 100%;
  object-fit: contain;
}

img,
* {
  user-select: none;
}

.chat-chunks {
  position: absolute;
  width: 100vw;
  height: 100vh;
  top: 0;
  left: 0;
  display: flex;
  pointer-events: none;
  flex-direction: row;
  gap: 16px;
  padding: 16px;
  color: var(--primary-blue);
}

.chat-message {
  margin: 0;
  line-height: 1.27;
  font-size: 1rem;
  font-feature-settings: "swsh" on;
  color: inherit;
  text-shadow: 0 0 24px var(--primary-blue);
  font-weight: normal;
  transition: opacity 900ms, filter 900ms;
  will-change: opacity, filter;
  position: absolute;
  text-align: center;
  margin: 12px;
  cursor: pointer;
  pointer-events: all;
}

.chat-message:hover {
  filter: blur(2px);
}

.chat-chunks-hidden .chat-message,
[x-cloak] .chat-message {
  opacity: 0;
  filter: blur(10px);
  transition: opacity 600ms, filter 600ms;
}

.chat-message.chunk-1 {
  width: 299px;
  top: 166px;
  left: 78px;

  transition-delay: 150ms;
}
.chat-message.chunk-2 {
  width: 215px;
  top: 266px;
  right: 202px;

  transition-delay: 250ms;
}
.chat-message.chunk-3 {
  width: 216px;
  bottom: 299px;
  left: 138px;

  transition-delay: 350ms;
}
.chat-message.chunk-4 {
  width: 212px;
  bottom: 189px;
  right: 144px;

  transition-delay: 450ms;
}

[x-cloak] .chat-message.chunk-1 {
  transition-delay: 400ms;
}
[x-cloak] .chat-message.chunk-2 {
  transition-delay: 600ms;
}
[x-cloak] .chat-message.chunk-3 {
  transition-delay: 800ms;
}
[x-cloak] .chat-message.chunk-4 {
  transition-delay: 1000ms;
}

.chatbox-container-fetching {
  pointer-events: none;
  filter: grayscale(100%);
  opacity: 0.5;
}

.side-drawer-container {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;

  pointer-events: none;
  transition: 300ms;
  will-change: backdrop-filter;
}
.side-drawer-container:has(.side-drawer.drawer-open) {
  backdrop-filter: blur(24px);
}

.side-drawer {
  position: fixed;
  width: 950px;
  height: 611px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  right: 0%;

  translate: 950px 0%;

  background-image: url(../assets/ui/drawer_background.png);
  background-size: cover;

  transition: 400ms ease-in-out;
  will-change: translate, right;
  pointer-events: all;
}

.side-drawer.drawer-open {
  right: 50%;

  translate: calc(950px / 2) 0%;
}

.drawer-handle {
  position: absolute;
  left: calc(-22px - 32px);
  cursor: pointer;
  background-color: transparent;
  outline: none;
  border: none;
  width: 22px;
  height: 188px;
  cursor: pointer;
  user-select: none;
  box-sizing: content-box;
  padding: 32px;
}

.drawer-handle > img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  user-select: none;
  pointer-events: none;
}

.flingable-object {
  position: absolute;
  width: 190px;
  height: 190px;
  object-fit: contain;
  pointer-events: all;
  background-color: transparent;
  outline: none;
  border: none;
  padding: 0;
  margin: 0;
  filter: drop-shadow(0 4px 8px rgba(43, 45, 46, 0.309))
    brightness(0.6);
  user-select: none;
  transition-delay: 400ms;
  transition: 520ms translate, filter ease-out;
}

.flingable-object > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}


.flingable-object:not([disabled]) {
  cursor: pointer;
}

.flingable-object[disabled] {
  filter: brightness(0.6) grayscale(100%);
  pointer-events: none;
}

.flingable-object:not([disabled]):not(.finished):hover {
  filter: drop-shadow(0 4px 10px rgba(190, 233, 255, 0.492)) brightness(1.2);
}

.flingable-object:not([disabled]):not(.finished) {
  filter: drop-shadow(0 2px 8px rgba(255, 255, 255, 0.63));
}

#flingOan {
  bottom: 182px;
  left: 126px;
  width: 190px;
  height: 190px;
  rotate: 8deg;
}

#flingBac {
  bottom: 84px;
  left: 262px;
  width: 114px;
  aspect-ratio: 0.7439153439;
  rotate: -17.382deg;
}

#flingHa {
  top: 101px;
  right: 152px;
  width: 575px;
  height: 358px;
  rotate: 4deg;
}

#flingNam {
  top: 187px;
  right: 100px;
  width: 108px;
  height: 236px;
  rotate: 30.459deg;
}

#flingBac {
  transition-delay: translate 270ms;
}

#flingOan {
  transition-delay: translate 390ms;
}

#flingHa {
  transition-delay: translate 150ms;
}

#flingNam {
  transition-delay: translate 320ms;
}

.side-drawer:not(.drawer-open) {
  .flingable-object {
    translate: 20px 0%;
  }
  #flingBac {
    translate: 60px 0%;
  }

  #flingNam {
    translate: 40px 0%;
  }
}

/* INTERMISSION */
.intermision-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 8000;
  background-color: var(--black-def);
  opacity: 0;
  pointer-events: none;
  transition: 800ms;
  display: flex;
  align-items: center;
  justify-content: center;
}
.intermision-overlay.overlay-shown {
  opacity: 1;
  pointer-events: all;
}

.intermision-overlay h1 {
  transition: 2s;
  filter: blur(24px);
}

.intermision-overlay.overlay-shown h1 {
  filter: blur(0px);
}
