/* Listing pages, v2. Warm sand palette shared with the homepage. */
.listing-page { scroll-padding-top: 5.75rem; }
.listing-page .site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 40; }
.listing-page .site-header .header-inner {
  background: linear-gradient(to bottom, rgba(15,23,42,0.62), rgba(15,23,42,0.12) 80%, transparent);
}
.listing-page .site-header.is-scrolled .header-inner,
.listing-page .site-header.is-open .header-inner { background: #0F172A; }

.listing-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: #fff;
}
.listing-hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
  transform: scale(1.06);
  animation: ken 28s ease-out forwards;
}
.listing-hero .hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,23,42,0.82) 0%, rgba(15,23,42,0.28) 52%, rgba(15,23,42,0.35) 100%);
}
.listing-hero-content {
  position: relative;
  text-align: left;
  width: min(1180px, calc(100% - 3rem));
  margin: 0 auto 5.75rem;
  z-index: 2;
}
.listing-hero-content h1 {
  color: #fff;
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  text-wrap: balance;
  max-width: 18ch;
  line-height: 1.05;
}
.listing-place {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #F6F1E8;
  margin: 0 0 1.35rem;
}
.listing-hero .badge {
  position: static;
  display: inline-block;
  margin: 0 0 1rem;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.35rem 0.7rem;
}
.listing-hero .badge.is-sold { background: #2A5A2C; border-color: transparent; }
.listing-hero .badge.is-off-market,
.listing-hero .badge.is-removed {
  background: rgba(15, 23, 42, 0.82);
  border-color: rgba(240, 230, 212, 0.55);
  color: #F0E6D4;
}
.listing-hero .hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; justify-content: flex-start; }
.listing-hero .hero-actions .btn { text-decoration: none; }

/* Facts */
.facts {
  background: var(--sand);
  padding: 2.4rem 0 2.1rem;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 5.75rem;
}
.facts-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem 1.25rem;
}
.fact { min-width: 0; padding: 0.15rem 0.25rem 0.15rem 0; }
.fact + .fact { border-left: 1px solid var(--line); padding-left: 1.25rem; }
.fact .label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 0.35rem;
}
.fact .value {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.3vw, 1.95rem);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.2;
  margin: 0;
  text-wrap: balance;
}
.fact .value.is-sold { color: var(--green); letter-spacing: 0.06em; }
.fact .value.is-off-market, .fact .value.is-removed { color: var(--ink); letter-spacing: 0.03em; }
.facts-extra { margin: 1.15rem 0 0; font-size: 0.95rem; color: var(--body); }
.facts-extra .address { margin: 0 0 0.45rem; }
.facts-tags { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0; padding: 0; list-style: none; }
.facts-tags li {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.28rem 0.55rem;
}

.jump {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 4.6rem;
  z-index: 20;
}
.jump-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  padding: 0.7rem 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.jump-nav a { color: var(--ink); text-decoration: none; }
.jump-nav a:hover { color: var(--green); }

/* Copy */
.listing-copy {
  background: var(--paper);
  padding: 5.25rem 0 4.75rem;
  scroll-margin-top: 5.75rem;
}
.listing-copy .copy-wrap { width: min(44rem, calc(100% - 2.5rem)); margin-inline: auto; }
.listing-copy h2 {
  font-size: clamp(2rem, 3.6vw, 3rem);
  margin: 0 0 1.5rem;
}
.listing-copy h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 2.2vw, 1.85rem);
  font-weight: 500;
  color: var(--ink);
  margin: 2.4rem 0 0.7rem;
}
.listing-copy p { font-size: 1.08rem; margin: 0 0 1.15rem; }
.listing-copy .legal {
  margin-top: 2.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  color: #5c6569;
}
.listing-copy .legal p { font-size: inherit; margin: 0 0 0.8rem; }

/* Video */
.listing-video {
  background: var(--ink);
  color: #E8E0D0;
  padding: 5rem 0;
  scroll-margin-top: 5.75rem;
}
.listing-video .eyebrow { color: #BFD8B4; }
.listing-video h2 { color: #fff; }
.video-frame { position: relative; aspect-ratio: 16/9; background: #000; margin-top: 1.5rem; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Gallery */
.listing-gallery {
  background: var(--paper);
  padding: 5.25rem 0 5rem;
  scroll-margin-top: 5.75rem;
}
.listing-gallery .section-head { margin-bottom: 1.75rem; }
.listing-gallery h2 { margin: 0; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}
.gallery-grid a {
  display: block;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--sand-deep);
}
.gallery-grid a:first-child { grid-column: span 2; grid-row: span 2; }
.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-grid a:hover img { transform: scale(1.04); }

/* Inquiry / contact card — call and email only, no form */
.listing-inquiry {
  background: var(--sand);
  padding: 5.25rem 0 5.5rem;
  scroll-margin-top: 5.75rem;
}
.inquiry-card {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3.5rem;
  align-items: center;
}
.inquiry-card h2 { margin-bottom: 0.6rem; }
.phone-display {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.85rem);
  color: var(--ink);
  text-decoration: none;
  margin: 0.7rem 0 0.25rem;
  line-height: 1.1;
}
.phone-display:hover { color: var(--green); }
.inquiry-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.5rem; }
.broker-card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 2rem 1.85rem;
}
.broker-card .eyebrow { margin-bottom: 0.45rem; }
.broker-card h3 { font-size: 1.7rem; margin: 0 0 0.2rem; }
.broker-card .role { margin: 0 0 1.1rem; color: var(--body); }
.broker-card a { display: block; margin: 0.2rem 0; }


