/* =====================================================================
   Reside Ke — Design System
   Editorial luxury: Cormorant Garamond display + Inter body,
   gold hairline signature, generous whitespace, restrained motion.
   ===================================================================== */

:root {
  /* ============================================================
     THEME TOKENS — default = Light Premium.
     Each theme below overrides this same set via [data-theme].
     Legacy variable names (--gold, --paper, --ink…) are mapped to
     semantic tokens so all existing components adapt automatically.
     ============================================================ */

  /* Semantic tokens (Light Premium) */
  --bg:            #fafaf8;   /* page background */
  --surface:       #ffffff;   /* cards */
  --surface-2:     #f4f5f3;   /* subtle raised / section */
  --border:        #e5e7eb;   /* hairline borders */
  --text:          #1f2937;   /* primary text */
  --text-muted:    #6b7280;   /* muted body text */
  --accent:        #2d5a4a;   /* primary brand accent */
  --accent-hover:  #3b745f;   /* accent hover */
  --accent-soft:   #d7e8dd;   /* soft accent tint */
  --accent-contrast:#ffffff;  /* text/icons on accent buttons */
  --hero-overlay:  linear-gradient(180deg, rgba(20,26,23,.30) 0%, rgba(20,26,23,.18) 42%, rgba(20,26,23,.72) 100%);
  --hero-eyebrow:  #d7e8dd;   /* eyebrow/accent text over hero */
  --success:       #16a34a;
  --warning:       #f59e0b;

  /* Legacy aliases → semantic (keeps existing CSS working) */
  --white:        var(--surface);
  --paper:        var(--bg);
  --mist:         var(--surface-2);
  --line:         var(--border);
  --ink:          var(--text);
  --charcoal:     var(--text);
  --slate:        var(--text-muted);
  --gold:         var(--accent);
  --gold-deep:    var(--accent-hover);
  --gold-soft:    var(--accent-soft);
  --danger:       #b4442f;
  --ok:           var(--success);

  /* Type */
  --display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Radii & shadow */
  --r-sm: 8px;
  --r:    14px;
  --r-lg: 22px;
  --shadow-sm: 0 2px 10px rgba(22,21,15,.05);
  --shadow:    0 14px 40px -18px rgba(22,21,15,.22);
  --shadow-lg: 0 30px 70px -30px rgba(22,21,15,.32);

  /* Layout */
  --max: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ============================================================
   THEME 2 — Luxury Dark (charcoal base, green accent)
   ============================================================ */
[data-theme="dark"] {
  --bg:            #0f1115;
  --surface:       #181c22;
  --surface-2:     #22272f;
  --border:        #303640;
  --text:          #f5f7fa;
  --text-muted:    #b5bcc7;
  --accent:        #4e9f7a;
  --accent-hover:  #66b68d;
  --accent-soft:   rgba(78,159,122,.16);
  --accent-contrast:#0f1115;
  --hero-overlay:  linear-gradient(180deg, rgba(8,10,13,.45) 0%, rgba(8,10,13,.30) 40%, rgba(8,10,13,.85) 100%);
  --hero-eyebrow:  #88c9a5;
  --success:       #4ade80;
  --warning:       #fbbf24;
  --shadow-sm: 0 2px 10px rgba(0,0,0,.3);
  --shadow:    0 14px 40px -18px rgba(0,0,0,.55);
  --shadow-lg: 0 30px 70px -30px rgba(0,0,0,.7);
}

/* ============================================================
   THEME 3 — Professional Blue
   ============================================================ */
[data-theme="blue"] {
  --bg:            #f8fafc;
  --surface:       #ffffff;
  --surface-2:     #eef4fb;
  --border:        #dbe6f1;
  --text:          #14243a;
  --text-muted:    #5b6b80;
  --accent:        #1f4e79;
  --accent-hover:  #2e679c;
  --accent-soft:   #dcecfb;
  --accent-contrast:#ffffff;
  --hero-overlay:  linear-gradient(180deg, rgba(15,32,56,.34) 0%, rgba(15,32,56,.20) 42%, rgba(15,32,56,.76) 100%);
  --hero-eyebrow:  #bcd6f2;
  --success:       #16a34a;
  --warning:       #f59e0b;
}

/* ============================================================
   THEME 4 — Earth & Nature (Kenyan landscape neutrals)
   ============================================================ */
[data-theme="earth"] {
  --bg:            #f7f5f1;
  --surface:       #ffffff;
  --surface-2:     #efeae1;
  --border:        #e3ddd1;
  --text:          #2b2b2b;
  --text-muted:    #746e63;
  --accent:        #5f7150;
  --accent-hover:  #4c5b40;
  --accent-soft:   #e6dccb;
  --accent-contrast:#ffffff;
  --hero-overlay:  linear-gradient(180deg, rgba(43,43,43,.30) 0%, rgba(43,43,43,.16) 42%, rgba(43,43,43,.70) 100%);
  --hero-eyebrow:  #c7b299;
  --success:       #16a34a;
  --warning:       #d99a2b;
}

/* Smooth theme transitions */
body, .site-header, .card, .search-panel, .btn, .cta-band, input, select, textarea {
  transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, picture, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
ul { list-style: none; padding: 0; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--display); font-weight: 500; line-height: 1.08; letter-spacing: -.01em; }
.display { font-family: var(--display); }
.eyebrow {
  font-family: var(--body);
  font-size: .72rem; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold-deep);
  display: inline-flex; align-items: center; gap: .7em;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--gold); display: inline-block; }

