:root {
  --bg: #14120f;
  --surface: #1c1a16;
  --line: #2f2b25;
  --text: #eee9e0;
  --muted: #a49d91;
  --brass: #c2a36b;
  --brass-ink: #14120f;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Manrope", system-ui, sans-serif;
  --gutter: clamp(16px, 5vw, 64px);
  --section: clamp(88px, 14vw, 180px);
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.08; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: clamp(36px, 5.4vw, 64px); }
h2 em { font-style: italic; color: var(--brass); }

.wrap { width: min(1240px, 100%); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section) 0; }
[id] { scroll-margin-top: 72px; }
.section-head { margin-bottom: clamp(32px, 5vw, 56px); }
.eyebrow { font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--brass); margin: 0 0 18px; font-weight: 500; }
.muted { color: var(--muted); }
.small { font-size: 13px; line-height: 1.55; }
.minor { font-family: var(--sans); font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); margin: 48px 0 8px; font-weight: 500; }

/* ---------- Address + price band above the hero, typed out (initTypewriter in app.js) ---------- */
.listing-band { background: var(--bg); border-bottom: 1px solid var(--line); padding-block: clamp(28px, 5vw, 60px); }
.tw { font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace; margin: 0; line-height: 1.1; overflow-wrap: anywhere; }
.tw--address { font-size: clamp(22px, 4vw, 48px); font-weight: 300; letter-spacing: -0.01em; color: var(--text); }
.tw--price { font-size: clamp(46px, 9.5vw, 120px); font-weight: 500; letter-spacing: -0.04em; color: var(--brass); margin-top: clamp(8px, 1.4vw, 16px); }
.tw-c { visibility: hidden; }
.tw-c.is-in { visibility: visible; }
.tw-c.is-caret::after {
  content: ""; display: inline-block; width: .08em; height: .9em; margin-left: .06em; vertical-align: -.08em;
  background: currentColor; animation: tw-blink 1s steps(1) infinite;
}
@keyframes tw-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .tw-c.is-caret::after { animation: none; } }

.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--brass); color: var(--brass-ink); padding: 8px 14px; }
.skip:focus { left: 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 26px; border: 0; border-radius: 999px;
  background: var(--brass); color: var(--brass-ink);
  font: 600 14px/1 var(--sans); letter-spacing: 0.04em; text-decoration: none; cursor: pointer;
  transition: background .25s, transform .25s;
}
.btn:hover { background: #d4b87f; }
.btn:active { transform: scale(.98); }
.btn-sm { min-height: 38px; padding: 0 18px; font-size: 13px; }
.btn:focus-visible, .icon-btn:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
.link { color: var(--brass); text-underline-offset: 4px; }

.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.28);
  background: rgba(20,18,15,.45); color: #fff; font-size: 18px; cursor: pointer;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}

