/* =====================================================================
   HABITAT MACAU — Curated homes for rent
   Premium editorial design system · cinematic · mobile-first
   ===================================================================== */

:root {
  color-scheme: light;

  /* --- Palette: deep forest + warm gold + bone cream --- */
  --ink: #0c1c18;            /* near-black forest */
  --ink-2: #15302a;
  --ink-3: #2a4742;
  --paper: #f5f1e6;          /* warm bone */
  --paper-2: #ede7d6;
  --paper-3: #e4dcc6;
  --white: #ffffff;
  --sand: #c9a35d;           /* warm gold */
  --sand-2: #d8bb7d;
  --sand-soft: #e8d6ad;
  --clay: #a8483c;           /* terracotta accent */
  --moss: #4f6b54;
  --muted: #6a7268;
  --line: #d8d2c0;
  --line-2: #e7e1cf;

  /* --- Type --- */
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* --- Radii --- */
  --r-sm: 0.5rem;
  --r: 1rem;
  --r-lg: 1.5rem;
  --r-xl: 2rem;
  --r-2xl: 2.75rem;

  /* --- Elevation --- */
  --shadow-sm: 0 2px 10px rgba(12, 28, 24, 0.06);
  --shadow: 0 24px 60px rgba(12, 28, 24, 0.14);
  --shadow-lg: 0 40px 100px rgba(12, 28, 24, 0.22);

  /* --- Layout --- */
  --container: 82rem;
  --gutter: 1.25rem;
  --header-h: 4.5rem;

  /* --- Easing --- */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ----------------------------- Reset ----------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-bottom: 4.6rem;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--sand); outline-offset: 3px; border-radius: 3px; }

.sr-only {
  position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important; overflow: hidden !important;
  clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important;
}
.skip-link {
  position: fixed; left: 1rem; top: -5rem; z-index: 100;
  background: var(--white); padding: 0.7rem 1.1rem; border-radius: 999px;
  box-shadow: var(--shadow); transition: top 0.25s var(--ease);
}
.skip-link:focus { top: 1rem; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter); }

/* Film grain for tactile texture */
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* ----------------------------- Type ------------------------------ */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--ink-2);
}
.eyebrow::before {
  content: ""; display: inline-block; width: 1.75rem; height: 1px; background: currentColor; opacity: 0.55;
}
.eyebrow-light { color: var(--sand-soft); }
.eyebrow-light::before { background: var(--sand-soft); }

em { font-family: var(--serif); font-style: italic; font-weight: 400; }

/* ----------------------------- Buttons --------------------------- */
.btn {
  --btn-bg: var(--ink); --btn-fg: var(--white); --btn-bd: var(--ink);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 3.1rem; padding: 0.85rem 1.5rem;
  background: var(--btn-bg); color: var(--btn-fg); border: 1px solid var(--btn-bd);
  border-radius: 999px; text-decoration: none;
  font-size: 0.86rem; font-weight: 600; letter-spacing: 0.005em;
  cursor: pointer; overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), background 0.35s var(--ease), color 0.35s var(--ease);
}
.btn svg { transition: transform 0.4s var(--ease); position: relative; z-index: 1; }
.btn > span { position: relative; z-index: 1; }
.btn::before {
  content: ""; position: absolute; inset: 0; background: var(--sand);
  transform: translateY(101%); transition: transform 0.45s var(--ease); z-index: 0;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(12,28,24,0.22); color: var(--ink); border-color: var(--sand); }
.btn:hover::before { transform: translateY(0); }
.btn:hover svg { transform: translateX(4px); }
.btn:active { transform: translateY(0); }
.btn-small { min-height: 2.75rem; padding: 0.6rem 1.15rem; font-size: 0.8rem; }
.btn-wide { width: 100%; }
.btn-light { --btn-bg: var(--white); --btn-fg: var(--ink); --btn-bd: var(--white); }
.btn-light::before { background: var(--ink); }
.btn-light:hover { color: var(--white); border-color: var(--ink); }
.btn-ghost-light {
  --btn-bg: transparent; --btn-fg: var(--white); --btn-bd: rgba(255,255,255,0.38);
}
.btn-ghost-light::before { background: var(--white); }
.btn-ghost-light:hover { color: var(--ink); border-color: var(--white); }
.btn-soft { --btn-bg: var(--ink); --btn-fg: var(--white); --btn-bd: transparent; }
.btn-soft::before { background: var(--sand); }
.btn-soft:hover { color: var(--ink); border-color: var(--sand); }

