:root {
  color-scheme: dark;
  --page: #191e1a;
  --surface: #212823;
  --frame: #151a16;
  --text: #ede8dc;
  --muted: #c1c5b9;
  --sage: #c8d1bd;
  --rule: #404942;
  --accent: #d9bb89;
  --accent-hover: #e7cda6;
  --ink: #24231d;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 1rem/1.55 var(--sans);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
#main-content:focus { outline: none; }
#homes, #photos { scroll-margin-top: 1.5rem; }

.shell {
  width: min(calc(100% - 5rem), 76rem);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  inset: .75rem auto auto .75rem;
  z-index: 2;
  padding: .6rem 1rem;
  color: var(--ink);
  background: var(--accent);
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.site-header { border-bottom: 1px solid var(--rule); }

.header-inner, .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.65rem;
}

.brand { display: inline-flex; align-items: center; gap: .82rem; }
.brand > span:last-child { font: 1.45rem/1.08 var(--serif); }

.brand small {
  display: block;
  margin-top: .22rem;
  color: var(--sage);
  font: .6875rem/1.15 var(--sans);
  letter-spacing: .15em;
  text-transform: uppercase;
}

.brand-mark {
  position: relative;
  width: 2rem;
  height: 2rem;
  flex: none;
  border: 1px solid #8d7858;
}

.brand-mark::before {
  content: '';
  position: absolute;
  inset: 9px auto auto 9px;
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
  border: 1px solid var(--accent);
  border-right: 0;
  border-bottom: 0;
}

.brand-mark::after {
  content: '';
  position: absolute;
  inset: 11px auto auto 9px;
  width: 10px;
  height: 11px;
  border: 1px solid var(--accent);
  border-top: 0;
}

.header-inner nav { display: flex; flex-wrap: wrap; gap: 0 clamp(.65rem, 3vw, 1.5rem); }

.header-inner nav a {
  padding-block: .6rem;
  color: var(--sage);
  font-size: .9rem;
}

.header-inner nav a:hover, .site-contact a:hover, .back-link:hover { color: var(--accent-hover); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  align-items: center;
  gap: clamp(1.8rem, 5vw, 5.25rem);
  padding-block: clamp(2.5rem, 6vw, 5.35rem);
}

.hero h1 {
  font-size: clamp(3.1rem, 6.8vw, 6.5rem);
  line-height: .98;
  letter-spacing: -.062em;
}

.hero h1 em { color: var(--sage); font-weight: 400; }

.hero-copy p {
  max-width: 27ch;
  margin-top: 1.4rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: .65rem 1.12rem;
  border: 1px solid transparent;
  font-size: .94rem;
  font-weight: 600;
}

.button-primary { margin-top: 1.5rem; background: var(--accent); color: var(--ink); }
.button-primary:hover { background: var(--accent-hover); }
.button-outline { border-color: var(--rule); color: var(--sage); }
.button-outline:hover { color: var(--accent-hover); border-color: var(--accent); }

.featured { display: block; min-width: 0; border: 1px solid var(--rule); background: var(--surface); }
.hero-image { background: var(--frame); }
.hero-image img { width: 100%; height: auto; }

.featured-caption, .card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.featured-caption {
  padding: .87rem 1.12rem;
  font: 1.23rem/1.15 var(--serif);
}

.featured-action {
  color: var(--accent);
  font: .87rem/1.25 var(--sans);
  white-space: nowrap;
}

.featured:hover .featured-action, .home-card a:hover h3 { color: var(--accent-hover); }

.collection { padding-bottom: clamp(3.5rem, 7vw, 6rem); }

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
  padding: 1.55rem 0 1.35rem;
  border-top: 1px solid var(--rule);
}

.section-heading h2 {
  color: var(--text);
  font-size: clamp(2rem, 4.4vw, 3.45rem);
  line-height: 1.07;
  letter-spacing: -.042em;
}

.section-heading > span { color: var(--muted); font-size: .9rem; white-space: nowrap; }

.home-grid, .photo-grid { display: grid; gap: clamp(.8rem, 2vw, 1.45rem); }
.home-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home-card a, .photo-tile { display: block; background: var(--surface); border: 1px solid var(--rule); }

.card-image {
  aspect-ratio: 1.62;
  overflow: hidden;
  background: var(--frame);
}

