/* ═══════════════════════════════════════════════════════════
   HP Homes Elite — Hero Crossfade Slideshow
   5 project images, soft Ken Burns + crossfade, no flicker
   ═══════════════════════════════════════════════════════════ */

/* ── Hide vertical text sidebars (left + right) ── */
[x-id="Home_32_8"],
[x-id="Home_40_8"] {
  display: none !important;
}

/* ── "A home built to perform." heading → white ── */
[x-id="Home_332_10"] {
  color: #ffffff !important;
}

/* ── Slideshow wrapper replaces the single hero-image ── */
.hero-slideshow {
  position: absolute;
  inset: 0;
  overflow: hidden;
  /* Force GPU layer at correct DPI on iOS Safari */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* Each slide layer */
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 2.2s cubic-bezier(0.45, 0, 0.55, 1);
  /* Prevent sub-pixel compositing blur on mobile */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.hero-slide.is-active {
  opacity: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  /* Force Retina-correct compositing layer */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* ── Per-slide Ken Burns: alternating motion per slide ── */
.hero-slide:nth-child(1) img { animation: kb-zoom-out    22s ease-in-out infinite; }
.hero-slide:nth-child(2) img { animation: kb-zoom-in     22s ease-in-out infinite; }
.hero-slide:nth-child(3) img { animation: kb-drift-left  22s ease-in-out infinite; }
.hero-slide:nth-child(4) img { animation: kb-drift-right 22s ease-in-out infinite; }
.hero-slide:nth-child(5) img { animation: kb-zoom-out    22s ease-in-out infinite; }

/* Reduced scale range on mobile — avoids rendering beyond native resolution */
@keyframes kb-zoom-out {
  0%   { transform: scale(1.06) translateY(0px); }
  100% { transform: scale(1.00) translateY(-8px); }
}

@keyframes kb-zoom-in {
  0%   { transform: scale(1.00) translateY(0px); }
  100% { transform: scale(1.06) translateY(6px); }
}

@keyframes kb-drift-left {
  0%   { transform: scale(1.04) translateX(10px); }
  100% { transform: scale(1.02) translateX(-10px); }
}

@keyframes kb-drift-right {
  0%   { transform: scale(1.03) translateX(-10px); }
  100% { transform: scale(1.05) translateX(8px); }
}

/* ── Dot navigation ── */
.hero-dots {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 30;
  pointer-events: none;
}

.hero-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(247, 244, 238, 0.35);
  transition: background 0.5s ease, transform 0.5s ease;
}

.hero-dot.is-active {
  background: rgba(247, 244, 238, 0.90);
  transform: scale(1.5);
}

/* ── Mobile: cap hero height so images don't stretch beyond ~1× ── */
/* At 65vh on iPhone 14 (844pt logical): 549pt × 3dpi = 1647px physical.
   Our 1500px images stretch only ~1.1× — near-native sharpness. */
@media (max-width: 768px) {
  [data-testid="hero"] {
    min-height: 65vh !important;
    height: 65vh !important;
    max-height: 65vh !important;
  }
}

/* ── Progress bar across bottom of hero ── */
.hero-progress-track {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(247, 244, 238, 0.08);
  z-index: 30;
  overflow: hidden;
}

.hero-progress-fill {
  height: 100%;
  background: rgba(247, 244, 238, 0.45);
  width: 0%;
  transition: none;
}