.icon-btn {
  position: relative; width: 2.75rem; height: 2.75rem; display: inline-grid; place-items: center;
  background: transparent; border: 1px solid var(--line); border-radius: 50%;
  cursor: pointer; color: var(--ink); transition: background 0.25s, border-color 0.25s, transform 0.25s;
}
.icon-btn:hover { background: var(--paper-2); border-color: var(--ink-3); transform: translateY(-1px); }
.fav-count {
  position: absolute; top: -5px; right: -5px; min-width: 1.3rem; height: 1.3rem;
  padding: 0 0.35rem; display: grid; place-items: center;
  background: var(--clay); color: var(--white); border-radius: 999px;
  font-size: 0.65rem; font-weight: 700; line-height: 1;
  border: 2px solid var(--paper);
  animation: pop 0.35s var(--ease);
}
@keyframes pop { 0% { transform: scale(0); } 60% { transform: scale(1.2); } 100% { transform: scale(1); } }

/* ============================= HEADER =========================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 241, 230, 0.72);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  transition: border-color 0.35s var(--ease), background 0.35s var(--ease), padding 0.35s var(--ease);
}
.site-header[data-scrolled="true"] { border-bottom-color: rgba(12, 28, 24, 0.08); background: rgba(245, 241, 230, 0.9); }
.header-inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 2.6rem; height: 2.6rem; display: grid; place-items: center;
  background: var(--ink); color: var(--sand);
  border-radius: 0.75rem; transition: transform 0.45s var(--ease), background 0.45s var(--ease);
}
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.05); }
.brand-text { display: grid; line-height: 1; }
.brand strong { font-family: var(--serif); font-size: 1.22rem; font-weight: 500; letter-spacing: -0.01em; }
.brand small { text-transform: uppercase; letter-spacing: 0.22em; font-size: 0.5rem; margin-top: 0.35rem; color: var(--muted); font-weight: 600; }

.desktop-nav { display: none; align-items: center; gap: 2.25rem; margin-left: auto; }
.desktop-nav a {
  position: relative; font-size: 0.84rem; font-weight: 500; text-decoration: none;
  color: var(--ink-2); padding: 0.4rem 0; transition: color 0.25s;
}
.desktop-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 1.5px;
  background: var(--sand); transition: width 0.4s var(--ease);
}
.desktop-nav a:hover { color: var(--ink); }
.desktop-nav a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 0.55rem; }
.header-actions > .btn { display: none; }
.favorites-trigger { display: inline-grid; }

.menu-button {
  width: 2.75rem; height: 2.75rem; display: grid; place-content: center; gap: 0.32rem;
  border: 1px solid var(--line); background: transparent; border-radius: 50%; cursor: pointer;
}
.menu-button span { display: block; width: 1.1rem; height: 1.5px; background: var(--ink); transition: transform 0.35s var(--ease), opacity 0.2s ease; }
.menu-button[aria-expanded="true"] span:nth-child(1) { transform: translateY(0.24rem) rotate(45deg); }
.menu-button[aria-expanded="true"] span:nth-child(2) { transform: translateY(-0.24rem) rotate(-45deg); }

.mobile-menu {
  overflow: hidden; max-height: 0; padding: 0 var(--gutter);
  background: var(--paper); border-top: 1px solid transparent;
  transition: max-height 0.45s var(--ease), padding 0.35s var(--ease), border-color 0.35s var(--ease);
}
.mobile-menu[data-open="true"] { max-height: 30rem; padding: 0.5rem var(--gutter) 1.5rem; border-top-color: var(--line); }
.mobile-menu[hidden] { display: none; }
.mobile-menu a:not(.btn) {
  display: block; padding: 1rem 0; border-bottom: 1px solid var(--line-2);
  font-family: var(--serif); font-size: 1.5rem; font-weight: 400; text-decoration: none; color: var(--ink);
}
.mobile-menu a:not(.btn):hover { color: var(--clay); padding-left: 0.5rem; transition: padding 0.3s var(--ease), color 0.3s; }
.mobile-menu .btn { margin-top: 1.25rem; width: 100%; }

/* ============================== HERO ============================= */
.hero {
  position: relative; min-height: calc(100svh - var(--header-h));
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden; background: var(--ink); color: var(--white); isolation: isolate;
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); animation: heroZoom 18s ease-out forwards; }
@keyframes heroZoom { to { transform: scale(1); } }
.hero-frame {
  position: absolute; inset: 1.25rem; border: 1px solid rgba(255,255,255,0.16);
  border-radius: var(--r-lg); pointer-events: none; z-index: 3;
}
.hero-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(120% 80% at 20% 100%, rgba(12,28,24,0.85), transparent 60%),
    linear-gradient(180deg, rgba(12,28,24,0.32) 0%, rgba(12,28,24,0.45) 40%, rgba(12,28,24,0.88) 100%);
}
.hero-content { position: relative; z-index: 4; padding: 2.5rem 0 2rem; max-width: 50rem; }
.pulse-dot {
  display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 50%;
  background: var(--sand-2); box-shadow: 0 0 0 0 rgba(216,187,125,0.6);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(216,187,125,0.6); }
  70% { box-shadow: 0 0 0 0.7rem rgba(216,187,125,0); }
  100% { box-shadow: 0 0 0 0 rgba(216,187,125,0); }
}
.hero h1 {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(3rem, 14vw, 6rem);
  line-height: 0.95; letter-spacing: -0.04em; margin: 1.2rem 0 1.4rem;
}
.hero h1 em { font-weight: 400; color: var(--sand-soft); }
.hero-copy { max-width: 33rem; color: #e6ebe6; font-size: 1.05rem; margin: 0 0 1.9rem; line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.hero-stats-wrap {
  position: relative; z-index: 4;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem;
  padding: 1.75rem 0 3.5rem;
  border-top: 1px solid rgba(255,255,255,0.16);
  margin-top: 1.5rem;
}
.hero-stats { display: flex; flex-wrap: wrap; gap: 0.5rem 2.4rem; list-style: none; padding: 0; margin: 0; }
.hero-stats li { display: grid; gap: 0.3rem; }
.hero-stats strong {
  font-family: var(--serif); font-size: clamp(1.8rem, 6vw, 2.6rem); font-weight: 400; line-height: 1; letter-spacing: -0.02em;
}
.hero-stats span { font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--sand-soft); }
.hero-coord { display: grid; gap: 0.25rem; text-align: right; font-size: 0.6rem; letter-spacing: 0.18em; color: rgba(232,214,173,0.7); font-variant-numeric: tabular-nums; }

