/* Homepage cinema walk — sticky crossfade advantages + HD media */

html.portal-snap {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html.portal-snap {
    scroll-behavior: auto;
  }
}

body.portal--home {
  background: #050706;
  color: #f4f5f3;
}

body.portal--home .portal-footer {
  background: #0a0c0b;
  border-top-color: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
}

.portal-skip-link {
  position: fixed;
  top: -60px;
  left: 12px;
  z-index: 300;
  padding: 12px 20px;
  background: #0a0c0b;
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: top 0.2s var(--lux-ease, ease);
}

.portal-skip-link:focus {
  top: 12px;
}

/* Bright bloom at the facade→interior cut: sells "the camera passed through
   the glass" instead of a flat scene change. Opacity is scroll-driven from
   portal-premium-motion.js, not animated, so it stays exact under fast
   scrolling. */
/* Prevent orphaned single words on the big display headlines. */
.portal-home-hero__title-main,
.portal-flythrough__title,
.portal-cinema__title {
  text-wrap: balance;
}

.portal-transition-flash {
  position: fixed;
  inset: 0;
  z-index: 140;
  background: #fdfaf2;
  opacity: 0;
  pointer-events: none;
}

/* Fixed progress rail */
.portal-story-rail {
  position: fixed;
  right: 18px;
  top: 50%;
  z-index: 90;
  transform: translateY(-50%);
  display: none;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

body.portal--home.is-story-active .portal-story-rail {
  display: flex;
}

.portal-story-rail__dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  transition: height 0.45s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s;
}

.portal-story-rail__dot.is-active {
  height: 28px;
  background: #fff;
}

/* Hero */
.portal-home-hero.portal-snap-screen {
  position: relative;
  min-height: 100svh;
  min-height: 100vh;
  scroll-snap-align: start;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.portal-home-hero__photo,
.portal-home-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.portal-home-hero__media {
  position: absolute;
  inset: -2%;
  background-size: cover;
  background-position: center;
}

.portal-home-hero.portal-snap-screen .portal-home-hero__layout {
  width: 100%;
  z-index: 2;
  padding: 120px 0 88px;
}

.portal-home-hero__title-main {
  font-family: "Playfair Display", Georgia, serif !important;
  font-size: clamp(56px, 10vw, 110px) !important;
  font-weight: 600 !important;
  line-height: 0.95 !important;
  color: #fff !important;
}

.portal-home-hero__btn--primary {
  background: #fff !important;
  color: #0a0c0b !important;
  border-radius: 2px !important;
  min-height: 54px !important;
  padding: 0 28px !important;
  border: 1px solid #fff !important;
}

.portal-home-hero__btn--ghost {
  background: transparent !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.55) !important;
  border-radius: 2px !important;
  min-height: 54px !important;
  padding: 0 28px !important;
}

.portal-home-hero__stats {
  display: inline-flex !important;
  margin-top: 28px;
  padding: 14px 18px !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase;
  font-size: 11px;
}

/* ========== REAL FLYTHROUGH (yard → facade → skyflat windows) ========== */
.portal-flythrough {
  position: relative;
  height: calc(var(--fly-steps, 3) * 120vh);
  background: #050706;
}

.portal-flythrough__pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
}

.portal-flythrough__stage {
  position: absolute;
  inset: 0;
}

.portal-flythrough__media-wrap {
  position: absolute;
  inset: -8%;
  will-change: transform;
  /* Zoom target = the specific window called out for the facade->interior
     cut, not just "somewhere upper-right". */
  transform-origin: 24% 46%;
}

.portal-flythrough__media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.portal-flythrough__veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.18) 55%, rgba(0, 0, 0, 0.35) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, transparent 40%, rgba(0, 0, 0, 0.72) 100%);
}

.portal-flythrough__copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  pointer-events: none;
}