.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.home-card a:hover .card-image img { transform: scale(1.025); }
.card-meta { padding: 1rem; }
.card-meta h3 { font-size: clamp(1.25rem, 2.1vw, 1.55rem); line-height: 1.1; letter-spacing: -.02em; }
.card-meta > span { color: var(--muted); font-size: .8rem; white-space: nowrap; }

.site-footer { border-top: 1px solid var(--rule); background: var(--surface); }
.footer-inner { min-height: 5.3rem; padding-block: 1.25rem; }
.site-contact h2 { font-size: 1.25rem; margin-bottom: .25rem; }
.site-contact address { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; font-style: normal; }
.site-contact a { color: var(--sage); text-decoration: underline; text-underline-offset: .22em; }

.property-intro { padding: clamp(1.5rem, 3.5vw, 3.35rem) 0 clamp(2rem, 5vw, 3.75rem); }

.back-link { color: var(--sage); font-size: .9rem; text-decoration: underline; text-underline-offset: .22em; }
.property-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  column-gap: 1.5rem;
  row-gap: .75rem;
  margin-block: .95rem 1.25rem;
}

.property-heading h1 {
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  line-height: 1;
  letter-spacing: -.052em;
}

.property-cover {
  display: block;
  width: min(100%, var(--cover-width, 43rem));
  background: var(--surface);
  border: 1px solid var(--rule);
}

.property-cover img { width: 100%; height: auto; }
.property-cover > span { display: block; padding: .7rem .95rem; color: var(--accent); font-size: .9rem; }
.property-cover:hover > span, .photo-tile:hover .photo-label { color: var(--accent-hover); }

.gallery-section { padding-bottom: 3.4rem; }
.plans { padding-bottom: 3.4rem; }
.photo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.photo-frame {
  display: grid;
  place-items: center;
  aspect-ratio: 1.44;
  background: var(--frame);
  overflow: hidden;
}

.photo-frame img { width: 100%; height: 100%; max-height: 100%; object-fit: contain; }
.floor-plan img { padding: .5rem; }
.photo-label { display: block; padding: .62rem .85rem; color: var(--sage); font-size: .87rem; }

.lightbox {
  width: min(calc(100% - 1.5rem), 55rem);
  max-width: none;
  max-height: calc(100% - 1.5rem);
  padding: 0;
  border: 1px solid #576156;
  background: var(--surface);
  color: var(--text);
  overscroll-behavior: contain;
}

.lightbox::backdrop { background: rgb(10 13 11 / 88%); }
body:has(.lightbox[open]) { overflow: hidden; }
.lightbox-inner { padding: clamp(.65rem, 2vw, 1.25rem); }
.viewer-top, .viewer-controls, .lightbox figcaption { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.viewer-property { font: clamp(1.1rem, 3vw, 1.55rem)/1.2 var(--serif); }
.lightbox figure {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  margin: .7rem 0;
}

.viewer-image {
  width: min(100%, var(--photo-display-width, 43rem));
  height: clamp(100px, calc(100dvh - 15rem), 55vh);
  margin-inline: auto;
  object-fit: contain;
}

.lightbox figcaption { padding: .55rem .15rem 0; color: var(--muted); font-size: .9rem; }
#photo-position { white-space: nowrap; }
.viewer-button {
  min-height: 2.75rem;
  padding: .45rem .85rem;
  border: 1px solid #697369;
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
}

.viewer-button:hover { color: var(--accent-hover); border-color: var(--accent); }

@media (max-width: 56rem) {
  .shell { width: min(calc(100% - 2.7rem), 76rem); }
  .home-grid, .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 40rem) {
  .shell { width: calc(100% - 2rem); }
  .header-inner { min-height: 4rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .site-contact address { flex-direction: column; align-items: flex-start; }
  .hero { grid-template-columns: 1fr; gap: 1.8rem; padding-block: 2.15rem; }
  .hero h1 { font-size: clamp(3.5rem, 12vw, 5rem); }
  .hero-copy p { margin-top: .95rem; }
  .button-primary { margin-top: 1.05rem; }
  .home-grid { grid-template-columns: 1fr; }
  .card-meta { padding: .85rem; }
}

@media (prefers-reduced-motion: reduce) {
  .card-image img { transition: none; }
  .home-card a:hover .card-image img { transform: none; }
}