/* ---------- Layout utilities ---------- */
.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(56px, 9vw, 128px); }
.section--tight { padding-block: clamp(40px, 6vw, 80px); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: clamp(28px, 4vw, 56px); flex-wrap: wrap; }
.section-head h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
.section-head p { color: var(--slate); max-width: 46ch; }
.center { text-align: center; }
.center .eyebrow { justify-content: center; }

/* Signature: gold hairline divider */
.hairline { height: 1px; background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--gold) 80%, transparent); border: 0; }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--ink); --fg: var(--white); --bd: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  padding: .95em 1.9em; border-radius: 999px;
  background: var(--bg); color: var(--fg); border: 1px solid var(--bd);
  font-size: .9rem; font-weight: 500; letter-spacing: .02em;
  cursor: pointer; transition: transform .35s var(--ease), background .35s var(--ease), color .35s var(--ease), box-shadow .35s var(--ease);
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.btn--gold { --bg: var(--accent); --fg: var(--accent-contrast); --bd: var(--accent); }
.btn--gold:hover { --bg: var(--accent-hover); --bd: var(--accent-hover); --fg: var(--accent-contrast); }
.btn--ghost { --bg: transparent; --fg: var(--text); --bd: var(--border); }
.btn--ghost:hover { --bd: var(--accent); --fg: var(--accent); }
.btn--light { --bg: var(--surface); --fg: var(--text); --bd: var(--surface); }
.btn--block { width: 100%; }
.btn--sm { padding: .6em 1.2em; font-size: .82rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s var(--ease);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: 76px; }
.brand { display: inline-flex; align-items: baseline; gap: .5ch; font-family: var(--display); font-size: 1.6rem; font-weight: 600; letter-spacing: .01em; color: var(--text); }
.brand b { color: var(--gold-deep); font-weight: 600; }
.brand small { font-family: var(--body); font-size: .58rem; letter-spacing: .28em; text-transform: uppercase; color: var(--slate); align-self: center; margin-left: .4ch; }
.brand-logo { height: 46px; width: auto; display: block; transition: filter .35s var(--ease); }
.nav-links { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.4rem); }
.nav-links a { font-size: .92rem; color: var(--charcoal); position: relative; padding-block: .3em; }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 1px; background: var(--gold); transition: width .3s var(--ease); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-cta { display: flex; align-items: center; gap: .8rem; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .4rem; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; transition: .3s var(--ease); }
.mobile-menu { display: none; }