.portal-flythrough__slide {
  position: absolute;
  left: max(24px, calc((100% - 1180px) / 2 + 24px));
  bottom: 96px;
  width: min(640px, calc(100% - 48px));
  opacity: 0;
  transform: translate3d(0, 40px, 0);
  transition: opacity 0.22s cubic-bezier(0.22, 1, 0.36, 1), transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.portal-flythrough__slide.is-active {
  opacity: 1;
  transform: none;
}

.portal-flythrough__kicker {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.portal-flythrough__title {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(44px, 8vw, 88px);
  font-weight: 600;
  line-height: 0.96;
  color: #fff;
  letter-spacing: -0.025em;
}

.portal-flythrough__text {
  margin: 16px 0 0;
  max-width: 28em;
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.78);
}

.portal-flythrough__bar {
  position: absolute;
  left: max(24px, calc((100% - 1180px) / 2 + 24px));
  bottom: 48px;
  z-index: 4;
  width: min(220px, 40vw);
  height: 2px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.portal-flythrough__bar > span {
  display: block;
  height: 100%;
  width: 0%;
  background: #fff;
  transform-origin: left center;
}

.portal-flythrough__hint {
  position: absolute;
  right: max(24px, calc((100% - 1180px) / 2 + 24px));
  bottom: 40px;
  z-index: 4;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

@media (prefers-reduced-motion: reduce) {
  .portal-flythrough {
    height: auto;
  }
  .portal-flythrough__pin {
    position: relative;
    height: auto;
  }
  .portal-flythrough__media-wrap {
    position: relative;
    inset: auto;
    min-height: 70vh;
  }
  .portal-flythrough__slide {
    position: relative;
    left: auto;
    bottom: auto;
    opacity: 1;
    transform: none;
    margin: 24px;
  }
}

/* ========== STICKY CINEMA WALK ========== */
.portal-cinema {
  position: relative;
  height: calc(var(--cinema-steps, 8) * 100vh);
  background: #050706;
}

.portal-cinema__pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
}

.portal-cinema__stage {
  position: absolute;
  inset: 0;
}

.portal-cinema__layer {
  position: absolute;
  inset: -6%;
  opacity: 0;
  transform: scale(1.18);
  will-change: opacity, transform;
  z-index: 0;
  pointer-events: none;
}

.portal-cinema__layer.is-active,
.portal-cinema__layer.is-leaving {
  z-index: 1;
}

.portal-cinema__media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.portal-cinema__veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.22) 52%, rgba(0, 0, 0, 0.45) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, transparent 38%, rgba(0, 0, 0, 0.78) 100%);
}

.portal-cinema__copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 0 0 84px;
  pointer-events: none;
}

.portal-cinema__slide {
  position: absolute;
  left: max(24px, calc((100% - 1180px) / 2 + 24px));
  bottom: 84px;
  width: min(680px, calc(100% - 48px));
  opacity: 0;
  transform: translate3d(0, 48px, 0);
  filter: blur(8px);
  pointer-events: none;
  will-change: opacity, transform, filter;
}

.portal-cinema__slide.is-active {
  opacity: 1;
  transform: none;
  filter: none;
  pointer-events: auto;
}

.portal-cinema__slide.is-leaving {
  opacity: 0;
  transform: translate3d(0, -28px, 0);
  filter: blur(6px);
}

.portal-cinema__kicker {
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.portal-cinema__title {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(44px, 8vw, 92px);
  font-weight: 600;
  line-height: 0.96;
  letter-spacing: -0.025em;
  max-width: 12ch;
  color: #fff;
  text-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.portal-cinema__text {
  margin: 18px 0 0;
  max-width: 28em;
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.78);
}

.portal-cinema__cta {
  display: inline-flex;
  margin-top: 26px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.9);
  color: #fff;
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
  transition: color 0.25s, border-color 0.25s;
  pointer-events: auto;
}

.portal-cinema__cta:hover {
  color: #8eb558;
  border-bottom-color: #8eb558;
}

.portal-cinema__index {
  position: absolute;
  right: max(24px, calc((100% - 1180px) / 2 + 24px));
  bottom: 28px;
  z-index: 4;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.4);
}

@media (prefers-reduced-motion: reduce) {
  .portal-cinema {
    height: auto;
  }

  .portal-cinema__pin {
    position: relative;
    height: auto;
  }

  .portal-cinema__layer {
    position: relative;
    min-height: 70vh;
    opacity: 1 !important;
    transform: none !important;
    filter: brightness(0.88) !important;
  }

  .portal-cinema__slide {
    position: relative;
    left: auto;
    bottom: auto;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    margin: 24px;
  }
}

/* Widgets after story — light premium deck */
.portal-home-blocks {
  background: #eef0ec;
  color: #0a0c0b;
  display: flex;
  flex-direction: column;
  padding: 0 0 40px;
  min-height: 0;
}

.portal-home-deck {
  background: #eef0ec;
  color: #0a0c0b;
  padding: 0 0 40px;
}

.portal-home-deck .portal-section-title {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #0a0c0b;
}

.portal-home-deck .portal-section-kicker {
  letter-spacing: 0.28em;
  font-size: 11px;
  color: #5c6560;
  text-transform: uppercase;
  margin: 0 0 10px;
}

.portal-home-pick {
  padding: clamp(56px, 7vw, 96px) 0 clamp(40px, 5vw, 72px);
  background: #eef0ec;
}

