/* 5532 Westhaven Road */

:root {
  --slate: #1D3037;
  --slate-2: #2B4650;
  --muted: #4B6570;
  --line: #C9D3D5;
  --field: #AEBCC0;
  --mist: #ECF0EE;
  --paper: #FFFFFF;
  --larch: #A57F26;
  --larch-tint: #F4ECD6;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --addr: "Newsreader", Georgia, "Times New Roman", serif;

  --wrap: 1240px;
  --gutter: clamp(20px, 5vw, 56px);
  --header-h: 64px;
}

:lang(zh) {
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
  --sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
}
:lang(fa) {
  --serif: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
  --sans: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--head-offset, 64px) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--slate);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }

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

.skip {
  position: absolute;
  inset-inline-start: 12px;
  top: -60px;
  z-index: 100;
  background: var(--slate);
  color: #fff;
  padding: 10px 14px;
  border-radius: 3px;
}
.skip:focus { top: 12px; }

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

/* ---------- Type ---------- */

h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 4.4vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.012em;
  margin: 0 0 0.45em;
  max-width: 17ch;
}
h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.2;
  margin: 0 0 0.55em;
}
:lang(zh) h2 { font-weight: 500; line-height: 1.3; letter-spacing: 0.02em; max-width: 14em; }
:lang(zh) h3 { font-weight: 600; letter-spacing: 0.02em; }
:lang(fa) h2 { font-weight: 500; line-height: 1.45; letter-spacing: 0; max-width: 16em; font-size: clamp(30px, 3.8vw, 50px); }
:lang(fa) h3 { font-weight: 600; line-height: 1.5; }

.prose p {
  font-family: var(--serif);
  font-size: clamp(18px, 1.3vw, 20px);
  line-height: 1.66;
  max-width: 60ch;
  margin: 0 0 1em;
}
:lang(zh) .prose p { line-height: 1.95; letter-spacing: 0.02em; max-width: 36em; }
:lang(fa) .prose p { line-height: 2; font-size: 18px; max-width: 40em; }

.dim, .num {
  font-variant-numeric: tabular-nums lining-nums;
}

.note {
  font-size: 14px;
  color: var(--muted);
  max-width: 70ch;
}

.sec { padding-block: clamp(76px, 10vw, 144px); }
.sec.mist { background: var(--mist); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font: 500 15px/1.1 var(--sans);
  padding: 14px 20px;
  border-radius: 3px;
  border: 1px solid var(--slate);
  background: var(--slate);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: var(--slate-2); border-color: var(--slate-2); }
.btn.ghost { background: transparent; color: var(--slate); }
.btn.ghost:hover { background: rgba(29, 48, 55, 0.06); }
.btn.light { background: #fff; color: var(--slate); border-color: #fff; }
.btn.light:hover { background: var(--mist); border-color: var(--mist); }
.btn.clear-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.75); }
.btn.clear-light:hover { background: rgba(255, 255, 255, 0.12); }

.icon-btn {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 3px;
  cursor: pointer;
  color: var(--slate);
}
.icon-btn:hover { border-color: var(--slate); }
.icon-btn svg { width: 20px; height: 20px; }
[dir="rtl"] .flip { transform: scaleX(-1); }