.hero-scroll {
  position: absolute; left: 50%; bottom: 1.25rem; transform: translateX(-50%);
  z-index: 4; display: none; flex-direction: column; align-items: center; gap: 0.5rem;
  font-size: 0.55rem; letter-spacing: 0.3em; text-transform: uppercase; color: rgba(232,214,173,0.7);
}
.hero-scroll-line { width: 1px; height: 2.5rem; background: linear-gradient(var(--sand-soft), transparent); position: relative; overflow: hidden; }
.hero-scroll-line::after { content: ""; position: absolute; top: -50%; left: 0; width: 100%; height: 50%; background: var(--white); animation: scrollDot 2s ease-in-out infinite; }
@keyframes scrollDot { 0% { top: -50%; } 100% { top: 100%; } }

/* Staggered hero entrance */
.reveal-stagger { opacity: 0; transform: translateY(28px); animation: heroIn 0.9s var(--ease) forwards; animation-delay: calc(0.15s + var(--i, 0) * 0.12s); }
@keyframes heroIn { to { opacity: 1; transform: translateY(0); } }

/* ========================== SECTIONS ============================ */
.section-heading { display: grid; gap: 0.85rem; margin-bottom: 2.25rem; max-width: 44rem; }
.section-heading h2 {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.4rem, 9vw, 4.5rem);
  letter-spacing: -0.038em; line-height: 0.96; margin: 0.5rem 0 0;
}
.section-heading h2 em { font-weight: 400; color: var(--clay); }
.section-heading > p { color: var(--muted); margin: 0; max-width: 32rem; font-size: 1rem; }
.section-heading-center { margin-inline: auto; text-align: center; justify-items: center; max-width: 44rem; }
.section-heading-center .eyebrow::before { display: none; }
.section-eyebrow { margin-bottom: 0.5rem; }

/* ========================= FEATURED ============================= */
.featured-section { padding: 5rem 0 3rem; }
.featured-head { display: grid; gap: 1rem; margin-bottom: 2.25rem; max-width: 56rem; }
.featured-head h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(2.4rem, 8vw, 4rem); line-height: 0.98; letter-spacing: -0.035em; margin: 0; }
.featured-head h2 em { color: var(--clay); }
.featured-head p { color: var(--muted); margin: 0; max-width: 36rem; }