.portal-home-pick .portal-container > form,
.portal-home-pick .portal-filters {
  background: rgba(255, 255, 255, 0.86) !important;
  border: 1px solid rgba(15, 23, 19, 0.08) !important;
  border-radius: 8px !important;
  box-shadow: 0 16px 48px rgba(10, 20, 16, 0.06) !important;
  backdrop-filter: blur(16px);
}

.portal-widget-block {
  padding: clamp(32px, 4vw, 56px) 0;
}

/* Sections stacked tighter on home: the old 56px inter-section margin plus
   each block's own ~50-90px padding was compounding into 150-270px of dead
   air between blocks (worst where a component also carried its own legacy
   margin, e.g. the genplan card). */
body.portal--home .portal-section {
  margin-bottom: 32px;
}

.portal-widget-block--dark {
  background: #0c100e;
  color: #f4f5f3;
}

.portal-widget-block--dark .portal-section-title {
  color: #fff;
}

.portal-widget-block--dark .portal-section-kicker {
  color: rgba(255, 255, 255, 0.5);
}

.portal-views-cinematic {
  background: #050706;
  padding: clamp(40px, 5vw, 64px) 0;
}

.portal-views-cinematic .portal-section-title {
  color: #fff;
  font-family: "Playfair Display", Georgia, serif;
}

.portal-views-cinematic .portal-section-kicker {
  color: rgba(255, 255, 255, 0.5);
}

.portal-views-cinematic .portal-views__slide {
  border-radius: 10px;
  overflow: hidden;
  min-height: min(58vh, 520px);
}

.portal-views-cinematic .portal-views__media {
  width: 100%;
  height: min(58vh, 520px);
  object-fit: cover;
  filter: brightness(0.92) saturate(0.9);
  transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.portal-views-cinematic .portal-views__slide:hover .portal-views__media {
  transform: scale(1.04);
}

.portal-life-mosaic {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}

.portal-life-mosaic .portal-amenity-card {
  grid-column: span 4;
  min-height: 280px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  border: 0;
  background: #111;
}

.portal-life-mosaic .portal-amenity-card:nth-child(1) {
  grid-column: span 8;
  min-height: 380px;
}

.portal-life-mosaic .portal-amenity-card:nth-child(2) {
  grid-column: span 4;
  min-height: 380px;
}

.portal-life-mosaic .portal-amenity-card__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.75) saturate(0.9);
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1), filter 0.5s;
}

.portal-life-mosaic .portal-amenity-card:hover .portal-amenity-card__photo {
  transform: scale(1.06);
  filter: brightness(0.85) saturate(0.95);
}

.portal-life-mosaic .portal-amenity-card__body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 24px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78));
  color: #fff;
}

.portal-life-mosaic .portal-amenity-card__title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 600;
  margin: 0 0 8px;
  color: #fff;
}

.portal-life-mosaic .portal-amenity-card__text {
  margin: 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  line-height: 1.45;
}

.portal-amenities-banner {
  min-height: min(48vh, 420px) !important;
  border-radius: 10px !important;
  margin-bottom: 14px;
  background-size: cover !important;
  background-position: center !important;
}

.portal-location-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.portal-location-stats__item {
  padding: 18px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 23, 19, 0.08);
  backdrop-filter: blur(12px);
}

.portal-location-stats__value {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 600;
  margin: 0;
}

.portal-genplan-wrap {
  border-radius: 12px !important;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(10, 20, 16, 0.12);
}

.portal-home-deck .portal-project-card,
.portal-home-deck .portal-news-card {
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(15, 23, 19, 0.06);
  box-shadow: 0 12px 36px rgba(10, 20, 16, 0.06);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s;
}

.portal-home-deck .portal-project-card:hover,
.portal-home-deck .portal-news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 48px rgba(10, 20, 16, 0.12);
}

.portal-home-deck .portal-construction-card__visual,
.portal-home-deck .portal-location-map__constructor {
  border-radius: 10px;
  overflow: hidden;
}

.portal-home-deck .portal-bank-marquee {
  padding: 24px 0;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 19, 0.06);
}

@media (max-width: 900px) {
  .portal-story-rail {
    right: 10px;
  }

  .portal-cinema__slide {
    left: 20px;
    width: calc(100% - 40px);
    bottom: 64px;
  }

  .portal-cinema__title {
    font-size: clamp(36px, 11vw, 56px);
  }

  .portal-life-mosaic .portal-amenity-card,
  .portal-life-mosaic .portal-amenity-card:nth-child(1),
  .portal-life-mosaic .portal-amenity-card:nth-child(2) {
    grid-column: span 12;
    min-height: 260px;
  }
}
