/* ==========================================================================
   KALEA HEIGHTS — STYLESHEET
   --------------------------------------------------------------------------
   Section map:
     1. Tokens          — colours, type, spacing (edit brand colours here)
     2. Reset & base
     3. Layout helpers
     4. Header & navigation
     5. Elevation rail  (the vertical scroll marker on the left)
     6. Hero
     7. Sections & typography blocks
     8. Cards, grids, tables
     9. Video sections
    10. Forms
    11. Chat widget
    12. Footer
    13. Lightbox
    14. Motion & accessibility
   ========================================================================== */

/* ---------- 1. TOKENS ---------------------------------------------------- */
:root {
  /* Brand colours — taken from the Kalea Heights logo and collateral */
  --forest:        #0F2A1D;
  --forest-deep:   #07160E;
  --forest-soft:   #1B3D2B;
  --moss:          #8E9A3C;
  --moss-bright:   #A8B54E;
  --gilt:          #C9A44C;
  --ink:           #17231C;
  --slate:         #5C6B60;
  --mist:          #EBEEE7;
  --paper:         #FBFBF8;
  --line:          rgba(15, 42, 29, .14);
  --line-soft:     rgba(15, 42, 29, .07);
  --line-dark:     rgba(255, 255, 255, .16);

  /* Type */
  --display: "Instrument Serif", "Times New Roman", serif;
  --body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:    "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;

  /* Spacing */
  --gutter:  clamp(1.25rem, 4vw, 3.5rem);
  --band:    clamp(4rem, 9vw, 8.5rem);
  --maxw:    1280px;
  --radius:  2px;

  /* Effects */
  --shadow:  0 18px 50px -28px rgba(7, 22, 14, .55);
  --ease:    cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 2. RESET & BASE ---------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.65;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.03;
  letter-spacing: -.015em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.75rem, 7.5vw, 5.75rem); }
