* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Stand-in for 100vh used by the hero/apartments sequence below (script.js
   locks it to a fixed px value on mobile — see refreshViewportHeightLock —
   so the frame-sequence canvases and their vh-sized containers don't jump
   when a mobile browser's address bar shows/hides mid-scroll; on desktop
   it's kept live, recomputed on every resize). This raw 100vh is only the
   pre-JS fallback so nothing collapses before script.js runs. */
:root {
  --vh100: 100vh;
}

html, body {
  width: 100%;
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: #fff;
}

/* Lenis smooth scroll */
html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

/* Loader */
#loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: #202020;
  transition: opacity 0.5s ease;
}

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

#loader-bar {
  width: min(280px, 60vw);
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

#loader-fill {
  width: 0%;
  height: 100%;
  background: #fff;
  transition: width 0.15s ease-out;
}

#loader-text {
  font-size: 13px;
  letter-spacing: 0.05em;
  opacity: 0.7;
}

/* Site header — fixed across the whole site, dims on scroll-down,
   comes back on scroll-up or on hover/focus regardless of scroll state. */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 5px;
  opacity: 1;
  transition: opacity 0.35s ease;
}

.site-header.header--dimmed {
  opacity: 0;
}

.site-header:hover,
.site-header:focus-within {
  opacity: 1;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 20px 20px;
  background: #fff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 15px;
  overflow: hidden;
}

/* Below 1280px, header-main's children flow directly as the row above
   (see .header-main display:contents) — .header-topbar stays hidden and
   the mobile layout matches the pre-redesign single-row header exactly. */
.header-topbar {
  display: none;
}

.header-main {
  display: contents;
}

.header-logo {
  flex-shrink: 0;
}

.header-logo img {
  display: block;
  width: 195px;
  height: auto;
}

.header-cta {
  flex-shrink: 0;
  padding: 10px 16px;
  border: none;
  border-radius: 12px;
  background: #da552f;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.header-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.header-nav--primary {
  flex-shrink: 0;
  gap: 10px;
}

.header-nav-link {
  color: #5e6076;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.header-nav--primary .header-nav-link {
  font-size: 14px;
  font-weight: 800;
}

.header-callback {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-callback-bt {
  padding: 7px 10px;
  border: none;
  border-radius: 7px;
  background: #f0f0f0;
  color: #5e6076;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.header-phone {
  color: #5e6076;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.header-func {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-func-bt {
  display: flex;
  align-items: center;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

.header-func-bt img {
  display: block;
  height: 17px;
  width: auto;
}

.header-phone-icon {
  display: none;
  align-items: center;
  padding: 0 10px;
}

.header-phone-icon img {
  display: block;
  width: 15px;
  height: auto;
}

.header-menu {
  display: none;
  align-items: center;
  padding: 6px;
  border: none;
  background: none;
  cursor: pointer;
}

.header-menu img {
  display: block;
  width: 21px;
  height: auto;
}

/* Desktop-only two-row header: gray topbar (city + secondary nav) above
   the white main row (logo, CTA, primary nav, callback, icons). Below
   1280px the header stays the pre-redesign single row (see .header-main
   display:contents above). */
@media (min-width: 1280px) {
  .site-header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 0 0 20px;
  }

  .header-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 6px 20px;
    background: #f0f0f0;
    width: 100%;
  }

  .header-topbar-item {
    color: #5e6076;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
  }

  .header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 20px;
    width: 100%;
  }
}

@media (max-width: 1279px) {
  .header-nav,
  .header-callback,
  .header-func {
    display: none;
  }

  .header-phone-icon,
  .header-menu {
    display: flex;
  }
}

/* Narrow phones: logo + CTA + phone icon + burger no longer fit at full
   size on one row, so this tier trims paddings/gaps and the logo itself
   to keep everything on one line without overlap. */
@media (max-width: 480px) {
  .site-header-inner {
    gap: 8px;
    padding: 14px 16px;
  }

  .header-logo img {
    width: 120px;
  }

  .header-cta {
    padding: 9px 12px;
    font-size: 12px;
  }
}