/* ---------- Header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid rgba(29, 48, 55, 0.12);
}
.head-row {
  display: flex;
  align-items: center;
  gap: 22px;
  height: var(--header-h);
}
.brand {
  font-family: var(--addr);
  font-size: 21px;
  letter-spacing: -0.005em;
  color: var(--slate);
  text-decoration: none;
  white-space: nowrap;
  margin-inline-end: auto;
}
.nav { display: none; gap: 22px; }
.nav a {
  font-size: 15px;
  text-decoration: none;
  padding-block: 6px;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
}
.nav a:hover { border-bottom-color: var(--larch); }
@media (min-width: 1120px) { .nav { display: flex; } }

.langs {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  flex: none;
}
.langs button {
  font-weight: 500;
  font-size: 14px;
  line-height: 1;
  padding: 9px 11px;
  background: none;
  border: 0;
  cursor: pointer;
}
.langs button + button { border-inline-start: 1px solid var(--line); }
.langs button[aria-pressed="true"] { background: var(--slate); color: #fff; }
.langs button[lang="zh"] { font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; }
.langs button[lang="fa"] { font-family: "Vazirmatn", Tahoma, sans-serif; }

.head-cta { padding: 11px 16px; }
@media (max-width: 759px) {
  .head-cta { display: none; }
  .brand { font-size: 19px; }
}
@media (max-width: 380px) {
  .brand-long { display: none; }
}

.notice {
  background: var(--larch-tint);
  font-size: 14.5px;
  line-height: 1.4;
  padding-block: 10px;
  border-top: 1px solid rgba(165, 127, 38, 0.25);
}
.notice strong { font-weight: 600; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  height: min(88svh, 940px);
  min-height: 540px;
  overflow: hidden;
  background: var(--slate);
  color: #fff;
}
.hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 58%;
  transform-origin: 50% 62%;
  animation: settle 2.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes settle {
  from { transform: scale(1.07); }
  to { transform: scale(1); }
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(17, 31, 36, 0.74) 0%, rgba(17, 31, 36, 0.4) 34%, rgba(17, 31, 36, 0) 62%);
  pointer-events: none;
}
.hero-in {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-block-end: clamp(34px, 6vw, 76px);
}
.hero .place {
  font-size: 16px;
  margin: 0 0 12px;
  opacity: 0.92;
}
.hero h1 {
  font-family: var(--addr);
  font-weight: 400;
  font-size: clamp(46px, 8.4vw, 116px);
  line-height: 0.94;
  letter-spacing: -0.022em;
  margin: 0 0 24px;
  text-wrap: balance;
}
[dir="rtl"] .hero h1 { direction: ltr; text-align: right; }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-bottom: 28px;
}
.price {
  font-family: var(--serif);
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.2;
}
.chip {
  font-weight: 500;
  font-size: 14px;
  line-height: 1;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 3px;
}
.hero-oh { font-size: 15.5px; margin: -10px 0 24px; opacity: 0.95; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Facts ---------- */

.facts { background: var(--slate); color: #fff; }
.facts p {
  font-family: var(--serif);
  font-size: clamp(22px, 2.5vw, 34px);
  line-height: 1.34;
  max-width: 40ch;
  margin: 0;
  padding-block: clamp(46px, 6.5vw, 92px);
}
:lang(zh) .facts p { max-width: 24em; line-height: 1.7; letter-spacing: 0.02em; }
:lang(fa) .facts p { max-width: 28em; line-height: 1.8; }

/* ---------- The view ---------- */

.view-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.view-head .prose { flex: 1 1 560px; }
.strip-ctrl { display: flex; gap: 8px; padding-bottom: 1.2em; }

.strip {
  --edge: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter)));
  display: flex;
  gap: clamp(12px, 1.6vw, 22px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-inline: var(--edge);
  scroll-padding-inline: var(--edge);
  margin-top: clamp(28px, 4vw, 48px);
  padding-bottom: 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  overscroll-behavior-x: contain;
}
.slide {
  flex: 0 0 clamp(280px, 66vw, 940px);
  scroll-snap-align: start;
  margin: 0;
}
@media (max-width: 759px) { .slide { flex-basis: 86vw; } }
.slide img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
  background: var(--mist);
}
.slide figcaption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  font-size: 15.5px;
}
.slide figcaption span:first-child { font-weight: 500; }
.slide .dim { color: var(--muted); }

.deck {
  display: grid;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  margin-top: clamp(72px, 9vw, 128px);
}
.deck img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
.deck .dim { color: var(--muted); font-size: 15px; margin: 0 0 14px; }
@media (min-width: 920px) { .deck { grid-template-columns: 7fr 5fr; } }

