/* Aleksey Julanov — Calgary Real Estate */

/* Fluid scaling: every size below is in rem. 1rem stays 16px up to a 1440px-wide screen
   (the design width: 1440 / 16 = 90), then grows with the viewport so the whole layout
   enlarges as one unit. The 100vh / 45 term caps growth on very wide, short screens.
   vw sizes are written as min(Xvw, X*0.9rem). Up to 1440px and on normal wide screens the
   two are equal (1vw = 0.9rem there), so nothing changes; on ultrawides the rem side takes
   over so vw-based sizes respect the height cap like everything else. */
html { font-size: max(16px, min(100vw / 90, 100vh / 45)); }
:root {
  --dark: #17191C;
  --black: #101114;
  --gold: #B18A4A;
  --gold-lt: #DFC18A;
  --gold-tab: #D9BC88;
  --gold-btn: #946F37;      /* gold dark enough for white text (AA) */
  --gold-text: #8A6631;     /* gold for text on light backgrounds (AA) */
  --white: #FFFFFF;
  --offwhite: #F6F5F3;
  --text: #252525;
  --muted: #666666;
  --line: #E4E1DB;
  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --script: 'Great Vibes', cursive;
  --gutter: clamp(1rem, min(5.8vw, 5.22rem), 6rem);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* Never allow sideways panning (e.g. while a slide-in animation sits just off-screen).
   clip, unlike hidden, doesn't create a scroll container, so position: sticky keeps working. */
html, body { overflow-x: clip; overscroll-behavior-x: none; }
@supports not (overflow: clip) { html, body { overflow-x: hidden; } }
body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.9375rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-weight: 500; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold-lt); outline-offset: 0.1875rem; }
.light-focus :focus-visible, .on-light :focus-visible { outline-color: var(--gold-text); }
[hidden] { display: none !important; }
.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;
}
.skip-link {
  position: absolute; left: 1rem; top: -3.75rem; z-index: 200;
  background: var(--gold-lt); color: var(--black); padding: 0.625rem 1rem; font-size: 0.8125rem;
}
.skip-link:focus { top: 0.75rem; }

.icon { width: 1em; height: 1em; flex: none; display: inline-block; vertical-align: middle; }
.icon svg { width: 100%; height: 100%; display: block; }

/* ---------- Image placeholder (shows the expected filename if the image is missing) ---------- */
.ph { position: relative; background: #E2E0DC; overflow: hidden; }
.ph > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph.img-error > img { visibility: hidden; }
.ph.img-error::before {
  content: attr(data-label);
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 0.75rem; text-align: center;
  font: 500 0.8125rem/1.3 var(--sans);
  letter-spacing: 0.04em;
  color: #7C7871;
  background: #E2E0DC;
}

/* ---------- Type helpers ---------- */
.eyebrow {
  display: block;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--muted);
}
.on-dark .eyebrow, .eyebrow.on-dark { color: rgba(255,255,255,0.82); }
.h-section {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.875rem, min(2.4vw, 2.16rem), 2.375rem);
  line-height: 1;
  letter-spacing: -0.005em;
  color: var(--text);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.625rem;
  min-height: 2.625rem; padding: 0.625rem 1.375rem;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  border: 1px solid transparent; border-radius: 0; cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn .icon { font-size: 0.9375rem; transition: transform .25s var(--ease); }
.btn:hover .icon-arrow { transform: translateX(0.1875rem); }
.btn-gold { background: var(--gold-btn); color: var(--white); }
.btn-gold:hover { background: #7E5C2A; }
.btn-gold-lt { background: var(--gold-tab); color: var(--black); }
.btn-gold-lt:hover { background: var(--gold-lt); }
.btn-outline { border-color: var(--gold); color: var(--white); background: transparent; }
.btn-outline:hover { border-color: var(--gold-lt); color: var(--gold-lt); }
.btn-outline .icon { color: var(--gold-lt); }
.btn-outline-dark { border-color: var(--gold-text); color: var(--gold-text); background: transparent; }
.btn-outline-dark:hover { background: var(--gold-text); color: var(--white); }

.link-gold {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold-text);
  padding-bottom: 0.25rem;
  background: linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat;
  transition: background-size .3s var(--ease);
}
.link-gold:hover { background-size: 40% 1px; }
.link-gold .icon { font-size: 0.8125rem; }

/* ---------- Header ---------- */
.site-header {
  /* Always pinned to the top. Larger at the top of the page; shrinks to the compact size once scrolling starts (.is-stuck) */
  --nav-h: 5.25rem; --logo-h: 3.875rem; --nav-fs: 0.75rem; --phone-h: 2.625rem; --phone-fs: 0.875rem;
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0 var(--gutter);
  /* Background is a plain colour in both states (not a gradient) so it fades smoothly
     between them instead of going see-through mid-transition */
  background-color: rgba(16,17,20,0.62);
  backdrop-filter: blur(0.625rem);
  -webkit-backdrop-filter: blur(0.625rem);
  color: var(--white);
  animation: navDown .8s var(--ease) both;
  transition: height .25s var(--ease), background-color .25s var(--ease), box-shadow .25s var(--ease);
}
.site-header.is-stuck {
  --nav-h: 4.25rem; --logo-h: 3.25rem; --nav-fs: 0.6875rem; --phone-h: 2.375rem; --phone-fs: 0.8125rem;
  background-color: rgba(16,17,20,0.97);
  box-shadow: 0 0.5rem 1.75rem rgba(0,0,0,0.22);
}
.site-header.is-stuck + .mobile-nav { top: 4.25rem; }
@keyframes navDown { from { transform: translateY(-100%); opacity: 0; } to { transform: none; opacity: 1; } }
.brand { display: block; flex: none; }
.brand img { height: var(--logo-h); width: auto; transition: height .25s var(--ease); }
.main-nav { flex: 1; display: flex; justify-content: center; gap: clamp(1.125rem, min(2.5vw, 2.25rem), 2.375rem); }
.main-nav a {
  position: relative; padding: 0.375rem 0;
  font-size: var(--nav-fs); font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  transition: color .25s var(--ease), font-size .25s var(--ease);
}
.main-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--gold-lt);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.main-nav a:hover { color: var(--white); }
.main-nav a:hover::after, .main-nav a[aria-current="page"]::after { transform: scaleX(1); }
.main-nav a[aria-current="page"] { color: var(--white); }
.header-phone {
  flex: none;
  display: inline-flex; align-items: center; gap: 0.75rem;
  height: var(--phone-h); padding: 0 1.375rem;
  border: 1px solid var(--gold);
  background: rgba(16,17,20,0.35);
  font-size: var(--phone-fs); font-weight: 500; letter-spacing: 0.12em;
  transition: border-color .25s var(--ease), color .25s var(--ease), height .25s var(--ease), font-size .25s var(--ease);
}
.header-phone .icon { color: var(--gold-lt); font-size: 0.9375rem; }
.header-phone:hover { border-color: var(--gold-lt); color: var(--gold-lt); }
.menu-toggle {
  display: none; margin-left: auto;
  width: 2.75rem; height: 2.75rem; padding: 0.625rem;
  background: none; border: 0; color: var(--white); cursor: pointer;
}
.menu-toggle .icon { font-size: 1.5rem; }
.mobile-nav {
  display: none;
  position: fixed; top: 5.25rem; left: 0; right: 0; z-index: 49;
  max-height: calc(100vh - 4rem); overflow-y: auto;
  background: var(--black);
  padding: 0.5rem var(--gutter) 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.mobile-nav a {
  display: block; padding: 0.875rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--white);
}
.mobile-nav a[aria-current="page"] { color: var(--gold-lt); }
.mobile-nav .btn { display: flex; margin-top: 1.25rem; width: 100%; padding: 0.75rem 1.375rem; border: 1px solid var(--gold); }
.mobile-nav.open { display: block; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: clamp(35rem, min(41vw, 36.9rem), 48.75rem);
  background: var(--black) center 26% / cover no-repeat;
  color: var(--white);
  overflow: visible; /* lets the search suggestions drop below; the portrait layer clips itself */
}
/* hero.mp4 plays behind the overlay; hero.webp is only loaded if the video can't play */
.hero-video {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 26%;
  pointer-events: none;
}
.hero-video.is-hidden { display: none; }
.hero.use-image { background-image: url("/hero.webp"); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg, rgba(12,12,14,0.62) 0%, rgba(12,12,14,0.44) 28%, rgba(12,12,14,0.16) 48%, rgba(12,12,14,0) 64%),
    linear-gradient(0deg, rgba(12,12,14,0.35) 0%, rgba(12,12,14,0) 40%),
    rgba(12,12,14,0.2); /* slight even darkening across the whole image */
}
.hero-figure { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.hero-guy {
  position: absolute;
  right: 17.2%;
  bottom: -8.6%;
  height: 87.75%;
  width: auto; max-width: none;
  object-fit: contain;
}
.hero-signature {
  position: absolute; right: 3%; bottom: 7.5%;
  text-align: center; color: var(--gold-lt);
}
.hero-signature .sig {
  display: block;
  font-family: var(--script);
  font-size: clamp(2.125rem, min(3.2vw, 2.88rem), 3.125rem);
  line-height: 1;
  transform: rotate(-4deg);
  text-shadow: 0 2px 0.875rem rgba(0,0,0,0.45);
}
.hero-signature .sig-sub {
  display: block; margin-top: 0.625rem; text-transform: uppercase;
  font-size: 0.59375rem; letter-spacing: 0.42em; color: rgba(255,255,255,0.85);
}
.hero-content {
  position: relative; z-index: 3;
  height: 100%;
  display: flex; flex-direction: column; justify-content: center;
  padding: 5.25rem var(--gutter) 2rem; /* with .hero-lead's top margin: headline sits high, paragraph + search lower */
  max-width: calc(47.5rem + var(--gutter) * 2);
}
.hero-content .eyebrow { text-shadow: 0 1px 0.625rem rgba(0,0,0,0.5); color: rgba(255,255,255,0.85); margin-bottom: 0.875rem; font-size: 0.6875rem; letter-spacing: 0.42em; }
.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.5rem, min(4.4vw, 3.96rem), 4.75rem);
  line-height: 0.87;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  text-shadow: 0 2px 1.5rem rgba(0,0,0,0.3);
}
.hero h1 .accent { color: var(--gold-lt); }
.hero h1 .nowrap { white-space: nowrap; }
.hero h1 sup { font-size: 0.32em; vertical-align: top; position: relative; top: 0.35em; margin-left: 0.04em; }
.hero-lead {
  margin-top: 2.875rem; max-width: 28.75rem;
  font-size: clamp(0.9375rem, min(1.25vw, 1.125rem), 1.125rem); line-height: 1.32;
  color: rgba(255,255,255,0.94);
  text-shadow: 0 1px 0.75rem rgba(0,0,0,0.45);
}