/* Mobile/tablet nav drawer — opened via .header-menu at <1280px
   (see script.js). Overlay + right-side panel, both driven by a shared
   --open modifier so CSS transitions (not JS) do the animating. */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.mobile-nav-overlay--open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 28px;
  width: min(360px, 86vw);
  height: 100%;
  padding: 20px 25px 25px;
  background: #fff;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.35s ease;
}

.mobile-nav--open {
  transform: translateX(0);
}

.mobile-nav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-nav-close {
  padding: 4px 8px;
  border: none;
  background: none;
  color: #5e6076;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.mobile-nav-cta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-nav-cta {
  flex-shrink: 0;
}

.mobile-nav-func-bt {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mobile-nav-link {
  color: #121327;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.mobile-nav-link--bold {
  font-weight: 800;
}

.mobile-nav-bottom {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

body.mobile-nav-lock {
  overflow: hidden;
}

/* Hero — pinned canvas sequence. The canvas itself IS slide 1 of the
   apartments slider below (see .apartments-track) — no handoff/substitution
   between a canvas and a separate photo. One continuous pin (height covers
   the canvas frames (105vh) + the scale-down shrink (50vh) + track translateX
   (remaining scroll), plus the trailing 100vh the sticky needs to scroll out
   of view at the end) means no unstick/restick gap either. Keep in sync with
   HERO_VH/SHRINK_VH in script.js if these numbers change. */
.hero-sequence {
  position: relative;
  height: calc(var(--vh100) * 4.55);
  background: #202020;
}

.hero-sticky {
  position: sticky;
  top: 0;
  height: var(--vh100);
  width: 100%;
  overflow: hidden;
  background: #202020;
}

/* Clips the canvas to the shrinking card box (top/left/width/height driven
   by script.js, continuously, in sync with the canvas's own scale) — the
   canvas is NOT sized as a percentage of this (shrinking) box, so its own
   layout size never changes; only its scale does, which is what keeps the
   shrink from distorting the image (see #sequence-canvas below). */
.canvas-mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  will-change: top, left, width, height, transform;
}

/* Fixed at the viewport's own size (vw/vh, not % of .canvas-mask) so it
   never gets stretched by its shrinking parent; top:50%/left:50% +
   translate(-50%,-50%) keeps it centered on .canvas-mask's box regardless
   of that box's current size, and script.js applies a single uniform
   scale() on top (cover-fit: preserves aspect ratio, .canvas-mask crops
   whatever overflows) instead of the old non-uniform scale(sx, sy). */
#sequence-canvas {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: var(--vh100);
  transform-origin: center center;
  will-change: transform;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(50% 50% at 50% 50%, rgba(0, 0, 0, 0.10) 0%, rgba(0, 0, 0, 0.50) 100%);
  pointer-events: none;
}

/* Sits in normal flow at the top of the (very tall) .hero-sequence
   ancestor — NOT sticky/fixed, so it scrolls away with the page like
   regular content while the canvas behind it stays pinned for longer.
   More sections will be appended after .hero-sequence later. */
.hero-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--vh100);
  display: flex;
  align-items: flex-end;
  padding: 100px clamp(20px, 3vw, 25px) clamp(24px, 4vw, 40px);
  pointer-events: none;
}

/* Next "slide" of overlay content — scrolls into view right after
   .hero-row has scrolled out, still layered on top of the (still pinned)
   canvas underneath. */
.hero-content--secondary {
  top: calc(var(--vh100) * 0.65);
}

.hero-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  width: 100%;
  gap: clamp(24px, 6vw, 100px);
}

.hero-title {
  flex-shrink: 0;
  font-size: clamp(40px, 5vw, 80px);
  line-height: 0.9;
  font-weight: 800;
  text-transform: uppercase;
  color: #fff;
  pointer-events: none;
}

.hero-widget {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: clamp(200px, 21vw, 297px);
  align-self: flex-end;
  display: flex;
  border-radius: 45px;
  padding: 5px;
  overflow: hidden;
  pointer-events: auto;
}

.hero-widget-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.hero-widget-bg::-webkit-media-controls {
  display: none;
}

/* Card covers half of .hero-widget; the video (full-bleed behind it)
   shows straight through the other, uncovered half — no filler element
   needed for that. */
