/* =====================================================
   DOMUS ARCHITECTURAL ISOMETRIC HERO SLIDER
   Clean, scoped styling for the homepage hero section
   Source implementation from 2167_orbital
   ===================================================== */

:root {
  --site-header-height: 58px;
}

/* Scoped hero wrapper (integrated with GSAP pinned scroll scene) */
.domus-hero-slider-section {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 100svh;
  max-height: none;
  margin-top: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  padding-top: var(--site-header-height, 58px) !important;
  padding-bottom: 0 !important;
  padding-left: clamp(24px, 5vw, 68px) !important;
  padding-right: clamp(24px, 5vw, 68px) !important;
  z-index: 5;
  overflow: hidden;
  box-sizing: border-box;
  background-color: #FAF9F6 !important;
  color: #0A0A0C;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Continuous ambient daylight gallery backdrop */
.domus-hero-slider-section .hero-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse at 75% 35%, rgba(255, 255, 255, 0.98) 0%, transparent 65%),
    radial-gradient(ellipse at 25% 80%, rgba(238, 235, 227, 0.55) 0%, transparent 70%),
    linear-gradient(to bottom, #FFFFFF 0%, #FAF9F6 50%, #F3F1EC 100%);
}

/* Subtle architectural grid */
.domus-hero-slider-section .hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.35;
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.035) 1px, transparent 1px);
  background-size: 90px 90px;
  mask-image: radial-gradient(ellipse at 50% 50%, #000 35%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 35%, transparent 80%);
}

/* Film grain texture */
.domus-hero-slider-section .hero-grain {
  position: absolute;
  inset: 0;
  opacity: 0.024;
  pointer-events: none;
  z-index: 2;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Giant Background Watermark Numeral in Upper-Right area */
.domus-hero-slider-section .hero-watermark {
  position: absolute;
  top: clamp(6px, 1.5vh, 20px);
  right: clamp(24px, 5vw, 68px);
  left: auto;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(6.5rem, 13vw, 12rem);
  font-weight: 700;
  line-height: 0.8;
  color: rgba(10, 10, 12, 0.045);
  user-select: none;
  pointer-events: none;
  z-index: 1;
  text-align: right;
  transition: opacity 0.5s ease;
}

/* Main Hero Stage Area */
.domus-hero-slider-section .hero-body {
  position: relative;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto !important;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  z-index: 10;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  box-sizing: border-box;
}

/* -----------------------------------------------------
   LEFT SIDE: EDITORIAL CONTENT LAYOUT
   ----------------------------------------------------- */
.domus-hero-slider-section .hero-editorial {
  position: relative;
  width: clamp(320px, 32vw, 480px);
  max-width: 480px;
  z-index: 15;
  padding-left: clamp(0px, 1.5vw, 24px);
}

.domus-hero-slider-section .editorial-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 0.70rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #18181B;
  margin-bottom: 10px;
}

.domus-hero-slider-section .editorial-badge::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #0A0A0C;
}

.domus-hero-slider-section .editorial-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.2rem, 3.4vw, 3.6rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.08;
  color: #0A0A0C;
  margin-bottom: 8px;
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.domus-hero-slider-section .editorial-title .title-brand {
  display: block;
  white-space: nowrap;
}

.domus-hero-slider-section .editorial-title .title-sub {
  display: block;
  white-space: nowrap;
}

.domus-hero-slider-section .editorial-meta {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: none;
  color: #52525B;
  margin-bottom: 14px;
  transition: opacity 0.35s ease;
}

.domus-hero-slider-section .editorial-desc {
  display: inline-block;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.25;
  color: #FFFFFF;
  background: #0A0A0C;
  padding: 5px 11px;
  border-radius: 2px;
  max-width: fit-content;
  margin-bottom: 0;
  transition: opacity 0.35s ease;
}

/* -----------------------------------------------------
   FEATURED ISOMETRIC BUILDING STAGE
   ----------------------------------------------------- */
.domus-hero-slider-section .hero-building-stage {
  position: absolute;
  left: 58.5%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: clamp(480px, 45vw, 680px);
  max-width: calc(100% - clamp(280px, 24vw, 380px) - 32px);
  height: calc(100% - clamp(28px, 5vh, 48px));
  max-height: 590px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1500px;
  perspective-origin: 50% 50%;
  pointer-events: auto;
  z-index: 10;
  box-sizing: border-box;
}

