/* FO-809 Whitehall — v3 listing redesign. Photo-first, Zillow/Redfin language. */
:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --ink: #1a1a1a;
  --muted: #5f5f5f;
  --line: #e6e6e1;
  --accent: #0f3d2e;
  --accent-soft: #e8f2ed;
  --accent-hover: #14523d;
  --max: 1120px;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.05);
  --cta-h: 3.25rem;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
p { margin: 0 0 .75rem; }
p:last-child { margin-bottom: 0; }
.muted { color: var(--muted); font-size: .92rem; }

/* Top bar */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 30;
}
.topbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: .65rem 1.15rem;
  display: flex;
  align-items: center;
  gap: .75rem;
}
.brand {
  font-weight: 800;
  letter-spacing: .02em;
  color: var(--accent);
  font-size: .95rem;
}
.status-pill {
  font-size: .78rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: .28rem .65rem;
  border-radius: 999px;
}
.topbar-cta {
  margin-left: auto;
  text-decoration: none;
  font-weight: 700;
  font-size: .88rem;
  color: #fff;
  background: var(--accent);
  padding: .45rem .9rem;
  border-radius: 999px;
}
.topbar-cta:hover { background: var(--accent-hover); }
@media (max-width: 560px) {
  .status-pill { display: none; }
  .topbar-cta { font-size: .82rem; padding: .4rem .75rem; }
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 1.15rem 3.5rem;
}
@media (max-width: 560px) {
  .wrap { padding-bottom: calc(3.5rem + var(--cta-h)); }
}

/* Hero collage — Zillow PDP */
.gallery-hero {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: .5rem;
  margin-bottom: 1.25rem;
  border-radius: var(--radius);
  overflow: hidden;
  background: #1a2e26;
  min-height: 280px;
}
.gallery-hero figure { margin: 0; height: 100%; }
.gallery-main img,
.gallery-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-main { min-height: 320px; max-height: 420px; }
.gallery-side {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: .5rem;
  min-height: 320px;
  max-height: 420px;
}
.gallery-side figure { overflow: hidden; min-height: 0; }
@media (max-width: 720px) {
  .gallery-hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .gallery-main {
    min-height: 220px;
    max-height: 260px;
  }
  .gallery-side {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
    min-height: 120px;
    max-height: 140px;
  }
}

/* Listing head: price + sticky CTA card */
.listing-head {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1.25rem;
  align-items: start;
  margin-bottom: 1.5rem;
}
.price {
  margin: 0 0 .2rem;
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.1;
}
.address-line {
  margin: 0 0 .35rem;
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.listing-credit {
  margin: 0 0 .9rem;
  font-size: .88rem;
  color: var(--muted);
}
.facts-chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}
.facts-chips li {
  font-size: .82rem;
  font-weight: 650;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: .4rem .7rem;
  border-radius: 999px;
}

.listing-cta-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.15rem 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  position: sticky;
  top: 3.5rem;
}
.cta-card-title {
  margin: 0;
  font-weight: 800;
  font-size: 1.05rem;
}
.cta-card-sub {
  margin: 0 0 .35rem;
  font-size: .88rem;
  color: var(--muted);
}

.btn-primary,
.btn-ghost,
.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 700;
  font-size: .94rem;
  border-radius: 999px;
  min-height: 2.7rem;
  padding: .65rem 1.1rem;
  text-align: center;
}
.btn-primary {
  color: #fff;
  background: var(--accent);
  border: 2px solid var(--accent);
}
.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.btn-ghost {
  color: var(--accent);
  background: transparent;
  border: 2px solid #c5ddd0;
}
.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.btn-link {
  color: var(--accent);
  border: 0;
  background: transparent;
  min-height: auto;
  padding: .35rem;
  font-size: .9rem;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 860px) {
  .listing-head { grid-template-columns: 1fr; }
  .listing-cta-card { position: static; }
}

/* Sections — flat listing aesthetic, less paper-card stack */
section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.35rem 1.45rem;
  margin-bottom: 1rem;
}
.section-head {
  margin-bottom: .85rem;
}
.section-head h2,
.about h2,
section > h2 {
  margin: 0 0 .35rem;
  font-size: 1.35rem;
  letter-spacing: -0.015em;
}
.section-head .muted { margin: 0; }
.subhead {
  margin: 1.25rem 0 .65rem;
  font-size: 1.05rem;
}

.about .lede {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 .55rem;
  max-width: 40rem;
  line-height: 1.35;
}
.about p { max-width: 42rem; color: var(--muted); }
.about p.lede { color: var(--ink); }

