/* Harmony Homes — styles
   Palette from the PRD. Sage, clay and stone measure about 3.6:1 on white, which
   is below AA for normal text, so text-bearing accents use deeper shades of the
   same hues (--sage-ink, --stone-ink). The original values are kept for fine
   lines, bullets and other decorative details. */

:root {
  --white: #FFFFFF;
  --linen: #F5F1EA;
  --charcoal: #2B2824;
  --stone: #8C8479;
  --stone-ink: #6E675D;   /* 5.6:1 on white, 5.0:1 on linen */
  --sage: #7D8B6F;
  --sage-ink: #5F6B53;    /* 5.7:1 with white text */
  --sage-deep: #4E5944;
  --clay: #B07A5A;

  --serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;

  --gutter: 20px;
  --text-col: 40rem;
  --wide: 1200px;
  --header-h: 64px;
  --nav-h: 44px;
  --ease: cubic-bezier(.2, .6, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--nav-h));
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--white);
  color: var(--charcoal);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1.125rem;
  line-height: 1.75;
  letter-spacing: .005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (min-width: 768px) { body { font-size: 1.1875rem; } }

img { display: block; max-width: 100%; height: auto; }
picture { display: block; }

a { color: var(--sage-ink); text-decoration-color: var(--clay); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--sage-deep); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: .015em;
  margin: 0;
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
}
strong, b { font-weight: 400; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Buttons ---------- */

.btn-wa {
  display: inline-flex; align-items: center; gap: .6em;
  min-height: 48px; padding: .75em 1.4em;
  background: var(--sage-ink); color: var(--white);
  border: 1px solid var(--sage-ink); border-radius: 999px;
  font-family: var(--sans); font-weight: 400; font-size: 1.06rem; letter-spacing: .02em;
  text-decoration: none; line-height: 1.2;
  transition: background-color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.btn-wa:hover { background: var(--sage-deep); border-color: var(--clay); color: var(--white); }
.btn-wa:active { transform: translateY(1px); }
.btn-wa svg { width: 1.2em; height: 1.2em; flex: none; fill: currentColor; }

/* ---------- Header ---------- */

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  color: var(--white);
  transition: background-color .35s var(--ease), color .35s var(--ease), box-shadow .35s var(--ease);
}
.site-header.is-solid {
  background: rgba(255, 255, 255, .97);
  color: var(--charcoal);
  box-shadow: 0 1px 0 rgba(176, 122, 90, .25);
}

/* mobile: brand + actions on one row, nav scrolls sideways underneath */
.header-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "brand actions" "nav nav";
  align-items: center;
  max-width: 1440px; margin: 0 auto;
}

.brand { grid-area: brand; position: relative; display: block; height: 46px; width: 48px; margin-left: var(--gutter); }
.brand img { position: absolute; inset: 0; height: 100%; width: auto; transition: opacity .35s var(--ease); }
.brand .logo-dark { opacity: 0; }
.site-header.is-solid .brand .logo-dark { opacity: 1; }
.site-header.is-solid .brand .logo-light { opacity: 0; }

.header-actions {
  grid-area: actions; display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  height: var(--header-h); padding-right: var(--gutter);
}

.lang-switch { display: flex; align-items: center; gap: 2px; font-size: 1.02rem; font-weight: 400; letter-spacing: .04em; }
.lang-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; min-height: 44px; padding: 0 4px; margin: 0;
  background: none; border: 0; color: inherit; cursor: pointer;
  font: inherit; letter-spacing: inherit; opacity: .8;
}
.lang-btn[aria-pressed="true"] { opacity: 1; text-decoration: underline; text-decoration-color: var(--clay); text-decoration-thickness: 1px; text-underline-offset: .45em; }
.lang-btn:hover { opacity: 1; text-decoration: underline; text-decoration-color: var(--clay); text-underline-offset: .45em; }
.lang-switch .sep { opacity: .6; }

/* One page, two languages: the toggle shows one and hides the other */
html[data-lang="en"] [data-l="es"],
html[data-lang="es"] [data-l="en"] { display: none !important; }