/* Property search (filters Aleksey's own listings only) */
.search {
  margin-top: 2.125rem;
  display: flex; width: 100%; max-width: 47.5rem; height: 3rem;
  box-shadow: 0 0.625rem 1.875rem rgba(0,0,0,0.28);
}
.search fieldset { display: flex; margin: 0; padding: 0; border: 0; }
.search-tab { position: relative; display: flex; }
.search-tab input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.search-tab span {
  display: flex; align-items: center; justify-content: center;
  width: 4.625rem; height: 100%;
  background: rgba(23,25,28,0.92);
  border-right: 1px solid rgba(255,255,255,0.08);
  font-size: 0.8125rem; font-weight: 500; color: var(--white);
  transition: background-color .2s var(--ease), color .2s var(--ease);
  pointer-events: none;
}
.search-tab:hover span { background: #24272B; }
.search-tab input:checked + span { background: var(--gold-tab); color: var(--black); }
.search-tab input:focus-visible + span { outline: 2px solid var(--gold-lt); outline-offset: -0.25rem; }
.search-input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; padding: 0 1.125rem;
  background: var(--white); color: var(--text);
  font-size: 0.8125rem;
}
.search-input::placeholder { color: #7A7A7A; }
.search-input:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.search-btn {
  width: 3.375rem; height: 100%; flex: none;
  display: flex; align-items: center; justify-content: center;
  border: 0; background: var(--gold-tab); color: var(--black); cursor: pointer;
  transition: background-color .2s var(--ease);
}
.search-btn .icon { font-size: 1.25rem; }
.search-btn:hover { background: var(--gold-lt); }
.search-btn:focus-visible { outline: 2px solid var(--white); outline-offset: -0.25rem; }

/* ---------- Featured listings ---------- */
.featured { background: #F8F8F6; padding: 1.875rem var(--gutter) 1.25rem; }
.featured-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; }
.featured-head .eyebrow { margin-bottom: 0.375rem; }
.featured-head .link-gold { margin-top: 2px; }
.listing-grid {
  margin-top: 0.875rem;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(0.875rem, min(1.55vw, 1.395rem), 1.5rem);
}
/* Homepage: Aleksey's listings scroll sideways, 4 visible on desktop (2 tablet, 1 phone) */
.featured-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 0.875rem; }
.carousel-nav { display: flex; gap: 0.5rem; }
.carousel-btn {
  width: 2.75rem; height: 2.75rem; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--black); background: var(--black); color: var(--gold-lt); cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), opacity .25s var(--ease);
}
.carousel-btn .icon { font-size: 1.25rem; }
.carousel-dots { display: none; }

/* Search type-ahead dropdown (assets/autocomplete.js) */
.ac-wrap { position: relative; }
.ac-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 0.375rem); z-index: 60;
  margin: 0; padding: 0.375rem 0; list-style: none;
  max-height: min(24rem, 60vh); overflow-y: auto;
  background: var(--white); color: var(--text); text-align: left;
  border: 1px solid var(--line); box-shadow: 0 1rem 2.5rem rgba(16,17,20,0.22);
}
.ac-group { padding: 0.625rem 1rem 0.25rem; font-size: 0.625rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.ac-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 1rem; cursor: pointer; }
.ac-item .icon { font-size: 1.125rem; color: var(--gold); flex: none; }
.ac-item:hover, .ac-item.is-active { background: var(--offwhite); }
.ac-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ac-label { font-size: 0.9375rem; color: var(--black); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-label mark { background: none; color: var(--gold-text); font-weight: 600; }
.ac-sub { font-size: 0.75rem; color: var(--muted); }
.ac-meta { flex: none; font-size: 0.75rem; color: var(--muted); white-space: nowrap; }
br.m-only { display: none; }
.spec-unit { display: none; }
.carousel-btn:hover:not(:disabled) { background: var(--gold-tab); border-color: var(--gold-tab); color: var(--black); }
.carousel-btn:disabled { background: transparent; border-color: #CFCBC4; color: #B9B5AE; cursor: default; }
.carousel-btn:focus-visible { outline: 2px solid var(--gold-text); outline-offset: 2px; }
.listing-grid.is-carousel {
  --per-view: 4;
  grid-template-columns: none; grid-auto-flow: column;
  grid-auto-columns: calc((100% - (var(--per-view) - 1) * clamp(0.875rem, min(1.55vw, 1.395rem), 1.5rem)) / var(--per-view));
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; overscroll-behavior-x: contain;
  padding-bottom: 0.25rem; outline: none;
}
.listing-grid.is-carousel::-webkit-scrollbar { display: none; }
.listing-grid.is-carousel > * { scroll-snap-align: start; }
.listing-grid.is-carousel > .empty-state { grid-column: auto; grid-auto-columns: 100%; width: 100%; }
.sample-note { margin-top: 0.875rem; font-size: 0.71875rem; color: var(--muted); }

.card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.card:hover { border-color: #D6D1C7; box-shadow: 0 0.625rem 1.75rem rgba(16,17,20,0.07); }
.card-media { aspect-ratio: 16 / 9; }
.card-media > img { transition: transform .8s var(--ease); }
.card:hover .card-media > img { transform: scale(1.045); }
.card-badge {
  position: absolute; top: 0.75rem; left: 0.75rem; z-index: 2;
  padding: 0.25rem 0.5625rem;
  background: var(--gold-tab); color: var(--black);
  font-size: 0.59375rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
}
.card-badge.is-status { background: #9B2C22; color: var(--white); } /* Conditionally Sold / Pending / Sold, set in the dashboard */
.card-body { padding: 0.75rem 1.125rem 0.75rem; display: flex; flex-direction: column; flex: 1; }
.card-price { font-size: 1rem; font-weight: 500; color: var(--black); line-height: 1.3; }
.card-address { margin-top: 2px; font-size: 0.78125rem; color: var(--text); line-height: 1.4; }
.card-address a::after { content: ""; position: absolute; inset: 0; z-index: 3; }
.card-address a:focus-visible { outline: none; }
.card:focus-within { outline: 2px solid var(--gold-text); outline-offset: 2px; }
.card-hood { margin-top: 2px; font-size: 0.625rem; letter-spacing: 0.12em; text-transform: uppercase; color: #8C8C8C; }
.card-specs {
  margin-top: 0.5625rem; padding: 0; list-style: none;
  display: flex; flex-wrap: wrap; gap: 0.375rem 1.5rem;
  font-size: 0.71875rem; color: var(--text);
}
.card-specs li { display: inline-flex; align-items: center; gap: 0.5625rem; }
.card-specs .icon { font-size: 0.9375rem; color: #3A3A3A; }

/* ---------- Testimonials ---------- */
.testimonials { background: var(--black); color: var(--white); padding: clamp(2.75rem, min(4.6vw, 4.14rem), 4.25rem) var(--gutter); }
.testimonials-head { text-align: center; }
.testimonials-head .eyebrow { margin-bottom: 0.625rem; }
.testimonials .h-section { color: var(--white); }
.testimonial-grid {
  margin-top: clamp(1.625rem, min(3vw, 2.7rem), 2.5rem);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, min(2vw, 1.8rem), 1.75rem);
}
.testimonial {
  margin: 0; padding: 1.75rem 1.75rem 1.5rem;
  display: flex; flex-direction: column;
  border: 1px solid rgba(223,193,138,0.28);
  background: rgba(255,255,255,0.02);
}
.quote-mark { font-family: var(--serif); font-size: 4rem; line-height: 0.6; height: 1.875rem; color: var(--gold-lt); }
.testimonial blockquote { margin: 0.625rem 0 0; flex: 1; }
.testimonial blockquote p { font-family: var(--sans); font-size: 0.9375rem; line-height: 1.7; color: rgba(255,255,255,0.86); }
.testimonial figcaption { margin-top: 1.375rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.1); display: grid; gap: 0.1875rem; }
.t-name { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-lt); }
.t-detail { font-size: 0.75rem; color: rgba(255,255,255,0.6); }
/* Placeholder slots: dashed and muted so they read as "to be filled in" */
.testimonial.is-placeholder { border-style: dashed; border-color: rgba(255,255,255,0.22); }
.testimonial.is-placeholder blockquote p,
.testimonial.is-placeholder .t-name,
.testimonial.is-placeholder .t-detail { color: rgba(255,255,255,0.42); }
.testimonial.is-placeholder .quote-mark { color: rgba(223,193,138,0.45); }

/* ---------- Why work with ---------- */
.why { display: grid; grid-template-columns: minmax(0, 1fr) 34.7%; }
.why-main {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr); gap: clamp(1.5rem, min(2.6vw, 2.34rem), 2.5rem);
  padding: 1.875rem clamp(1.5rem, min(2.6vw, 2.34rem), 2.5rem) 1.625rem var(--gutter);
  background: #F4F4F2 url("/background.webp") center bottom / cover no-repeat;
}
/* Slight, even white wash over the mountain photo */
.why-main::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: rgba(255,255,255,0.18);
}
.why-main > * { position: relative; }
.why-intro .eyebrow { margin-bottom: 0.625rem; }
.why-intro .h-section { font-size: clamp(1.875rem, min(2.65vw, 2.385rem), 2.625rem); }
.why-intro p { margin-top: 1rem; max-width: 34em; font-size: 0.8125rem; line-height: 1.5; color: var(--text); }
.why-intro .btn { margin-top: 1.375rem; }
.values {
  margin: 0; padding: 0.25rem 0 0; list-style: none;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.125rem clamp(1.125rem, min(2vw, 1.8rem), 2rem);
  align-content: start;
}
.value .icon { font-size: 2.125rem; color: var(--gold); }
.value .icon svg { stroke-width: 1.1; }
.value h3 {
  margin-top: 0.625rem;
  font-family: var(--sans); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--black);
}
.value p { margin-top: 0.25rem; font-size: 0.71875rem; line-height: 1.38; color: var(--muted); max-width: 17em; }

