/**
 * Limited Homes Remaining paragraph.
 * Values from Figma Dev Mode — Desktop: 1435:8134 | Mobile: 1442:1090
 *
 * Layout constraints (from the design notes):
 *  - Background image = 50% of the screen (desktop, right side).
 *  - Content sits in the site's standard `.container` (same as the rest of the
 *    page) so the "countdown" always lines up with page content at any width.
 *  - The dark panel stays fully solid until the 50% mark (the photo's left edge),
 *    then fades over the photo and clears by ~87% — matching the Figma overlay.
 */

.limited-homes {
  position: relative;
  background-color: #1d1d1f;
  overflow: hidden;
  /* Top is lighter than bottom — the element above already adds spacing. */
  /* margin-top: 70px; */
  margin-bottom: 96px;
}

/* Background photo — 50% of the screen, right side. */
.limited-homes__bg {
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background-color: #171719;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 1;
}

/* Fade overlay: solid dark to 50% (photo edge), faint by 72%, clear by 87%. */
.limited-homes::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    #1d1d1f 0%,
    #1d1d1f 50%,
    rgba(29, 29, 31, 0.78) 60%,
    rgba(29, 29, 31, 0.42) 73%,
    rgba(29, 29, 31, 0.12) 84%,
    rgba(29, 29, 31, 0) 94%
  );
}

/* Content uses the site container so it aligns with the rest of the page. */
.limited-homes > .container {
  position: relative;
  z-index: 3;
  padding-top: 100px;
  padding-bottom: 100px;
}

.limited-homes__content {
  /* Cap at the Figma 618px, but never let it cross into the right-hand image
     (image is 50% of the viewport) — keeps the text on the dark half. */
  width: min(618px, calc(50vw - 100px));
  max-width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 50px;
  text-align: center;
}

/* ---- Heading: ONLY / 10 / HOMES REMAIN ---- */
.limited-homes__heading {
  width: 100%;
}

.limited-homes__eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 21px;
  width: 100%;
}

/* Rules flex-shrink so the eyebrow never overflows the content width. */
.limited-homes__rule {
  flex: 1 1 auto;
  min-width: 20px;
  max-width: 125px;
  height: 2px;
  background-color: #feef94;
}

.limited-homes__only,
.limited-homes__unit {
  margin: 0;
  font-family: 'Montserrat', 'Open Sans', sans-serif;
  font-weight: 600;
  color: #feef94;
  text-transform: uppercase;
  letter-spacing: 4.5px;
  line-height: 1.2;
  /* Figma 45px, scales down on smaller screens. */
  font-size: clamp(24px, 3.3vw, 45px);
}

.limited-homes__only {
  flex: 0 0 auto;
  white-space: nowrap;
}

.limited-homes__unit {
  margin-top: 14px;
}

.limited-homes__number {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: flex-start;
  font-family: 'Merriweather', Georgia, 'Times New Roman', serif;
  font-weight: 600;
  color: #fff;
  line-height: 1;
  /* The big (current) number drives sizing; the struck number is sized in em. */
  font-size: clamp(150px, 18vw, 250px);
}

.limited-homes__number-current {
  letter-spacing: 0.1em; /* Figma 25px at 250px */
}

/* The previous count, small and struck through with a gold slash (e.g. 10). */
.limited-homes__number-prev {
  position: absolute;
  right: 100%; /* sit fully to the left of the big number */
  top: 0;
  margin-right: 0.18em; /* gap between the "10" and the "9" */
  transform: translateY(6%);
  font-size: 0.4em; /* Figma 100px vs 250px */
  letter-spacing: 0.06em;
  line-height: 1;
  color: rgba(255, 255, 255, 0.3);
  white-space: nowrap;
}

/* Gold brush-stroke slash (exact SVG from the design) over the previous number. */
.limited-homes__slash {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 150%;
  height: auto;
  transform: translate(-50%, -50%);
  pointer-events: none;
  overflow: visible;
}

