/* ===== PAGE LOADER ===== */
#pageLoader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #1a0e07;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#pageLoader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
}

/* Logo */
.loader-logo {
  height: 80px;
  width: auto;
  opacity: 0;
  transform: translateY(-12px);
  animation: loaderLogoIn 0.7s ease 0.2s forwards;
}

@keyframes loaderLogoIn {
  to { opacity: 1; transform: translateY(0); }
}

/* Home-icon dots */
.loader-homes {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  opacity: 0;
  animation: loaderFadeIn 0.5s ease 0.6s forwards;
}

@keyframes loaderFadeIn {
  to { opacity: 1; }
}

/* Each span = a tiny home icon via clip-path */
.loader-homes span {
  display: block;
  width: 14px;
  height: 14px;
  background: #C4704F;
  /* House silhouette: roof peak at top-center, flat base */
  clip-path: polygon(50% 0%, 100% 45%, 85% 45%, 85% 100%, 15% 100%, 15% 45%, 0% 45%);
  transform: scale(0.6);
  opacity: 0.3;
}

/* Wave animation – each home lights up in sequence */
.loader-homes span:nth-child(1) { animation: homeWave 1.4s ease-in-out 0.6s infinite; }
.loader-homes span:nth-child(2) { animation: homeWave 1.4s ease-in-out 0.8s infinite; }
.loader-homes span:nth-child(3) { animation: homeWave 1.4s ease-in-out 1.0s infinite; }
.loader-homes span:nth-child(4) { animation: homeWave 1.4s ease-in-out 1.2s infinite; }
.loader-homes span:nth-child(5) { animation: homeWave 1.4s ease-in-out 1.4s infinite; }
.loader-homes span:nth-child(6) { animation: homeWave 1.4s ease-in-out 1.6s infinite; }
.loader-homes span:nth-child(7) { animation: homeWave 1.4s ease-in-out 1.8s infinite; }

@keyframes homeWave {
  0%, 100% {
    transform: scale(0.6);
    opacity: 0.25;
    background: #C4704F;
  }
  40% {
    transform: scale(1.15);
    opacity: 1;
    background: #e8a87c;
  }
  60% {
    transform: scale(1);
    opacity: 0.85;
    background: #C4704F;
  }
}

/* Loading text */
.loader-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0;
  animation: loaderFadeIn 0.5s ease 1s forwards;
}