.connect {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 40% 1fr; align-items: center;
  min-height: 15.5rem;
  background: var(--black); color: var(--white);
}
.connect-photo { align-self: stretch; position: relative; }
.connect-photo img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 15%;
  -webkit-mask-image: linear-gradient(90deg, #000 62%, transparent 100%);
          mask-image: linear-gradient(90deg, #000 62%, transparent 100%);
}
.connect-body { position: relative; padding: 1.875rem clamp(1.25rem, min(3.4vw, 3.06rem), 3.25rem) 1.625rem 0.5rem; }
.connect .eyebrow { color: rgba(255,255,255,0.8); margin-bottom: 0.625rem; }
.connect h2 { font-family: var(--serif); font-size: clamp(1.75rem, min(2.2vw, 1.98rem), 2.125rem); line-height: 1.02; white-space: nowrap; }
.connect p { margin-top: 0.75rem; font-size: 0.78125rem; line-height: 1.45; color: rgba(255,255,255,0.86); max-width: 20em; }
.connect-actions { margin-top: 1rem; display: grid; gap: 0.625rem; max-width: 12.8125rem; }
.connect-actions .btn { min-height: 2.0625rem; padding: 0.375rem 1rem; font-size: 0.6875rem; justify-content: flex-start; gap: 0.75rem; }
.connect-actions .btn-gold-lt { letter-spacing: 0.08em; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--black); color: rgba(255,255,255,0.72);
  padding: 2.25rem var(--gutter) 1.75rem;
  font-size: 0.78125rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2.5rem; }
.footer-top img { height: 3rem; width: auto; }
/* Brokerage logo sits on a white plate so the RE/MAX red and blue read correctly on the dark footer */
.footer-brand { display: flex; align-items: center; gap: 1.375rem; flex-wrap: wrap; }
.footer-divider { width: 1px; height: 2.5rem; background: rgba(255,255,255,0.55); }
/* RE/MAX logo shown in white; the box crops the wide transparent margins above and below the wordmark */
.footer-brokerage { display: flex; align-items: center; height: 1.75rem; overflow: hidden; }
.footer-top .footer-brokerage img { height: 4.625rem; width: auto; max-width: none; filter: brightness(0) invert(1); }
.footer-contact a:hover { color: var(--gold-lt); }
.footer-brokerage-address { margin-bottom: 0.375rem; color: rgba(255,255,255,0.72); }
.footer-contact { display: flex; flex-wrap: wrap; gap: 0.625rem 1.625rem; }
.footer-contact a { display: inline-flex; align-items: center; gap: 0.5rem; }
.footer-contact .icon { color: var(--gold-lt); }
.footer-legal { margin-top: 1.5rem; padding-top: 1.125rem; border-top: 1px solid rgba(255,255,255,0.08); font-size: 0.71875rem; color: rgba(255,255,255,0.5); }