h2 { font-size: clamp(2rem, 4.6vw, 3.6rem); }
h3 { font-size: clamp(1.4rem, 2.4vw, 2rem); }
h4 { font-size: 1.2rem; }
p  { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

::selection { background: var(--moss); color: #fff; }

/* ---------- 3. LAYOUT HELPERS -------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: 820px; }
.band  { padding-block: var(--band); }
.band--tight { padding-block: clamp(2.5rem, 6vw, 5rem); }
.band--dark  { background: var(--forest); color: #F2F5EF; }
.band--deep  { background: var(--forest-deep); color: #F2F5EF; }
.band--mist  { background: var(--mist); }
.band--dark h1, .band--dark h2, .band--dark h3,
.band--deep h1, .band--deep h2, .band--deep h3 { color: #fff; }

.eyebrow {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--moss);
  margin: 0 0 1.1rem;
  display: flex;
  align-items: center;
  gap: .75rem;
}
.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: currentColor;
  flex: none;
}
.band--dark .eyebrow, .band--deep .eyebrow { color: var(--moss-bright); }

.lede { font-size: clamp(1.05rem, 1.7vw, 1.3rem); color: var(--slate); max-width: 62ch; }
.band--dark .lede, .band--deep .lede { color: rgba(242,245,239,.78); }

.section-head { max-width: 68ch; margin-bottom: clamp(2rem, 4vw, 3.5rem); }

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .95rem 1.7rem;
  border: 1px solid var(--forest);
  background: var(--forest);
  color: #fff;
  font-size: .84rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.btn:hover  { background: var(--moss); border-color: var(--moss); transform: translateY(-2px); }
.btn:focus-visible { outline: 2px solid var(--gilt); outline-offset: 3px; }
.btn--ghost { background: transparent; color: var(--forest); }
.btn--ghost:hover { background: var(--forest); color: #fff; }
.btn--light { background: #fff; border-color: #fff; color: var(--forest); }
.btn--light:hover { background: var(--moss-bright); border-color: var(--moss-bright); color: var(--forest-deep); }
.btn--outline-light { background: transparent; border-color: rgba(255,255,255,.45); color: #fff; }
.btn--outline-light:hover { background: #fff; color: var(--forest); border-color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Text link with underline animation */
.tlink {
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  border-bottom: 1px solid currentColor;
  padding-bottom: .25rem;
  transition: color .25s var(--ease);
}
.tlink:hover { color: var(--moss); }

/* ---------- 4. HEADER & NAVIGATION --------------------------------------- */
.promo-bar {
  background: var(--forest-deep);
  color: #EDEFE7;
  font-size: .8rem;
  text-align: center;
  padding: .6rem var(--gutter);
  letter-spacing: .02em;
}
.promo-bar strong { color: var(--gilt); font-weight: 600; }
.promo-bar a { border-bottom: 1px solid rgba(255,255,255,.4); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(251,251,248,.92);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
/* Over a hero image the header has no solid background, so it carries its own
   soft gradient scrim — without it, white nav text disappears against a
   bright sky. */
.site-header.is-transparent {
  background: linear-gradient(to bottom, rgba(7,22,14,.62) 0%, rgba(7,22,14,.28) 55%, rgba(7,22,14,0) 100%);
  backdrop-filter: none;
  border-color: transparent;
}
.site-header.is-transparent .brand-name,
.site-header.is-transparent .nav a,
.site-header.is-transparent .nav-toggle {
  color: #fff;
  text-shadow: 0 1px 12px rgba(7,22,14,.45);
}
.site-header.is-transparent .brand-name { color: rgba(255,255,255,.8); }
.site-header.is-transparent .nav .btn { text-shadow: none; }
.site-header.is-transparent .brand img { filter: brightness(0) invert(1); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: .85rem;
}
.brand { display: flex; align-items: center; gap: .85rem; }
.brand img { height: 40px; width: auto; }
.brand-name {
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--slate);
  line-height: 1.5;
  border-left: 1px solid var(--line);
  padding-left: .85rem;
}
@media (max-width: 560px) { .brand-name { display: none; } }

.nav { display: flex; align-items: center; gap: clamp(.9rem, 1.8vw, 1.9rem); }
.nav a {
  font-size: .82rem;
  letter-spacing: .03em;
  color: var(--ink);
  padding-block: .35rem;
  position: relative;
  transition: color .25s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--moss);
  transition: width .3s var(--ease);
}
.nav a:hover::after, .nav a.is-active::after { width: 100%; }
.nav a.is-active { color: var(--moss); }
/* The .nav a rule above is more specific than .btn, so the button colour has
   to be restated here or the label disappears into the dark green fill. */
.nav .btn { padding: .7rem 1.2rem; font-size: .74rem; color: #fff; }
.nav .btn:hover { color: #fff; }
.nav .btn::after { display: none; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: .5rem;
  color: var(--ink);
}
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(88vw, 380px);
    background: var(--forest);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: .35rem;
    padding: 4.5rem var(--gutter);
    transform: translateX(100%);
    transition: transform .4s var(--ease);
    z-index: 70;
  }
  .nav.is-open { transform: translateX(0); }
  .nav a { color: #fff; font-size: 1.35rem; font-family: var(--display); padding-block: .55rem; }
  .nav a.is-active { color: var(--moss-bright); }
  .nav .btn { margin-top: 1.25rem; font-size: .8rem; }
  .nav-close {
    position: absolute; top: 1.2rem; right: 1.2rem;
    background: none; border: 0; color: #fff; padding: .5rem;
  }
  .nav-close svg { width: 26px; height: 26px; }
}
@media (min-width: 981px) { .nav-close { display: none; } }

.nav-scrim {
  position: fixed; inset: 0;
  background: rgba(7,22,14,.55);
  opacity: 0; visibility: hidden;
  transition: opacity .35s var(--ease), visibility .35s;
  z-index: 65;
}
.nav-scrim.is-open { opacity: 1; visibility: visible; }

/* While the mobile menu is open, tuck away anything else that floats above
   the page (chat button, sticky action bar) so it can't poke through it. */
body.nav-is-open .chat-launcher,
body.nav-is-open .chat-panel,
body.nav-is-open .action-bar { display: none; }

/* ---------- 5. ELEVATION RAIL (signature element) ------------------------
   A vertical marker fixed to the left edge. Each tick is a section of the
   page; the label reads like a level marker on a building section drawing. */
.rail {
  position: fixed;
  left: 1.6rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: none;
  flex-direction: column;
  gap: .1rem;
  padding: 0;
  margin: 0;
  list-style: none;
}
/* Only shown when the viewport is wide enough to clear the content column,
   otherwise the rail labels overlap the page. */
@media (min-width: 1440px) { .rail { display: flex; } }

.rail li { position: relative; }
.rail a {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .34rem 0;
  font-family: var(--mono);
  font-size: .6rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--slate);
  opacity: .5;
  transition: opacity .3s var(--ease), color .3s var(--ease);
}
.rail-tick {
  width: 14px; height: 1px;
  background: currentColor;
  flex: none;
  transition: width .35s var(--ease);
}
.rail-label {
  white-space: nowrap;
  max-width: 0;
  overflow: hidden;
  transition: max-width .45s var(--ease);
}
.rail a:hover, .rail a.is-current { opacity: 1; color: var(--moss); }
.rail a:hover .rail-tick, .rail a.is-current .rail-tick { width: 30px; }
/* The label only opens on hover. If the active section opened it too, it
   would sit permanently over the left edge of the content. */
.rail a:hover .rail-label { max-width: 200px; }
.rail--on-dark a { color: rgba(255,255,255,.85); }
.rail--on-dark a.is-current, .rail--on-dark a:hover { color: var(--moss-bright); }

/* ---------- 6. HERO ------------------------------------------------------ */
.hero {
  position: relative;
  min-height: min(94vh, 900px);
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
  margin-top: -1px;
}
.hero__media { position: absolute; inset: 0; }
.hero__media img, .hero__media video {
  width: 100%; height: 100%; object-fit: cover;
}
.hero__media::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(7,22,14,.88) 0%, rgba(7,22,14,.35) 45%, rgba(7,22,14,.30) 100%);
}
.hero__inner { position: relative; z-index: 2; padding-bottom: clamp(3rem, 7vw, 6rem); padding-top: 8rem; width: 100%; }
.hero h1 { color: #fff; max-width: 15ch; margin-bottom: .35em; text-wrap: balance; }
.hero h1 em {
  font-style: italic;
  color: var(--moss-bright);
}
.hero__sub { font-size: clamp(1rem, 1.5vw, 1.2rem); color: rgba(255,255,255,.85); max-width: 52ch; margin-bottom: 2rem; }
.hero__eyebrow { color: var(--moss-bright); }
.hero__meta {
  display: flex; flex-wrap: wrap; gap: 0 2.5rem;
  margin-top: 3rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.22);
  font-family: var(--mono); font-size: .72rem; letter-spacing: .12em;
  text-transform: uppercase; color: rgba(255,255,255,.72);
}
.hero__meta span { padding-block: .3rem; }