.featured-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.featured-card {
  position: relative; display: flex; flex-direction: column; gap: 1.1rem;
  background: var(--white); border-radius: var(--r-xl);
  padding: 1.1rem 1.1rem 1.4rem; border: 1px solid var(--line-2);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.featured-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.featured-media { position: relative; aspect-ratio: 4/3; overflow: hidden; border-radius: var(--r-lg); background: var(--paper-2); }
.featured-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.featured-card:hover .featured-media img { transform: scale(1.06); }
.featured-rank {
  position: absolute; left: 1rem; top: 1rem; z-index: 2;
  width: 2.6rem; height: 2.6rem; display: grid; place-items: center;
  background: rgba(12,28,24,0.85); backdrop-filter: blur(6px); color: var(--sand-soft);
  font-family: var(--serif); font-size: 0.95rem; border-radius: 50%;
}
.featured-tag {
  position: absolute; right: 1rem; top: 1rem; z-index: 2;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(6px);
  padding: 0.4rem 0.8rem; border-radius: 999px;
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink);
}
.featured-body { padding: 0 0.35rem; }
.featured-meta { display: flex; align-items: center; gap: 0.45rem; font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); font-weight: 600; }
.featured-body h3 { font-family: var(--serif); font-weight: 400; font-size: 1.7rem; line-height: 1.1; margin: 0.6rem 0 0.7rem; letter-spacing: -0.018em; }
.featured-body h3 a { text-decoration: none; }
.featured-facts { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; color: var(--ink-2); font-size: 0.82rem; font-weight: 500; padding: 0.8rem 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.featured-facts span { display: inline-flex; align-items: center; gap: 0.35rem; }
.featured-facts svg { color: var(--muted); }
.featured-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 0.6rem; margin-top: 0.9rem; }
.featured-foot strong { font-family: var(--serif); font-size: 1.6rem; font-weight: 400; color: var(--ink); }
.featured-foot strong.on-request { font-style: italic; color: var(--muted); font-size: 1.25rem; }
.featured-foot .featured-link { font-size: 0.78rem; font-weight: 600; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 0.35rem; }
.featured-foot .featured-link svg { transition: transform 0.35s var(--ease); }
.featured-foot .featured-link:hover svg { transform: translateX(4px); }

/* ========================= SEARCH/HOMES ========================= */
.search-section { padding: 4rem 0 3rem; }

.filter-bar {
  display: grid; gap: 0.7rem;
  background: var(--white); padding: 1rem; border-radius: var(--r-lg);
  box-shadow: var(--shadow); border: 1px solid var(--line-2);
  margin-bottom: 1.75rem;
}
.search-field { position: relative; }
.search-field > i { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-field input {
  width: 100%; min-height: 3.3rem; padding: 0 1rem 0 2.75rem;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--paper);
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}
.search-field input::placeholder { color: var(--muted); }
.search-field input:focus { border-color: var(--ink-3); background: var(--white); box-shadow: 0 0 0 4px rgba(201,163,93,0.18); outline: none; }

.select-field, .sort-field { position: relative; display: grid; gap: 0.35rem; }
.select-field > span, .sort-field > span {
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
  padding-left: 0.15rem;
}
.select-field select, .sort-field select {
  width: 100%; min-height: 3.3rem; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--paper); padding: 0 2.5rem 0 1rem;
  appearance: none; -webkit-appearance: none; cursor: pointer; transition: border-color 0.25s, background 0.25s;
}
.select-field select:focus, .sort-field select:focus { border-color: var(--ink-3); background: var(--white); outline: none; box-shadow: 0 0 0 4px rgba(201,163,93,0.18); }
.select-field .chev, .sort-field .chev { position: absolute; right: 0.9rem; bottom: 0.95rem; pointer-events: none; color: var(--muted); }
.sort-field { grid-template-columns: auto 1fr; align-items: center; gap: 0.55rem; }
.sort-field > span { padding-left: 0; }
.sort-field .chev { bottom: 50%; transform: translateY(50%); }

.filter-submit { width: 100%; }
.filter-reset {
  justify-self: start; display: inline-flex; align-items: center; gap: 0.4rem;
  background: none; border: 0; color: var(--clay);
  font-size: 0.78rem; font-weight: 600; cursor: pointer;
  min-height: 2.75rem; padding: 0.3rem 0.75rem; margin-left: -0.75rem;
  border-bottom: 1px solid transparent; transition: border-color 0.25s;
}
.filter-reset:hover { border-bottom-color: var(--clay); }

.results-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; }
.results-count { margin: 0; font-size: 0.9rem; color: var(--ink-2); display: flex; align-items: baseline; gap: 0.45rem; }
.results-count strong { font-family: var(--serif); font-size: 1.7rem; font-weight: 400; color: var(--ink); letter-spacing: -0.01em; }

/* ========================== PROPERTY GRID ======================= */
.property-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }

.property-card {
  position: relative; background: var(--white); border-radius: var(--r-lg);
  overflow: hidden; border: 1px solid var(--line-2);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), border-color 0.45s var(--ease);
  opacity: 0; transform: translateY(18px);
  animation: cardIn 0.7s var(--ease) forwards;
}
@keyframes cardIn { to { opacity: 1; transform: translateY(0); } }
.property-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: transparent; }

.card-media { position: relative; display: block; aspect-ratio: 4/3; overflow: hidden; background: var(--paper-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.85s var(--ease); }
.property-card:hover .card-media img { transform: scale(1.06); }
.card-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(12,28,24,0.18)); opacity: 0; transition: opacity 0.45s var(--ease); pointer-events: none; }
.property-card:hover .card-media::after { opacity: 1; }