.hero-widget-card {
  position: relative;
  z-index: 1;
  flex: 0 1 50%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 0;
  border-radius: 40px;
  background: rgba(255, 255, 255, 0.49);
  backdrop-filter: blur(12.5px);
  -webkit-backdrop-filter: blur(12.5px);
}

.hero-widget-form {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  padding: 0 20px;
}

.hero-widget-rooms {
  display: flex;
  align-items: center;
  gap: 2px;
}

.room-bt {
  padding: 10px;
  border: none;
  border-radius: 12px;
  background: #f0f0f0;
  color: #121327;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease;
}

.room-bt:not(.room-bt--wide):not(.room-bt--accent) {
  width: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.room-bt:hover {
  background: #e4e4e4;
}

.room-bt--accent {
  background: #da552f;
  color: #fff;
}

.room-bt--accent:hover {
  background: #c44a29;
}

.hero-widget-divider {
  height: 1px;
  margin: 14px 20px;
  background: rgba(255, 255, 255, 0.2);
}

.hero-widget-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
}

.hero-widget-badge-text {
  max-width: 207px;
  font-size: clamp(16px, 1.9vw, 30px);
  line-height: 1;
  font-weight: 800;
  text-transform: uppercase;
  color: #121327;
}

.hero-widget-badge-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
}

@media (max-width: 820px) {
  .hero-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-widget {
    max-width: none;
    width: 100%;
    height: auto;
    min-height: 300px;
    align-self: auto;
    flex-direction: column;
    justify-content: flex-end;
  }

  .hero-content {
    padding-top: 80px;
  }
}

/* Heading styled the same way as .hero-title (uppercase ExtraBold, tight
   leading), just one step down in scale. */
.section-title {
  font-size: clamp(32px, 6.9vw, 90px);
  line-height: 0.9;
  font-weight: 800;
  text-transform: uppercase;
  color: #fff;
}

/* Apartments slider — the canvas itself is slide 1's visual, so there's no
   handoff/substitution to keep in sync. Sequence, all scroll-driven off the
   same one continuous pin:
   1. Canvas plays its frame sequence (see script.js HERO_VH), covering the
      full viewport as always.
   2. Scale-down: once the last frame is drawn, .canvas-mask (see below)
      shrinks continuously from full-viewport down to the resting card box
      (66.9vw x 80vh), staying centered, while the canvas inside it gets a
      single UNIFORM `scale()` (transform-origin: center) tracking that
      same shrink — same coefficient on both axes, so the frame's
      proportions never distort, cover-fit style: whatever doesn't fit is
      cropped by the mask instead of being squeezed. #apartment-slide-first-content
      (the floating plan/type/price overlay, positioned independently of
      the flex track below) fades in once via a fixed-duration CSS
      transition, fired once this scale-down has fully finished — it
      doesn't itself scale, so text never distorts either.
   3. Paging: once the scale-down finishes, .apartments-track's translateX
      takes over, sliding the row left — the canvas mask gets the exact
      same translateX applied to its transform, so the card moves as if it
      were the row's first member. .apartments-viewport (wrapping the
      track) is clipped to the resting card's box until this exact moment,
      so slides 2/3 — which sit right after slide 1 in the flex row — stay
      completely hidden until translateX is what actually reveals them,
      rather than peeking in during the scale-down. The one-shot widen
      itself (left/width) is a CSS transition, not an instant jump, so the
      clip's edge doesn't visibly "pop" right as paging starts.
   #apartment-slide-first is kept in the DOM as a dormant, invisible
   (visibility: hidden) placeholder purely to reserve slide 1's slot in the
   row's layout math — its own photo/handoff assets are unused now. */
.apartments-viewport {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  transition: left 0.6s ease, width 0.6s ease;
  will-change: left, width, top, height;
}

.apartments-track {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: stretch;
  gap: 0.6vw;
  will-change: transform;
}

.apartment-slide {
  position: relative;
  flex: 0 0 66.9vw;
  min-width: 0;
  overflow: hidden;
}

#apartment-slide-first {
  visibility: hidden;
}

