/* =============================================
   LIFESTYLE — Figma 175:3597 "4th" (1920×979)
   Full-bleed photo with left-aligned white copy.
   Every measurement is Figma px × --dpx (see CONVENTIONS).
   The CSS below holds the FINAL state (Variant 11);
   js/sections/lifestyle.js animates blocks in from
   the Variant 9 positions when motion is enabled.
   ============================================= */

.sec-lifestyle {
  background: var(--dark);
  color: var(--white);
}

.sec-lifestyle .sec-canvas {
  height: calc(979 * var(--dpx));
  background: var(--dark);
}

/* ---- Photo — Figma 175:3599: 1990×995 @ -10,-8. The box is 2:1 by design; the
        16:9 render covers it, so ~11% of the image height is cropped evenly. ---- */
.sec-lifestyle .lifestyle-media {
  position: absolute;
  left: calc(-10 * var(--dpx));
  top: calc(-8 * var(--dpx));
  width: calc(1990 * var(--dpx));
  height: calc(995 * var(--dpx));
}

.sec-lifestyle .lifestyle-photo {
  object-position: center center;
}

/* Shading measured from the Figma render (black only, no tint):
   1. linear 108.79°: ~0.45 at the top-left fading out by ~37%
   2. radial vignette from the Figma gradientTransform
      (centre 1311.5,529 · radii 2958.5 × 4676): ≈0.44 at the left
      edge, clear on the towers, ≈0.2 at the far right */
.sec-lifestyle .lifestyle-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(108.79deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.11) 25%, rgba(0, 0, 0, 0) 36.8%),
    radial-gradient(calc(2958.5 * var(--dpx)) calc(4676 * var(--dpx)) at calc(1311.5 * var(--dpx)) calc(529 * var(--dpx)),
      rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 100%);
}

/* ---- Block 1 — Figma 175:3600: 510 wide @ 112, top 131 (final), gap 18 ---- */
.sec-lifestyle .lifestyle-intro {
  position: absolute;
  left: calc(112 * var(--dpx));
  top: calc(131 * var(--dpx));
  width: calc(510 * var(--dpx));
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: calc(18 * var(--dpx));
}

/* Figma 175:3601 — Neue Haas 45 Light 18, tracking 0.9 */
.sec-lifestyle .lifestyle-eyebrow {
  font-family: var(--font-body);
  font-weight: var(--fw-light);
  font-size: max(calc(18 * var(--dpx)), 13px);
  line-height: normal;
  letter-spacing: calc(0.9 * var(--dpx));
  color: var(--white);
  white-space: nowrap;
  margin: 0;
}

/* Figma 175:3602 — Loren Blake 64/75, 592 wide (wider than its parent, so no shrink) */
.sec-lifestyle .lifestyle-title {
  flex-shrink: 0;
  width: calc(592 * var(--dpx));
  font-size: calc(64 * var(--dpx));
  line-height: calc(75 * var(--dpx));
  color: var(--white);
}

/* keeps "the Ordinary" together so the title breaks like the Figma render */
.sec-lifestyle .lifestyle-title__keep {
  white-space: nowrap;
}

/* ---- Block 2 — Figma 175:3603: 500 wide @ 112, top 357 (final), gap 24 ---- */
.sec-lifestyle .lifestyle-copy {
  position: absolute;
  left: calc(112 * var(--dpx));
  top: calc(357 * var(--dpx));
  width: calc(500 * var(--dpx));
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: calc(24 * var(--dpx));
}

/* Figma 175:3604 "Vector" — 500×1 white @ 30% */
.sec-lifestyle .lifestyle-rule {
  display: block;
  width: 100%;
  height: max(1px, calc(1 * var(--dpx)));
  background: rgba(255, 255, 255, 0.3);
}

/* Figma 175:3605 — Neue Haas 45 Light 18/28, tracking 0.9 */
.sec-lifestyle .lifestyle-text {
  width: 100%;
  font-size: max(calc(18 * var(--dpx)), 13px);
  line-height: 1.556;
  letter-spacing: calc(0.9 * var(--dpx));
  color: var(--white);
}