/* Unit cards */
.unit-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: .85rem;
  margin: 0 0 1rem;
}
@media (min-width: 720px) {
  .unit-cards { grid-template-columns: repeat(3, 1fr); }
}
.unit-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fbfbfa;
  display: flex;
  flex-direction: column;
}
.unit-photo {
  aspect-ratio: 4 / 3;
  background: #1a2e26;
  overflow: hidden;
}
.unit-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.unit-body { padding: .95rem 1rem 1.05rem; }
.unit-card h3 { margin: 0 0 .25rem; font-size: 1.08rem; }
.unit-layout {
  margin: 0 0 .45rem;
  font-size: .88rem;
  color: var(--muted);
  font-weight: 600;
}
.unit-blurb {
  margin: 0 0 .7rem;
  font-size: .92rem;
  line-height: 1.45;
  color: #3a3a3a;
}
.unit-rent {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent);
}
.unit-rent-label {
  display: block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .12rem;
}
.unit-list {
  margin: .3rem 0 0;
  font-size: .85rem;
  color: var(--muted);
}

/* Income stats — investment listing module */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .65rem;
  margin: 0 0 1.1rem;
}
@media (min-width: 720px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
}
.stat-card {
  background: var(--accent-soft);
  border: 1px solid #c5ddd0;
  border-radius: 10px;
  padding: .9rem .95rem;
}
.stat-label {
  margin: 0;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
}
.stat-figure {
  margin: .3rem 0 .15rem;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.stat-sub {
  margin: 0;
  font-size: .8rem;
  color: var(--muted);
  line-height: 1.35;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: .65rem 0;
  border: 1px solid var(--line);
  border-radius: 10px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  min-width: 480px;
}
th, td {
  text-align: left;
  padding: .6rem .7rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  font-weight: 700;
  background: #fafaf8;
}
tr:last-child td { border-bottom: 0; }

.stack-cards { display: none; }
@media (max-width: 479px) {
  .table-wrap { display: none; }
  .stack-cards {
    display: grid;
    gap: .65rem;
    margin: .65rem 0 1rem;
  }
  .stack-card {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: .85rem .95rem;
    background: #fbfbfa;
  }
  .stack-card h3 { margin: 0 0 .5rem; font-size: .98rem; }
  .stack-card dl { margin: 0; display: grid; gap: .4rem; }
  .stack-card dl div {
    display: grid;
    grid-template-columns: 42% 1fr;
    gap: .4rem;
  }
  .stack-card dt {
    margin: 0;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
    padding-top: .15rem;
  }
  .stack-card dd { margin: 0; font-weight: 600; font-size: .92rem; }
}

/* Photo grid */
.photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .55rem;
}
@media (min-width: 640px) {
  .photo-grid { grid-template-columns: repeat(4, 1fr); }
}
.photo-slot {
  margin: 0;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  background: #1a2e26;
  border: 1px solid var(--line);
}
.photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-slot figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: .4rem .55rem;
  font-size: .75rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.55));
}

/* Facts */
.props {
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem 1.25rem;
  margin: 0;
}
@media (min-width: 560px) {
  .props { grid-template-columns: 1fr 1fr; }
}
.props dt {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  margin: 0;
}
.props dd {
  margin: .15rem 0 0;
  font-weight: 600;
  font-size: .96rem;
}
.floorplan-link { margin: 1rem 0 0; font-size: .95rem; }
.floorplan-link a {
  font-weight: 700;
  text-underline-offset: 2px;
}

.contact-intro {
  margin: 0 0 1rem;
  color: var(--muted);
  max-width: 40rem;
}
.contact-cta-wrap {
  margin: 1.15rem 0 .9rem;
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}
.soft-note {
  margin-top: .5rem;
  max-width: 42rem;
  line-height: 1.5;
}

footer.disclaimer {
  font-size: .8rem;
  color: #6b6560;
  padding: .35rem .15rem 0;
  line-height: 1.5;
  max-width: 48rem;
}
footer.disclaimer p { margin: 0; }

/* Sticky mobile CTA */
.sticky-cta {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  padding: .55rem .85rem calc(.55rem + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgba(0,0,0,.06);
}
.sticky-cta a {
  display: block;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  font-size: .95rem;
  color: #fff;
  background: var(--accent);
  padding: .8rem 1rem;
  border-radius: 999px;
}
@media (max-width: 560px) {
  .sticky-cta { display: block; }
  .contact-cta-wrap {
    flex-direction: column;
    align-items: stretch;
  }
  .contact-cta-wrap .btn-primary,
  .contact-cta-wrap .btn-ghost,
  .listing-cta-card .btn-primary,
  .listing-cta-card .btn-ghost {
    width: 100%;
  }
}

@media print {
  :root { --bg: #fff; }
  body { background: #fff; font-size: 11pt; }
  .topbar, .sticky-cta, .listing-cta-card, .contact-cta-wrap { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  section { box-shadow: none; break-inside: avoid; }
  .gallery-hero { break-inside: avoid; }
  .table-wrap { display: block !important; overflow: visible; }
  .stack-cards { display: none !important; }
  a { color: inherit; text-decoration: none; }
}