.apartment-slide-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Oversized (126% wide, centered via left:-13%) so the horizontal parallax
   pan applied in script.js (translateX, up to PARALLAX_MAX_FRACTION = 12%
   of the slide's own width, as it crosses the viewport during paging)
   never exposes an edge. */
.apartment-slide-bg img {
  position: absolute;
  top: 0;
  left: -13%;
  width: 126%;
  height: 100%;
  object-fit: cover;
  display: block;
  will-change: transform;
}

/* Frame-sequence slides (see SLIDE_SEQUENCES in script.js) draw their own
   cover-fit crop straight onto the canvas, so — unlike .apartment-slide-bg
   img above — it's sized to the box exactly, no oversized/parallax offset
   needed. */
.apartment-slide-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.apartment-slide-handoff {
  opacity: 1;
  transition: opacity 1s;
  will-change: opacity;
}

.apartment-slide-gradient {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.1) 38%);
}

.apartment-slide-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  gap: clamp(20px, 3vw, 50px);
  height: 100%;
  padding: clamp(20px, 2.5vw, 25px);
}

/* Slide 1's content overlay lives directly in .hero-sticky (a sibling of
   the canvas), independent of the flex track, so it can sit centered on
   screen matching wherever the scaled-down canvas ends up. Sized to the
   resting card (66.9vw x 80vh); JS only ever touches its opacity (one-shot
   fade-in) and transform (adds the paging translateX once that starts) —
   the centering translate(-50%, -50%) below is the static baseline. */
.apartment-slide-content--floating {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 66.9vw;
  height: calc(var(--vh100) * 0.8);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 1s;
  will-change: opacity, transform;
  z-index: 1;
}

.apartment-plan {
  flex-shrink: 0;
  width: clamp(140px, 15vw, 294px);
  height: auto;
  object-fit: contain;
}

.apartment-type {
  flex-shrink: 0;
  font-size: clamp(32px, 6.9vw, 110px);
  line-height: 0.9;
  font-weight: 800;
  text-transform: uppercase;
  color: #fff;
}

.apartment-price {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
  color: #fff;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.9;
}

.apartment-price-label,
.apartment-price-unit {
  font-size: clamp(14px, 2.5vw, 40px);
  padding-bottom: 0.2em;
}

.apartment-price-value {
  font-size: clamp(32px, 6.9vw, 110px);
}

@media (max-width: 820px) {
  .apartment-slide {
    flex-basis: 92vw;
    align-items: flex-end;
    flex-wrap: wrap;
  }

  .apartment-plan {
    width: clamp(100px, 30vw, 180px);
  }
  /* Matches RESTING_HEIGHT_VH_MOBILE in script.js — the floating overlay
     (slide 1's own card face) must stay sized to the same resting-card
     height .apartments-viewport/.apartments-track get on mobile, or slide 1
     ends up a different height than slides 2/3. left stays the base rule's
     50% (centered), same as desktop. Width matches .apartment-slide's own
     92vw mobile flex-basis above — left at the base rule's 66.9vw, slide 1's
     plan/type/price row has less room than slides 2/3 get and .apartment-price
     overflows the card into whatever's next in the row. top shifts up by
     MOBILE_VERTICAL_SHIFT_VH (script.js) off the base rule's 50% (centered) —
     keep the two in sync. */
  .apartment-slide-content--floating{
    width: 92vw;
    top: calc(50% - var(--vh100) * 0.15);
    height: calc(var(--vh100) / 2);
  }
}

/* Panorama — plain full-bleed section (not pinned, unlike .hero-sequence),
   scrolls normally with the page. Sized to the viewport, image cropped via
   object-fit: cover. script.js applies a light scale+pan on .panorama-img
   as the section crosses the viewport (onPanoramaScroll) — a subtle
   parallax/zoom, not a scroll-scrubbed sequence like the hero. */
.panorama-section {
  position: relative;
  height: 100vh;
  overflow: hidden;
  background: #202020;
}

.panorama-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}

/* Projects — a single column of six same-size cards, scrolling normally
   (no position: sticky — nothing pins in place). Overlap is a plain layout
   trick instead: every card after the first gets a negative margin-top
   (see ".project-card + .project-card" below) pulling it up partway over
   the previous card, so each one reveals over a real scroll distance
   instead of the whole stack bunching up on screen at once — z-index keeps
   the DOM-later (visually lower) card painting on top of the one behind
   it. script.js (onProjectsScroll) holds each card at 100% until its top
   crosses a trigger line near the top of the viewport, then shrinks it
   continuously and non-linearly off its own (always-live, never-frozen)
   rect.top — fast right after the trigger, decelerating the further past
   it the card goes. Overlap is turned off below 820px (see the media
   query) — cards go full-width, plain stacked list, no shrink either. */