/* Page hero (interior pages) */
.pagehero {
  position: relative;
  color: #fff;
  min-height: clamp(340px, 48vh, 520px);
  display: flex; align-items: flex-end;
  overflow: hidden;
}
.pagehero__media { position: absolute; inset: 0; }
.pagehero__media img { width: 100%; height: 100%; object-fit: cover; }
.pagehero__media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(7,22,14,.85), rgba(7,22,14,.30));
}
.pagehero__inner { position: relative; z-index: 2; padding-block: clamp(2.5rem, 5vw, 4rem) clamp(2.5rem, 5vw, 3.5rem); width: 100%; }
.pagehero h1 { color: #fff; font-size: clamp(2.4rem, 5.5vw, 4.2rem); margin-bottom: .3em; }
.pagehero p { color: rgba(255,255,255,.82); max-width: 60ch; margin: 0; }

.crumb {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .16em;
  text-transform: uppercase; color: rgba(255,255,255,.6); margin-bottom: 1rem;
}
.crumb a:hover { color: #fff; }

/* ---------- 7. CONTENT BLOCKS -------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1.75rem, 4vw, 4rem);
  align-items: center;
}
.split__text  { grid-column: span 12; }
.split__media { grid-column: span 12; }
@media (min-width: 860px) {
  .split__text  { grid-column: span 5; }
  .split__media { grid-column: span 7; }
  .split--flip .split__text  { grid-column: 8 / span 5; grid-row: 1; }
  .split--flip .split__media { grid-column: 1 / span 7; grid-row: 1; }
}
.split__media img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }

/* Facts strip */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--line-dark);
  border-block: 1px solid var(--line-dark);
}
.fact { background: var(--forest); padding: clamp(1.5rem, 3vw, 2.4rem) clamp(1rem, 2vw, 1.75rem); }
.fact__value {
  font-family: var(--display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1;
  color: #fff;
  display: flex; align-items: baseline; gap: .4rem;
}
.fact__unit {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--moss-bright);
}
.fact__label { font-size: .84rem; color: rgba(242,245,239,.66); margin-top: .8rem; line-height: 1.45; }

