@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/fonts/newsreader.ttf") format("truetype");
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/instrument-sans.ttf") format("truetype");
}

:root {
  --emerald: #123D32;
  --emerald-soft: #1d5244;
  --paper: #F5F3ED;
  --paper-deep: #ECE8DE;
  --paper-line: #DCD6C8;
  --ink: #232323;
  --ink-soft: #5b5a55;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 68rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --bar-h: 4.75rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.65 var(--sans);
  padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom) + 1.5rem);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, video, svg { display: block; max-width: 100%; }
h1, h2, h3, p, dl, dd, ul { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--emerald); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--ink-soft); }

/* Masthead */
.masthead {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: 1.5rem; padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--paper-line);
  font-size: .75rem; letter-spacing: .16em; text-transform: uppercase;
}
.brand { font-weight: 600; color: var(--emerald); }
.masthead-note { color: var(--ink-soft); }

/* Hero */
.hero { padding-top: clamp(2.75rem, 9vw, 6rem); padding-bottom: clamp(2rem, 6vw, 3.5rem); }
.eyebrow {
  font-size: .8125rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--emerald); font-weight: 500;
  display: flex; align-items: center; gap: .75rem;
}
.eyebrow::before { content: ""; width: 1.75rem; height: 1px; background: currentColor; }
h1 {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.125rem, 7.4vw, 4.5rem);
  line-height: 1.06; letter-spacing: -.02em;
  margin-top: 1.25rem; max-width: 18ch;
  text-wrap: balance;
}
.price-row {
  margin-top: clamp(1.75rem, 5vw, 2.75rem);
  display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap;
  padding-top: 1.25rem; border-top: 1px solid var(--ink);
  max-width: 34rem;
}
.price-label { font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.price {
  font-family: var(--serif); font-size: clamp(1.875rem, 5.5vw, 2.75rem);
  font-weight: 400; color: var(--emerald); letter-spacing: -.01em;
  font-variant-numeric: lining-nums tabular-nums;
}

/* Video */
.video-section .wrap { padding-inline: 0; }
@media (min-width: 48rem) { .video-section .wrap { padding-inline: var(--gutter); } }
.video-frame {
  position: relative; aspect-ratio: 16 / 9; width: 100%;
  background: var(--emerald); overflow: hidden;
}
.video-frame video { width: 100%; height: 100%; object-fit: contain; background: #0d2c24; }
.video-empty {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--paper); text-align: center; padding: 1.5rem;
}
.video-empty .plan { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .16; }
.video-empty-inner { position: relative; max-width: 26rem; }
.video-empty h3 { font-family: var(--serif); font-weight: 300; font-size: clamp(1.375rem, 4vw, 1.875rem); line-height: 1.2; }
.video-empty p { margin-top: .625rem; font-size: .875rem; opacity: .78; }
.video-empty .tag {
  display: inline-block; margin-bottom: 1rem; font-size: .6875rem; letter-spacing: .18em; text-transform: uppercase;
  border: 1px solid rgba(245,243,237,.4); padding: .35rem .7rem;
}
.video-caption {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .875rem var(--gutter) 0; font-size: .8125rem; color: var(--ink-soft);
}
@media (min-width: 48rem) { .video-caption { padding-inline: 0; } }

/* Section headings */
section.metrics, section.gallery, section.about { padding-top: clamp(3.5rem, 10vw, 6.5rem); }
.section-index {
  font-family: var(--sans); font-weight: 500;
  font-size: .75rem; letter-spacing: .16em; text-transform: uppercase;
  display: flex; align-items: center; gap: .875rem;
  padding-bottom: 1rem; margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--paper-line);
}
.section-index span { font-family: var(--serif); font-size: 1rem; letter-spacing: 0; color: var(--emerald); }