/* ---------- The house ---------- */

.floor {
  display: grid;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
  margin-top: clamp(40px, 5vw, 64px);
}
.floor img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
@media (min-width: 920px) {
  .floor { grid-template-columns: 1fr 1fr; }
  .floor.alt .floor-img { order: -1; }
}

.rooms {
  display: grid;
  gap: 40px;
  align-items: start;
  margin-top: clamp(56px, 7vw, 96px);
}
@media (min-width: 820px) { .rooms { grid-template-columns: 1fr 1fr; gap: 56px; } }

.tbl { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.tbl caption {
  text-align: start;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  padding-bottom: 10px;
}
.tbl th, .tbl td {
  text-align: start;
  font-weight: 400;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.tbl tr:first-child th, .tbl tr:first-child td { border-top: 1px solid var(--slate); }
.tbl td { text-align: end; padding-inline-start: 16px; }
.rooms + .note { margin-top: 20px; }

/* ---------- Floor plans ---------- */

.plan-btn {
  display: block;
  width: 100%;
  padding: clamp(12px, 2.2vw, 30px);
  margin-top: clamp(28px, 4vw, 44px);
  background: #fff;
  border: 1px solid var(--line);
  cursor: zoom-in;
}
.plan-btn img { display: block; width: 100%; height: auto; }
.plan-btn:hover { border-color: var(--slate); }

/* ---------- Photographs ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 6px;
  margin-top: clamp(28px, 4vw, 44px);
}
.grid button {
  display: block;
  padding: 0;
  border: 0;
  background: var(--mist);
  cursor: zoom-in;
  overflow: hidden;
}
.grid img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: opacity 0.2s ease;
}
.grid button:hover img { opacity: 0.86; }
@media (min-width: 900px) {
  .grid button:first-child { grid-column: span 2; grid-row: span 2; }
}

/* ---------- Lightbox ---------- */

dialog.lb {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
}
dialog.lb::backdrop { background: rgba(14, 25, 29, 0.95); }
.lb-stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 64px clamp(12px, 7vw, 96px) 72px;
}
.lb-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  background: #fff;
}
.lb .icon-btn {
  position: absolute;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}
.lb .icon-btn:hover { background: rgba(255, 255, 255, 0.18); }
.lb-close { top: 12px; inset-inline-end: 12px; }
.lb-prev { top: 50%; inset-inline-start: 12px; transform: translateY(-50%); }
.lb-next { top: 50%; inset-inline-end: 12px; transform: translateY(-50%); }
[dir="rtl"] .lb-prev svg, [dir="rtl"] .lb-next svg { transform: scaleX(-1); }
.lb-count {
  position: absolute;
  bottom: 22px;
  inset-inline: 0;
  text-align: center;
  font-size: 14px;
  opacity: 0.8;
}

/* ---------- Location ---------- */

.loc { display: grid; gap: clamp(32px, 5vw, 64px); align-items: start; }
@media (min-width: 980px) { .loc { grid-template-columns: 6fr 6fr; } }
.places { list-style: none; margin: 28px 0 18px; padding: 0; }
.places li {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15.5px;
}
.places li:first-child { border-top: 1px solid var(--slate); }
.places li span:last-child { color: var(--muted); white-space: nowrap; }
.map {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  display: block;
  background: var(--mist);
  filter: saturate(0.75);
}
.map-link { display: inline-block; margin-top: 12px; font-size: 15px; }

/* ---------- Offer process ---------- */

.offer-grid { display: grid; gap: clamp(40px, 5vw, 72px); align-items: start; }
@media (min-width: 980px) { .offer-grid { grid-template-columns: 7fr 5fr; } }
.offer-copy {
  border-inline-start: 3px solid var(--larch);
  padding-inline-start: clamp(18px, 2.6vw, 34px);
}
.offer-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }

/* ---------- Enquiry ---------- */