/* ---------- Inner pages ---------- */
.page-hero {
  position: relative;
  padding: calc(5.25rem + clamp(3rem, min(6vw, 5.4rem), 5.5rem)) var(--gutter) clamp(2.75rem, min(5vw, 4.5rem), 4.5rem);
  overflow: hidden;
  background: var(--black) center 30% / cover no-repeat; /* hero.webp only via .use-image fallback */
  color: var(--white);
}
.page-hero.use-image { background-image: url("/hero.webp"); }
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(12,12,14,0.86), rgba(12,12,14,0.55));
}
.page-hero > * { position: relative; z-index: 2; }
.page-hero > .hero-video { position: absolute; z-index: 0; object-position: center 30%; }
.page-hero > .hero-video.is-hidden { display: none; }
.page-hero .eyebrow { color: rgba(255,255,255,0.82); margin-bottom: 0.875rem; }
.page-hero h1 { font-family: var(--serif); font-size: clamp(2.375rem, min(4.4vw, 3.96rem), 4rem); line-height: 0.95; }
.page-hero p { margin-top: 1rem; max-width: 36em; font-size: 1rem; color: rgba(255,255,255,0.88); }
.page-section { padding: clamp(3rem, min(6vw, 5.4rem), 5.5rem) var(--gutter); }
.page-section.alt { background: var(--offwhite); }
.prose { max-width: 45rem; }
.prose p + p { margin-top: 0.875rem; }
.prose h2 { font-family: var(--serif); font-size: clamp(1.75rem, min(2.6vw, 2.34rem), 2.375rem); line-height: 1.05; margin-bottom: 0.875rem; }
.cta-band { background: var(--black); color: var(--white); padding: clamp(2.5rem, min(5vw, 4.5rem), 4rem) var(--gutter); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.cta-band h2 { font-family: var(--serif); font-size: clamp(1.75rem, min(2.8vw, 2.52rem), 2.5rem); line-height: 1.05; }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.todo-note { margin-top: 1.125rem; padding: 0.75rem 0.875rem; border-left: 2px solid var(--gold); background: var(--offwhite); font-size: 0.78125rem; color: var(--muted); }

/* ---------- Buying / Selling ---------- */
.h-display { font-family: var(--serif); font-weight: 500; font-size: clamp(2rem, min(3.3vw, 2.97rem), 3.125rem); line-height: 1.02; color: var(--text); }
.split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(2rem, min(5.5vw, 4.95rem), 6rem); align-items: center; }
.split.split-top { align-items: start; }
.split-copy .eyebrow, .section-head .eyebrow { margin-bottom: 0.75rem; }
.split-copy p { margin-top: 1.125rem; max-width: 36em; font-size: 1rem; line-height: 1.7; }
.split-copy .h-display + p { margin-top: 1.375rem; }
.split-actions { margin-top: 1.875rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.split-copy .contact-list { margin-top: 1.625rem; }

.checklist-card {
  position: relative;
  background: var(--black); color: var(--white);
  padding: clamp(1.875rem, min(3.4vw, 3.06rem), 3rem);
  border-top: 2px solid var(--gold);
}
.checklist { margin: 1.375rem 0 0; padding: 0; list-style: none; display: grid; gap: 1.125rem; }
.checklist li { display: grid; grid-template-columns: 1.875rem 1fr; gap: 0.875rem; align-items: start; font-size: 0.9375rem; line-height: 1.5; color: rgba(255,255,255,0.82); }
.checklist strong { color: var(--white); font-weight: 600; }
.checklist .icon {
  width: 1.875rem; height: 1.875rem; padding: 0.4375rem;
  border: 1px solid rgba(223,193,138,0.5); border-radius: 50%;
  color: var(--gold-lt);
}

.section-head { max-width: 41.25rem; margin-bottom: clamp(1.875rem, min(3.6vw, 3.24rem), 3.25rem); }
#mls-search .section-head { max-width: none; } /* "Search Listings Across Southern Alberta" fits on one line */
.section-head p { margin-top: 0.875rem; font-size: 1rem; color: var(--muted); }

.timeline { margin: 0; padding: 0; list-style: none; counter-reset: none; }
.timeline > li {
  display: grid; grid-template-columns: clamp(4rem, min(9vw, 8.1rem), 8.125rem) minmax(0, 1fr); gap: clamp(1rem, min(3vw, 2.7rem), 2.5rem);
  padding: clamp(1.625rem, min(3vw, 2.7rem), 2.375rem) 0;
  border-top: 1px solid #DCD7CE;
}
.timeline > li:last-child { border-bottom: 1px solid #DCD7CE; }
.timeline .num { font-family: var(--serif); font-size: clamp(2.75rem, min(4.6vw, 4.14rem), 4.25rem); line-height: 0.85; color: var(--gold); }
.timeline h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.5rem, min(2.2vw, 1.98rem), 2rem); line-height: 1.1; color: var(--black); }
.timeline p { margin-top: 0.625rem; max-width: none; font-size: 0.96875rem; line-height: 1.7; color: #4A4A4A; }
.timeline .link-gold { margin-top: 1rem; }
.chips { margin: 1rem 0 0.25rem; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chips li { padding: 0.4375rem 0.875rem; background: var(--white); border: 1px solid #DCD7CE; font-size: 0.8125rem; color: var(--text); }

.consider-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line);
}
.consider { background: var(--white); padding: clamp(1.5rem, min(2.6vw, 2.34rem), 2.25rem); transition: background-color .3s var(--ease); }
.consider:hover { background: #FBFAF8; }
.consider .icon { font-size: 1.875rem; color: var(--gold); }
.consider .icon svg { stroke-width: 1.2; }
.consider h3 { margin-top: 1rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--black); }
.consider p { margin-top: 0.5rem; font-size: 0.90625rem; line-height: 1.6; color: var(--muted); }

.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, min(2vw, 1.8rem), 1.75rem); }
.pillar { background: var(--white); border: 1px solid var(--line); padding: clamp(1.75rem, min(3vw, 2.7rem), 2.625rem); transition: border-color .3s var(--ease), box-shadow .3s var(--ease); }
.pillar:hover { border-color: #D6D1C7; box-shadow: 0 0.75rem 1.875rem rgba(16,17,20,0.06); }
.pillar-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 3.5rem; height: 3.5rem; border: 1px solid var(--gold); border-radius: 50%;
  color: var(--gold-text); font-size: 1.5rem;
}
.pillar-icon .icon svg { stroke-width: 1.3; }
.pillar h3 { margin-top: 1.375rem; font-family: var(--serif); font-weight: 500; font-size: clamp(1.5rem, min(2vw, 1.8rem), 1.8125rem); line-height: 1.1; color: var(--black); }
.pillar p { margin-top: 0.75rem; font-size: 0.9375rem; line-height: 1.7; color: #4A4A4A; }

/* Mortgage calculator */
.calc { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); background: var(--white); border: 1px solid var(--line); }
.calc-inputs { padding: clamp(1.5rem, min(3vw, 2.7rem), 2.75rem); display: grid; gap: 1.375rem; align-content: start; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.875rem; }
.input-affix { position: relative; display: flex; align-items: center; }
.input-affix > span { position: absolute; left: 0.8125rem; font-size: 0.875rem; color: var(--muted); pointer-events: none; }
.field .input-affix input { padding-left: 1.625rem; }
.input-affix.suffix > span { left: auto; right: 0.8125rem; }
.field .input-affix.suffix input { padding-left: 0.75rem; padding-right: 1.875rem; }
.calc input[type="range"] { width: 100%; margin-top: 0.75rem; accent-color: var(--gold); }
.calc-results { background: var(--black); color: var(--white); padding: clamp(1.625rem, min(3vw, 2.7rem), 2.75rem); display: flex; flex-direction: column; }
.calc-payment { margin-top: 0.75rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.75rem; }
#mc-payment { font-family: var(--serif); font-size: clamp(2.75rem, min(4.4vw, 3.96rem), 4rem); line-height: 1; color: var(--gold-lt); }
.calc-per { font-size: 0.8125rem; color: rgba(255,255,255,0.7); }
.calc-rows { margin: 1.625rem 0 0; display: grid; }
.calc-rows > div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.6875rem 0; border-bottom: 1px solid rgba(255,255,255,0.1); font-size: 0.875rem; }
.calc-rows dt { color: rgba(255,255,255,0.65); }
.calc-rows dd { margin: 0; font-weight: 500; text-align: right; }
.calc-bar { margin-top: 1.5rem; height: 0.5rem; display: flex; background: rgba(255,255,255,0.08); overflow: hidden; }
.calc-bar span { display: block; height: 100%; transition: width .4s var(--ease); }
#mc-bar-p { background: var(--gold-lt); }
#mc-bar-i { background: rgba(255,255,255,0.3); }
.calc-legend { margin-top: 0.625rem; display: flex; gap: 1.125rem; font-size: 0.75rem; color: rgba(255,255,255,0.65); }
.calc-legend span::before { content: ""; display: inline-block; width: 0.5625rem; height: 0.5625rem; margin-right: 0.4375rem; vertical-align: -1px; }
.calc-legend .lg-p::before { background: var(--gold-lt); }
.calc-legend .lg-i::before { background: rgba(255,255,255,0.3); }
.calc-warning { margin-top: 1.25rem; padding: 0.6875rem 0.875rem; border-left: 2px solid var(--gold-lt); background: rgba(223,193,138,0.1); font-size: 0.8125rem; line-height: 1.5; color: rgba(255,255,255,0.88); }
.calc-note { margin-top: 1rem; max-width: 80ch; font-size: 0.75rem; line-height: 1.6; color: var(--muted); }

/* Properties page */
.filters {
  display: grid; grid-template-columns: 2fr repeat(4, minmax(0, 1fr)) auto; gap: 0.75rem; align-items: end;
  padding: 1.375rem; background: var(--white); border: 1px solid var(--line);
}
.field { display: flex; flex-direction: column; gap: 0.375rem; }
.field label, .field .label { font-size: 0.65625rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 2.625rem; padding: 0.5625rem 0.75rem;
  border: 1px solid #D5D1CA; border-radius: 0; background: var(--white); color: var(--text); font-size: 0.875rem;
}
.field textarea { min-height: 7.5rem; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: -1px; border-color: var(--gold); }
.results-meta { margin: 1.375rem 0 0.875rem; font-size: 0.8125rem; color: var(--muted); }
.properties-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(16.25rem, 1fr)); gap: 1.375rem; }
.empty-state { padding: 3rem 1.5rem; text-align: center; border: 1px dashed #D5D1CA; color: var(--muted); }
.empty-state strong { display: block; font-family: var(--serif); font-size: 1.625rem; font-weight: 500; color: var(--text); margin-bottom: 0.375rem; }

/* Property detail */
.detail { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(18.75rem, 1fr); gap: clamp(1.5rem, min(3.5vw, 3.15rem), 3.5rem); align-items: start; }
.gallery { position: relative; }
.gallery-main { aspect-ratio: 16 / 10; }
.gallery-main > img { transition: opacity .35s var(--ease); }
/* Loading state between photos: previous photo hidden, Aleksey's logo pulses on dark */
.gallery-main.is-loading { background: var(--black); }
.gallery-main.is-loading > img { opacity: 0; transition: none; }
.gallery-main.is-loading::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: url("/logo.png") center / min(48%, 18rem) auto no-repeat;
  animation: logoPulse 1.4s ease-in-out infinite;
}
@keyframes logoPulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.9; } }
.gallery-arrow {
  position: absolute; top: 50%; z-index: 2; transform: translateY(-50%);
  width: 3rem; height: 3rem; display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.35); border-radius: 50%;
  background: rgba(16,17,20,0.55); color: var(--white); cursor: pointer;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.gallery-arrow .icon { font-size: 1.5rem; }