.projects {
  position: relative;
  z-index: 0; /* contains the cards' z-index (1-6) in a local stacking context, so it can't leak out and paint over later siblings like .panorama-section */
  background: #202020;
  padding: clamp(60px, 8vw, 100px) 0;
}

.projects-title {
  padding: 0 clamp(20px, 3vw, 25px);
  margin-bottom: clamp(40px, 6vw, 100px);
  font-size: clamp(38px, 6.9vw, 110px);
  line-height: 0.9;
  font-weight: 800;
  text-transform: uppercase;
  color: #fff;
}

.projects-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  aspect-ratio: 1224 / 706;
  padding: clamp(16px, 2.5vw, 35px);
  border-radius: clamp(20px, 3.75vw, 60px);
  background-size: cover;
  background-position: center;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  will-change: transform;
}

/* Positive gap (not an overlap) between cards — each fully clears the
   previous before the next one starts, plus this much breathing room. */
.project-card + .project-card {
  margin-top: 5vw;
}

.project-card-top,
.project-card-badges {
  position: relative;
  z-index: 1;
}

.project-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.project-card-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.project-card-label {
  padding: 4px 0;
  font-size: clamp(13px, 1.6vw, 20px);
  font-weight: 500;
  text-transform: uppercase;
}

.project-card-name {
  font-size: clamp(26px, 5vw, 80px);
  line-height: 0.9;
  font-weight: 800;
  text-transform: uppercase;
}

.project-card-arrow {
  flex-shrink: 0;
  width: clamp(32px, 4vw, 52px);
  height: clamp(32px, 4vw, 52px);
}

.project-card-arrow img {
  display: block;
  width: 100%;
  height: 100%;
}

.project-card-badges {
  display: flex;
  gap: 5px;
}

.project-card-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: clamp(10px, 1.5vw, 20px);
  border-radius: 40px;
  background: rgba(255, 255, 255, 0.49);
  backdrop-filter: blur(12.5px);
  -webkit-backdrop-filter: blur(12.5px);
  white-space: nowrap;
}

.project-card-badge-label,
.project-card-badge-unit {
  font-size: clamp(12px, 1.4vw, 20px);
  font-weight: 500;
  text-transform: uppercase;
}

.project-card-badge-value,
.project-card-badge-status {
  font-size: clamp(18px, 2.2vw, 30px);
  font-weight: 800;
}

.project-card--lot4 {
  z-index: 1;
  background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.56) 25.96%, rgba(0, 0, 0, 0.1) 58.65%), url(/local/templates/main_new/assets/new-main/img/projects/pr_1.webp);
}

.project-card--lot5 {
  z-index: 2;
  background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.56) 25.96%, rgba(0, 0, 0, 0.1) 58.65%), url(/local/templates/main_new/assets/new-main/img/projects/pr_2.webp);
}

.project-card--lot6 {
  z-index: 3;
  background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.56) 25.96%, rgba(0, 0, 0, 0.1) 58.65%), url(/local/templates/main_new/assets/new-main/img/projects/pr_3.webp);
}

.project-card--lot7 {
  z-index: 4;
  background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.56) 25.96%, rgba(0, 0, 0, 0.1) 58.65%), url(/local/templates/main_new/assets/new-main/img/projects/pr_4.webp);
}

.project-card--duet {
  z-index: 5;
  background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.56) 25.96%, rgba(0, 0, 0, 0.1) 58.65%), url(/local/templates/main_new/assets/new-main/img/projects/pr_5.webp);
}

.project-card--dzeta {
  z-index: 6;
  background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.56) 25.96%, rgba(0, 0, 0, 0.1) 58.65%), url(/local/templates/main_new/assets/new-main/img/projects/pr_6.webp);
}

@media (max-width: 820px) {
  .project-card + .project-card {
    margin-top: 10px;
  }
}