/* Ground architectural contact shadow plinth */
.domus-hero-slider-section .stage-plinth {
  position: absolute;
  bottom: 0%;
  left: 50%;
  width: clamp(320px, 32vw, 480px);
  height: 44px;
  transform: translateX(-50%) rotateX(75deg);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(10, 10, 15, 0.28) 0%, rgba(10, 10, 15, 0.07) 50%, transparent 75%);
  filter: blur(11px);
  pointer-events: none;
  z-index: 2;
}

/* Active & Transitioning Building Wrapper */
.domus-hero-slider-section .building-slide-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
}

.domus-hero-slider-section .building-slide {
  position: absolute;
  bottom: 0%;
  left: 50%;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  transform-origin: 50% 90%;
  transform-style: preserve-3d;
  will-change: transform, opacity;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition:
    transform 0.75s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.75s ease,
    visibility 0.75s ease;
}

/* Building Cutout Image: strictly constrained to visible hero area below header */
.domus-hero-slider-section .building-slide img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center bottom;
  transform: none;
  filter: drop-shadow(0 35px 50px rgba(0, 0, 0, 0.18)) drop-shadow(0 15px 20px rgba(0, 0, 0, 0.08));
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Specific visual scale adjustment: increase display height for wide aspect-ratio building on desktop only */
@media (min-width: 821px) {

  .domus-hero-slider-section .building-slide[data-title="The Domus 26 East"] img,
  .domus-hero-slider-section .building-slide[data-title="The Domus 26 EAST"] img {
    transform: scale(1.50);
    transform-origin: center bottom;
  }
}

/* Active Slide State */
.domus-hero-slider-section .building-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0px) translateZ(0px) rotateY(0deg) rotateX(0deg) scale(1);
  z-index: 20;
}

/* Outgoing slide exiting down & forward along isometric axis */
.domus-hero-slider-section .building-slide.exit-next {
  opacity: 0;
  visibility: visible;
  transform: translateX(-50%) translate3d(-80px, 80px, 70px) rotateY(-14deg) rotateX(6deg) scale(0.92);
  z-index: 10;
}

/* Incoming slide entering from top & background along isometric axis */
.domus-hero-slider-section .building-slide.enter-next {
  opacity: 0;
  visibility: visible;
  transform: translateX(-50%) translate3d(80px, -20px, -70px) rotateY(14deg) rotateX(-4deg) scale(0.96);
  z-index: 15;
}

/* Outgoing slide exiting up & backward for Prev */
.domus-hero-slider-section .building-slide.exit-prev {
  opacity: 0;
  visibility: visible;
  transform: translateX(-50%) translate3d(80px, -20px, -70px) rotateY(14deg) rotateX(-4deg) scale(0.96);
  z-index: 10;
}

/* Incoming slide entering from down & foreground for Prev */
.domus-hero-slider-section .building-slide.enter-prev {
  opacity: 0;
  visibility: visible;
  transform: translateX(-50%) translate3d(-80px, 80px, 70px) rotateY(-14deg) rotateX(6deg) scale(0.92);
  z-index: 15;
}

/* -----------------------------------------------------
   RESPONSIVE DESIGN & REDUCED MOTION
   ----------------------------------------------------- */
@media (max-width: 1024px) {
  .domus-hero-slider-section .hero-editorial {
    width: clamp(240px, 28vw, 320px);
    max-width: 320px;
  }

  .domus-hero-slider-section .editorial-title {
    font-size: 2.2rem;
  }

  .domus-hero-slider-section .hero-watermark {
    top: 6px;
    right: 20px;
    font-size: clamp(5.5rem, 13vw, 8.5rem);
  }

  .domus-hero-slider-section .hero-building-stage {
    left: 59%;
    top: 50%;
    width: clamp(380px, 46vw, 520px);
    max-width: calc(100% - clamp(240px, 28vw, 320px) - 24px);
    height: calc(100% - clamp(24px, 4vh, 40px));
    max-height: 500px;
  }
}