/* Metrics */
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.metric {
  padding: 1.25rem 0 1.5rem; border-bottom: 1px solid var(--paper-line);
}
.metric:nth-child(odd) { padding-right: 1rem; border-right: 1px solid var(--paper-line); }
.metric:nth-child(even) { padding-left: 1.25rem; }
.metric dt { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.metric dd {
  margin-top: .375rem; font-family: var(--serif); font-weight: 300;
  font-size: clamp(1.75rem, 6vw, 2.75rem); line-height: 1.1; color: var(--ink);
  font-variant-numeric: lining-nums;
}
.metric dd small { font-family: var(--sans); font-size: .875rem; color: var(--ink-soft); margin-left: .25rem; font-weight: 400; }
.metric.is-text dd { font-size: clamp(1.125rem, 3.6vw, 1.375rem); line-height: 1.35; }
@media (min-width: 48rem) {
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .metric, .metric:nth-child(odd), .metric:nth-child(even) { padding: 1.5rem 1.5rem 1.75rem; border-right: 1px solid var(--paper-line); }
  .metric:nth-child(3n+1) { padding-left: 0; }
  .metric:nth-child(3n) { border-right: 0; }
}

/* Tabs */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--paper-line); margin-bottom: 1.5rem; overflow-x: auto; scrollbar-width: none; }
.tab {
  appearance: none; background: none; border: 0; cursor: pointer;
  padding: .75rem 1rem .875rem; font-size: .9375rem; color: var(--ink-soft);
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
  min-height: 44px;
}
.tab:first-child { padding-left: 0; }
.tab[aria-selected="true"] { color: var(--emerald); border-bottom-color: var(--emerald); font-weight: 500; }
.tab .n { font-size: .75rem; margin-left: .375rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

/* Gallery grid */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.grid .thumb:first-child { grid-column: span 2; aspect-ratio: 3 / 2; }
@media (min-width: 48rem) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: .75rem; }
  .grid .thumb:first-child { grid-row: span 2; grid-column: span 2; aspect-ratio: auto; }
}
.thumb {
  position: relative; appearance: none; border: 0; padding: 0; cursor: zoom-in;
  aspect-ratio: 4 / 3; background: var(--paper-deep); overflow: hidden; width: 100%;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.is-broken { cursor: default; }
.thumb .broken {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: .8125rem; color: var(--ink-soft); padding: 1rem; text-align: center;
}

/* Placeholder */
.placeholder {
  display: grid; grid-template-columns: 1fr; gap: .5rem;
}
.ph-card {
  position: relative; background: var(--paper-deep); aspect-ratio: 4 / 3; overflow: hidden;
  border: 1px solid var(--paper-line);
}
.ph-card svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ph-card.lead { aspect-ratio: 3 / 2; }
.ph-label {
  position: absolute; left: 1rem; bottom: 1rem; right: 1rem;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem;
}
.ph-label strong { font-family: var(--serif); font-weight: 400; font-size: 1.375rem; color: var(--emerald); line-height: 1.1; }
.ph-label span { font-size: .6875rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); text-align: right; }
.ph-row { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.ph-note { margin-top: 1rem; font-size: .875rem; color: var(--ink-soft); max-width: 38rem; }
@media (min-width: 48rem) {
  .placeholder { grid-template-columns: 2fr 1fr; gap: .75rem; }
  .ph-row { grid-template-columns: 1fr; gap: .75rem; }
  .ph-card.lead { aspect-ratio: auto; min-height: 100%; }
}

/* About */
.prose { max-width: 40rem; }
.prose p { font-family: var(--serif); font-size: clamp(1.1875rem, 3.4vw, 1.4375rem); line-height: 1.55; font-weight: 300; }
.prose p + p { margin-top: 1rem; }
.prose p:first-child::first-line { color: var(--emerald); }

.buildings { display: grid; gap: 1px; margin-top: clamp(2.5rem, 7vw, 4rem); background: var(--paper-line); border: 1px solid var(--paper-line); }
@media (min-width: 48rem) { .buildings { grid-template-columns: 1fr 1fr; } }
.building { background: var(--paper); padding: clamp(1.5rem, 4vw, 2.25rem); }
.building header { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.building h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.625rem, 5vw, 2.125rem); color: var(--emerald); }
.building .badge { font-size: .6875rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.building p { margin-top: .75rem; color: var(--ink-soft); font-size: .9375rem; }
.rooms { list-style: none; padding: 0; margin-top: 1.25rem; }
.rooms li { display: flex; gap: .875rem; padding: .625rem 0; border-top: 1px solid var(--paper-line); font-size: .9375rem; }
.rooms li::before { content: counter(r, decimal-leading-zero); counter-increment: r; font-family: var(--serif); color: var(--emerald); min-width: 1.5rem; font-variant-numeric: tabular-nums; }
.rooms { counter-reset: r; }

.features { list-style: none; padding: 0; margin-top: clamp(2.5rem, 7vw, 4rem); display: grid; gap: 0; }
@media (min-width: 48rem) { .features { grid-template-columns: 1fr 1fr; column-gap: 2.5rem; } }
.features li { position: relative; padding: .9rem 0 .9rem 1.75rem; border-bottom: 1px solid var(--paper-line); }
.features li::before { content: ""; position: absolute; left: 0; top: 1.55rem; width: .875rem; height: 1px; background: var(--emerald); }

.colophon { margin-top: clamp(4rem, 10vw, 6rem); padding-top: 1.5rem; padding-bottom: 1rem; border-top: 1px solid var(--paper-line); font-size: .8125rem; }
.colophon p + p { margin-top: .375rem; }

.load-error { margin-top: 1rem; padding: 1rem; border: 1px solid var(--paper-line); background: var(--paper-deep); font-size: .875rem; }
.load-error button { margin-left: .5rem; background: none; border: 0; text-decoration: underline; color: var(--emerald); cursor: pointer; }

/* Contact bar */
.contact-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: rgba(245, 243, 237, .94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid var(--paper-line);
  padding: .625rem var(--gutter) calc(.625rem + env(safe-area-inset-bottom));
}
.contact-inner { max-width: calc(var(--wrap) - 2 * var(--gutter)); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
@media (min-width: 48rem) { .contact-inner { max-width: 30rem; } }
.cta {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3.125rem; text-decoration: none; font-weight: 500; font-size: .9375rem;
  border: 1px solid var(--emerald);
}
.cta svg { width: 1.125rem; height: 1.125rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.cta-phone { background: var(--emerald); color: var(--paper); }
.cta-wa { background: transparent; color: var(--emerald); }
.cta-phone:hover { background: var(--emerald-soft); }
.cta-wa:hover { background: rgba(18,61,50,.06); }
.cta.is-disabled { background: transparent; color: #8b8a84; border-color: var(--paper-line); cursor: not-allowed; }
.contact-note { text-align: center; font-size: .75rem; color: var(--ink-soft); margin-top: .375rem; }

/* Lightbox */
.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: #14181a; color: var(--paper);
  display: none; flex-direction: column;
}
.lightbox[open] { display: flex; }
.lightbox::backdrop { background: #14181a; }
.lb-top, .lb-bottom { display: flex; align-items: center; gap: .5rem; padding: .75rem 1rem; }
.lb-top { justify-content: space-between; padding-top: calc(.75rem + env(safe-area-inset-top)); }
.lb-bottom { padding-bottom: calc(.75rem + env(safe-area-inset-bottom)); }
.lb-count { font-size: .8125rem; letter-spacing: .08em; font-variant-numeric: tabular-nums; opacity: .8; }
.lb-caption { flex: 1; text-align: center; font-size: .8125rem; opacity: .75; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-btn {
  appearance: none; background: transparent; border: 1px solid rgba(245,243,237,.25); color: var(--paper);
  width: 2.75rem; height: 2.75rem; display: grid; place-items: center; cursor: pointer; flex: none;
}
.lb-btn:hover { border-color: rgba(245,243,237,.6); }
.lb-btn[aria-pressed="true"] { background: rgba(245,243,237,.12); }
.lb-btn svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.lb-stage { flex: 1; position: relative; overflow: hidden; touch-action: none; display: grid; place-items: center; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-select: none; transform-origin: center; cursor: zoom-in; will-change: transform; }
.lb-stage.is-zoomed img { cursor: grab; }
.lb-error { position: absolute; font-size: .875rem; opacity: .8; }

@media (prefers-reduced-motion: no-preference) {
  .lb-stage img.ease { transition: transform .2s ease-out; }
}
