:root {
  scroll-behavior: smooth;

  --color-primary: #324998;
  --color-secondary: #34B78E;
  --color-white: #e8e8e8;

  --font-primary: 'Poppins', sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-primary);
  color: var(--color-white);
}

#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: hidden;
  background: var(--color-white);
  transition: all 0.6s ease-out;
  width: 100%;
  height: 100vh;
}

#preloader:before,
#preloader:after {
  content: "";
  position: absolute;
  border: 4px solid var(--color-primary);
  border-radius: 50%;
  animation: animate-preloader 2s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

#preloader:after {
  animation-delay: -0.5s;
}

@keyframes animate-preloader {
  0% {
    width: 10px;
    height: 10px;
    top: calc(50% - 5px);
    left: calc(50% - 5px);
    opacity: 1;
  }

  100% {
    width: 72px;
    height: 72px;
    top: calc(50% - 36px);
    left: calc(50% - 36px);
    opacity: 0;
  }
}

body {
  background-color: var(--color-primary);
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.container {
  background-image: url(/assets/stars.svg);
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.container_message {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 540px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
}

.container_message img{
  width: 100%;
  opacity: 0;
  animation: fadeIn 1s ease-in forwards;
}

.container_message h2 {
  text-align: center;
  margin-bottom: 40px;
}

.dreaming {
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  margin: 0 auto;
  animation: typing 3.5s steps(35) infinite;
  animation-delay: 1s;
}

@keyframes typing {
  0% {
    width: 0;
    opacity: 1;
  }
  80% {
    width: 60%;
    opacity: 1;
  }
  100% {
   opacity: 0 ;
  }
}

.apologise {
  opacity: 0;
  animation: fadeIn 1s ease-in forwards;
  animation-delay: 1.5s;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.container_message span {
  color: var(--color-secondary);
  font-size: xx-large;
}

.trees-container {
  position: absolute;
  bottom: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  overflow: hidden;
  z-index: 0;
}

.trees {
  width: 100%;
  animation: slide-up 2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slide-up {
  0% {
    transform: translateY(100%);
  }
  100% {
    transform: translateY(0);
  }
}

/* @MEDIA - RESPONSIVE */

@media (max-width: 1600px) {
  .container_message {
    width: 450px;
  }

  .trees {
    width: 300%;
  }
}

@media (max-width: 1200px) {
  .container_message {
    width: 350px;
    font-size: small;
  }

  .container_message span {
    font-size: medium;
  }

  .trees {
    width: 140%;
  }
}

@media (max-width: 920px) {
  .container_message {
    width: 360px;
  }

  .trees {
    width: 300%;
  }
}

@media (max-width: 480px) {
  .container_message {
    width: 260px;
    font-size: x-small;
  }

  .container_message span {
    font-size: medium;
  }

  .trees {
    width: 500%;
  }
}

@media (max-width: 280px) {
  .container_message {
    width: 200px;
  }
}