.loader {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

.loader__text {
  position: relative;
  font-size: 2.8rem;
  overflow: hidden;
  z-index: 2;
  color: var(--c--darkest);
  padding-top: 1rem;
  padding-bottom: 1rem;
  &:not(:first-of-type) {
    padding-left: 0.8rem;
  }

  span {
    display: inline-block;
    opacity: 0;
    visibility: hidden;
  }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .loader {
    flex-direction: column;
    text-align: center;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: 0;
  }

  .loader__text {
    font-size: 1.8rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    text-align: center;
    width: 100%;

    &:not(:first-of-type) {
      padding-left: 0;
    }
  }
}

.loader__slice {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(33.33vw + 0.1rem);
  height: 100vh;
  background-color: var(--c-lightest);
  z-index: 0;

  &:nth-of-type(2) {
    left: 33.33vw;
  }

  &:nth-of-type(3) {
    left: 66.66vw;
  }
}

/* Mobile responsive adjustments for loader slices */
@media (max-width: 768px) {
  .loader__slice {
    width: 100vw;
    height: calc(33.33vh + 0.1rem);

    &:first-of-type {
      top: 0;
      left: 0;
    }

    &:nth-of-type(2) {
      top: 33.33vh;
      left: 0;
    }

    &:nth-of-type(3) {
      top: 66.66vh;
      left: 0;
    }
  }
}

.hero {
  height: 100vh;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--c-darkest);
}

.hero__title {
  color: var(--c-lightest);
  font-size: 5.2rem;
  overflow: hidden;
  text-align: center; /* Center the text */
  width: 100%; /* Ensure the title takes full width */
  span {
    display: inline-block;
  }
}

.hero__container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* Mobile responsive adjustments for hero section */
@media (max-width: 768px) {
  .hero {
    padding: 0;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100vh;
    display: flex;
  }

  .hero__title {
    font-size: 3rem;
    text-align: center;
    width: 100%;
    padding: 0 15px;
    margin: 0;
    line-height: 1.2;
  }

  .hero__container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0;
    height: 100%;
  }
}

/* Extra small devices (phones, 480px and down) */
@media (max-width: 480px) {
  .loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    text-align: center;
    padding: 0;
  }

  .loader__text {
    font-size: 1.4rem;
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
    text-align: center;
    width: 100%;
    margin: 0 auto;
  }

  .hero {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100vh;
  }

  .hero__title {
    font-size: 2.5rem;
    padding: 0 10px;
    line-height: 1.2;
    width: 100%;
    margin: 0;
    max-width: 90%;
    text-align: center;
  }

  .hero__container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
  }
}

/* Additional mobile styles for intro section */
@media (max-width: 768px) {
  .mobile-device .loader,
  .mobile-device .hero {
    width: 100%;
    overflow-x: hidden;
  }

  /* Ensure hero section is centered on mobile */
  .mobile-device .hero {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 !important;
    height: 100vh;
    width: 100%;
    background-color: var(--c-darkest) !important; /* Force dark background */
  }

  .mobile-device .hero__title {
    margin: 0 auto;
    width: 100%;
    text-align: center !important;
    max-width: 90%;
    color: #e7e5e4; /* Ensuring light text color */
    text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.5); /* Adding shadow to improve readability */
  }
}

/* Adjust the hero title position vertically if needed */
@media (max-height: 600px) {
  .mobile-device .hero__title {
    margin-top: -20px; /* Slight adjustment for very short screens */
  }
}

/* For extra small devices */
@media (max-width: 380px) {
  .mobile-device .hero__title {
    font-size: 2.2rem !important;
  }
}
