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

body {
  background-color: #5f5c4b;
  color: white;
  margin: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: sans-serif;
  transition: background-color 0.8s ease;
}

body.final {
  background-color: #0d1b3e;
}

#main-text,
#final-text {
  position: absolute;
  top: 10%;
  left: 10%;
  text-align: center;
}

#main-text h1,
#final-text h1 {
  font-family: InstrumentSerif, serif;
  margin-top: 0;
  margin-bottom: 0;
}

h1,
#logo {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

h1.active,
#logo.active {
  opacity: 1;
  transform: translateY(0);
}

#final-text h1 {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

#final-text.active h1 {
  opacity: 1;
  transform: translateY(0);
}

#final-text.active h1:nth-child(2) {
  transition-delay: 0.15s;
}

#logo {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 300px;
  height: auto;
}

#scroll-indicator {
  position: fixed;
  bottom: 20px;
  left: 50%;
  width: 28px;
  height: 28px;
  color: white;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  animation: scroll-hint 1.4s ease-in-out infinite;
}

#scroll-indicator.visible {
  opacity: 0.85;
}

@keyframes scroll-hint {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(7px);
  }
}
#main-text {
  transition: opacity 0.6s ease;
}

body.final #main-text {
  opacity: 0;
  pointer-events: none;
}
