/* Condo listing page. Same tokens and fonts as index_new.css (kept separate, so index_new.css is untouched). */
:root {
  --bg: #f6f4f1;
  --fg: #1d1b19;
  --muted: #5e5852;
  --line: #d9d3cb;
  --accent: #8f2d2d;
  --panel: #2b2723;
  --display: "Fraunces", Georgia, serif;
  --body: "Source Serif 4", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161412;
    --fg: #ece7e1;
    --muted: #a39b92;
    --line: #38332e;
    --accent: #e08a84;
    --panel: #0f0d0c;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #161412;
  --fg: #ece7e1;
  --muted: #a39b92;
  --line: #38332e;
  --accent: #e08a84;
  --panel: #0f0d0c;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.65;
}

.page {
  max-width: 64rem;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.page > * { min-width: 0; }

a { color: var(--fg); }
a:hover { color: var(--accent); }
a:focus-visible,
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.crumbs {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }

h1 {
  margin: 0;
  text-align: center;
  color: var(--accent);
  font-family: var(--display);
  font-size: clamp(1.8rem, 6vw, 2.8rem);
  line-height: 1.15;
  text-wrap: balance;
}

.gallery {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

/* Main picture */
.stage {
  position: relative;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  aspect-ratio: 3 / 2;
  max-height: 75vh;
  width: 100%;
  background: var(--panel);
  overflow: hidden;
}

.stage img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.nav {
  position: absolute;
  top: 50%;
  width: 3rem;
  height: 3rem;
  margin-top: -1.5rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}

.nav:hover { background: rgba(0, 0, 0, 0.8); }
.nav.prev { left: 0.6rem; }
.nav.next { right: 0.6rem; }

.nav::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.8rem;
  height: 0.8rem;
  border: solid #fff;
  border-width: 0 0 3px 3px;
}

.nav.prev::before { transform: translate(-30%, -50%) rotate(45deg); }
.nav.next::before { transform: translate(-70%, -50%) rotate(-135deg); }

/* Caption, counter and play button */
.bar {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.caption {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-family: var(--display);
  font-size: 1.1rem;
  overflow-wrap: anywhere;
}

.counter {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.play {
  min-width: 5.5rem;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--fg);
  background: transparent;
  color: var(--fg);
  font-family: var(--mono);
  font-size: 0.8rem;
  cursor: pointer;
}

.play:hover { border-color: var(--accent); color: var(--accent); }

/* Thumbnails */
.thumbs {
  position: relative;
  display: flex;
  gap: 8px;
  padding: 8px;
  overflow-x: auto;
  background: var(--panel);
}

.thumb {
  flex: none;
  padding: 0;
  border: 2px solid transparent;
  background: none;
  cursor: pointer;
  opacity: 0.6;
}

.thumb img {
  display: block;
  width: auto;
  height: 64px;
}

.thumb:hover { opacity: 1; }
.thumb[aria-current="true"] { border-color: var(--accent); opacity: 1; }

/* Montreal video, under the photo slide show */
.video {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}

.video h2 {
  margin: 0;
  text-align: center;
  color: var(--accent);
  font-family: var(--display);
  font-size: clamp(1.5rem, 4.5vw, 2.1rem);
  line-height: 1.15;
  text-wrap: balance;
}

.player {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 75vh;
  background: var(--panel);
  overflow: hidden;
}

.player video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

@media (max-width: 30rem) {
  .bar { flex-wrap: wrap; }
  .caption { flex-basis: 100%; }
  .nav { width: 2.5rem; height: 2.5rem; margin-top: -1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

@media print {
  .nav, .play, .thumbs { display: none; }
  .player { display: none; }
}