/* Pillars */
.pillars { display: grid; gap: clamp(1.75rem, 3vw, 2.5rem); grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.pillar__img { aspect-ratio: 4/3; overflow: hidden; border-radius: var(--radius); margin-bottom: 1.5rem; }
.pillar__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.pillar:hover .pillar__img img { transform: scale(1.05); }
.pillar h3 { font-size: 1.55rem; margin-bottom: .5rem; }
.pillar p { color: var(--slate); font-size: .95rem; }

/* Amenity districts */
.district {
  display: grid;
  gap: clamp(1.5rem, 3vw, 3rem);
  grid-template-columns: 1fr;
  padding-block: clamp(2rem, 4vw, 3.25rem);
  border-top: 1px solid var(--line);
  align-items: start;
}
@media (min-width: 800px) { .district { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); } }
.district__media { aspect-ratio: 16/10; overflow: hidden; border-radius: var(--radius); }
.district__media img { width: 100%; height: 100%; object-fit: cover; }
.district h3 { margin-bottom: .35rem; }
.district__note { color: var(--slate); font-size: .95rem; margin-bottom: 1.25rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0; padding: 0; }
.chips li {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .07em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  padding: .45rem .8rem;
  border-radius: 100px;
  color: var(--forest-soft);
}
.band--dark .chips li, .band--deep .chips li { border-color: var(--line-dark); color: rgba(255,255,255,.82); }

/* Simple list grid */
.tick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.tick-list li { display: flex; gap: .7rem; font-size: .95rem; align-items: flex-start; }
.tick-list li::before { content: "—"; color: var(--moss); flex: none; }

