/* preloader */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100vw;
  height: 100svh;
  display: flex;
  gap: 2rem;
  padding: 2rem;
  background-color: var(--tone-100);
  color: var(--tone-400);
  overflow: hidden;
  pointer-events: all;
}

.overlay p {
  font-size: 1.3rem;
}

.projects,
.loader,
.locations {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.loader {
  align-items: center;
  gap: 0;
}

.loader h1 {
  font-size: 2rem;
  line-height: 0.9;
  text-align: center;
  text-transform: uppercase;
  color: #3a3a3a;
  background-image: linear-gradient(
    0deg,
    var(--tone-200),
    var(--tone-200) 50%,
    var(--tone-400) 0
  );
  background-size: 100% 200%;
  background-position: 0% 100%;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.projects-header,
.project-item,
.locations-header,
.location-item {
  display: flex;
  gap: 2rem;
  opacity: 0;
}

.projects-header > *,
.project-item > * {
  flex: 1;
}

.locations {
  align-items: center;
}

.locations-header,
.location-item {
  width: 50%;
}

.project-item,
.location-item {
  color: var(--tone-300);
}

.image-grid {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 1000;
  width: 30%;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transform: translate(-50%, -50%);
}

.image-grid .grid-row {
  width: 100%;
  display: flex;
  gap: 1rem;
}

.img {
  position: relative;
  flex: 1;
  aspect-ratio: 1;
  clip-path: polygon(0% 0%, 100% 0%, 100% 0%, 0% 0%);
  overflow: hidden;
}

.img img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

@media (max-width: 1000px) {
  .loader h1 {
    font-size: 1.5rem;
  }

  .projects,
  .locations {
    display: none;
  }

  .image-grid {
    width: 90%;
  }
}