.gallery-arrow.prev { left: 1rem; }
.gallery-arrow.next { right: 1rem; }
.gallery-arrow:hover { background: rgba(16,17,20,0.85); color: var(--gold-lt); border-color: var(--gold-lt); }
.gallery-arrow:focus-visible { outline: 2px solid var(--gold-lt); outline-offset: 2px; }
.gallery-count {
  position: absolute; right: 1rem; bottom: 1rem; z-index: 2;
  padding: 0.3125rem 0.75rem; background: rgba(16,17,20,0.7); color: var(--white);
  font-size: 0.75rem; letter-spacing: 0.08em;
}
/* one scrollable row of thumbnails, however many photos a listing has */
.gallery-thumbs { margin-top: 0.625rem; display: grid; grid-auto-flow: column; grid-auto-columns: 6.25rem; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.375rem; scroll-snap-type: x proximity; }
.gallery-thumbs button { scroll-snap-align: start; }
.gallery-thumbs button { padding: 0; border: 2px solid transparent; background: none; cursor: pointer; aspect-ratio: 4 / 3; }
.gallery-thumbs button[aria-current="true"] { border-color: var(--gold); }
.gallery-thumbs .ph { width: 100%; height: 100%; }
.gallery-thumbs .ph.img-error::before { font-size: 0.625rem; }
.detail-price { font-size: 1.875rem; font-weight: 500; color: var(--black); }
.detail-address { font-family: var(--serif); font-size: clamp(1.75rem, min(2.6vw, 2.34rem), 2.375rem); line-height: 1.05; margin-top: 0.375rem; }
.specs-table { margin-top: 1.5rem; width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.specs-table th, .specs-table td { text-align: left; padding: 0.6875rem 0; border-bottom: 1px solid var(--line); }
.specs-table th { width: 42%; font-weight: 500; color: var(--muted); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; }
.inquiry { background: var(--offwhite); border: 1px solid var(--line); padding: 1.625rem; display: grid; gap: 0.875rem; }

/* ---------- Live MLS® listings (REALTOR.ca DDF®) ---------- */
.card-brokerage {
  margin-top: auto; padding-top: 0.625rem;
  font-size: 0.6875rem; line-height: 1.35; color: #8C8C8C;
}
.card-specs + .card-brokerage { margin-top: 0.625rem; padding-top: 0.5rem; border-top: 1px solid var(--line); }
.card.is-skeleton { pointer-events: none; }
.card.is-skeleton .card-media { background: #ECEAE6; animation: skeleton 1.4s ease-in-out infinite; }
.card.is-skeleton .card-body span { display: block; height: 0.625rem; margin-top: 0.625rem; background: #ECEAE6; animation: skeleton 1.4s ease-in-out infinite; }
.card.is-skeleton .card-body span:first-child { width: 45%; height: 0.875rem; margin-top: 0.25rem; }
.card.is-skeleton .card-body span:nth-child(2) { width: 75%; }
.card.is-skeleton .card-body span:nth-child(3) { width: 55%; margin-bottom: 0.75rem; }
@keyframes skeleton { 50% { opacity: 0.55; } }
[aria-busy="true"] .card { opacity: 1; }

.mls-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; }
.mls-filters .field-q { grid-column: span 2; }
.filter-actions { grid-column: span 2; display: flex; gap: 0.625rem; justify-content: flex-end; }
.filter-actions .btn { min-height: 2.625rem; }
.filter-actions .btn .icon { font-size: 1rem; }

.pager { margin-top: 2rem; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.375rem; }
.pager-btn {
  min-width: 2.625rem; height: 2.625rem; padding: 0 0.75rem;
  border: 1px solid #D5D1CA; background: var(--white); color: var(--text);
  font-size: 0.8125rem; cursor: pointer;
  transition: border-color .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease);
}
.pager-btn:hover { border-color: var(--gold); }
.pager-btn[aria-current="page"] { background: var(--black); border-color: var(--black); color: var(--white); }
.pager-step { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.pager-gap { padding: 0 0.25rem; color: var(--muted); }
/* Properties page: switch between Aleksey's listings and all Alberta listings */
.view-switch-bar { padding: clamp(1.75rem, min(3vw, 2.7rem), 2.75rem) var(--gutter) 0; display: flex; justify-content: center; }
.section-head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: clamp(1.875rem, min(3.6vw, 3.24rem), 3.25rem); }
.section-head-row .section-head { margin-bottom: 0; }
.sort-field { min-width: 13.75rem; }
.view-switch-bar.is-all { background: var(--offwhite); } /* blend into the search section's background */
.view-switch { display: inline-flex; border: 1px solid var(--black); background: var(--white); }
.view-switch button {
  min-width: 12.5rem; height: 3rem; padding: 0 1.75rem;
  border: 0; background: transparent; color: var(--text); cursor: pointer;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
.view-switch button + button { border-left: 1px solid var(--black); }
.view-switch button:hover { background: var(--offwhite); }
.view-switch button[aria-selected="true"] { background: var(--black); color: var(--gold-lt); }
.view-switch button:focus-visible { outline: 2px solid var(--gold-text); outline-offset: 2px; }
.view-switch-bar + .page-section { padding-top: clamp(2rem, min(3.5vw, 3.15rem), 3.5rem); }
#mls-search { padding-top: clamp(2rem, min(3.5vw, 3.15rem), 3.5rem); }

.ddf-note { margin-top: 1.5rem; font-size: 0.75rem; color: var(--muted); }
.powered-by-realtor { margin-top: 2.5rem; padding-top: 1.75rem; border-top: 1px solid #DCD7CE; text-align: center; }
.powered-by-realtor a {
  display: inline-flex; align-items: baseline; gap: 0.5rem;
  font-size: 1.125rem; font-weight: 600; letter-spacing: 0.01em; color: var(--black);
  transition: color .25s var(--ease);
}
.powered-by-realtor a span { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.powered-by-realtor a:hover { color: var(--gold-text); }

/* Property page (server-rendered by api/aleksey-property.js) */
.detail-back { margin-bottom: 1.5rem; }
.detail-section { margin-top: 2.5rem; }
.detail-section.prose { max-width: none; }
.detail-section.prose p { white-space: pre-line; font-size: 1rem; line-height: 1.75; }
.detail-h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.75rem, min(2.6vw, 2.34rem), 2.375rem); line-height: 1.05; margin-bottom: 1rem; }
.feature-list { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2rem; }
.feature-list > div { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.feature-list dt { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.feature-list dd { margin: 0.25rem 0 0; font-size: 0.9375rem; }
.table-scroll { overflow-x: auto; }
.rooms-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.rooms-table th, .rooms-table td { text-align: left; padding: 0.625rem 0.75rem 0.625rem 0; border-bottom: 1px solid var(--line); }
.rooms-table th { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.detail-map { margin-top: 2rem; }
.detail-map .detail-h2 { font-size: clamp(1.5rem, min(2vw, 1.8rem), 1.875rem); margin-bottom: 0.75rem; }
.detail-side .map-frame { aspect-ratio: 4 / 3; }
.map-frame { aspect-ratio: 16 / 9; background: var(--offwhite); border: 1px solid var(--line); }
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.detail-side { display: block; }
.detail-badge { position: static; justify-self: start; margin-bottom: 0.875rem; }
/* Listing page layout */
/* Top of listing: gallery left, price + info card right (same columns as the body below) */
.listing-top { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(18.75rem, 1fr); gap: clamp(1.5rem, min(3.5vw, 3.15rem), 3.5rem); align-items: start; }
.listing-summary { position: sticky; top: 5.5rem; }
.listing-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.listing-badges .detail-badge { margin: 0; }
.badge-dark { display: inline-block; padding: 0.25rem 0.5625rem; background: var(--black); color: var(--gold-lt); font-size: 0.59375rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.listing-summary .detail-price { font-family: var(--serif); font-weight: 500; font-size: clamp(2.25rem, min(3.2vw, 2.88rem), 3rem); line-height: 1; color: var(--black); }
.listing-summary .detail-address { margin-top: 0.75rem; font-size: clamp(1.625rem, min(2.2vw, 1.98rem), 2.125rem); line-height: 1.1; }
.listing-where { margin-top: 0.625rem; display: flex; align-items: center; gap: 0.5rem; font-size: 0.9375rem; color: var(--muted); }
.listing-where .icon { color: var(--gold); font-size: 1rem; }
.summary-specs { margin: 1.25rem 0 0; padding: 1rem 0; list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 0.9375rem; }
.summary-specs li { display: inline-flex; align-items: center; gap: 0.5rem; }
.summary-specs .icon { color: var(--gold); font-size: 1.125rem; }
.listing-mls { margin-top: 0.875rem; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.listing-summary .agent-card { margin-top: 1.5rem; }
.back-link { border: 0; background: none; cursor: pointer; padding: 0 0 0.25rem; }
.back-link .icon { font-size: 0.875rem; }
/* MLS photos are 3:2 (e.g. 1024×682), so the frame matches and nothing gets cropped */
.listing-gallery .gallery-main { aspect-ratio: 3 / 2; }
/* Full-screen photo viewer (opened by clicking the main listing photo) */
.lightbox { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: 4.5rem 5.5rem; background: rgba(10,11,13,0.95); animation: lbIn .25s var(--ease); }
.lightbox[hidden] { display: none; }
@keyframes lbIn { from { opacity: 0; } }
html.lightbox-open { overflow: hidden; }
.lightbox-frame { position: relative; width: 100%; height: 100%; background: transparent; }
.lightbox-frame > img { width: 100%; height: 100%; object-fit: contain; transition: opacity .3s var(--ease); }
.lightbox-frame.is-loading > img { opacity: 0; transition: none; }
.lightbox-frame.is-loading::after {
  content: ""; position: absolute; inset: 0;
  background: url("/logo.png") center / min(40%, 18rem) auto no-repeat;
  animation: logoPulse 1.4s ease-in-out infinite;
}
.lightbox-frame.img-error::before { background: transparent; color: rgba(255,255,255,0.6); }
.lightbox-close, .lightbox-arrow {
  position: absolute; z-index: 2; display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.3); border-radius: 50%; background: rgba(255,255,255,0.06);
  color: var(--white); cursor: pointer; transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.lightbox-close { top: 1.25rem; right: 1.25rem; width: 3rem; height: 3rem; }
.lightbox-arrow { top: 50%; transform: translateY(-50%); width: 3.5rem; height: 3.5rem; }
.lightbox-arrow.prev { left: 1.25rem; }
.lightbox-arrow.next { right: 1.25rem; }
.lightbox-close .icon, .lightbox-arrow .icon { font-size: 1.5rem; }
.lightbox-close:hover, .lightbox-arrow:hover { background: rgba(16,17,20,0.9); color: var(--gold-lt); border-color: var(--gold-lt); }
.lightbox-close:focus-visible, .lightbox-arrow:focus-visible { outline: 2px solid var(--gold-lt); outline-offset: 2px; }
.lightbox-count { position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,0.8); font-size: 0.8125rem; letter-spacing: 0.12em; }
.gallery-main[role="button"]:focus-visible { outline: 2px solid var(--gold-text); outline-offset: 3px; }

#detail { padding-top: clamp(1.5rem, min(2.4vw, 2.16rem), 2.25rem); }
#detail .detail-back { margin-bottom: 1rem; }
.listing-gallery + .gallery-thumbs { margin-top: 0.75rem; }
.listing-body { margin-top: clamp(2.5rem, min(4vw, 3.6rem), 3.75rem); }
.listing-body .detail-section:first-child, .fact-tiles + .detail-section { margin-top: 2.5rem; }
/* columns = number of facts (≤5) or 3 for six, so rows are always even; 1px gaps draw the dividers */
.fact-tiles { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.fact-tiles li { padding: 1.25rem 1.125rem; background: var(--white); display: flex; flex-direction: column; gap: 0.25rem; }
.fact-tiles .icon { font-size: 1.5rem; color: var(--gold); margin-bottom: 0.5rem; }
.fact-tiles .icon svg { stroke-width: 1.3; }
.fact-tiles strong { font-family: var(--serif); font-weight: 500; font-size: 1.625rem; line-height: 1.05; color: var(--black); }
.fact-tiles strong small { font-family: var(--sans); font-size: 0.75rem; color: var(--muted); }
.fact-tiles span:not(.icon) { font-size: 0.625rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.listing-desc p { white-space: pre-line; font-size: 1rem; line-height: 1.8; color: #3A3A3A; }
.listing-desc.is-clamped { max-height: 13.5rem; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent); mask-image: linear-gradient(180deg, #000 60%, transparent); }
.desc-toggle { margin-top: 1rem; border: 0; background: none; cursor: pointer; padding: 0 0 0.25rem; }
.rooms-levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.5rem 2.5rem; }
.rooms-level h3 { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-text); padding-bottom: 0.5rem; border-bottom: 1px solid var(--black); }
.rooms-level ul { margin: 0; padding: 0; list-style: none; }
.rooms-level li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.625rem 0; border-bottom: 1px solid var(--line); font-size: 0.875rem; }
.rooms-level li span:last-child { color: var(--muted); white-space: nowrap; }
.listing-body .specs-table { margin-top: 0; }
.attribution-links { margin: 0.875rem 0 0.75rem; display: flex; flex-wrap: wrap; gap: 0.625rem; }
.attribution-links:empty { display: none; }
.attribution-links .btn { min-height: 2.25rem; padding: 0.375rem 1rem; font-size: 0.6875rem; }
.listing-body .listing-attribution { margin-top: 2.5rem; }

/* Agent card in the listing sidebar */
.agent-card { background: var(--black); color: var(--white); padding: 1.625rem; display: grid; grid-template-columns: 4.5rem 1fr; gap: 1rem 1.125rem; align-items: center; border-top: 2px solid var(--gold); }
.agent-card img { width: 4.5rem; height: 4.5rem; border-radius: 50%; object-fit: cover; object-position: 50% 20%; border: 1px solid rgba(223,193,138,0.5); }
.agent-card .eyebrow { font-size: 0.625rem; letter-spacing: 0.28em; }
.agent-name { margin-top: 0.25rem; font-family: var(--serif); font-size: 1.625rem; line-height: 1.05; }
.agent-office { margin-top: 0.25rem; font-size: 0.75rem; color: rgba(255,255,255,0.65); }
.agent-pitch { grid-column: 1 / -1; font-size: 0.875rem; line-height: 1.55; color: rgba(255,255,255,0.82); }
.agent-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 0.625rem; }
.agent-actions .btn { min-height: 2.5rem; padding: 0.5rem 0.75rem; font-size: 0.6875rem; }
.detail-side .inquiry { margin-top: 1.25rem; }

.listing-attribution { margin: 1.5rem 0; padding: 1rem 1.125rem; border-left: 2px solid var(--gold); background: var(--offwhite); font-size: 0.8125rem; line-height: 1.5; color: var(--text); }
.listing-attribution p + p { margin-top: 0.375rem; }
.attr-label { display: inline-block; min-width: 5.5rem; font-size: 0.625rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.powered-by { font-size: 0.75rem; color: var(--muted); }
.powered-by a { color: var(--gold-text); text-decoration: underline; text-underline-offset: 2px; }
.inquiry h2 { font-family: var(--serif); font-size: 1.75rem; line-height: 1.05; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.875rem; align-items: end; } /* inputs stay aligned even if a label wraps */
.form-grid .full { grid-column: 1 / -1; }
.form-note { font-size: 0.75rem; color: var(--muted); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(1.75rem, min(4vw, 3.6rem), 4rem); align-items: start; }
.contact-list { margin: 1.375rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.875rem; font-size: 0.9375rem; }
.contact-list a { display: inline-flex; align-items: center; gap: 0.75rem; }
.contact-list a:hover { color: var(--gold-text); }
.contact-list .icon { color: var(--gold-text); font-size: 1.125rem; }
.contact-list li > span { align-items: flex-start !important; line-height: 1.5; }
.contact-list li > span .icon { margin-top: 0.1875rem; }
.about-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(1.75rem, min(4vw, 3.6rem), 4rem); align-items: center; }
.about-grid .ph { aspect-ratio: 1; background: var(--black); }
.about-copy .eyebrow { margin-bottom: 1rem; }
.about-goal {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.625rem, min(2.5vw, 2.25rem), 2.375rem); line-height: 1.15; color: var(--black);
  padding-left: 1.375rem; border-left: 2px solid var(--gold);
}
.about-goal em { font-style: italic; color: var(--gold-text); }
.about-copy > p:not(.about-goal) { margin-top: 1.125rem; max-width: 40em; font-size: 1rem; line-height: 1.75; }
.about-copy .about-goal + p { margin-top: 1.625rem; }

/* Door-knocking highlight inside the bio, links down to the full section */
.door-callout {
  margin-top: 1.75rem; max-width: 40em;
  display: grid; grid-template-columns: auto 1fr; gap: 1.125rem; align-items: center;
  padding: 1.25rem 1.375rem;
  background: var(--black); color: var(--white);
  border-left: 0.1875rem solid var(--gold);
}
.door-callout .door-icon { margin: 0; width: 3.25rem; height: 3.25rem; font-size: 1.5rem; }
.door-callout strong { display: block; font-family: var(--serif); font-weight: 500; font-size: clamp(1.375rem, min(1.9vw, 1.71rem), 1.6875rem); line-height: 1.15; color: var(--gold-lt); }
.door-callout-text > span { display: block; margin-top: 0.3125rem; font-size: 0.875rem; line-height: 1.55; color: rgba(255,255,255,0.8); }
.door-callout + .split-actions { margin-top: 1.625rem; }

/* Stats strip */
.stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: var(--offwhite);
}
.stat { padding: clamp(1.75rem, min(3.4vw, 3.06rem), 3rem) var(--gutter); text-align: center; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat-num { display: block; font-family: var(--serif); font-weight: 500; font-size: clamp(3rem, min(5.4vw, 4.86rem), 5rem); line-height: 1; color: var(--gold-text); }
.stat-label { display: block; margin-top: 0.625rem; font-size: 0.71875rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }

/* Round door icon (bio callout) */
.door-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 4rem; height: 4rem; margin-bottom: 1.625rem;
  border: 1px solid var(--gold); border-radius: 50%;
  color: var(--gold-lt); font-size: 1.75rem;
}
.door-icon .icon svg { stroke-width: 1.3; }

/* Closing pledge */
.pledge { padding: clamp(2.25rem, min(4vw, 3.6rem), 3.75rem) var(--gutter); text-align: center; background: var(--white); }
.pledge p {
  margin: 0 auto; max-width: 24em;
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.75rem, min(3vw, 2.7rem), 2.75rem); line-height: 1.2; color: var(--black);
}
.pledge .accent { color: var(--gold-text); font-style: italic; }
.pledge-sig { display: block; margin-top: 1.375rem; font-family: var(--script); font-size: clamp(2rem, min(2.8vw, 2.52rem), 2.625rem); color: var(--gold); }
.reasons { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- Motion ---------- */
.fade-in { opacity: 0; transform: translateY(0.875rem); animation: fadeUp .9s var(--ease) forwards; }
.fade-in.d1 { animation-delay: .08s; } .fade-in.d2 { animation-delay: .2s; }
.fade-in.d3 { animation-delay: .34s; } .fade-in.d4 { animation-delay: .48s; }
@keyframes fadeUp { to { opacity: 1; transform: none; } }
.reveal { opacity: 0; transform: translateY(1.75rem) scale(0.985); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.reveal-fade { transform: none; }
.reveal.reveal-left { transform: translateX(-2rem); }
.reveal.reveal-right { transform: translateX(2rem); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; animation-delay: 0s !important; transition-duration: 0s !important; scroll-behavior: auto !important; }
  .fade-in, .reveal { opacity: 1; transform: none; }
  .site-header, .site-header.is-stuck { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .main-nav { gap: 1.125rem; }
  .header-phone { padding: 0 0.875rem; letter-spacing: 0.06em; }
  .site-header { --logo-h: 3.375rem; }
  .site-header.is-stuck { --logo-h: 2.75rem; }
  .hero { height: 40rem; }
  .hero-content { max-width: 62%; padding-right: 0; }
  .hero-guy { right: 6%; height: 82.8%; bottom: -6%; }
  .hero-signature { right: 2%; bottom: 5%; }
  .listing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .listing-grid.is-carousel { --per-view: 2; }
  .why { grid-template-columns: 1fr; }
  .connect { grid-template-columns: 38% 1fr; min-height: 18.75rem; }
  .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filters .field-q { grid-column: 1 / -1; }
  .mls-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mls-filters .field-q { grid-column: 1 / -1; }
  .filter-actions { grid-column: span 1; }
}
@media (max-width: 960px) {
  .main-nav, .header-phone { display: none; }
  .menu-toggle { display: inline-flex; }
  .hero h1 { font-size: clamp(2.25rem, min(4.8vw, 4.32rem), 3rem); }
  .hero-content { max-width: 58%; }
  .hero-guy { right: -7%; height: 77.4%; bottom: -4%; }
  .why-main { grid-template-columns: 1fr; }
  .testimonial-grid { grid-template-columns: 1fr; max-width: 40rem; margin-left: auto; margin-right: auto; }
  .detail, .contact-grid, .about-grid { grid-template-columns: minmax(0, 1fr); }
  .listing-top { grid-template-columns: minmax(0, 1fr); }
  .listing-summary { position: static; }
  .listing-gallery .gallery-main { aspect-ratio: 3 / 2; }
  .split, .calc, .pillars { grid-template-columns: 1fr; }
  .reasons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .consider-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  body { font-size: 0.90625rem; }
  .site-header { --nav-h: 4.5rem; --logo-h: 3rem; }
  .site-header.is-stuck { --nav-h: 4rem; --logo-h: 2.625rem; }
  .mobile-nav { top: 4.5rem; }
  .site-header.is-stuck + .mobile-nav { top: 4rem; }
  .hero { height: auto; display: flex; flex-direction: column; background-position: 46% center; }
  .hero-video { object-position: 46% center; }
  .hero::before { background: linear-gradient(180deg, rgba(12,12,14,0.78) 0%, rgba(12,12,14,0.62) 55%, rgba(12,12,14,0.25) 100%); }
  .hero-content { max-width: none; height: auto; padding: 6.5rem 1rem 0; }
  .hero-content .eyebrow { letter-spacing: 0.16em; font-size: 0.625rem; }
  .hero h1 { font-size: clamp(1.875rem, min(9.8vw, 8.82rem), 3rem); line-height: 0.9; }
  .hero-lead { margin-top: 0.875rem; font-size: 0.9375rem; line-height: 1.45; }
  .search { flex-wrap: wrap; height: auto; box-shadow: none; }
  .search fieldset { width: 100%; }
  .search-tab { flex: 1; }
  .search-tab span { width: 100%; height: 2.75rem; }
  .search-input { height: 3.125rem; font-size: 1rem; }
  .search-btn { height: 3.125rem; }
  .hero-figure { position: relative; inset: auto; height: 18.75rem; margin-top: 1.25rem; }
  .hero-guy { right: 0; bottom: 0; height: 90%; }
  .hero-signature { left: 1rem; right: auto; bottom: 2.125rem; text-align: left; }
  .hero-signature .sig { font-size: 2.375rem; }
  .featured { padding: 2.5rem 1rem 2rem; }
  .footer-brand { flex-wrap: nowrap; gap: 0.75rem; }
  .footer-top .footer-brand > a img { height: 2.25rem; }
  .footer-divider { height: 1.875rem; }
  .footer-brokerage { height: 1.25rem; }
  .footer-top .footer-brokerage img { height: 3.25rem; }
  .testimonials { padding: 2.75rem 1rem; }
  .testimonial { padding: 1.375rem 1.25rem 1.25rem; }
  .featured-head { flex-direction: column; gap: 0.625rem; }
  .listing-grid { grid-template-columns: 1fr; gap: 1.125rem; margin-top: 1.25rem; }
  .listing-grid.is-carousel { --per-view: 1.12; } /* peek at the next card */
  .featured-head { flex-direction: row; flex-wrap: wrap; align-items: flex-end; }
  .featured-actions { flex-direction: row-reverse; align-items: center; justify-content: space-between; width: 100%; }
  .why-main { padding: 2.5rem 1rem 3rem; background-size: auto 100%; background-position: 30% bottom; }
  .connect { grid-template-columns: 1fr; }
  .connect-photo { height: 17.5rem; }
  .connect-photo img { -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent 100%); mask-image: linear-gradient(180deg, #000 60%, transparent 100%); object-position: 50% 20%; }
  .connect-body { padding: 0.25rem 1rem 2.5rem; }
  .connect-actions { max-width: none; }
  .connect-actions .btn { min-height: 2.875rem; justify-content: center; }
  .filters { grid-template-columns: 1fr 1fr; padding: 1rem; }
  .mls-filters { grid-template-columns: 1fr 1fr; }
  .filter-actions { grid-column: 1 / -1; }
  .filter-actions .btn { flex: 1; }
  .feature-list { grid-template-columns: 1fr; }
  .pager-step { padding: 0 0.625rem; }
  .fact-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact-tiles li:last-child:nth-child(odd) { grid-column: span 2; }

  .gallery-arrow { width: 2.5rem; height: 2.5rem; }
  .gallery-arrow.prev { left: 0.625rem; }
  .gallery-arrow.next { right: 0.625rem; }
  .gallery-count { right: 0.625rem; bottom: 0.625rem; }
  .lightbox { padding: 4rem 0.5rem; }
  .lightbox-arrow { top: auto; bottom: 1rem; transform: none; width: 3rem; height: 3rem; }
  .lightbox-count { bottom: 2rem; }
  .view-switch { display: flex; width: 100%; }
  .view-switch button { flex: 1; min-width: 0; padding: 0 0.75rem; letter-spacing: 0.1em; }
  .form-grid { grid-template-columns: 1fr; }
  .consider-grid, .reasons { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .stat { border-left: 0; border-top: 1px solid var(--line); padding: 1.625rem 1rem; }
  .stat:first-child { border-top: 0; }
  .pledge { padding: 2.25rem 1rem; }
  .timeline > li { grid-template-columns: 1fr; gap: 0.5rem; }
  .split-actions .btn { width: 100%; }
  .page-hero { padding-left: 1rem; padding-right: 1rem; }
  .page-section { padding-left: 1rem; padding-right: 1rem; }
}
@media (max-width: 420px) {
  .values { grid-template-columns: 1fr; }
  .filters, .mls-filters { grid-template-columns: 1fr; }
}

/* ---------- Phone homepage (hero + featured listings) ---------- */
@media (max-width: 760px) {
  .menu-toggle { color: var(--gold-lt); }
  br.m-only { display: inline; }
  .d-only { display: none; }

  /* Hero: text on the left with Aleksey's portrait on the right, search across the bottom */
  .hero { display: block; height: auto; min-height: 37rem; }
  .hero::before {
    background:
      linear-gradient(90deg, rgba(12,12,14,0.78) 0%, rgba(12,12,14,0.55) 45%, rgba(12,12,14,0.1) 75%),
      linear-gradient(0deg, rgba(12,12,14,0.85) 0%, rgba(12,12,14,0.2) 30%, rgba(12,12,14,0.25) 100%);
  }
  .hero-content { position: relative; z-index: 3; min-height: 37rem; padding: 6.75rem 1.25rem 3rem; justify-content: flex-start; }
  .hero-content .eyebrow { display: none; font-size: 0.625rem; letter-spacing: 0.34em; line-height: 1.9; margin-bottom: 0.75rem; }
  .hero h1 { font-size: clamp(2.25rem, 10.6vw, 3.125rem); line-height: 0.92; text-shadow: 0 2px 18px rgba(0,0,0,0.55); }
  .hero-lead { max-width: 58%; margin-top: 1.375rem; font-size: 0.9375rem; line-height: 1.45; text-shadow: 0 1px 12px rgba(0,0,0,0.7); }
  .hero-figure { position: absolute; inset: 0; height: auto; margin: 0; z-index: 2; }
  .hero-guy { right: -12%; bottom: 0; height: 64%; }
  .hero-signature { display: none; }
  .search { margin-top: auto; height: 3.5rem; flex-wrap: nowrap; box-shadow: 0 0.75rem 2rem rgba(0,0,0,0.45); }
  .search-input {
    height: 100%; padding-left: 2.75rem; font-size: 1rem;
    background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E") 0.875rem center / 1.25rem no-repeat;
  }
  .search-btn { width: 3.5rem; height: 100%; }

  /* Featured listings: "View all" beside the heading, swipeable cards with dots */
  .featured { padding: 2.25rem 1.25rem 2.25rem; }
  .featured-head { flex-direction: row; flex-wrap: nowrap; align-items: flex-end; justify-content: space-between; gap: 1rem; }
  .featured-actions { width: auto; flex-direction: row; }
  .featured-actions .link-gold { white-space: nowrap; font-size: 0.6875rem; }
  .carousel-nav { display: none !important; }
  .listing-grid.is-carousel { --per-view: 1.16; margin-top: 1.25rem; }
  .listing-grid.is-carousel > .reveal { opacity: 1; transform: none; } /* so the next card peeks in */
  .carousel-dots { display: flex; justify-content: center; gap: 0.5rem; margin-top: 1.125rem; flex-wrap: wrap; }
  .carousel-dots button { width: 0.5rem; height: 0.5rem; padding: 0; border: 0; border-radius: 50%; background: #CFCBC4; cursor: pointer; transition: background-color .25s var(--ease), transform .25s var(--ease); }
  .carousel-dots button.is-active { background: var(--gold); transform: scale(1.25); }

  /* Card layout on phones: address first, then location, then gold price beside the specs */
  .card-body { display: flex; flex-direction: row; flex-wrap: wrap; align-content: flex-start; align-items: center; column-gap: 0.875rem; padding: 1rem 1.125rem 1rem; }
  .card-address { order: 1; flex-basis: 100%; margin: 0; font-family: var(--serif); font-size: 1.375rem; font-weight: 500; line-height: 1.15; }
  .card-hood { order: 2; flex-basis: 100%; margin-top: 0.25rem; font-size: 0.8125rem; letter-spacing: 0; text-transform: none; color: var(--muted); }
  .card-price { order: 3; margin-top: 0.75rem; font-size: 1.1875rem; font-weight: 600; color: var(--gold-text); }
  .card-specs { order: 4; margin-top: 0.75rem; gap: 0; font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
  .card-specs .icon { display: none; }
  .card-specs li + li::before { content: ""; width: 1px; height: 0.875rem; margin: 0 0.625rem; background: #D5D1CA; }
  .spec-unit { display: inline; }
  .card-brokerage { order: 5; flex-basis: 100%; }
}


/* ---------- Blog (pages rendered by the Worker from D1, src/blog.js) ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, min(2vw, 1.8rem), 2rem); max-width: 87.5rem; margin: 0 auto; }
.post-card .card-media { aspect-ratio: 3 / 2; }
.post-card-body { display: flex; flex-direction: column; flex: 1; padding: 1.125rem 1.375rem 1.375rem; }
.post-meta { font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; color: #8C8C8C; }
.post-card-title { margin-top: 0.5rem; font-family: var(--serif); font-size: 1.625rem; font-weight: 500; line-height: 1.1; color: var(--black); }
.post-card-title a::after { content: ""; position: absolute; inset: 0; z-index: 3; }
.post-card-title a:focus-visible { outline: none; }
.post-card-excerpt { margin-top: 0.625rem; font-size: 0.9375rem; line-height: 1.6; color: var(--muted); }
.post-card-more { margin-top: auto; padding-top: 1rem; align-self: flex-start; }
.page-hero .post-title { max-width: 20em; font-size: clamp(2.125rem, min(3.6vw, 3.24rem), 3.5rem); line-height: 1.02; }
.page-hero .eyebrow a { color: inherit; text-decoration: none; }
.page-hero .eyebrow a:hover { color: var(--gold-lt); }
.post-section { background: var(--white); }
.post { max-width: 46rem; margin: 0 auto; }
.post-cover { aspect-ratio: 3 / 2; margin: 0 0 2.25rem; }
.post-body { font-size: 1.0625rem; line-height: 1.8; color: #2E2E2E; }
.post-body > * + * { margin-top: 1.25rem; }
.post-body h2 { margin-top: 2.5rem; font-family: var(--serif); font-size: 2.125rem; font-weight: 500; line-height: 1.1; color: var(--black); }
.post-body h3 { margin-top: 2rem; font-family: var(--serif); font-size: 1.625rem; font-weight: 500; line-height: 1.15; color: var(--black); }
.post-body h2 + *, .post-body h3 + * { margin-top: 0.75rem; }
.post-body ul, .post-body ol { padding-left: 1.375rem; }
.post-body li + li { margin-top: 0.375rem; }
.post-body li::marker { color: var(--gold); }
.post-body strong { font-weight: 600; color: var(--black); }
.post-body blockquote { margin: 2rem 0; padding: 0.25rem 0 0.25rem 1.5rem; border-left: 2px solid var(--gold); font-family: var(--serif); font-size: 1.5rem; line-height: 1.4; color: var(--black); }
.post-body figure { margin: 2rem 0; }
.post-body img { display: block; width: 100%; height: auto; }
.post-body hr { margin: 2.5rem auto; width: 4rem; border: 0; border-top: 1px solid var(--gold); }
.post-footer { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
@media (max-width: 960px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .post-grid { grid-template-columns: 1fr; }
  .post-body { font-size: 1rem; }
  .post-body h2 { font-size: 1.75rem; }
}