.header-wa { min-height: 44px; padding: .6em .85em; }
.header-wa .label {
  position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.main-nav { grid-area: nav; border-top: 1px solid rgba(255, 255, 255, .22); min-width: 0; }
.site-header.is-solid .main-nav { border-top-color: rgba(176, 122, 90, .2); }
.main-nav ul {
  display: flex; gap: 22px; list-style: none; margin: 0; padding: 0 var(--gutter);
  height: var(--nav-h); align-items: center; overflow-x: auto; scrollbar-width: none;
}
.main-nav ul::-webkit-scrollbar { display: none; }
.main-nav a {
  display: inline-block; color: inherit; text-decoration: none; font-size: 1.02rem; letter-spacing: .03em; white-space: nowrap;
  padding: 10px 0 9px; border-bottom: 1px solid transparent;
}
.main-nav a:hover, .main-nav a.is-active { border-bottom-color: var(--clay); }

@media (min-width: 900px) {
  :root { --header-h: 84px; --nav-h: 0px; }
  .header-inner {
    display: flex; align-items: center; gap: 36px; height: var(--header-h);
  }
  .brand { height: 60px; width: 62px; }
  .main-nav { border: 0; margin-left: auto; }
  .site-header.is-solid .main-nav { border: 0; }
  .main-nav ul { height: auto; padding: 0; gap: 30px; overflow: visible; }
  .header-actions { height: auto; gap: 20px; }
  .header-wa { padding: .65em 1.2em; }
  .header-wa .label { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end;
  color: var(--white); background: var(--charcoal);
  overflow: hidden;
}
.hero picture, .hero img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero img { object-fit: cover; object-position: 50% 50%; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top, rgba(20, 18, 16, .82) 0%, rgba(20, 18, 16, .55) 32%, rgba(20, 18, 16, .12) 62%, rgba(20, 18, 16, 0) 75%),
    linear-gradient(to bottom, rgba(20, 18, 16, .55) 0%, rgba(20, 18, 16, 0) 22%);
}
.hero-content {
  position: relative; z-index: 1; width: 100%; max-width: 1200px; margin: 0 auto;
  padding: 0 var(--gutter) clamp(40px, 9vh, 96px);
}
.hero h1 {
  font-size: clamp(2.3rem, 7.6vw, 4.7rem);
  line-height: 1.08; letter-spacing: .01em; max-width: 15em;
  text-wrap: balance;
}
.hero .size-line {
  margin: 1.1rem 0 .2rem; font-size: clamp(1.15rem, 2.8vw, 1.4rem); font-weight: 400; letter-spacing: .06em;
}
.hero .location-line { margin: 0 0 1.8rem; font-size: clamp(1.08rem, 2.5vw, 1.25rem); max-width: 34em; }
.hero .btn-wa { background: var(--sage-ink); }

/* ---------- Sections ---------- */

.section { padding: clamp(72px, 12vw, 144px) 0; }
.section--linen { background: var(--linen); }

.text-col { max-width: var(--text-col); margin: 0 auto; padding: 0 var(--gutter); }
.wide { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }

.section h2 {
  font-size: clamp(2.3rem, 6.4vw, 3.7rem);
  margin-bottom: 1.6rem;
  text-wrap: balance;
}
.section h2::after {
  content: ""; display: block; width: 44px; height: 1px; background: var(--clay); margin-top: 1.4rem;
}

.text-col p { margin: 0 0 1.25rem; }
.text-col p:last-child { margin-bottom: 0; }

.lede, .note { font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1; }
.lede {
  font-family: var(--serif); font-weight: 300; font-size: clamp(1.6rem, 4.2vw, 2.1rem);
  line-height: 1.4; letter-spacing: .005em;
}
.note {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: clamp(1.42rem, 3.7vw, 1.75rem); line-height: 1.5;
}
.list-intro { font-weight: 400; margin-top: 2rem !important; margin-bottom: .6rem !important; }

.list { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.list li { position: relative; padding: .5rem 0 .5rem 1.6rem; border-bottom: 1px solid rgba(176, 122, 90, .22); }
.list li:last-child { border-bottom: 0; }
.list li::before {
  content: ""; position: absolute; left: 0; top: 1.22em; width: 10px; height: 1px; background: var(--clay);
}
.list .label { font-weight: 400; }

.text-col + .media, .text-col + .gallery { margin-top: clamp(48px, 8vw, 88px); }
.media + .text-col { margin-top: clamp(48px, 8vw, 88px); }

/* photo frames: fixed aspect, object-fit cover, never stretched */
.frame { position: relative; overflow: hidden; background: var(--linen); }
.frame picture, .tile picture { width: 100%; height: 100%; }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.media .frame { aspect-ratio: 16 / 10; }
@media (min-width: 768px) { .media .frame { aspect-ratio: 16 / 9; } }

/* ---------- Galleries ---------- */

.tile {
  display: block; width: 100%; height: 100%; padding: 0; margin: 0; border: 0; background: none;
  cursor: zoom-in; overflow: hidden; position: relative;
}
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.tile:hover img { transform: scale(1.025); }
.tile::after {
  content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 0 var(--clay);
  transition: box-shadow .3s var(--ease); pointer-events: none;
}
.tile:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; }

.gallery { display: grid; gap: 10px; }
.gallery--pair { grid-template-columns: 1fr; }
.gallery--pair .tile { aspect-ratio: 3 / 2; }
.gallery--pair .tile.span-all { grid-column: 1 / -1; }
@media (min-width: 768px) { .gallery--pair .tile.span-all { aspect-ratio: 16 / 9; } }
@media (min-width: 768px) {
  .gallery { gap: 14px; }
  .gallery--pair { grid-template-columns: 1fr 1fr; }
  .gallery--pair .tile { aspect-ratio: 4 / 3; }
}

.gallery--grid {
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: calc((min(100vw, var(--wide)) - 2 * var(--gutter) - 10px) / 2 * .75);
  grid-auto-flow: row dense;
}
.gallery--grid .span-2 { grid-column: span 2; }
.gallery--grid .tall { grid-row: span 2; }
@media (max-width: 767px) { .gallery--grid .span-2-sm { grid-column: span 2; } }
@media (min-width: 768px) {
  .gallery--grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: calc((min(100vw, var(--wide)) - 2 * var(--gutter) - 28px) / 3 * .75);
  }
}