/* Theme switcher */
.theme-switch { position: relative; }
.theme-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; transition: border-color .25s var(--ease), color .25s var(--ease); }
.theme-btn:hover { border-color: var(--accent); color: var(--accent); }
.theme-menu { position: absolute; right: 0; top: calc(100% + 10px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow); padding: .4rem; min-width: 200px; display: none; z-index: 60; }
.theme-menu.open { display: block; }
.theme-menu button { display: flex; align-items: center; gap: .6rem; width: 100%; text-align: left; background: none; border: 0; padding: .55rem .6rem; border-radius: var(--r-sm); cursor: pointer; font: inherit; font-size: .88rem; color: var(--text); }
.theme-menu button:hover { background: var(--surface-2); }
.theme-menu button[aria-current="true"] { color: var(--accent); font-weight: 600; }
.theme-menu .sw { width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--border); flex: none; }
.mobile-themes { padding: .7rem 0; }
.mobile-themes .mt-label { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }
.mobile-themes .mt-row { display: flex; gap: .8rem; margin-top: .6rem; }
.mobile-themes .mt-row button { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.mobile-themes .mt-row .sw { width: 20px; height: 20px; border-radius: 50%; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: min(72vh, 680px); display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.hero__bg { position: absolute; inset: 0; z-index: 1; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: 2; background: var(--hero-overlay); }
.hero__inner { position: relative; z-index: 3; width: 100%; padding-block: clamp(34px, 6vw, 74px); color: #fff; }
.hero .eyebrow { color: var(--hero-eyebrow); }
.hero .eyebrow::before { background: var(--hero-eyebrow); }
.hero h1 { font-size: clamp(2.4rem, 6vw, 5rem); font-weight: 500; max-width: 16ch; }
.hero h1 em { font-style: italic; color: var(--hero-eyebrow); }
.hero p.lede { margin-top: 1.1rem; max-width: 52ch; color: rgba(255,255,255,.9); font-size: clamp(1rem, 1.5vw, 1.2rem); }

/* ---------- Search panel (prominent solid card) ---------- */
.search-panel {
  margin-top: clamp(24px, 3.5vw, 40px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: clamp(18px, 2.2vw, 26px);
  box-shadow: var(--shadow-lg);
}
.search-tabs { display: inline-flex; gap: .3rem; background: var(--surface-2); padding: .3rem; border-radius: 999px; margin-bottom: 1.1rem; }
.search-tabs button {
  border: 0; background: transparent; color: var(--text-muted);
  padding: .55em 1.4em; border-radius: 999px; cursor: pointer; font-size: .86rem; font-weight: 500;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.search-tabs button.active { background: var(--accent); color: var(--accent-contrast); }
.search-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .7rem; align-items: end; }
.search-field { display: flex; flex-direction: column; gap: .35rem; }
.search-field label { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }
.search-field input, .search-field select {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: .8em .9em; font-size: .9rem; color: var(--text); width: 100%;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.search-field input:focus, .search-field select:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-submit { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: .6rem; flex-wrap: wrap; }
.search-toggle-adv { background: none; border: 0; color: var(--white); font-size: .82rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; align-self: center; margin-right: auto; }
.search-advanced { display: none; }
.search-advanced.open { display: contents; }

/* ---------- Property card ---------- */
.grid { display: grid; gap: clamp(18px, 2.4vw, 30px); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.card__media { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--mist); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.card:hover .card__media img { transform: scale(1.05); }
.card__badges { position: absolute; top: 12px; left: 12px; display: flex; gap: .4rem; flex-wrap: wrap; }
.badge {
  font-size: .66rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  padding: .4em .8em; border-radius: 999px; backdrop-filter: blur(6px);
}
.badge--featured { background: var(--gold); color: var(--ink); }
.badge--sale { background: rgba(22,21,15,.82); color: var(--white); }
.badge--rent { background: rgba(61,122,85,.9); color: var(--white); }
.badge--airbnb { background: rgba(180,68,47,.9); color: var(--white); }
.badge--land, .badge--commercial { background: rgba(43,42,37,.85); color: var(--white); }
.card__fav { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.85); border: 0; display: grid; place-items: center; cursor: pointer;
  transition: background .3s var(--ease), transform .3s var(--ease); }
.card__fav:hover { background: var(--white); transform: scale(1.08); }
.card__body { padding: 1.2rem 1.3rem 1.4rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.card__price { font-family: var(--display); font-size: 1.5rem; font-weight: 600; color: var(--ink); }
.card__price span { font-family: var(--body); font-size: .78rem; color: var(--slate); font-weight: 400; }
.card__title { font-family: var(--body); font-size: 1.02rem; font-weight: 600; letter-spacing: -.01em; }
.card__title a:hover { color: var(--gold-deep); }
.card__loc { font-size: .84rem; color: var(--slate); display: flex; align-items: center; gap: .4em; }
.card__meta { display: flex; gap: 1.1rem; margin-top: auto; padding-top: .9rem; border-top: 1px solid var(--line); font-size: .82rem; color: var(--charcoal); }
.card__meta span { display: inline-flex; align-items: center; gap: .4em; }
.card__meta svg { color: var(--gold-deep); }

/* ---------- Category tiles ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: clamp(14px, 2vw, 22px); }
.cat-tile { position: relative; aspect-ratio: 3/4; border-radius: var(--r); overflow: hidden; display: flex; align-items: flex-end; padding: 1.3rem; color: #fff; background: var(--surface-2); isolation: isolate; }
.cat-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; transition: transform .8s var(--ease); }
.cat-tile::after { content: ""; position: absolute; inset: 0; z-index: 2; background: linear-gradient(180deg, transparent 30%, rgba(15,14,10,.78)); }
.cat-tile > div { position: relative; z-index: 3; }
.cat-tile:hover img { transform: scale(1.06); }
.cat-tile h3 { font-size: 1.4rem; font-weight: 500; }
.cat-tile span { font-size: .78rem; color: rgba(255,255,255,.85); }

/* ---------- County pills ---------- */
.county-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.county-pill { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.3rem; border: 1px solid var(--line); border-radius: var(--r); transition: border-color .3s var(--ease), background .3s var(--ease), transform .3s var(--ease); }
.county-pill:hover { border-color: var(--gold); background: var(--gold-soft); transform: translateY(-3px); }
.county-pill b { font-family: var(--display); font-size: 1.15rem; font-weight: 600; }
.county-pill svg { color: var(--gold-deep); transition: transform .3s var(--ease); }
.county-pill:hover svg { transform: translateX(4px); }

/* ---------- Why choose (features) ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: clamp(20px, 3vw, 40px); }
.feature { display: flex; flex-direction: column; gap: .7rem; }
.feature__icon { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-deep); }
.feature h3 { font-family: var(--body); font-size: 1.05rem; font-weight: 600; }
.feature p { color: var(--slate); font-size: .92rem; }

/* ---------- Testimonials ---------- */
.tstack { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(18px, 2.4vw, 28px); }
.tcard { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(24px, 3vw, 38px); display: flex; flex-direction: column; gap: 1rem; }
.tcard .stars { color: var(--gold); letter-spacing: .1em; }
.tcard blockquote { font-family: var(--display); font-size: 1.25rem; line-height: 1.45; color: var(--charcoal); }
.tcard .who { display: flex; align-items: center; gap: .8rem; margin-top: auto; }
.tcard .who b { font-weight: 600; }
.tcard .who span { color: var(--slate); font-size: .84rem; }

/* ---------- CTA band ---------- */
.cta-band { position: relative; border-radius: var(--r-lg); overflow: hidden; padding: clamp(44px, 6vw, 90px); color: #fff; text-align: center; isolation: isolate; }
.cta-band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.cta-band::after { content: ""; position: absolute; inset: 0; z-index: 2; background: linear-gradient(180deg, rgba(15,14,10,.55), rgba(15,14,10,.75)); }
.cta-band > * { position: relative; z-index: 3; }
.cta-band h2 { font-size: clamp(2rem, 4.5vw, 3.4rem); max-width: 20ch; margin-inline: auto; }
.cta-band p { max-width: 52ch; margin: 1rem auto 2rem; color: rgba(255,255,255,.85); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.72); padding-block: clamp(48px, 6vw, 84px) 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: clamp(28px, 4vw, 56px); }
.footer-grid h4 { font-family: var(--body); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 1.1rem; }
.footer-grid a { color: rgba(255,255,255,.72); font-size: .92rem; display: block; padding: .3rem 0; transition: color .25s var(--ease); }
.footer-grid a:hover { color: var(--gold); }
.footer-brand .brand { color: var(--white); }
.footer-brand .brand-logo { filter: invert(1) brightness(1.6); height: 52px; }
.footer-brand p { margin: 1rem 0; max-width: 34ch; font-size: .92rem; }
.newsletter { display: flex; gap: .5rem; margin-top: 1rem; }
.newsletter input { flex: 1; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16); border-radius: 999px; padding: .8em 1.1em; color: var(--white); }
.newsletter input:focus { outline: 0; border-color: var(--gold); }
.socials { display: flex; gap: .7rem; margin-top: 1.2rem; }
.socials a { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.16); display: grid; place-items: center; transition: border-color .3s var(--ease), background .3s var(--ease); }
.socials a:hover { border-color: var(--gold); background: var(--gold-soft); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: clamp(36px, 4vw, 56px); padding-top: 1.6rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .82rem; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links, .nav-cta .btn--ghost, .theme-switch { display: none; }
  .nav-toggle { display: block; }
  .mobile-menu.open { display: flex; flex-direction: column; gap: .4rem; padding: 1rem var(--gutter) 1.5rem; border-top: 1px solid var(--line); background: var(--surface); }
  .mobile-menu a { padding: .7rem 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .search-tabs { width: 100%; justify-content: space-between; }
  .card__meta { gap: .8rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Accessibility ---------- */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--white); padding: .8em 1.2em; z-index: 999; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* =====================================================================
   Flash messages
   ===================================================================== */
.flash { padding: .9rem 1.2rem; border-radius: var(--r-sm); margin: 0 0 1.2rem; font-size: .92rem; border: 1px solid transparent; }
.flash--success { background: rgba(61,122,85,.1); border-color: rgba(61,122,85,.3); color: #2c5a3f; }
.flash--error   { background: rgba(180,68,47,.08); border-color: rgba(180,68,47,.3); color: #8f3121; }

/* =====================================================================
   Breadcrumbs
   ===================================================================== */
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0; font-size: .82rem; color: var(--slate); }
.breadcrumbs li + li::before { content: "/"; margin-right: .5rem; color: var(--line); }
.breadcrumbs a { color: var(--slate); }
.breadcrumbs a:hover { color: var(--gold-deep); }
.breadcrumbs [aria-current] { color: var(--ink); }

/* =====================================================================
   Forms (shared)
   ===================================================================== */
.field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.1rem; }
.field label { font-size: .82rem; font-weight: 500; color: var(--charcoal); letter-spacing: .01em; }
.field .hint { font-size: .76rem; color: var(--slate); }
.input, .select, .textarea {
  width: 100%; font: inherit; font-size: .95rem; color: var(--ink);
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: .72rem .85rem; transition: border-color .2s, box-shadow .2s;
}
.textarea { resize: vertical; min-height: 120px; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.2rem; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.5rem, 3vw, 2.4rem); box-shadow: var(--shadow-sm); }

/* =====================================================================
   Single property page
   ===================================================================== */
.pdp { padding: clamp(1.4rem, 3vw, 2rem) 0 clamp(3rem, 6vw, 5rem); }
.pdp-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; margin: 1rem 0 1.4rem; }
.pdp-head h1 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); line-height: 1.08; margin: .3rem 0 .5rem; }
.pdp-head .pdp-loc { color: var(--slate); display: flex; align-items: center; gap: .4rem; }
.pdp-price { text-align: right; }
.pdp-price .amt { font-family: var(--display); font-size: clamp(1.6rem, 3vw, 2.3rem); color: var(--ink); font-weight: 600; }
.pdp-price .amt span { font-size: .5em; color: var(--slate); font-family: var(--body); }
.pdp-price .ref { font-size: .78rem; color: var(--slate); letter-spacing: .04em; }

/* Gallery */
.gallery { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; border-radius: var(--r-lg); overflow: hidden; max-height: 560px; }
.gallery img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; display: block; transition: transform .6s var(--ease); }
.gallery a { overflow: hidden; position: relative; }
.gallery a:hover img { transform: scale(1.04); }
.gallery .g-main { grid-row: 1 / 3; }
.gallery .g-more { position: absolute; inset: 0; background: rgba(22,21,15,.55); color: #fff; display: grid; place-items: center; font-size: 1.1rem; letter-spacing: .02em; }
@media (max-width: 780px) { .gallery { grid-template-columns: 1fr 1fr; max-height: none; } .gallery .g-main { grid-row: auto; grid-column: 1 / -1; aspect-ratio: 16/10; } }

.pdp-grid { display: grid; grid-template-columns: 1fr 360px; gap: clamp(1.5rem, 4vw, 3rem); margin-top: clamp(1.8rem, 4vw, 2.6rem); align-items: start; }
@media (max-width: 940px) { .pdp-grid { grid-template-columns: 1fr; } }

.pdp-block { margin-bottom: 2.4rem; }
.pdp-block h2 { font-size: 1.5rem; margin-bottom: .9rem; }
.spec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.spec-grid .spec { background: var(--white); padding: 1rem; }
.spec-grid .spec .k { font-size: .74rem; color: var(--slate); text-transform: uppercase; letter-spacing: .06em; }
.spec-grid .spec .v { font-family: var(--display); font-size: 1.3rem; color: var(--ink); margin-top: .2rem; }
.amenity-list, .feature-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .6rem 1.2rem; }
.amenity-list li, .feature-list li { display: flex; align-items: center; gap: .5rem; font-size: .92rem; color: var(--charcoal); }
.amenity-list li::before, .feature-list li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); flex: none; }
.nearby-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.4rem; }
.nearby-cols h3 { font-family: var(--body); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--slate); margin-bottom: .5rem; }