.card-badge {
  position: absolute; left: 0.85rem; top: 0.85rem;
  background: rgba(255,255,255,0.94); backdrop-filter: blur(8px);
  padding: 0.4rem 0.75rem; border-radius: 999px;
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink);
}
.save-button {
  position: absolute; right: 0.7rem; top: 0.7rem;
  width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(8px);
  color: var(--ink); cursor: pointer; display: grid; place-items: center;
  transition: background 0.25s, transform 0.3s var(--ease), color 0.25s;
}
.save-button svg { width: 18px; height: 18px; transition: transform 0.35s var(--ease); }
.save-button:hover { transform: scale(1.1); }
.save-button.is-saved { color: var(--clay); background: var(--white); }
.save-button.is-saved svg { fill: var(--clay); }
.save-button:active svg { transform: scale(0.8); }

.card-body { padding: 1.1rem 1.15rem 1.3rem; }
.card-location {
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
  font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); font-weight: 600;
}
.card-location .pin { display: inline-flex; align-items: center; gap: 0.3rem; }
.card-body h3 { font-family: var(--serif); font-weight: 400; font-size: 1.4rem; line-height: 1.15; margin: 0.6rem 0 0.9rem; letter-spacing: -0.018em; }
.card-body h3 a { text-decoration: none; background-image: linear-gradient(var(--ink), var(--ink)); background-size: 0% 1.5px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size 0.45s var(--ease); }
.card-body h3 a:hover { background-size: 100% 1.5px; }
.card-facts {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1.2rem;
  color: var(--ink-2); font-size: 0.8rem; font-weight: 500;
  padding-bottom: 0.95rem; border-bottom: 1px solid var(--line-2);
}
.card-facts span { display: inline-flex; align-items: center; gap: 0.35rem; }
.card-facts svg { color: var(--muted); }
.card-price { display: flex; align-items: baseline; justify-content: space-between; gap: 0.6rem; padding-top: 0.95rem; }
.card-price strong { font-family: var(--serif); font-size: 1.4rem; font-weight: 400; color: var(--ink); letter-spacing: -0.01em; }
.card-price strong.on-request { font-style: italic; color: var(--muted); font-size: 1.1rem; }
.card-price span { font-size: 0.72rem; color: var(--muted); }

/* Empty + load more */
.empty-state { text-align: center; padding: 4.5rem 1rem; background: var(--white); border-radius: var(--r-xl); border: 1px solid var(--line-2); }
.empty-icon { display: inline-grid; place-items: center; color: var(--muted); margin-bottom: 0.5rem; }
.empty-state h3 { font-family: var(--serif); font-weight: 400; font-size: 1.7rem; margin: 0.5rem 0 0.5rem; letter-spacing: -0.015em; }
.empty-state p { color: var(--muted); margin: 0 auto 1.5rem; max-width: 28rem; }
.load-more-wrap { display: flex; justify-content: center; padding: 2.75rem 0 0; }

/* =========================== DISTRICTS ========================== */
.district-section { background: var(--ink); color: var(--white); padding: 5rem 0; position: relative; overflow: hidden; }
.district-section .eyebrow-light::before { background: var(--sand-soft); opacity: 0.55; }
.district-section .section-heading-center h2 em { color: var(--sand-soft); }
.district-section .section-heading-center > p { color: #b8c1bd; }
.district-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.district-card {
  position: relative; display: block; min-height: 18rem; overflow: hidden;
  border-radius: var(--r-lg); color: var(--white); text-decoration: none; isolation: isolate;
}
.district-card img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; filter: saturate(0.92); transition: transform 0.9s var(--ease); }
.district-shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, transparent 30%, rgba(8,20,17,0.88)); }
.district-card:hover img { transform: scale(1.07); }
.district-body { position: absolute; z-index: 2; left: 1.5rem; right: 4rem; bottom: 1.5rem; }
.district-index { font-family: var(--serif); font-size: 0.85rem; color: var(--sand-soft); letter-spacing: 0.08em; }
.district-body strong { display: block; font-family: var(--serif); font-size: 2.2rem; font-weight: 400; line-height: 1; letter-spacing: -0.022em; margin: 0.45rem 0 0.4rem; }
.district-body small { font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--sand-soft); display: block; }
.district-meta { display: block; margin-top: 0.7rem; font-size: 0.85rem; color: rgba(232,214,173,0.85); max-width: 22rem; font-family: var(--sans); line-height: 1.45; }
.district-arrow {
  position: absolute; right: 1.25rem; bottom: 1.5rem; z-index: 2;
  width: 2.75rem; height: 2.75rem; border-radius: 50%;
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.3);
  display: grid; place-items: center; color: var(--white);
  transition: background 0.4s var(--ease), transform 0.4s var(--ease);
}
.district-card:hover .district-arrow { background: var(--sand); color: var(--ink); transform: rotate(-45deg) scale(1.05); }