/* Signature: a private-catalog "portfolio plate" between the story and the gallery. */
.portfolio-plate {
  position: relative;
  min-height: 88vh;
  min-height: 88dvh;
  margin: 0;
  overflow: hidden;
  background: #0F172A;
  scroll-margin-top: 0;
}
.portfolio-plate img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.portfolio-plate::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,23,42,0.55), rgba(15,23,42,0.05) 42%, rgba(15,23,42,0.2));
  pointer-events: none;
}
.portfolio-plate figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  width: min(1180px, calc(100% - 3rem));
  margin: 0 auto 3.2rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  color: #F6F1E8;
}
.plate-legend { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.plate-name {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.35rem, 2.4vw, 2.1rem);
  font-weight: 500;
}
.plate-count {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #E6D8C0;
  white-space: nowrap;
}
.plate-rule {
  display: block;
  width: 3.25rem;
  height: 1px;
  background: #C4A574;
  margin: 0 0 1.1rem;
}

/* A quiet brass hairline under the hero badge / place lockup */
.listing-hero .plate-rule { background: #E6D8C0; margin: 0 0 1.25rem; }

/* Sticky mobile CTA */
.sticky-cta { display: none; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(10, 14, 22, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4rem 4rem 3rem;
}
.lightbox.is-open { display: flex; }
.lightbox-image { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox button {
  position: absolute;
  background: none;
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
  cursor: pointer;
  font: 600 0.8rem var(--font-sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.lightbox-close { top: 1rem; right: 1rem; padding: 0.5rem 0.9rem; }
.lightbox-prev, .lightbox-next {
  top: 50%;
  width: 2.8rem;
  height: 2.8rem;
  font-size: 1.6rem !important;
  transform: translateY(-50%);
}
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-caption { position: absolute; bottom: 1rem; color: #ddd; margin: 0; font-size: 0.85rem; }

@media (max-width: 980px) {
  .facts-grid { grid-template-columns: 1fr 1fr; }
  .fact + .fact { border-left: 0; padding-left: 0; }
  .fact:nth-child(even) { border-left: 1px solid var(--line); padding-left: 1.2rem; }
  .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .inquiry-card { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 720px) {
  .listing-page { padding-bottom: 4.6rem; }
  .listing-hero-content { margin-bottom: 8rem; width: min(1180px, calc(100% - 2rem)); }
  .listing-hero .hero-actions { flex-direction: column; align-items: stretch; width: 100%; max-width: 22rem; }
  .listing-hero .hero-actions .btn-ghost.view-photos { display: none; }
  .listing-hero .scroll-cue { display: none; }
  .portfolio-plate { min-height: 78vh; min-height: 78dvh; }
  .portfolio-plate figcaption { margin-bottom: 6.25rem; width: min(1180px, calc(100% - 2rem)); flex-direction: column; gap: 0.25rem; }
  .facts { padding: 1.6rem 0; }
  .facts-grid { gap: 1.1rem 0.4rem; }
  .fact .value { font-size: 1.32rem; }
  .jump { top: 4.25rem; }
  .listing-copy, .listing-gallery, .listing-inquiry, .listing-video { padding-top: 3.5rem; padding-bottom: 3.2rem; }
  .listing-copy .copy-wrap { width: min(44rem, calc(100% - 1.75rem)); }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem; }
  .gallery-grid a:first-child { grid-column: span 2; grid-row: span 2; }
  .lightbox { padding: 4rem 0.5rem 2.5rem; }
  .lightbox-prev, .lightbox-next { width: 2.2rem; height: 2.2rem; }
  .lightbox-prev { left: 0.4rem; }
  .lightbox-next { right: 0.4rem; }
  .sticky-cta {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 35;
    background: #0F172A;
    padding: 0.7rem 0.9rem calc(0.7rem + env(safe-area-inset-bottom));
    gap: 0.55rem;
    box-shadow: 0 -8px 24px rgba(15,23,42,0.18);
  }
  .sticky-cta a {
    flex: 1;
    text-align: center;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.85rem 0.6rem;
  }
  .sticky-cta .btn-call { background: var(--green); color: #fff; }
  .sticky-cta .btn-mail { background: transparent; color: #F0E6D4; border: 1px solid rgba(240,230,212,0.5); }
}
@media (prefers-reduced-motion: reduce) {
  .listing-hero-photo { animation: none !important; transform: none; }
  .gallery-grid img { transition: none; }
}