/* Genplan (detail-project) — swaps between three "map" views (one per ЖК)
   via the <select>; only .genplan-view--active is shown. Each view layers
   an SVG of clickable building outlines (.genplan-poly) over a background
   photo, sized to the SVG's own viewBox aspect ratio so the polygons line
   up with the photo underneath. Hidden entirely on mobile (see the media
   query at the bottom) — this is a desktop-only interactive map. */

.genplan-select-wrap {
  position: absolute;
  top: clamp(20px, 3vw, 40px);
  left: clamp(20px, 3vw, 25px);
  z-index: 2;
}

.genplan-select {
  appearance: none;
  padding: 12px 40px 12px 20px;
  border: none;
  border-radius: 40px;
  background: #fff url(/local/templates/main_new/assets/new-main/img/ui/vector4.svg) no-repeat right 18px center;
  background-size: 12px auto;
  color: #121327;
  font-family: inherit;
  font-size: clamp(13px, 1.4vw, 16px);
  font-weight: 600;
  cursor: pointer;
}

.genplan-view {
  display: none;
  position: relative;
  width: 100%;
}

.genplan-view--active {
  display: block;
}

.genplan-view[data-genplan="0"] {
  aspect-ratio: 2560 / 1200;
}

.genplan-view[data-genplan="1"],
.genplan-view[data-genplan="2"] {
  aspect-ratio: 1920 / 1080;
}

.genplan-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.genplan-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.genplan-poly polygon,
.genplan-poly path {
  fill: transparent;
  stroke: transparent;
  stroke-width: 3px;
  pointer-events: all;
  cursor: pointer;
  transition: fill 0.2s ease, stroke 0.2s ease;
}

.genplan-poly:hover polygon,
.genplan-poly:hover path {
  fill: rgba(218, 85, 47, 0.35);
  stroke: #da552f;
}

.genplan-tooltip {
  position: absolute;
  right: clamp(16px, 3vw, 30px);
  bottom: clamp(16px, 3vw, 30px);
  z-index: 2;
  max-width: 260px;
  padding: 16px 20px;
  border-radius: 16px;
  background: #fff;
  color: #121327;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.genplan-tooltip--visible {
  opacity: 1;
  transform: translateY(0);
}

.genplan-tooltip-title {
  margin-bottom: 4px;
  font-size: clamp(14px, 1.6vw, 18px);
  font-weight: 800;
  text-transform: uppercase;
}

.genplan-tooltip-text {
  color: #5e6076;
  font-size: clamp(12px, 1.3vw, 14px);
}

/* Mortgage — a plain (non-functional) calculator mockup: the "sliders" are
   just styled divs at fixed demo positions, not real range inputs, since
   this project is markup-only — no live recalculation. */
.mortgage {
  position: relative;
  background: #202020;
  padding: clamp(60px, 8vw, 100px) clamp(20px, 3vw, 25px);
}

.mortgage-head {
  max-width: 720px;
  margin: 0 auto clamp(40px, 6vw, 70px);
  text-align: center;
}

.mortgage-title {
  margin-bottom: 16px;
  font-size: clamp(32px, 5vw, 60px);
  line-height: 0.9;
  font-weight: 800;
  text-transform: uppercase;
  color: #fff;
}

.mortgage-subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-size: clamp(14px, 1.6vw, 18px);
}

.mortgage-form {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 2.5vw, 30px);
  padding: clamp(24px, 3vw, 35px);
  border-radius: 30px;
  background: #2b2b2b;
}

.mortgage-field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mortgage-field-label {
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.6);
  font-size: clamp(12px, 1.3vw, 14px);
}

.mortgage-field-percent {
  color: #da552f;
  font-weight: 600;
  font-size: clamp(12px, 1.3vw, 14px);
}

.mortgage-field-value {
  display: block;
  width: 100%;
  margin-bottom: 12px;
  padding: 0;
  border: none;
  background: none;
  color: #fff;
  font-family: inherit;
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 800;
}

.mortgage-field-value:focus {
  outline: none;
  color: #da552f;
}

/* Native range slider restyled to the old decorative look: a 4px rail with an
   orange fill up to --fill (set per-input from JS for WebKit; Firefox uses its
   native ::-moz-range-progress) and a 16px white thumb. */
.mortgage-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 16px;
  margin: 0;
  background: none;
  cursor: pointer;
}

