:root {
  --ink: #1c1915;
  --navy: #16324f;
  --blue: #1f4e79;
  --paper: #f4f0e8;
  --quiet: #ebe4d8;
  --line: #ddd4c6;
  --muted: #5c564c;
  --sold-yellow: #ffe14a;
  --offer: #8a5a20;
  --white: #fffcf7;
  --shadow: 0 10px 30px rgba(22, 50, 79, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Nunito Sans", "Segoe UI", sans-serif;
  font-size: 1.05rem;
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); }
h1, h2, h3 {
  font-family: "Libre Baskerville", Georgia, serif;
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 0.6rem;
}
h1 { font-size: clamp(2rem, 4vw, 3.4rem); }
h2 { font-size: 1.7rem; }
p { margin: 0 0 1rem; }

.staging {
  margin: 0;
  padding: 0.45rem 1rem;
  background: #3d3426;
  color: #f4efe4;
  text-align: center;
  font-size: 0.85rem;
}
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1.2rem;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}
.brand img { height: 52px; width: auto; }
.bar nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; }
.bar nav a { color: var(--navy); text-decoration: none; font-weight: 700; }
.bar nav a:hover { color: var(--blue); }

.hero {
  min-height: 68vh;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  color: white;
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(12, 24, 36, 0.78), rgba(12, 24, 36, 0.12) 55%);
}
.hero-short { min-height: 42vh; }
.hero.hero-anchor-bottom { background-position: center bottom; }
.hero-copy { position: relative; padding: 2.2rem 6vw 2.4rem; max-width: 46rem; }
.listing > .hero .hero-copy {
  max-width: min(72rem, 88vw);
}
.listing > .hero .hero-copy h1 {
  font-size: clamp(1.7rem, 3.2vw, 2.8rem);
  line-height: 1.18;
}
.eyebrow {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.lede { font-size: 1.15rem; }
.hero a { color: white; }
.actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1rem; }

.button, button {
  display: inline-block;
  background: var(--navy);
  color: white;
  text-decoration: none;
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1.15rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.button-ghost { background: transparent; border: 1px solid white; }
.button-block { display: block; text-align: center; margin-bottom: 1rem; }
a.button { color: white; }

.band { padding: 2.2rem 6vw 2.6rem; }
.band-quiet { background: var(--quiet); }
.narrow { max-width: 42rem; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1rem;
}
.note, .count, .meta, .caption { color: var(--muted); }
.caption { display: block; font-size: 0.85rem; }
.price { font-weight: 700; color: var(--navy); }
.price-lg { font-size: 1.6rem; font-weight: 700; margin: 0.3rem 0; }
.street { font-size: 1.15rem; }

.cards, .areas, .people {
  display: grid;
  gap: 1rem;
}
.cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  color: inherit;
  text-decoration: none;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.card-photo { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--quiet); }
.card-photo img, .card-empty {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-empty { display: grid; place-items: center; color: var(--muted); }
.card-body { padding: 0.9rem 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.15rem; }
.card-title { font-family: "Libre Baskerville", Georgia, serif; color: var(--ink); }
.where { font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.pill {
  position: absolute;
  left: 0.7rem;
  top: 0.7rem;
  background: var(--navy);
  color: white;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
}
.pill-sold, .pill-conveyancing, .pill-transferred, .pill-let {
  display: inline-grid;
  place-items: center;
  background: var(--navy);
  color: var(--sold-yellow);
  white-space: nowrap;
}
.pill-sizer,
.pill-word { grid-area: 1 / 1; }
.pill-sizer { visibility: hidden; white-space: nowrap; }
.pill-word {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  font-size: 1.333em;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}
.gallery-stage > .pill {
  z-index: 2;
  pointer-events: none;
  top: 1.4rem;
  left: 1.4rem;
  padding: 0.4rem 1.2rem;
  font-size: 1.5rem;
}
.let-note { margin: 0 0 1rem; font-weight: 700; color: var(--navy); }
.pill-under_offer { background: var(--offer); }

.areas { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.area {
  min-height: 220px;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  text-decoration: none;
  color: white;
  position: relative;
  overflow: hidden;
}
.area::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(12, 24, 36, 0.42), transparent 46%);
}
.area span {
  position: relative;
  padding: 1rem;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1.35rem;
  text-shadow: 0 1px 2px rgba(12, 24, 36, 0.45);
}

.people { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.person { color: inherit; text-decoration: none; }
.person img, .portrait {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center top;
  border-radius: 12px;
  background: var(--quiet);
}
.portrait { max-width: 280px; }
.person-name { display: block; margin-top: 0.45rem; font-weight: 700; }
.agent-layout { display: grid; grid-template-columns: 280px 1fr; gap: 1.5rem; align-items: start; }
.listing-grid { display: grid; grid-template-columns: 1.4fr 0.8fr; gap: 2rem; padding: 2rem 6vw 3rem; }
.listing-grid > * { min-width: 0; }
.gallery { margin: 0 0 1.1rem; min-width: 0; }
.gallery-stage { position: relative; }
.gallery button.gallery-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--quiet);
  cursor: zoom-in;
}
.gallery-stage img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 12px;
  background: var(--quiet);
}
.gallery button.gallery-arrow,
.viewer button.viewer-arrow {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 252, 247, 0.94);
  color: var(--navy);
}
.gallery-arrow { position: absolute; top: 50%; transform: translateY(-50%); }
.gallery-prev { left: 0.7rem; }
.gallery-next { right: 0.7rem; }
.gallery-arrow svg, .viewer-arrow svg, .specs svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.gallery-count, .viewer figcaption {
  margin: 0;
  background: rgba(16, 24, 32, 0.72);
  color: white;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.85rem;
  font-weight: 700;
}
.gallery-count { position: absolute; right: 0.8rem; bottom: 0.8rem; }
.gallery-thumbs {
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  margin-top: 0.6rem;
  padding-bottom: 0.25rem;
  scroll-snap-type: x mandatory;
}
.gallery button.gallery-thumb {
  flex: 0 0 210px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  background: transparent;
  scroll-snap-align: start;
}
.gallery-thumb img {
  width: 206px;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
}
.gallery-thumb.is-on { border-color: var(--navy); }
.specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.3rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.1rem;
}
.specs li { display: flex; align-items: center; gap: 0.45rem; color: var(--navy); }
.specs span { color: var(--muted); font-weight: 650; }
.specs strong { color: var(--ink); }
.costs { margin: -0.35rem 0 1.1rem; color: var(--ink); font-weight: 650; }
.viewer {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  padding: 0.6rem;
  background: #101820;
  color: white;
}
.viewer::backdrop { background: rgba(8, 14, 20, 0.94); }
.viewer[open] {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto minmax(0, 1fr);
  align-items: center;
}
.viewer-close { grid-column: 1 / -1; justify-self: end; }
.viewer figure { grid-column: 2; grid-row: 2; margin: 0; min-width: 0; text-align: center; }
.viewer-prev { grid-column: 1; grid-row: 2; }
.viewer-next { grid-column: 3; grid-row: 2; }
.viewer img {
  max-width: 100%;
  max-height: calc(100vh - 8rem);
  width: auto;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}