.enq-grid { display: grid; gap: clamp(40px, 5vw, 72px); align-items: start; }
@media (min-width: 980px) { .enq-grid { grid-template-columns: 7fr 4fr; } }

.form { margin-top: 28px; }
.field { display: grid; gap: 7px; margin-bottom: 18px; }
.field label, .legend {
  font-size: 15px;
  font-weight: 500;
}
.opt { color: var(--muted); font-weight: 400; }
.form input[type="text"],
.form input[type="email"],
.form input[type="tel"],
.form select,
.form textarea {
  font: 16px/1.4 var(--sans);
  padding: 12px 14px;
  border: 1px solid var(--field);
  border-radius: 3px;
  background: #fff;
  color: var(--slate);
  width: 100%;
}
.form textarea { min-height: 128px; resize: vertical; }
.form input:focus-visible, .form select:focus-visible, .form textarea:focus-visible {
  outline: 2px solid var(--larch);
  outline-offset: 0;
  border-color: var(--slate);
}
fieldset { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.legend { display: block; margin-bottom: 10px; padding: 0; }
.choice {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid var(--field);
  border-radius: 3px;
  margin-bottom: 8px;
  cursor: pointer;
  font-size: 16px;
}
.choice input { width: 18px; height: 18px; accent-color: var(--slate); margin: 0; flex: none; }
.choice:has(input:checked) { border-color: var(--slate); background: var(--mist); }
.two { display: grid; gap: 0 16px; }
@media (min-width: 640px) { .two { grid-template-columns: 1fr 1fr; } }
.cond[hidden] { display: none; }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .btn { margin-top: 6px; min-width: 200px; }
.form .btn[disabled] { opacity: 0.65; cursor: progress; }
.form-msg { padding: 14px 16px; border-radius: 3px; margin-top: 16px; font-size: 15.5px; }
.form-msg.ok { background: #E1ECE4; }
.form-msg.err { background: #F5E2DD; }
.privacy { font-size: 13.5px; color: var(--muted); margin-top: 16px; max-width: 60ch; }
.closed-note { font-family: var(--serif); font-size: 22px; line-height: 1.5; max-width: 34ch; }

.agent {
  border: 1px solid var(--line);
  background: #fff;
  padding: 24px;
  position: sticky;
  top: calc(var(--head-offset, 64px) + 24px);
}
.agent-top { display: flex; gap: 18px; align-items: center; }
.agent-top img { width: 104px; height: 130px; object-fit: cover; display: block; flex: none; }
.agent h3 { font-family: var(--addr); margin: 0 0 4px; font-size: 26px; font-weight: 400; }
.agent .title { margin: 0; font-size: 14.5px; color: var(--muted); line-height: 1.45; }
.agent-lines { list-style: none; margin: 22px 0 22px; padding: 0; }
.agent-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; }
.agent-lines li:first-child { border-top: 1px solid var(--line); }
.agent-lines a { text-decoration: none; direction: ltr; unicode-bidi: isolate; }
.agent-lines a:hover { text-decoration: underline; }
.agent-lines span { color: var(--muted); }
.agent .logo { display: block; width: 170px; height: auto; }

/* ---------- Footer ---------- */

.foot {
  background: var(--slate);
  color: rgba(255, 255, 255, 0.82);
  font-size: 13.5px;
  line-height: 1.6;
  padding-block: 52px 56px;
}
.foot p { max-width: 96ch; margin: 0 0 12px; }
.foot .foot-addr { font-family: var(--addr); font-size: 20px; color: #fff; margin-bottom: 18px; }

/* ---------- Mobile action bar ---------- */

.mbar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 45;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid var(--line);
}
.mbar .btn { padding: 13px 10px; }
@media (max-width: 759px) {
  body.has-mbar { padding-bottom: 72px; }
}
@media (min-width: 760px) { .mbar { display: none; } }

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
  .site-head, .mbar, .strip-ctrl, .form, .map { display: none !important; }
  .hero { height: auto; min-height: 0; }
}