.mortgage-range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right,
    #da552f 0 var(--fill, 0%),
    rgba(255, 255, 255, 0.15) var(--fill, 0%));
}

.mortgage-range::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.15);
}

.mortgage-range::-moz-range-progress {
  height: 4px;
  border-radius: 2px;
  background: #da552f;
}

.mortgage-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  margin-top: -6px;
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 50%;
  background: #fff;
}

.mortgage-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 50%;
  background: #fff;
}

.mortgage-range:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px rgba(218, 85, 47, 0.35);
}

.mortgage-range:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 3px rgba(218, 85, 47, 0.35);
}

.mortgage-field-hint {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
  line-height: 1.4;
}

.mortgage-cta {
  padding: 16px;
  border: none;
  border-radius: 40px;
  background: #da552f;
  color: #fff;
  font-family: inherit;
  font-size: clamp(14px, 1.5vw, 16px);
  font-weight: 600;
  cursor: pointer;
}

.mortgage-cta:hover {
  background: #c44a29;
}

.mortgage-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 2vw, 24px);
}

.mortgage-plan {
  padding: clamp(24px, 3vw, 35px);
  border-radius: 30px;
  background: #2b2b2b;
}

.mortgage-plan--accent {
  background: #0069d9;
}

.mortgage-plan-title {
  margin-bottom: clamp(16px, 2vw, 24px);
  font-size: clamp(16px, 1.8vw, 20px);
  font-weight: 800;
  text-transform: uppercase;
  color: #fff;
}

.mortgage-plan-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mortgage-plan-item-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: clamp(12px, 1.3vw, 14px);
}

.mortgage-plan-item-value {
  color: #fff;
  font-weight: 800;
  font-size: clamp(14px, 1.6vw, 18px);
  text-align: right;
}

.mortgage-plan-diff {
  display: block;
  color: #eb5757;
  font-weight: 500;
  font-size: 11px;
}

.mortgage-plan--accent .mortgage-plan-diff {
  color: #6fcf97;
}

.mortgage-plan-item-value--accent {
  color: #6fcf97;
}

/* Consultation callback form — a plain visual mock; no real submit target,
   this project is markup-only. */
.consultation {
  position: relative;
  background: #202020;
  padding: clamp(40px, 6vw, 80px) clamp(20px, 3vw, 25px);
}

.consultation-card {
  display: grid;
  grid-template-columns: minmax(240px, 420px) 1fr;
  max-width: 1100px;
  margin: 0 auto;
  border-radius: 30px;
  overflow: hidden;
  background: #2b2b2b;
}

.consultation-image {
  position: relative;
  min-height: 280px;
}

.consultation-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.consultation-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 4vw, 50px);
}

.consultation-title {
  margin-bottom: 12px;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 800;
  text-transform: uppercase;
  color: #fff;
}

.consultation-subtitle {
  margin-bottom: clamp(20px, 3vw, 30px);
  color: rgba(255, 255, 255, 0.7);
  font-size: clamp(13px, 1.4vw, 15px);
}

.consultation-subtitle b {
  color: #fff;
}

.consultation-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.consultation-input {
  width: 100%;
  padding: 16px 20px;
  border: none;
  border-radius: 40px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
}

.consultation-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.consultation-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 4px;
}

.consultation-checkbox input {
  flex-shrink: 0;
  margin-top: 3px;
}

.consultation-checkbox span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  line-height: 1.5;
}

.consultation-checkbox a {
  color: rgba(255, 255, 255, 0.75);
}

.consultation-submit {
  margin-top: 6px;
  padding: 16px;
  border: none;
  border-radius: 40px;
  background: #da552f;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.consultation-submit:hover {
  background: #c44a29;
}

.consultation-caption {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 820px) {
  .consultation-card {
    grid-template-columns: 1fr;
  }

  .consultation-image {
    min-height: 200px;
  }
}

/* Client-side validation + post-submit confirmation (see initForms in
   script.js). Both forms swap themselves for a .*-success block in place on a
   valid submit, then restore the pristine form after a few seconds. */
.consultation-input.is-invalid {
  outline: 1px solid #e5533d;
  outline-offset: -1px;
  background: rgba(229, 83, 61, 0.14);
}

