:root {
  --paper: #f6f3ee;
  --ink: #1c1b19;
  --muted: #6e6a63;
  --line: #e2ddd5;
  --brick: #8f3b24;

  --sans: "Roboto", system-ui, sans-serif;

  --gutter: 16px;
  --radius: 6px;
}

@media (min-width: 768px) {
  :root { --gutter: 32px; }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

h1, h2, h3 { font-weight: 500; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }

p, li { text-wrap: pretty; }

::selection { background: var(--brick); color: #fff; }

:focus-visible { outline: 2px solid var(--brick); outline-offset: 3px; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Top ---------- */

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  padding-bottom: 20px;
}

.eyebrow, .room-meta, .facts, dt, .viewer-count {
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.top-link {
  font-size: 14px;
  color: var(--ink);
  text-underline-offset: 3px;
}

/* ---------- Title ---------- */

.intro { padding-top: 24px; padding-bottom: 28px; }

/* Full width, no forced breaks: wraps only where it runs out of room. */
h1 {
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

.facts { white-space: nowrap; }

/* Phrases that must never split across lines (browsers break after "–" and "/"). */
.keep, .top-link, .eyebrow { white-space: nowrap; }

.facts { margin: 16px 0 0; }

/* ---------- Mosaic: one cover photo per room ---------- */

.mosaic {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
  height: min(56vw, 520px);
}

.tile {
  position: relative;
  padding: 0;
  border: 0;
  overflow: hidden;
  cursor: pointer;
  background: var(--line);
  border-radius: var(--radius);
}

.tile-lead { grid-row: 1 / 3; }

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.tile:hover img { transform: scale(1.03); }

.tile-label {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 3px 9px;
  border-radius: 99px;
  background: rgb(246 243 238 / 0.92);
  color: var(--ink);
  font: 500 12px/1.5 var(--sans);
}

@media (max-width: 767px) {
  /* Phones: lead photo full width, the other four in a swipeable row. */
  .mosaic {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    height: 300px;
    scrollbar-width: none;
  }
  .tile { flex: 0 0 82%; scroll-snap-align: start; }
}

/* ---------- Body: content + terms ---------- */

.body {
  display: grid;
  gap: 64px;
  padding-top: 40px;
  padding-bottom: 120px;
}

@media (min-width: 960px) {
  .body { grid-template-columns: minmax(0, 1fr) 320px; }
}

.lede {
  font-size: 24px;
  line-height: 1.4;
  margin: 0;
}

@media (max-width: 767px) {
  .lede { font-size: 20px; }
}

h2 {
  font-size: 34px;
  line-height: 1.1;
  margin: 56px 0 8px;
}

/* Room nav: sticks to the top while you scroll through the rooms. */
.rooms-nav {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0;
  padding: 12px 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.rooms-nav a {
  flex: none;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--ink);
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.rooms-nav a:hover { border-color: var(--ink); }

.rooms-nav a[aria-current] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

/* ---------- Rooms ---------- */

.room {
  padding: 32px 0 40px;
  border-bottom: 1px solid var(--line);
}

.room-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
}

h3 { font-size: 28px; line-height: 1.15; }

.room p { margin: 8px 0 0; max-width: 60ch; }

/* Phone photos are mostly portrait, so every tile is 3:4, in order, three across. The viewer shows each one uncropped. */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 20px;
}

.gallery img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--line);
  cursor: zoom-in;
}

@media (max-width: 767px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Setup + location ---------- */

.block ul {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.block > p { margin: 16px 0 0; }

.block li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

/* ---------- Terms card ---------- */

.terms {
  align-self: start;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

@media (min-width: 960px) {
  .terms { position: sticky; top: 24px; }
}

.price { margin: 0; font-size: 15px; color: var(--muted); }

.price span {
  font-size: 40px;
  line-height: 1;
  color: var(--ink);
}

.price-note { margin: 8px 0 0; font-size: 14px; color: var(--muted); }

dl { margin: 20px 0 24px; }

dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

dd { margin: 0; text-align: right; }

.button {
  display: block;
  padding: 13px 20px;
  border-radius: 99px;
  background: var(--brick);
  color: #fff;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s;
}

.button:hover { background: #73301d; }

/* Phones: price + button pinned to the bottom of the screen. */
.bar { display: none; }

@media (max-width: 959px) {
  .bar {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
    background: var(--paper);
    border-top: 1px solid var(--line);
  }
  .bar .price span { font-size: 28px; }
  .bar .button { padding: 11px 22px; }
}

/* ---------- Photo viewer ---------- */

.viewer {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #121110;
  color: #f6f3ee;
}

.viewer[open] { display: flex; flex-direction: column; }

.viewer::backdrop { background: #121110; }

.viewer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px var(--gutter);
}

.viewer-rooms {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.viewer button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.viewer-rooms button {
  flex: none;
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 14px;
  color: #a39e95;
}

.viewer-rooms button[aria-current] { background: #f6f3ee; color: #121110; }

.viewer-close { font-size: 14px; flex: none; }

.viewer-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0 8px;
}

.viewer-stage img {
  flex: 1;
  min-width: 0;
  height: 100%;
  object-fit: contain;
}

.viewer-step {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.viewer-step:hover { background: rgb(255 255 255 / 0.1); }

.viewer-count { text-align: center; padding: 16px; margin: 0; color: #a39e95; }

@media (max-width: 767px) {
  .viewer-step { display: none; }
}

/* ---------- Neighborhood favorites ---------- */

.block-first h2 { margin-top: 48px; }

.block > .neighborhood { margin: 32px 0 0; }

.block > .favorites { margin: 8px 0 0; }

@media (max-width: 389px) {
  .facts { white-space: normal; }
}