/* ---- Blurb ---- */
.limited-homes__blurb {
  font-family: 'Open Sans', sans-serif;
  color: rgba(255, 255, 255, 0.8);
  line-height: 27px;
  font-size: clamp(16px, 1.45vw, 20px);
}

.limited-homes__blurb p {
  margin: 0;
}

.limited-homes__blurb strong,
.limited-homes__blurb b {
  color: #fff;
  font-weight: 700;
}

/* ---- House icons (each icon = 1 home) ---- */
.limited-homes__icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: min(430px, 100%);
  gap: 10.75px 11.467px; /* row-gap col-gap */
}

.lh-house {
  display: inline-flex;
  width: 28.667px;
  height: 28.667px;
}

.lh-house__icon {
  display: block;
  width: 100%;
  height: 100%;
}

/* Filled gold = still available. */
.lh-house.is-filled .lh-house__icon path {
  fill: #feef94;
  stroke: none;
}

/* Outline = sold / gone. */
.lh-house.is-empty .lh-house__icon path {
  fill: none;
  stroke: #feef94;
  stroke-width: 1.6;
}

/* ---- Button ---- */
.limited-homes__cta a,
.limited-homes__cta .btn {
  display: inline-block;
  border: 2px solid #fff;
  border-radius: 0; /* sharp rectangle, per Figma (theme default is a pill) */
  color: #fff;
  background: transparent;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 18px;
  line-height: 28px;
  padding: 21px 42px;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.limited-homes__cta a:hover,
.limited-homes__cta .btn:hover {
  background-color: #fff;
  color: #1d1d1f;
}

/* Strip any theme "external link" icon so the button matches the design. */
.limited-homes__cta a::after,
.limited-homes__cta a::before {
  content: none !important;
}

.limited-homes__cta a svg,
.limited-homes__cta a i,
.limited-homes__cta a img {
  display: none !important;
}

/* =====================================================================
   Mobile / tablet — Figma node 1442:1090 (390px frame)
   Image stacks on top, content below.
   ===================================================================== */
@media (max-width: 991px) {
  .limited-homes {
    /* Figma mobile image is 269px tall; grow it on wider tablets so it
       isn't a short, stretched band. */
    --lh-img-h: clamp(269px, 42vw, 400px);
    /* Tablet: a little less vertical margin than desktop. */
    /* margin-top: 32px; */
    margin-bottom: 64px;
  }

  .limited-homes__bg {
    position: relative;
    width: 100%;
    height: var(--lh-img-h);
    z-index: 1;
  }

  /* Vertical fade over the image bottom (Figma overlay 1442:1128). */
  .limited-homes::before {
    top: 0;
    bottom: auto;
    height: var(--lh-img-h);
    background: linear-gradient(
      0deg,
      #1d1d1f 0%,
      rgba(29, 29, 31, 0.25) 25%,
      rgba(29, 29, 31, 0) 100%
    );
  }

  .limited-homes > .container {
    padding: 45px 30px;
  }

  .limited-homes__content {
    width: 100%;
    gap: 40px;
  }

  .limited-homes__eyebrow {
    gap: 12.2px;
  }

  .limited-homes__rule {
    max-width: 72.621px;
  }

  .limited-homes__only,
  .limited-homes__unit {
    letter-spacing: 2.6144px;
    /* Figma mobile size — tablets use the same as mobile. */
    font-size: clamp(20px, 6.7vw, 26.144px);
  }

  .limited-homes__number {
    /* Big current number on mobile/tablet; struck number scales in em. */
    font-size: clamp(120px, 40vw, 150px);
  }

  .limited-homes__blurb {
    font-size: 15px;
  }

  .limited-homes__icons {
    width: min(340px, 100%);
    gap: 7.625px 8.133px;
  }

  .lh-house {
    width: 20.333px;
    height: 20.333px;
  }
}

/* Mobile: smaller vertical margin still. */
@media (max-width: 767px) {
  .limited-homes {
    /* margin-top: 30px; */
    margin-bottom: 40px;
  }
}