/* Top bar: appears once the flight is done */
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 90;
  display: flex; align-items: center; gap: 24px;
  padding: 12px var(--gutter);
  background: rgba(20,18,15,.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transform: translateY(-100%); transition: transform .4s ease;
}
.topbar.is-on { transform: none; }
.topbar-mark { font-family: var(--serif); font-size: 20px; text-decoration: none; margin-right: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.topbar-nav { display: none; gap: 28px; font-size: 13px; letter-spacing: .06em; }
.topbar-nav a { text-decoration: none; color: var(--muted); }
.topbar-nav a:hover { color: var(--text); }
@media (min-width: 820px) { .topbar-nav { display: flex; } }

.hero-static { position: relative; height: min(100svh, 860px); min-height: 520px; overflow: hidden; background: #000; }
.hero-static img, .hero video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.hero { height: 100svh; max-height: none; }
.hero__controls { position: absolute; z-index: 2; right: var(--gutter); bottom: clamp(24px, 5svh, 48px); display: flex; gap: 8px; }
.hero__toggle {
  min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.3);
  background: rgba(20,18,15,.5); color: #fff; font: 600 13px/1 var(--sans); letter-spacing: .06em; cursor: pointer;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid rgba(238,233,224,.4); }
.btn-ghost:hover { background: rgba(238,233,224,.1); }
@media (max-width: 640px) { .hero__controls { top: 16px; bottom: auto; } }
/* The commercial carries its own titles: the card and shade step aside while it plays,
   and return over the front of the house when it ends */
.hero-static__card, .hero-static::after, .hero video { transition: opacity .6s ease; }
.hero.is-playing .hero-static__card, .hero.is-playing::after { opacity: 0; pointer-events: none; }
.hero.is-ended { background: #000 var(--hero-end) center / cover no-repeat; }
.hero.is-ended video { opacity: 0; }
@media (orientation: portrait) and (max-width: 900px) { .hero.is-ended { background-image: var(--hero-end-p); } }
/* The film is 16:9 with titles at both edges: on screens narrower than 16:10, show the whole
   frame (letterboxed) rather than a centre crop that would cut them off */
@media (max-aspect-ratio: 16/10) { .hero video { object-fit: contain; } }
@media (orientation: portrait) and (max-width: 900px) {
  .hero { height: auto; min-height: 0; overflow: visible; background: var(--bg); }
  .hero video { position: relative; inset: auto; display: block; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
  .hero::after, .hero .hero__mini-cta { display: none; }
  .hero-static__card, .hero.is-playing .hero-static__card { position: static; opacity: 1; pointer-events: auto; max-width: none; padding: 28px var(--gutter) 36px; }
  .hero.is-ended { background: var(--bg); }
  .hero.is-ended video { opacity: 1; }  /* keep the film's end card (agent and number) on screen */
  .hero__controls { top: 12px; bottom: auto; }
}
.hero-static::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(10,9,7,.88) 0%, rgba(10,9,7,.5) 36%, rgba(10,9,7,0) 66%),
              linear-gradient(90deg, rgba(10,9,7,.5) 0%, rgba(10,9,7,0) 60%);
}
.hero-static__broker { margin: 6px 0 0; font-size: 13px; line-height: 1.5; color: rgba(238,233,224,.72); }
.hero__mini-cta {
  position: absolute; z-index: 2; left: var(--gutter); bottom: clamp(24px, 5svh, 48px);
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px; border-radius: 999px;
  background: var(--brass); color: var(--brass-ink); font: 600 13px/1 var(--sans); letter-spacing: .04em; text-decoration: none;
  opacity: 0; pointer-events: none; transition: opacity .6s ease;
}
.hero__mini-cta span { margin-left: .4em; font-variant-numeric: tabular-nums; }
.hero.is-playing .hero__mini-cta { opacity: 1; pointer-events: auto; }
.hero-static__card { position: absolute; z-index: 1; left: var(--gutter); right: var(--gutter); bottom: clamp(40px, 9svh, 96px); max-width: 640px; }
.hero-static__address { font-size: clamp(40px, 7vw, 88px); }
.hero-static__price { font-family: var(--serif); font-size: clamp(26px, 3.4vw, 40px); color: var(--brass); margin: 10px 0 4px; }
.hero-static__specs { color: rgba(238,233,224,.82); margin: 0 0 24px; }
.hero-static__locality { color: rgba(238,233,224,.82); margin: 8px 0 0; font-size: 17px; }
.facts:not(:has(> div:not([hidden]))) { display: none; }
[hidden] { display: none !important; }
.overview:not(:has(.lede:not([hidden]), .facts > div:not([hidden]))) { display: none; }

/* Everything after the flight scrolls up over it like a curtain */
.page { position: relative; z-index: 70; background: var(--bg); box-shadow: 0 -40px 80px rgba(0,0,0,.45); }


/* ---------- Overview ---------- */
.lede { font-size: clamp(30px, 4.4vw, 54px); max-width: 22ch; margin-bottom: clamp(48px, 7vw, 88px); }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); margin: 0; border-top: 1px solid var(--line); }
.facts div { padding: 22px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 6px 0 0; font-family: var(--serif); font-size: clamp(26px, 3vw, 36px); }
@media (min-width: 760px) { .facts { grid-template-columns: repeat(3, 1fr); column-gap: 32px; } }
@media (min-width: 1100px) { .facts { grid-template-columns: repeat(6, 1fr); } }