.consultation-error {
  display: block;
  margin: 6px 0 0 20px;
  color: #f0937f;
  font-size: 12px;
}

.consultation-checkbox.is-invalid span {
  color: #f0937f;
}

.consultation-success {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 0;
}

.consultation-success-title {
  color: #fff;
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 700;
}

.consultation-success-text {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

.footer-subscribe-input.is-invalid {
  outline: 1px solid #e5533d;
  outline-offset: -1px;
}

.footer-subscribe-error {
  margin-top: 8px;
  color: #f0937f;
  font-size: 12px;
}

.footer-subscribe-success {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

/* iOS Safari auto-zooms the page when a focused field's font-size is below
   16px. Bump the form inputs to 16px on mobile so tapping them no longer
   triggers that zoom, without disabling pinch-zoom in the viewport meta. */
@media (max-width: 820px) {
  .consultation-input,
  .footer-subscribe-input {
    font-size: 16px;
  }
}

/* Map — static full-bleed section right before the footer. map.webp already
   bakes in the building-highlight overlay (no separate Figma layer to
   composite), so it's a single cover-fit image under a white-to-transparent
   gradient that fades the top edge for heading legibility. */
.map-section {
  position: relative;
  height: 100vh;
  overflow: hidden;
  background: #fff;
}

.map-bg {
  position: absolute;
  inset: 0;
}

.map-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.map-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, #fff 0%, rgba(255, 255, 255, 0) 32%);
}

.map-title {
  position: relative;
  z-index: 1;
  max-width: 874px;
  padding: 50px;
  font-size: clamp(28px, 5vw, 60px);
  font-weight: 300;
  line-height: 1.05;
  text-transform: uppercase;
  color: #000;
}

@media (max-width: 820px) {
  .map-title {
    padding: 30px 20px;
  }
}

/* Footer — nav columns + social + subscribe form + legal text, matching the
   real site's info architecture, restyled to our dark theme. */
.footer {
  position: relative;
  background: #161616;
  padding: clamp(50px, 6vw, 80px) clamp(20px, 3vw, 25px) clamp(24px, 3vw, 30px);
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: clamp(30px, 5vw, 60px);
  max-width: 1400px;
  margin: 0 auto;
  padding-bottom: clamp(30px, 4vw, 50px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-nav {
  display: flex;
  flex: 2 1;
  flex-wrap: wrap;
  gap: clamp(30px, 4vw, 60px);
}

.footer-nav-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 160px;
  list-style: none;
}

.footer-nav-heading {
  margin-bottom: 4px;
  color: #fff;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 13px;
}

.footer-nav-col a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  font-size: 13px;
  line-height: 1.4;
}

.footer-nav-col a:hover {
  color: #fff;
}

.footer-social {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 10px;
  list-style: none;
}

.footer-social a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  font-size: 13px;
}

.footer-social a:hover {
  color: #fff;
}

.footer-subscribe {
  flex: 1 1;
  max-width: 340px;
}

.footer-subscribe-title {
  margin-bottom: 14px;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
}

.footer-subscribe-row {
  display: flex;
  gap: 8px;
}

.footer-subscribe-input {
  flex: 1 1 0;
  min-width: 0;
  padding: 12px 16px;
  border: none;
  border-radius: 40px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
}

.footer-subscribe-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.footer-subscribe-submit {
  flex-shrink: 0;
  padding: 12px 20px;
  border: none;
  border-radius: 40px;
  background: #da552f;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.footer-subscribe-submit:hover {
  background: #c44a29;
}

.footer-subscribe-text {
  display: block;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 10px;
  line-height: 1.5;
}

.footer-subscribe-text a {
  color: rgba(255, 255, 255, 0.55);
}

.footer-bottom {
  max-width: 1400px;
  margin: clamp(20px, 3vw, 30px) auto 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-legal {
  color: rgba(255, 255, 255, 0.3);
  font-size: 10px;
  line-height: 1.5;
}

.footer-credit {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

.footer-copyright {
  margin-top: 0;
  color: rgba(255, 255, 255, 0.4);
  font-size: 11px;
  text-decoration: none;
}

a.footer-copyright:hover {
  color: #fff;
}

@media (max-width: 820px) {
  .footer-top {
    flex-direction: column;
  }
}