.pdp-desc { color: var(--charcoal); line-height: 1.75; }
.pdp-desc p { margin-bottom: 1rem; }

.map-embed, .video-embed { border: 0; width: 100%; aspect-ratio: 16/9; border-radius: var(--r); }
.tour-links { display: flex; gap: .8rem; flex-wrap: wrap; }

/* Sticky contact/agent sidebar */
.pdp-side { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 1.2rem; }
.agent-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.5rem; box-shadow: var(--shadow-sm); }
.agent-card .who { display: flex; gap: .9rem; align-items: center; margin-bottom: 1rem; }
.agent-card .who img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.agent-card .who .nm { font-family: var(--display); font-size: 1.2rem; }
.agent-card .who .rl { font-size: .8rem; color: var(--slate); }
.contact-actions { display: flex; flex-direction: column; gap: .6rem; }

/* Mortgage calculator */
.mortgage { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.5rem; box-shadow: var(--shadow-sm); }
.mortgage .row { display: flex; justify-content: space-between; align-items: baseline; margin-top: .8rem; }
.mortgage output { font-family: var(--display); font-size: 1.9rem; color: var(--gold-deep); font-weight: 600; }
.mortgage input[type=range] { width: 100%; accent-color: var(--gold); }

.share-row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.share-row a, .share-row button { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--white); color: var(--charcoal); cursor: pointer; transition: border-color .2s, color .2s; }
.share-row a:hover, .share-row button:hover { border-color: var(--gold); color: var(--gold-deep); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(12,11,8,.94); z-index: 200; display: none; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; object-fit: contain; border-radius: 6px; }
.lightbox .lb-close, .lightbox .lb-prev, .lightbox .lb-next { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 1.4rem; cursor: pointer; display: grid; place-items: center; }
.lightbox .lb-close { top: 20px; right: 20px; }
.lightbox .lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 20px; top: 50%; transform: translateY(-50%); }