/* ---------- 8. CARDS, GRIDS, TABLES --------------------------------------- */
.card {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .35s var(--ease), transform .35s var(--ease);
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.card__media { aspect-ratio: 3/2; overflow: hidden; background: var(--mist); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: clamp(1.4rem, 2.4vw, 2rem); flex: 1; display: flex; flex-direction: column; }
.card__body h3 { margin-bottom: .35rem; }
.card__price {
  font-family: var(--mono); font-size: .95rem; color: var(--moss);
  letter-spacing: .02em; margin-bottom: 1rem;
}
.card__spec {
  list-style: none; margin: 0 0 1.5rem; padding: 1rem 0 0;
  border-top: 1px solid var(--line-soft);
  display: grid; gap: .4rem; font-size: .86rem; color: var(--slate);
}
.card__spec span { color: var(--ink); }
.card__foot { margin-top: auto; }

.grid-3 { display: grid; gap: clamp(1.25rem, 2.5vw, 2rem); grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid-2 { display: grid; gap: clamp(1.25rem, 2.5vw, 2rem); grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid-4 { display: grid; gap: clamp(1rem, 2vw, 1.75rem); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* Tables */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table.data { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 620px; }
table.data th, table.data td { padding: .85rem 1.1rem; text-align: left; border-bottom: 1px solid var(--line-soft); }
table.data thead th {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .13em;
  text-transform: uppercase; color: var(--slate);
  background: var(--mist); position: sticky; top: 0; z-index: 1;
  border-bottom: 1px solid var(--line);
}
table.data tbody tr:hover { background: rgba(142,154,60,.06); }
table.data td.num { font-family: var(--mono); white-space: nowrap; }
table.data tr:last-child td { border-bottom: 0; }

.status {
  font-family: var(--mono); font-size: .66rem; letter-spacing: .1em;
  text-transform: uppercase; padding: .25rem .6rem; border-radius: 100px;
  border: 1px solid currentColor; white-space: nowrap;
}
.status--available { color: #3F7A46; }
.status--hold      { color: #B07A19; }
.status--sold      { color: #9B3B3B; }

/* Filter bar */
.filters { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.75rem; align-items: center; }
.filters label {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--slate);
}
.filters select, .filters input {
  font: inherit; font-size: .88rem;
  padding: .6rem .8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}
.filters select:focus-visible, .filters input:focus-visible { outline: 2px solid var(--moss); outline-offset: 1px; }
.filter-count { font-family: var(--mono); font-size: .74rem; color: var(--slate); margin-left: auto; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li {
  display: grid; gap: .35rem 2rem;
  grid-template-columns: 1fr;
  padding-block: 1.5rem;
  border-top: 1px solid var(--line-dark);
}
@media (min-width: 700px) { .timeline li { grid-template-columns: 160px 200px 1fr; align-items: baseline; } }
.timeline .when { font-family: var(--mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--moss-bright); }
.timeline .what { font-family: var(--display); font-size: 1.5rem; color: #fff; }
.timeline .detail { color: rgba(242,245,239,.7); font-size: .92rem; }

/* Accordion */
.acc { border-top: 1px solid var(--line); }
.acc__item { border-bottom: 1px solid var(--line); }
.acc__btn {
  width: 100%; background: none; border: 0; text-align: left;
  padding: 1.3rem 2.5rem 1.3rem 0;
  font-family: var(--display); font-size: 1.25rem; color: var(--ink);
  position: relative;
}
.acc__btn::after {
  content: "+"; position: absolute; right: .25rem; top: 50%;
  transform: translateY(-50%); font-family: var(--body); font-size: 1.4rem;
  color: var(--moss); transition: transform .3s var(--ease);
}
.acc__item.is-open .acc__btn::after { content: "–"; }
.acc__panel { max-height: 0; overflow: hidden; transition: max-height .4s var(--ease); }
.acc__panel > div { padding-bottom: 1.4rem; color: var(--slate); max-width: 68ch; }

/* Nearby columns */
.nearby { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.nearby h3 { font-size: 1.25rem; margin-bottom: 1rem; }
.nearby ul { list-style: none; margin: 0; padding: 0; }
.nearby li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .55rem 0; border-bottom: 1px solid var(--line-soft);
  font-size: .9rem;
}
.nearby .km { font-family: var(--mono); font-size: .8rem; color: var(--moss); white-space: nowrap; }

/* Map */
.map-frame { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.map-frame iframe { width: 100%; height: clamp(320px, 52vh, 520px); border: 0; display: block; }

/* ---------- 9. VIDEO SECTIONS --------------------------------------------
   Built to grow: add entries to $VIDEOS in includes/data.php and this grid
   keeps its shape whether you have one video or twelve.                    */
.video-grid {
  display: grid;
  gap: clamp(1.25rem, 4vw, 2.5rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  align-items: start;
}

/* Each card caps its own width by orientation, so portrait (phone-shaped)
   and landscape videos can sit in the same grid without either one
   stretching to an awkward size. */
.vcard { display: flex; flex-direction: column; width: 100%; }
.vcard--portrait  { max-width: 340px; margin-inline: auto; }
.vcard--landscape { max-width: 640px; grid-column: span 1; }
@media (min-width: 720px) {
  /* Give a landscape card room to breathe by spanning two grid tracks
     when the grid is wide enough to have more than one column. */
  .video-grid:has(.vcard--landscape) { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
  .vcard--landscape { grid-column: span 2; max-width: 100%; }
}

.vcard__frame {
  position: relative;
  background: var(--forest-deep);
  border-radius: var(--radius);
  overflow: hidden;
}
.vcard--portrait .vcard__frame  { aspect-ratio: 9/16; }
.vcard--landscape .vcard__frame { aspect-ratio: 16/9; }
.vcard__frame video, .vcard__frame iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; border: 0;
}
.vcard__poster {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: opacity .4s var(--ease);
}
.vcard.is-playing .vcard__poster, .vcard.is-playing .vcard__play { opacity: 0; pointer-events: none; }
.vcard__play {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: linear-gradient(to top, rgba(7,22,14,.6), rgba(7,22,14,.05));
  border: 0; color: #fff;
  transition: opacity .4s var(--ease);
}
.vcard__play span {
  width: 66px; height: 66px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.7);
  display: grid; place-items: center;
  backdrop-filter: blur(4px);
  background: rgba(255,255,255,.12);
  transition: background .3s var(--ease), transform .3s var(--ease);
}
.vcard__play:hover span { background: var(--moss); transform: scale(1.06); }
.vcard__play svg { width: 20px; height: 20px; margin-left: 3px; }
.vcard__meta { padding-top: 1.1rem; }
.vcard__meta h3 { font-size: 1.2rem; margin-bottom: .25rem; }
.vcard__meta p  { font-size: .88rem; color: var(--slate); margin: 0; }
.band--dark .vcard__meta p, .band--deep .vcard__meta p { color: rgba(242,245,239,.66); }

.video-empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
  color: var(--slate);
}

/* ---------- 10. FORMS ---------------------------------------------------- */
.form-shell {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3.5vw, 3rem);
  box-shadow: var(--shadow);
}
.band--dark .form-shell, .band--deep .form-shell { box-shadow: none; }

.field-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.field { display: flex; flex-direction: column; gap: .45rem; }
.field--full { grid-column: 1 / -1; }
.field label {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .13em;
  text-transform: uppercase; color: var(--slate);
}
.field .req { color: var(--moss); }
.field input, .field select, .field textarea {
  font: inherit; font-size: .95rem;
  padding: .85rem .95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  transition: border-color .25s var(--ease), background .25s var(--ease);
  width: 100%;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 0; border-color: var(--moss); background: #fff;
}
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--moss); outline-offset: 1px;
}
.field--error input, .field--error select, .field--error textarea { border-color: #9B3B3B; }
.field__error { font-size: .78rem; color: #9B3B3B; }

.consent { display: flex; gap: .7rem; align-items: flex-start; font-size: .8rem; color: var(--slate); line-height: 1.5; }
.consent input { width: 18px; height: 18px; margin-top: .15rem; flex: none; accent-color: var(--moss); }

/* Honeypot — hidden from people, visible to spam bots */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert {
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  font-size: .9rem;
  margin-bottom: 1.5rem;
  border: 1px solid;
}
.alert--ok   { border-color: #3F7A46; background: rgba(63,122,70,.08); color: #2C5A32; }
.alert--bad  { border-color: #9B3B3B; background: rgba(155,59,59,.07); color: #7E2F2F; }

/* ---------- 11. CHAT WIDGET ---------------------------------------------- */
.chat-launcher {
  position: fixed;
  right: clamp(1rem, 3vw, 1.75rem);
  bottom: clamp(1rem, 3vw, 1.75rem);
  z-index: 80;
  display: flex; align-items: center; gap: .6rem;
  background: var(--forest);
  color: #fff;
  border: 0;
  border-radius: 100px;
  padding: .9rem 1.35rem;
  box-shadow: 0 12px 30px -12px rgba(7,22,14,.7);
  font-size: .82rem; letter-spacing: .04em;
  transition: background .3s var(--ease), transform .3s var(--ease);
}
.chat-launcher:hover { background: var(--moss); transform: translateY(-2px); }
.chat-launcher svg { width: 18px; height: 18px; flex: none; }
.chat-launcher__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--moss-bright);
  box-shadow: 0 0 0 0 rgba(168,181,78,.7);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(168,181,78,.6); }
  70%  { box-shadow: 0 0 0 10px rgba(168,181,78,0); }
  100% { box-shadow: 0 0 0 0 rgba(168,181,78,0); }
}

.chat-panel {
  position: fixed;
  right: clamp(1rem, 3vw, 1.75rem);
  bottom: clamp(4.75rem, 8vw, 6rem);
  width: min(92vw, 360px);
  max-height: min(70vh, 560px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 60px -22px rgba(7,22,14,.6);
  z-index: 80;
  display: flex; flex-direction: column;
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
  overflow: hidden;
}
.chat-panel.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.chat-panel__head {
  background: var(--forest); color: #fff;
  padding: 1rem 1.1rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.chat-panel__head strong { font-size: .95rem; font-weight: 600; }
.chat-panel__head small { display: block; font-size: .72rem; color: rgba(255,255,255,.65); }
.chat-panel__close { background: none; border: 0; color: #fff; padding: .25rem; line-height: 1; font-size: 1.3rem; }
.chat-panel__body { padding: 1.2rem; overflow-y: auto; font-size: .9rem; color: var(--slate); }
.chat-bubble {
  background: var(--mist);
  border-radius: 12px 12px 12px 2px;
  padding: .85rem 1rem;
  color: var(--ink);
  margin-bottom: 1rem;
}
.chat-quick { display: grid; gap: .5rem; }
.chat-quick a {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .7rem .9rem;
  font-size: .85rem;
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.chat-quick a:hover { border-color: var(--moss); color: var(--moss); }
.chat-panel__foot { padding: .9rem 1.2rem; border-top: 1px solid var(--line-soft); font-size: .72rem; color: var(--slate); }

/* ---------- 12. FOOTER --------------------------------------------------- */
.site-footer { background: var(--forest-deep); color: rgba(242,245,239,.72); font-size: .9rem; }
.footer-top { display: grid; gap: clamp(2rem, 4vw, 3rem); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); padding-block: clamp(3rem, 6vw, 4.5rem); }
.site-footer h4 {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--moss-bright); margin-bottom: 1.1rem;
}
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.footer-brand img { height: 52px; width: auto; margin-bottom: 1.2rem; }
.footer-bottom {
  border-top: 1px solid var(--line-dark);
  padding-block: 1.75rem;
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  font-size: .76rem; color: rgba(242,245,239,.5);
}
.disclaimer { font-size: .74rem; line-height: 1.6; color: rgba(242,245,239,.45); max-width: 90ch; padding-bottom: 2rem; }

/* Sticky mobile action bar */
.action-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 75;
  display: none;
  background: rgba(15,42,29,.97);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line-dark);
}
.action-bar a {
  flex: 1; text-align: center; color: #fff;
  padding: .85rem .5rem;
  font-family: var(--mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: .3rem;
}
.action-bar a + a { border-left: 1px solid var(--line-dark); }
.action-bar svg { width: 17px; height: 17px; }
@media (max-width: 720px) {
  .action-bar { display: flex; }
  body { padding-bottom: 62px; }
  .chat-launcher { bottom: 74px; }
  .chat-panel { bottom: 138px; }
}

/* Layout type browser — a dense grid of every individual unit type (used on
   the Units page under each bedroom count). Built to stay legible whether
   there are 5 types (3BR) or 42 (2BR). */
.layout-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  margin-top: 1rem;
}
.layout-chip {
  display: block; width: 100%; padding: 0; border: 1px solid var(--line);
  background: #fff; border-radius: var(--radius); overflow: hidden; text-align: left;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
}
.layout-chip:hover { border-color: var(--moss); box-shadow: var(--shadow); transform: translateY(-2px); }
.layout-chip__thumb { aspect-ratio: 4/3; overflow: hidden; background: var(--mist); }
.layout-chip__thumb img { width: 100%; height: 100%; object-fit: cover; }
.layout-chip__meta { padding: .6rem .7rem; }
.layout-chip__type {
  font-family: var(--mono); font-size: .78rem; font-weight: 500;
  color: var(--forest); display: block; margin-bottom: .15rem;
}
.layout-chip__area { font-size: .74rem; color: var(--slate); display: block; }
.layout-toggle {
  margin-top: 1.25rem; background: none; border: 1px solid var(--line);
  border-radius: 100px; padding: .6rem 1.2rem; font-family: var(--mono);
  font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--forest);
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.layout-toggle:hover { border-color: var(--moss); color: var(--moss); }
.layout-hidden { display: none; }

/* Floor plan document cards */
.docgrid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.doccard { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.doccard__thumb { aspect-ratio: 3/4; background: var(--mist); overflow: hidden; border: 0; padding: 0; width: 100%; display: block; }
.doccard__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .6s var(--ease); }
.doccard__thumb:hover img { transform: scale(1.04); }
.doccard__body { padding: 1rem 1.1rem 1.1rem; }
.doccard__body h3 { font-size: 1.05rem; margin-bottom: .2rem; }
.doccard__body p { font-size: .8rem; color: var(--slate); margin-bottom: .8rem; }
.doccard__link {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--moss); display: inline-flex; align-items: center; gap: .4rem;
}
.doccard__link:hover { color: var(--forest); }

/* ---------- 13. LIGHTBOX ------------------------------------------------- */
.gallery-grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.gallery-item {
  position: relative; overflow: hidden; border-radius: var(--radius);
  aspect-ratio: 3/2; background: var(--mist); border: 0; padding: 0; display: block; width: 100%;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 2.5rem .9rem .9rem;
  background: linear-gradient(to top, rgba(7,22,14,.85), transparent);
  color: #fff; font-family: var(--mono); font-size: .68rem;
  letter-spacing: .1em; text-transform: uppercase; text-align: left;
}

.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(7,22,14,.95);
  display: grid; place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  opacity: 0; visibility: hidden;
  transition: opacity .3s var(--ease), visibility .3s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img { max-width: 100%; max-height: 82vh; object-fit: contain; border-radius: var(--radius); }
.lightbox__cap { color: rgba(255,255,255,.75); font-family: var(--mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; margin-top: 1rem; text-align: center; }
.lightbox__close, .lightbox__nav {
  position: absolute; background: none; border: 1px solid rgba(255,255,255,.3);
  color: #fff; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; transition: background .25s var(--ease);
}
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255,255,255,.15); }
.lightbox__close { top: clamp(1rem, 3vw, 2rem); right: clamp(1rem, 3vw, 2rem); font-size: 1.4rem; line-height: 1; }
.lightbox__nav--prev { left: clamp(.5rem, 2vw, 2rem); top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: clamp(.5rem, 2vw, 2rem); top: 50%; transform: translateY(-50%); }

/* ---------- 14. MOTION & ACCESSIBILITY ----------------------------------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--forest); color: #fff; padding: .85rem 1.25rem;
}
.skip-link:focus { left: 1rem; top: 1rem; }

:focus-visible { outline: 2px solid var(--moss); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .site-footer, .chat-launcher, .chat-panel, .action-bar, .rail, .promo-bar { display: none !important; }
  body { padding-bottom: 0; }
}