/* ---- Block 3 — Figma 175:3606: pills @ 112, top 502 (final), gap 30 ---- */
.sec-lifestyle .lifestyle-actions {
  position: absolute;
  left: calc(112 * var(--dpx));
  top: calc(502 * var(--dpx));
  display: flex;
  align-items: center;
  gap: calc(30 * var(--dpx));
}

/* Figma 175:3607 / 175:3610 — glass pill, Neue Haas 65 Medium 15.3, tracking 0.765 */
.sec-lifestyle .lifestyle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: calc(46 * var(--dpx));
  padding: 0 calc(17 * var(--dpx));
  border-radius: var(--radius-pill);
  background: var(--white-glass);
  border: 1px solid var(--white-glass-border);
  backdrop-filter: blur(2.5px);
  -webkit-backdrop-filter: blur(2.5px);
  font-family: var(--font-body);
  font-weight: var(--fw-medium);
  font-size: max(calc(15.3 * var(--dpx)), 12px);
  line-height: normal;
  letter-spacing: calc(0.765 * var(--dpx));
  color: var(--white);
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}

.sec-lifestyle .lifestyle-btn--enquire  { width: calc(204 * var(--dpx)); }
.sec-lifestyle .lifestyle-btn--brochure { width: calc(194 * var(--dpx)); }

.sec-lifestyle .lifestyle-btn:hover,
.sec-lifestyle .lifestyle-btn:focus-visible {
  background: rgba(255, 255, 255, 0.26);
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--white);
}

/* =============================================
   RESPONSIVE — below the scaled canvas (<992px)
   Photo becomes the section background, copy stacks.
   ============================================= */

@media (max-width: 991px) {
  .sec-lifestyle .sec-canvas {
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
    padding: 64px 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 24px;
  }

  .sec-lifestyle .lifestyle-media {
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
  }

  /* keep the towers in frame on portrait screens: cover scales to height here, so
     only a narrow vertical band of the render shows — bias it onto the tower + podium */
  .sec-lifestyle .lifestyle-photo {
    object-position: 30% center;
  }

  /* copy spans the full width here, so shade top-to-bottom instead */
  .sec-lifestyle .lifestyle-shade {
    background:
      linear-gradient(180deg, rgba(0, 0, 0, 0.30) 0%, rgba(0, 0, 0, 0.18) 35%, rgba(0, 0, 0, 0.62) 72%, rgba(0, 0, 0, 0.78) 100%);
  }

  .sec-lifestyle .lifestyle-intro,
  .sec-lifestyle .lifestyle-copy,
  .sec-lifestyle .lifestyle-actions {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    max-width: 560px;
  }

  .sec-lifestyle .lifestyle-intro { gap: 12px; }
  .sec-lifestyle .lifestyle-copy  { gap: 20px; }

  .sec-lifestyle .lifestyle-eyebrow {
    font-size: 0.875rem;
    letter-spacing: 0.06em;
    white-space: normal;
  }

  .sec-lifestyle .lifestyle-title {
    width: 100%;
    font-size: 2.25rem;
    line-height: 1.15;
  }

  .sec-lifestyle .lifestyle-rule { height: 1px; }

  .sec-lifestyle .lifestyle-text {
    font-size: 1rem;
    line-height: 1.5;
    letter-spacing: 0.04em;
  }

  .sec-lifestyle .lifestyle-actions {
    flex-wrap: wrap;
    gap: 12px 16px;
  }

  .sec-lifestyle .lifestyle-btn,
  .sec-lifestyle .lifestyle-btn--enquire,
  .sec-lifestyle .lifestyle-btn--brochure {
    width: auto;
    height: 46px;
    padding: 0 26px;
    font-size: 0.9375rem;
    letter-spacing: 0.04em;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }
}

@media (max-width: 767px) {
  .sec-lifestyle .sec-canvas { padding: 48px 20px; }
}