/* ---------- Details ---------- */

.details-grid { display: grid; gap: 48px; max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter); }
.details-grid h2 { font-size: clamp(2.1rem, 5vw, 2.6rem); margin-bottom: 1rem; }
.details-grid h2::after { margin-top: 1rem; }
.details-grid p { margin: 0; }
@media (min-width: 900px) { .details-grid { grid-template-columns: repeat(3, 1fr); gap: 56px; } }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--linen); border-top: 1px solid rgba(176, 122, 90, .25);
  padding: 72px var(--gutter) 96px; text-align: center;
}
.site-footer .footer-logo { width: 150px; height: auto; margin: 0 auto 32px; }
.site-footer .copyright { margin: 32px 0 0; font-size: 1rem; color: var(--stone-ink); }

/* ---------- Floating WhatsApp (mobile) ---------- */

.wa-float {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 40;
  width: 58px; height: 58px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--sage-ink); color: var(--white);
  box-shadow: 0 6px 20px rgba(43, 40, 36, .25);
  opacity: 0; transform: translateY(12px); pointer-events: none; visibility: hidden;
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s linear .3s;
}
.wa-float svg { width: 28px; height: 28px; fill: currentColor; }
.wa-float.is-visible {
  opacity: 1; transform: none; pointer-events: auto; visibility: visible;
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s;
}
.wa-float:hover { background: var(--sage-deep); color: var(--white); }
@media (min-width: 900px) { .wa-float { display: none; } }

/* ---------- Reveal on scroll ---------- */