.viewer figcaption { display: inline-block; margin-top: 0.7rem; }
.gallery-stage, .viewer img { touch-action: pan-y; }
.features { columns: 2; padding-left: 1.1rem; }
.agent-card {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  color: inherit;
  text-decoration: none;
  margin-bottom: 0.8rem;
}
.agent-card img { width: 72px; height: 72px; flex: 0 0 72px; object-fit: cover; object-position: center top; border-radius: 50%; }
.agent-copy {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}
.agent-copy strong,
.agent-copy .meta { display: block; }
.prose p { max-width: 40rem; }

.filters { display: flex; flex-wrap: wrap; gap: 0.55rem; align-items: end; margin-bottom: 0.6rem; }
.filters select[name="beds"],
.filters select[name="baths"] { min-width: 5.5rem; width: 5.5rem; }
.filter-field { display: flex; flex-direction: column; gap: 0.25rem; }
.filter-label { font-size: 0.9rem; font-weight: 700; }
.filter-drop { position: relative; }
.filter-drop[open] { z-index: 6; }
.filter-drop summary {
  list-style: none;
  cursor: pointer;
  font-weight: 400;
  padding: 0.55rem 2rem 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  min-width: 12rem;
  position: relative;
}
.filter-drop summary::-webkit-details-marker { display: none; }
.filter-drop summary::marker { content: ""; }
.filter-drop summary::after {
  content: "";
  position: absolute;
  right: 0.8rem;
  top: 50%;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid var(--navy);
  border-bottom: 2px solid var(--navy);
  transform: translateY(-70%) rotate(45deg);
}
.filter-menu {
  position: absolute;
  z-index: 6;
  top: calc(100% + 0.3rem);
  left: 0;
  width: max(100%, 16rem);
  max-height: 16rem;
  overflow: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 0.3rem 0;
}
.filter-menu .tick {
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  font-weight: 400;
  margin: 0;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
}
.filter-menu .tick input { min-width: 0; width: 1rem; height: 1rem; padding: 0; }
.filter-menu .tick.is-empty { color: var(--muted); }
.tick-count { margin-left: auto; font-variant-numeric: tabular-nums; }
.sold-run {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  margin-top: 1.8rem;
}
.sold-mark, .let-mark {
  margin: 0;
  background: var(--navy);
  color: var(--sold-yellow);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.75rem;
  line-height: 1;
  writing-mode: vertical-rl;
  border-radius: 8px;
  padding: 0.9rem 0.45rem;
  text-align: center;
}
label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.9rem; font-weight: 700; }
input, select, textarea {
  font: inherit;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  min-width: 10rem;
}
textarea { width: 100%; }
.form { display: grid; gap: 0.8rem; max-width: 36rem; }
.check { font-weight: 400; flex-direction: row; align-items: flex-start; }
.check input { min-width: 0; margin-top: 0.3rem; }
.error { color: var(--navy); font-weight: 700; }
.empty { padding: 1rem 0 2rem; }

.foot {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1rem;
  padding: 2rem 6vw 2.4rem;
  background: var(--navy);
  color: #efe8dc;
}
.foot a { color: white; display: block; }
.foot-links { display: flex; flex-direction: column; }

@media (max-width: 800px) {
  .agent-layout, .listing-grid, .foot { grid-template-columns: 1fr; }
  .hero { min-height: 78vw; }
  .features { columns: 1; }
  .brand img { height: 42px; }
  .sold-run { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sold-mark, .let-mark {
    writing-mode: horizontal-tb;
    justify-self: start;
    letter-spacing: 0.18em;
    padding: 0.4rem 0.75rem;
  }
}
@media (max-width: 520px) {
  .cards { grid-template-columns: 1fr; }
}
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