/* ---------- Gallery: circular image carousel (initCircleGallery in app.js) ---------- */
.cgal {
  position: relative; width: min(100%, calc(80svh * 1.5)); max-width: 100%; margin-inline: auto; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 20px;
  background: var(--surface); cursor: zoom-in; outline: none;
  box-shadow: 0 2.8px 2.2px rgba(0,0,0,.08), 0 6.7px 5.3px rgba(0,0,0,.11), 0 12.5px 10px rgba(0,0,0,.14),
    0 22.3px 17.9px rgba(0,0,0,.17), 0 41.8px 33.4px rgba(0,0,0,.2), 0 100px 80px rgba(0,0,0,.28);
}
.cgal:focus-visible { box-shadow: 0 0 0 3px var(--brass); }
.cgal-stage, .cgal-slide, .cgal-tabs { position: absolute; inset: 0; }
.cgal-slide svg, .cgal-tabs { display: block; width: 100%; height: 100%; }
.cgal-tabs { z-index: 100; pointer-events: none; }
.cgal-ring { pointer-events: auto; cursor: pointer; fill: rgba(255,255,255,0); stroke: rgba(255,255,255,.7); stroke-width: 1.5; transition: stroke .2s; }
.cgal-ring:hover { stroke: #fff; }
.cgal-ring.is-on { stroke: var(--brass); stroke-width: 2.5; }
.cgal-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 18px auto 0; width: min(100%, calc(80svh * 1.5)); }
.cgal-count { margin: 0; font-size: 13px; letter-spacing: .14em; color: var(--muted); font-variant-numeric: tabular-nums; }
.cgal-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.cgal-controls .icon-btn { background: var(--surface); border-color: var(--line); font-size: 15px; white-space: nowrap; }
#cgalPlay, #cgalFull { width: auto; padding: 0 16px; border-radius: 999px; font: 600 13px/1 var(--sans); letter-spacing: .06em; }

.lightbox {
  width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(8,7,6,.97); color: #fff; overflow: hidden;
}
.lightbox::backdrop { background: rgba(8,7,6,.9); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox img { max-width: calc(100% - 32px); max-height: calc(100% - 120px); object-fit: contain; user-select: none; }
.lb-close { position: absolute; top: 16px; right: 16px; }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: 16px; } .lb-next { right: 16px; }
.lb-close, .lb-prev, .lb-next { z-index: 2; touch-action: manipulation; }  /* quick repeat taps step photos instead of zooming */
/* the counter spans the full width: let taps pass through it to the arrow buttons beside it */
.lb-count { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; margin: 0; font-size: 13px; letter-spacing: .14em; color: var(--muted); pointer-events: none; }
@media (max-width: 640px) {
  .lb-prev, .lb-next { top: auto; bottom: calc(12px + env(safe-area-inset-bottom)); transform: none; width: 52px; height: 52px; }
  .lb-count { bottom: calc(28px + env(safe-area-inset-bottom)); }
}