@media (max-width: 820px) {

  /* Let hero section utilize the full mobile viewport cleanly */
  .domus-hero-slider-section {
    height: 100svh !important;
    min-height: 100svh !important;
    max-height: 100svh !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: center !important;
    padding-top: calc(var(--site-header-height, 58px) + 2px) !important;
    padding-bottom: 8px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .domus-hero-slider-section .hero-body {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 0 !important;
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    flex: 1 1 0% !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
  }

  /* Compact editorial header to allocate maximum vertical space to building */
  .domus-hero-slider-section .hero-editorial {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    box-sizing: border-box !important;
  }

  .domus-hero-slider-section .editorial-badge {
    margin-bottom: 2px !important;
    font-size: 0.62rem !important;
  }

  .domus-hero-slider-section .editorial-title {
    font-size: clamp(1.4rem, 4.8vw, 2rem) !important;
    margin-bottom: 2px !important;
    line-height: 1.08 !important;
  }

  .domus-hero-slider-section .editorial-meta {
    font-size: 0.66rem !important;
    margin-bottom: 4px !important;
    letter-spacing: 0.14em !important;
  }

  .domus-hero-slider-section .editorial-desc {
    font-size: 0.68rem !important;
    line-height: 1.2 !important;
    padding: 4px 9px !important;
    margin-bottom: 4px !important;
    max-width: fit-content !important;
  }

  .domus-hero-slider-section .hero-watermark {
    top: 6px;
    right: 16px;
    font-size: clamp(4.5rem, 16vw, 6.5rem);
  }

  /* MAXIMIZED HERO BUILDING STAGE: occupies all remaining vertical and horizontal space */
  .domus-hero-slider-section .hero-building-stage {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 0% !important;
    min-height: 0 !important;
    height: 100% !important;
    max-height: none !important;
    margin: 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    padding: 0 4px !important;
  }

  .domus-hero-slider-section .building-slide-wrap {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .domus-hero-slider-section .stage-plinth {
    display: none !important;
  }

  /* Building slides take full stage boundaries with vertical centering */
  .domus-hero-slider-section .building-slide {
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 50% !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Maximize rendered image size: full available width and height with zero cropping */
  .domus-hero-slider-section .building-slide img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center 36% !important;
    transform: none !important;
  }

  /* =====================================================================
     MOBILE-ONLY INDIVIDUAL SLIDE OPTIMIZATION (4 TARGETED BUILDINGS)
     Increases rendered image size while preserving complete building visibility
     ===================================================================== */

  /* 1. Audumber Heights (+15-20% visible size boost) */
  .domus-hero-slider-section .building-slide[data-title="Audumber Heights"] img,
  .domus-hero-slider-section .building-slide[data-title="The Domus Audumber Heights"] img {
    object-position: center 35% !important;
    transform: scale(1.18) !important;
    transform-origin: center 38% !important;
  }

  /* 2. The Domus Privé (+30-35% visible size boost - fills natural transparent margins) */
  .domus-hero-slider-section .building-slide[data-title="The Domus Privé"] img,
  .domus-hero-slider-section .building-slide[data-title="The Domus Prive"] img {
    object-position: center 32% !important;
    transform: scale(1.32) !important;
    transform-origin: center 34% !important;
  }

  /* 3. The Domus 26 West (+15-20% visible size boost) */
  .domus-hero-slider-section .building-slide[data-title="The Domus 26 West"] img,
  .domus-hero-slider-section .building-slide[data-title="The Domus 26 WEST"] img {
    object-position: center 32% !important;
    transform: scale(1.18) !important;
    transform-origin: center 34% !important;
  }

  /* 4. The Domus 26 East (+35-40% visible size boost - enhances vertical presence) */
  .domus-hero-slider-section .building-slide[data-title="The Domus 26 East"] img,
  .domus-hero-slider-section .building-slide[data-title="The Domus 26 EAST"] img {
    object-position: center 28% !important;
    transform: scale(1.36) !important;
    transform-origin: center 30% !important;
  }

  /* 5. The Domus Menarco (+15-20% visible size boost on mobile) */
  .domus-hero-slider-section .building-slide[data-title="Menarco"] img,
  .domus-hero-slider-section .building-slide[data-title="The Domus Menarco"] img {
    object-position: center 36% !important;
    transform: scale(1.35) !important;
    transform-origin: center 36% !important;
  }

  /* Default positioning for other slides */
  .domus-hero-slider-section .building-slide[data-title="Mayuresh Trinity"] img,
  .domus-hero-slider-section .building-slide[data-title="The Domus Mayuresh Trinity"] img {
    object-position: center 35% !important;
  }

  .domus-hero-slider-section .building-slide[data-title="Shivneri"] img,
  .domus-hero-slider-section .building-slide[data-title="The Domus Shivneri"] img,
  .domus-hero-slider-section .building-slide[data-title="Ashtabhuja"] img,
  .domus-hero-slider-section .building-slide[data-title="The Domus Ashatapuja"] img,
  .domus-hero-slider-section .building-slide[data-title="Trinity"] img,
  .domus-hero-slider-section .building-slide[data-title="The Domus Trinity"] img {
    object-position: center 36% !important;
  }

  /* Smoother mobile transitions to prevent horizontal overflow */
  .domus-hero-slider-section .building-slide.exit-next {
    transform: translateX(-50%) translate3d(-35px, 30px, 20px) rotateY(-8deg) scale(0.95);
  }

  .domus-hero-slider-section .building-slide.enter-next {
    transform: translateX(-50%) translate3d(35px, -15px, -20px) rotateY(8deg) scale(0.96);
  }

  .domus-hero-slider-section .building-slide.exit-prev {
    transform: translateX(-50%) translate3d(35px, -15px, -20px) rotateY(8deg) scale(0.96);
  }

  .domus-hero-slider-section .building-slide.enter-prev {
    transform: translateX(-50%) translate3d(-35px, 30px, 20px) rotateY(-8deg) scale(0.95);
  }
}

/* Compact phones (iPhone SE, narrow screens) */
@media (max-width: 480px) {
  .domus-hero-slider-section {
    padding-top: calc(var(--site-header-height, 58px) + 2px) !important;
    padding-bottom: 6px !important;
  }

  .domus-hero-slider-section .editorial-title {
    font-size: clamp(1.5rem, 6vw, 1.95rem) !important;
  }

  .domus-hero-slider-section .editorial-desc {
    font-size: 0.74rem !important;
    line-height: 1.35 !important;
    margin-bottom: 2px !important;
  }

  /* Responsive scale tuning on compact mobile screens to prevent edge clipping */
  .domus-hero-slider-section .building-slide[data-title="Audumber Heights"] img,
  .domus-hero-slider-section .building-slide[data-title="The Domus Audumber Heights"] img {
    transform: scale(1.25) !important;
  }

  .domus-hero-slider-section .building-slide[data-title="The Domus Privé"] img,
  .domus-hero-slider-section .building-slide[data-title="The Domus Prive"] img {
    transform: scale(1.80) !important;
  }

  .domus-hero-slider-section .building-slide[data-title="The Domus 26 West"] img,
  .domus-hero-slider-section .building-slide[data-title="The Domus 26 WEST"] img {
    transform: scale(1.30) !important;
  }

  .domus-hero-slider-section .building-slide[data-title="The Domus 26 East"] img,
  .domus-hero-slider-section .building-slide[data-title="The Domus 26 EAST"] img {
    transform: scale(1.40) !important;
  }
}

/* Short height mobile screens */
@media (max-height: 700px) and (max-width: 820px) {
  .domus-hero-slider-section {
    padding-top: calc(var(--site-header-height, 58px) + 2px) !important;
    padding-bottom: 4px !important;
  }

  .domus-hero-slider-section .editorial-title {
    font-size: 1.55rem !important;
    margin-bottom: 1px !important;
  }

  .domus-hero-slider-section .editorial-meta {
    margin-bottom: 2px !important;
    font-size: 0.62rem !important;
  }

  .domus-hero-slider-section .editorial-desc {
    margin-bottom: 2px !important;
    font-size: 0.65rem !important;
    padding: 3px 8px !important;
  }

  .domus-hero-slider-section .building-slide[data-title="Audumber Heights"] img,
  .domus-hero-slider-section .building-slide[data-title="The Domus Audumber Heights"] img {
    transform: scale(1.12) !important;
    object-position: center 38% !important;
  }

  .domus-hero-slider-section .building-slide[data-title="The Domus Privé"] img,
  .domus-hero-slider-section .building-slide[data-title="The Domus Prive"] img {
    transform: scale(1.22) !important;
    object-position: center 36% !important;
  }

  .domus-hero-slider-section .building-slide[data-title="The Domus 26 West"] img,
  .domus-hero-slider-section .building-slide[data-title="The Domus 26 WEST"] img {
    transform: scale(1.12) !important;
    object-position: center 36% !important;
  }

  .domus-hero-slider-section .building-slide[data-title="The Domus 26 East"] img,
  .domus-hero-slider-section .building-slide[data-title="The Domus 26 EAST"] img {
    transform: scale(1.26) !important;
    object-position: center 32% !important;
  }
}

@media (prefers-reduced-motion: reduce) {

  .domus-hero-slider-section .building-slide,
  .domus-hero-slider-section .editorial-title,
  .domus-hero-slider-section .editorial-desc {
    transition: opacity 0.3s ease !important;
    transform: none !important;
  }
}