/* =====================================================================
   Contact / About / generic page hero
   ===================================================================== */
.page-hero { padding: clamp(3rem, 7vw, 6rem) 0 clamp(2rem, 4vw, 3rem); text-align: center; background: linear-gradient(180deg, var(--paper), var(--white)); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.05; }
.page-hero p { color: var(--slate); max-width: 620px; margin: 1rem auto 0; font-size: 1.05rem; }
.contact-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (max-width: 820px) { .contact-split { grid-template-columns: 1fr; } }
.contact-lines { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.contact-lines li { display: flex; gap: .9rem; align-items: flex-start; }
.contact-lines .ic { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--gold-soft); color: var(--gold-deep); display: grid; place-items: center; }
.contact-lines .k { font-size: .76rem; text-transform: uppercase; letter-spacing: .07em; color: var(--slate); }
.contact-lines .v { color: var(--ink); font-size: 1rem; }

/* About */
.about-lead { font-size: clamp(1.15rem, 2.4vw, 1.5rem); font-family: var(--display); line-height: 1.5; color: var(--charcoal); max-width: 780px; }
.stat-band { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.stat-band .stat { background: var(--white); padding: 1.8rem 1.2rem; text-align: center; }
.stat-band .num { font-family: var(--display); font-size: clamp(2rem, 4vw, 3rem); color: var(--gold-deep); font-weight: 600; }
.stat-band .lbl { font-size: .82rem; color: var(--slate); margin-top: .3rem; }
.value-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.value-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.6rem; }
.value-card .feature__icon { margin-bottom: 1rem; }
.value-card h3 { font-size: 1.25rem; margin-bottom: .5rem; }
.value-card p { color: var(--slate); font-size: .92rem; line-height: 1.6; }

/* File input styling */
.filedrop { border: 1.5px dashed var(--line); border-radius: var(--r); padding: 1.4rem; text-align: center; color: var(--slate); background: var(--paper); cursor: pointer; transition: border-color .2s, background .2s; }
.filedrop:hover { border-color: var(--gold); background: var(--gold-soft); }

/* Custom homepage blocks (admin-created) */
.custom-block { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 4vw, 48px); align-items: center; }
.custom-block:only-child { }
.custom-block__img { width: 100%; height: 100%; max-height: 460px; object-fit: cover; border-radius: var(--r-lg); box-shadow: var(--shadow); }
.custom-block__text h2 { font-family: var(--display); font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 500; color: var(--text); margin-bottom: .8rem; }
.custom-block__text p { color: var(--text-muted); font-size: 1.05rem; line-height: 1.75; }
.custom-block:not(:has(.custom-block__img)) { grid-template-columns: 1fr; text-align: center; max-width: 760px; margin: 0 auto; }
@media (max-width: 780px) { .custom-block { grid-template-columns: 1fr; } .custom-block__img { max-height: 300px; } }