.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .tile img { transition: none; }
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: rgba(24, 22, 20, .96); color: var(--white);
  overscroll-behavior: contain;
}
.lightbox::backdrop { background: rgba(24, 22, 20, .96); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox-stage {
  position: absolute; inset: 56px 0 56px; display: flex; align-items: center; justify-content: center;
  touch-action: pan-y;
}
.lightbox-stage picture { display: contents; }
.lightbox-stage img {
  max-width: calc(100% - 2 * var(--gutter)); max-height: 100%; width: auto; height: auto;
  object-fit: cover; user-select: none; -webkit-user-drag: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.lightbox-stage img.is-swapping { opacity: 0; }
.lb-btn {
  position: absolute; z-index: 2; width: 48px; height: 48px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .08); color: var(--white);
  border: 1px solid rgba(255, 255, 255, .25); border-radius: 50%; cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.lb-btn:hover { background: rgba(255, 255, 255, .16); border-color: var(--clay); }
.lb-btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.4; }
.lb-close { top: 4px; right: 8px; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
@media (max-width: 767px) {
  .lb-prev, .lb-next { top: auto; bottom: 4px; transform: none; }
  .lb-prev { left: calc(50% - 60px); }
  .lb-next { right: calc(50% - 60px); }
}
.lb-count { position: absolute; top: 16px; left: 20px; font-size: .9rem; letter-spacing: .08em; opacity: .85; }
body.lb-open { overflow: hidden; }

/* ---------- Ideal For: infographic band ---------- */

.section--ideal { background: var(--sage-ink); color: var(--white); }
.section--ideal h2::after { background: rgba(255, 255, 255, .55); }
.ideal-grid {
  list-style: none; margin: clamp(40px, 7vw, 72px) auto 0; padding: 0 var(--gutter);
  max-width: 1100px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px 12px; text-align: center;
}
@media (min-width: 900px) { .ideal-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 24px; } }
.ideal-icon {
  width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .5);
  display: flex; align-items: center; justify-content: center;
}
@media (min-width: 900px) { .ideal-icon { width: 88px; height: 88px; } }
.ideal-icon svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 900px) { .ideal-icon svg { width: 40px; height: 40px; } }
.ideal-label { display: block; font-size: 1.02rem; font-weight: 400; letter-spacing: .02em; line-height: 1.35; }

/* ---------- Location: map link ---------- */

.map-link { margin-top: 2rem !important; }
.btn-outline {
  display: inline-flex; align-items: center; gap: .6em; min-height: 48px; padding: .7em 1.4em;
  border: 1px solid var(--sage-ink); border-radius: 999px; color: var(--sage-ink);
  font-weight: 400; font-size: 1.06rem; letter-spacing: .02em; text-decoration: none; line-height: 1.2;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn-outline:hover { background: var(--sage-ink); color: var(--white); border-color: var(--clay); }
.btn-outline svg { width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* Details now holds Utilities and Lease only */
@media (min-width: 900px) { .details-grid--two { grid-template-columns: repeat(2, 1fr); max-width: 820px; } }

/* ---------- Wellness Rooftop: "Coming soon" card ---------- */

.soon-card {
  margin: 2.2rem 0 1rem; padding: 28px 22px 26px; text-align: center;
  background: var(--white); border: 1px solid rgba(176, 122, 90, .35); border-radius: 14px;
}
.soon-badge {
  display: inline-block; padding: 4px 16px; border-radius: 999px;
  background: var(--sage-ink); color: var(--white);
  font-size: 1rem; font-weight: 400; letter-spacing: .04em;
}
.soon-items {
  list-style: none; margin: 24px 0 20px; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
}
.soon-items li { display: flex; flex-direction: column; align-items: center; gap: 10px; font-weight: 400; line-height: 1.3; }
.soon-icon {
  width: 68px; height: 68px; border-radius: 50%; background: var(--linen); color: var(--sage-ink);
  display: flex; align-items: center; justify-content: center;
}
.soon-icon svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.text-col .soon-card .soon-date {
  margin: 0; font-family: var(--serif); font-size: clamp(1.45rem, 3.6vw, 1.8rem); line-height: 1.3;
  font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1;
}