/* ---------- Features / split ---------- */
.split { display: grid; gap: 24px; }
@media (min-width: 900px) { .split { grid-template-columns: 5fr 7fr; gap: 64px; } }
.feature-list { list-style: none; margin: 0; padding: 0; }
.feature-list li { padding: 16px 0 16px 28px; border-bottom: 1px solid var(--line); position: relative; }
.feature-list li::before { content: ""; position: absolute; left: 0; top: 27px; width: 12px; height: 1px; background: var(--brass); }
.feature-list--quiet li { color: var(--muted); padding-block: 12px; }
.feature-list--quiet li::before { top: 23px; }
.features-lede { margin: 16px 0 0; max-width: 62ch; }
.feature-stats { list-style: none; margin: clamp(32px, 5vw, 56px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); }
.feature-stats li { padding: 22px 0; border-bottom: 1px solid var(--line); }
.feature-stats strong { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 3.6vw, 44px); color: var(--brass); line-height: 1.1; }
.feature-stats span { display: block; margin-top: 6px; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
@media (min-width: 760px) { .feature-stats { grid-template-columns: repeat(4, 1fr); column-gap: 32px; } }
.feature-groups { display: grid; gap: 0 64px; }
@media (min-width: 900px) { .feature-groups { grid-template-columns: 1fr 1fr; } }

.placeholder {
  display: grid; place-items: center; align-content: center; gap: 8px; text-align: center;
  border: 1px dashed #4a443a; color: var(--muted); padding: 32px; height: 100%;
}
.placeholder p { margin: 0; font-family: var(--serif); font-size: 26px; color: var(--text); }
.floorplan { aspect-ratio: 16 / 9; min-height: 260px; }

/* ---------- Location ---------- */
.map { aspect-ratio: 16 / 9; min-height: 300px; background: var(--surface); }
@media (max-width: 640px) { .floorplan, .map { min-height: 0; aspect-ratio: 4 / 3; } }
.floorplan-lede { margin: 16px 0 0; max-width: 60ch; }
.floorplan-frame { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #f3f1ec; height: min(860px, 88svh); }
.floorplan-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.floorplan-foot { margin: 14px 0 0; }
.map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(.6) contrast(1.05); }
.hood { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (min-width: 720px) { .hood { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .hood { grid-template-columns: repeat(4, 1fr); } }
.hood li { background: var(--bg); padding: 28px; }
.hood h3 { font-size: 26px; margin-bottom: 6px; }
.hood p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- Contact: call the agent ---------- */
.contact { padding-bottom: var(--section); }
.agent { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .agent { grid-template-columns: 5fr 6fr; gap: 64px; } }
.agent__intro .muted { max-width: 34ch; margin: 18px 0 0; }
.agent__card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: clamp(24px, 4vw, 40px); }
.agent__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.agent__name { margin: 0; font-family: var(--serif); font-size: clamp(30px, 3.6vw, 40px); line-height: 1.05; letter-spacing: .01em; }
.agent__role { margin: 6px 0 0; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--brass); }
.agent__logo { flex: none; display: inline-flex; align-items: center; background: #fcfcfc; border-radius: 8px; padding: 8px 12px; }
.agent__logo img { display: block; width: 168px; height: auto; }
.agent__call { width: 100%; min-height: 58px; margin-top: 28px; font-size: 17px; gap: 10px; }
.agent__email { margin: 14px 0 0; text-align: center; font-size: 15px; }
.agent__email a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line); }
.agent__email a:hover { color: var(--text); }
.agent__brokerage { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); font-style: normal; display: grid; gap: 4px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.agent__brokerage-name { color: var(--text); font-weight: 500; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 48px 0 calc(48px + env(safe-area-inset-bottom)); }
.footer-inner { display: grid; gap: 32px; align-items: end; }
@media (min-width: 760px) { .footer-inner { grid-template-columns: 1fr auto; } }
.footer-broker { margin: 0; color: var(--text); font-size: 14px; line-height: 1.6; }
.footer-broker a { color: var(--brass); text-decoration: none; white-space: nowrap; }
.footer-legal { margin: 10px 0 0; }
.callbar { display: none; }
@media (max-width: 760px) {
  .callbar {
    position: fixed; z-index: 95; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px max(16px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background: var(--brass); color: var(--brass-ink); text-decoration: none; box-shadow: 0 -8px 24px rgba(0,0,0,.35);
  }
  .callbar span { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
  .callbar strong { font: 600 17px/1.2 var(--sans); font-variant-numeric: tabular-nums; }
  .footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}
.footer-address { font-family: var(--serif); font-size: 28px; margin: 0 0 8px; }
.qr { margin: 0; display: grid; gap: 8px; justify-items: start; }
.qr img { background: #fff; padding: 6px; border-radius: 4px; }