/* ============================ VALUES ============================ */
.values-section { padding: 5rem 0; background: var(--paper-2); }
.values-section .section-heading-center h2 em { color: var(--clay); }
.values-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.value-card {
  background: var(--white); border: 1px solid var(--line-2); border-radius: var(--r-lg);
  padding: 1.75rem 1.5rem; transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.value-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.value-icon {
  display: inline-grid; place-items: center; width: 3.25rem; height: 3.25rem;
  border-radius: 0.9rem; background: var(--ink); color: var(--sand-soft); margin-bottom: 1.1rem;
}
.value-card h3 { font-family: var(--serif); font-weight: 500; font-size: 1.3rem; margin: 0 0 0.5rem; letter-spacing: -0.015em; }
.value-card p { color: var(--muted); margin: 0; font-size: 0.92rem; line-height: 1.55; }

/* ============================ SERVICE =========================== */
.service-section { background: var(--paper); padding: 5rem 0; }
.service-grid { display: grid; gap: 2.5rem; }
.service-intro h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(2.4rem, 8vw, 4rem); letter-spacing: -0.038em; line-height: 0.98; margin: 0.8rem 0 1rem; }
.service-intro h2 em { color: var(--clay); }
.service-intro > p { color: var(--muted); max-width: 30rem; }
.service-intro .btn { margin-top: 1.5rem; }
.service-steps { list-style: none; padding: 0; margin: 0; }
.service-steps li {
  display: grid; grid-template-columns: 4rem 1fr; gap: 1.2rem;
  padding: 1.7rem 0; border-top: 1px solid var(--line);
}
.service-steps li:last-child { border-bottom: 1px solid var(--line); }
.step-num { font-family: var(--serif); font-size: 1rem; color: var(--sand); letter-spacing: 0.05em; }
.service-steps strong { font-family: var(--serif); font-size: 1.4rem; font-weight: 400; letter-spacing: -0.015em; }
.service-steps p { color: var(--muted); margin: 0.45rem 0 0; font-size: 0.93rem; }

/* =========================== TESTIMONIAL ======================== */
.testimonial-section { background: var(--ink-2); color: var(--white); padding: 5rem 0; position: relative; overflow: hidden; }
.testimonial-section::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 85% 15%, rgba(201,163,93,0.16), transparent 50%); pointer-events: none; }
.testimonial-inner { position: relative; text-align: center; max-width: 48rem; margin-inline: auto; }
.quote-mark { display: block; font-family: var(--serif); font-size: 6rem; line-height: 0.6; color: var(--sand); margin-bottom: 1rem; }
.testimonial-inner .eyebrow { justify-content: center; }
.testimonial-inner .eyebrow::before { display: none; }
.testimonial-inner blockquote {
  font-family: var(--serif); font-weight: 300; font-size: clamp(1.5rem, 4.5vw, 2.2rem);
  line-height: 1.35; letter-spacing: -0.02em; margin: 1.2rem 0 2rem;
}
.testimonial-author { display: inline-flex; align-items: center; gap: 0.85rem; }
.avatar {
  width: 3rem; height: 3rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--sand); color: var(--ink); font-family: var(--serif); font-weight: 500; font-size: 0.95rem;
}
.author-meta { text-align: left; display: grid; gap: 0.2rem; }
.author-meta strong { font-family: var(--sans); font-size: 0.95rem; font-weight: 600; }
.author-meta small { color: var(--sand-soft); font-size: 0.78rem; }

/* ============================== CTA ============================= */
.cta-section { background: var(--ink); color: var(--white); padding: 5rem 0; position: relative; overflow: hidden; }
.cta-glow { position: absolute; inset: 0; background: radial-gradient(circle at 75% 25%, rgba(201,163,93,0.2), transparent 50%); pointer-events: none; }
.cta-inner { position: relative; text-align: center; max-width: 42rem; margin-inline: auto; }
.cta-inner .eyebrow { justify-content: center; }
.cta-inner .eyebrow::before { display: none; }
.cta-inner h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(2.2rem, 7vw, 3.6rem); letter-spacing: -0.038em; line-height: 0.98; margin: 0.8rem 0 1rem; }
.cta-inner h2 em { color: var(--sand-soft); }
.cta-inner > p { color: #c5cec9; margin: 0 0 2rem; }
.cta-form { display: flex; flex-direction: column; gap: 0.75rem; max-width: 30rem; margin-inline: auto; }
.cta-field input {
  width: 100%; min-height: 3.3rem; padding: 0 1.3rem; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.28); background: rgba(255,255,255,0.08); color: var(--white);
  transition: border-color 0.25s, background 0.25s;
}
.cta-field input::placeholder { color: rgba(255,255,255,0.55); }
.cta-field input:focus { border-color: var(--sand); background: rgba(255,255,255,0.14); outline: none; }
.cta-form .btn { width: 100%; }
.cta-feedback { color: var(--sand-soft); font-size: 0.92rem; margin-top: 1rem; }

/* ============================ FOOTER =========================== */
.site-footer { background: #081511; color: var(--white); padding: 4rem 0 5rem; }
.footer-top { display: flex; flex-direction: column; gap: 2rem; padding-bottom: 3rem; border-bottom: 1px solid rgba(255,255,255,0.12); }
.footer-brand { display: flex; align-items: center; gap: 0.85rem; }
.brand-mark-light { background: var(--ink-3); color: var(--sand-soft); }
.footer-brand strong { display: block; font-family: var(--serif); font-size: 1.2rem; font-weight: 500; }
.footer-brand small { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: #8f9b96; }
.footer-tagline { font-family: var(--serif); font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 300; line-height: 1; letter-spacing: -0.03em; margin: 0; }
.footer-tagline em { color: var(--sand-soft); }
.footer-grid { display: grid; gap: 2rem; padding: 2.5rem 0; }
.footer-col { display: grid; align-content: start; gap: 0.65rem; }
.footer-col strong { font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--sand); font-weight: 700; margin-bottom: 0.3rem; }
.footer-col a { color: #b1bab5; text-decoration: none; font-size: 0.9rem; transition: color 0.25s, padding-left 0.25s var(--ease); }
.footer-col a:hover { color: var(--white); padding-left: 0.3rem; }
.footer-bottom { display: flex; flex-direction: column; gap: 0.5rem; color: #7c887f; font-size: 0.78rem; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.75rem; }

/* ======================= MOBILE BOTTOM NAV ===================== */
.mobile-bottom-nav {
  position: fixed; z-index: 45; bottom: 0; left: 0; right: 0;
  padding: 0.4rem max(0.5rem, env(safe-area-inset-right)) calc(0.4rem + env(safe-area-inset-bottom)) max(0.5rem, env(safe-area-inset-left));
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.3rem;
  background: rgba(255,255,255,0.95); border-top: 1px solid var(--line);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.mobile-bottom-nav a {
  display: grid; place-items: center; gap: 0.2rem; padding: 0.4rem 0.2rem;
  color: var(--muted); font-size: 0.58rem; font-weight: 500; text-decoration: none;
  border-radius: var(--r-sm); transition: color 0.25s;
}
.mobile-bottom-nav a.is-active { color: var(--ink); }
.mobile-bottom-nav a.is-active svg { transform: scale(1.05); }

/* ========================= FAV DRAWER ========================== */
.fav-drawer { position: fixed; inset: 0; z-index: 80; }
.fav-overlay { position: absolute; inset: 0; background: rgba(8,21,17,0.6); backdrop-filter: blur(3px); opacity: 0; transition: opacity 0.35s var(--ease); }
.fav-drawer[data-open="true"] .fav-overlay { opacity: 1; }
.fav-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(92vw, 27rem);
  background: var(--paper); display: flex; flex-direction: column;
  transform: translateX(102%); transition: transform 0.45s var(--ease);
  box-shadow: var(--shadow-lg);
}
.fav-drawer[data-open="true"] .fav-panel { transform: translateX(0); }
.fav-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 1.4rem 1.4rem 1.1rem; border-bottom: 1px solid var(--line); }
.fav-header h2 { font-family: var(--serif); font-size: 1.5rem; font-weight: 400; margin: 0.3rem 0 0; letter-spacing: -0.015em; }
.fav-list { overflow-y: auto; padding: 0.8rem 1rem 2rem; display: grid; gap: 0.75rem; align-content: start; }
.fav-list:empty + .fav-empty { display: block; }
.fav-empty { display: none; text-align: center; padding: 3rem 1.5rem; color: var(--muted); }
.fav-empty .empty-icon { color: var(--sand); margin-bottom: 0.75rem; }
.fav-empty p { margin: 0; font-size: 0.92rem; max-width: 18rem; margin-inline: auto; }
.fav-item { display: flex; gap: 0.85rem; padding: 0.6rem; background: var(--white); border-radius: var(--r); border: 1px solid var(--line-2); }
.fav-item img { width: 4.5rem; height: 4.5rem; object-fit: cover; border-radius: var(--r-sm); flex-shrink: 0; }
.fav-item-body { flex: 1; min-width: 0; }
.fav-item-body strong { font-family: var(--serif); font-size: 0.98rem; font-weight: 400; display: block; line-height: 1.2; letter-spacing: -0.01em; }
.fav-item-body small { color: var(--muted); font-size: 0.72rem; }
.fav-item-body .fav-item-price { display: block; margin-top: 0.35rem; color: var(--ink); font-weight: 600; font-size: 0.85rem; }
.fav-item-remove { background: none; border: 0; color: var(--muted); cursor: pointer; align-self: flex-start; padding: 0.25rem; border-radius: 50%; transition: color 0.25s, background 0.25s; }
.fav-item-remove:hover { color: var(--clay); background: var(--paper-2); }

/* ============================ TOAST ============================ */
.toast {
  position: fixed; bottom: calc(5rem + env(safe-area-inset-bottom)); left: 50%;
  transform: translateX(-50%) translateY(1rem);
  background: var(--ink); color: var(--white); padding: 0.85rem 1.3rem; border-radius: 999px;
  font-size: 0.85rem; font-weight: 500; box-shadow: var(--shadow); z-index: 90;
  opacity: 0; transition: opacity 0.35s var(--ease), transform 0.35s var(--ease); pointer-events: none;
  display: inline-flex; align-items: center; gap: 0.5rem; max-width: calc(100vw - 2rem);
}
.toast[data-visible="true"] { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ========================= SCROLL REVEAL ======================= */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.85s var(--ease), transform 0.85s var(--ease); }
.reveal[data-revealed="true"] { opacity: 1; transform: translateY(0); }

/* ====================================================================
   BREAKPOINTS — tablet / desktop
   ==================================================================== */
@media (min-width: 48rem) {
  :root { --gutter: 2rem; --header-h: 5.25rem; }
  body { padding-bottom: 0; }

  .desktop-nav { display: flex; }
  .header-actions > .btn { display: inline-flex; }
  .menu-button, .mobile-menu, .mobile-bottom-nav { display: none; }

  .hero-frame { inset: 2rem; }
  .hero-content { padding: 4rem 0 2rem; }
  .hero h1 { font-size: clamp(4rem, 9vw, 6.4rem); }
  .hero-copy { font-size: 1.15rem; }
  .hero-scroll { display: flex; }
  .hero-stats-wrap { padding: 2rem 0 4rem; }

  .featured-section { padding: 7rem 0 4rem; }
  .featured-head { grid-template-columns: 1.4fr 1fr; align-items: end; }
  .featured-grid { grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }

  .search-section { padding: 7rem 0 5rem; }
  .filter-bar { grid-template-columns: 1.6fr repeat(3, 1fr) auto; align-items: end; padding: 1.1rem; gap: 0.85rem; }
  .filter-submit { width: auto; align-self: stretch; }
  .filter-reset { grid-column: 1 / -1; }

  .section-heading { grid-template-columns: 1.5fr 1fr; align-items: end; max-width: none; }
  .section-heading-center { grid-template-columns: 1fr; justify-items: center; max-width: 44rem; }

  .property-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem; }

  .district-section { padding: 7rem 0; }
  .district-grid { grid-template-columns: 1.1fr 1fr; grid-template-rows: repeat(2, 19rem); gap: 1rem; }
  .district-card-lg { grid-row: 1 / 3; min-height: 0; }
  .district-card { min-height: 0; }
  .district-body strong { font-size: 2.6rem; }
  .district-card-lg .district-body strong { font-size: 3.2rem; }

  .values-section { padding: 7rem 0; }
  .values-grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }

  .service-section { padding: 7rem 0; }
  .service-grid { grid-template-columns: 1fr 1fr; gap: 4rem; }

  .testimonial-section { padding: 7rem 0; }

  .cta-section { padding: 7rem 0; }
  .cta-form { flex-direction: row; }
  .cta-form .btn { width: auto; }

  .site-footer { padding: 5.5rem 0 4.5rem; }
  .footer-top { flex-direction: row; align-items: center; justify-content: space-between; }
  .footer-grid { grid-template-columns: repeat(3, 1fr); gap: 3rem; }
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}

@media (min-width: 72rem) {
  .property-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
  .values-grid { grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
  .district-body strong { font-size: 3rem; }
  .district-card-lg .district-body strong { font-size: 3.6rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .reveal-stagger { opacity: 1; transform: none; }
  .property-card { opacity: 1; transform: none; animation: none; }
  .hero-media img { animation: none; transform: scale(1); }
  .pulse-dot, .hero-scroll-line::after { animation: none; }
}

/* Print */
@media print {
  .site-header, .mobile-bottom-nav, .site-footer, .cta-section, .testimonial-section, .fav-drawer, .toast, .grain { display: none !important; }
  body { background: white; padding: 0; }
  .property-card, .featured-card { box-shadow: none; border: 1px solid #ccc; }
}

/* ---- Detail page fixes ---- */
body.detail-page { padding-bottom: 0; }
.detail-actions > .btn { display: inline-flex; }
