/* =========================================================
   Istocki Properties: theme
   Brand colors from the logo package README:
     Dark Brown #4D382C, Gold #B7782D
   ========================================================= */
:root {
  --brown: #4D382C;
  --brown-900: #2B201B;       /* deep background from the reversed logo */
  --brown-800: #3A2B23;
  --gold: #B7782D;
  --gold-600: #9E6424;        /* hover / text-safe gold */
  --gold-100: #F4E9DA;
  --cream: #FAF7F2;
  --sand: #F2ECE3;
  --ink: #2B201B;
  --muted: #6E625A;
  --line: #E6DDD1;
  --white: #fff;
  --ok: #3E7A4E;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(43, 32, 27, .06), 0 8px 24px rgba(43, 32, 27, .08);
  --shadow-lg: 0 24px 60px rgba(43, 32, 27, .28);
  --header-h: 72px;
  --font: "Lato", "Carlito", "Calibri", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6;
  color: var(--ink); background: var(--cream); -webkit-font-smoothing: antialiased;
}
body.modal-open, body.menu-open { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { line-height: 1.15; margin: 0; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 900; letter-spacing: -.01em; }

.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 16px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.eyebrow {
  margin: 0 0 10px; font-size: .78rem; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--gold);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px; border: 2px solid transparent;
  font-weight: 700; font-size: .95rem; letter-spacing: .02em; text-decoration: none;
  transition: background .2s, color .2s, border-color .2s, transform .2s; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: 8px 16px; font-size: .85rem; }
.btn-lg { padding: 16px 30px; font-size: 1rem; }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-600); }
.btn-ghost { border-color: rgba(255,255,255,.7); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--brown-900); }
.btn-outline { border-color: var(--brown); color: var(--brown); background: transparent; }
.btn-outline:hover { background: var(--brown); color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  background: linear-gradient(rgba(43,32,27,.55), rgba(43,32,27,0));
  transition: background .3s, box-shadow .3s;
}
.site-header.solid, body.menu-open .site-header { background: var(--brown-900); box-shadow: 0 2px 16px rgba(0,0,0,.2); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand img { height: 50px; width: auto; }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { color: rgba(255,255,255,.88); text-decoration: none; font-weight: 700; font-size: .92rem; letter-spacing: .03em; position: relative; padding: 4px 0; }
.nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px; background: var(--gold); transition: right .25s; }
.nav a:hover { color: #fff; }
.nav a:hover::after { right: 0; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.menu-btn { display: none; background: none; border: 0; width: 40px; height: 40px; padding: 9px 8px; flex-direction: column; justify-content: space-between; }
.menu-btn span { display: block; height: 2px; background: #fff; border-radius: 2px; transition: transform .25s, opacity .25s; }
body.menu-open .menu-btn span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
body.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
body.menu-open .menu-btn span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: min(92vh, 820px); display: flex; align-items: flex-end; color: #fff; overflow: hidden; background: var(--brown-900); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: heroZoom 18s ease-out forwards; }
@keyframes heroZoom { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero-shade { position: absolute; inset: 0; background:
  linear-gradient(90deg, rgba(43,32,27,.88) 0%, rgba(43,32,27,.55) 45%, rgba(43,32,27,.1) 100%),
  linear-gradient(0deg, rgba(43,32,27,.7) 0%, rgba(43,32,27,0) 45%); }
.hero-content { position: relative; padding: calc(var(--header-h) + 60px) 0 56px; }
.hero h1 { font-size: clamp(2.2rem, 5.6vw, 4.1rem); font-weight: 900; max-width: 15ch; letter-spacing: -.02em; }
.hero-sub { font-size: clamp(1.02rem, 1.6vw, 1.2rem); max-width: 46ch; margin: 18px 0 30px; color: rgba(255,255,255,.88); font-weight: 300; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-stats { display: flex; gap: 0; margin: 48px 0 0; padding: 0; max-width: 560px; border-top: 1px solid rgba(255,255,255,.2); }
.hero-stats div { flex: 1; padding: 18px 16px 0 0; }
.hero-stats div + div { padding-left: 20px; border-left: 1px solid rgba(255,255,255,.2); }
.hero-stats dt { font-size: 1.6rem; font-weight: 900; color: #fff; }
.hero-stats dd { margin: 0; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.7); }

/* Blur fade: elements drift up and sharpen into focus, one after another.
   Set the start delay per element with style="--d: .5s" */
.blur-fade { animation: blurFade .7s ease-out var(--d, 0s) both; }
.blur-fade-slow { animation-duration: 1.2s; }
@keyframes blurFade {
  from { opacity: 0; transform: translateY(10px); filter: blur(8px); }
  to   { opacity: 1; transform: none; filter: none; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 110px) 0; }
.section-tint { background: var(--sand); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 36px; }
.section-head.center { justify-content: center; text-align: center; }

/* Filters */
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1.5px solid var(--line); background: #fff; padding: 9px 16px; border-radius: 999px; font-weight: 700; font-size: .88rem; transition: all .2s; }
.chip span { color: var(--muted); font-weight: 400; margin-left: 2px; }
.chip:hover { border-color: var(--brown); }
.chip.active { background: var(--brown-900); border-color: var(--brown-900); color: #fff; }
.chip.active span { color: var(--gold-100); }

/* ---------- Cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; }
.card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .3s, box-shadow .3s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(43,32,27,.06), 0 18px 40px rgba(43,32,27,.14); }
.card-media { position: relative; border: 0; padding: 0; aspect-ratio: 4 / 3; overflow: hidden; background: var(--sand); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.card:hover .card-media img { transform: scale(1.05); }
.badge { position: absolute; top: 14px; left: 14px; background: var(--gold); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 6px 11px; border-radius: 999px; }
.badge-dark { left: auto; right: 14px; background: rgba(43,32,27,.85); backdrop-filter: blur(4px); }
.card-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.card-eyebrow { margin: 0 0 6px; font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-600); }
.card h3 { font-size: 1.3rem; font-weight: 900; }
.card h3 button { border: 0; background: none; padding: 0; text-align: left; font-weight: inherit; }
.card h3 button:hover { color: var(--gold-600); }
.card-sub { margin: 4px 0 14px; color: var(--muted); }
.specs { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; }
.specs li { font-size: .82rem; font-weight: 700; background: var(--sand); color: var(--brown); padding: 5px 11px; border-radius: 8px; }
.specs li.ok { background: #E8F1EA; color: var(--ok); }
.card-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.price { margin: 0; font-size: 1.55rem; font-weight: 900; color: var(--ink); line-height: 1.1; }
.price span { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.price small { font-size: .9rem; font-weight: 400; color: var(--muted); }
.price em { display: block; font-style: normal; font-size: .78rem; font-weight: 700; color: var(--ok); margin-top: 3px; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- Steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: s; }
.steps li { background: #fff; border-radius: var(--radius); padding: 32px 28px; box-shadow: var(--shadow); }
.step-num { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--brown-900); color: var(--gold); font-weight: 900; font-size: 1.2rem; margin-bottom: 18px; }
.steps h3 { font-size: 1.2rem; font-weight: 900; margin-bottom: 8px; }
.steps p { margin: 0; color: var(--muted); }

/* ---------- Resident band ---------- */
.resident-band {
  display: flex; align-items: center; gap: 36px; padding: clamp(32px, 5vw, 56px);
  border-radius: 22px; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(circle at 100% 0%, rgba(183,120,45,.35), transparent 50%), var(--brown-900);
}
.band-icon { width: 88px; height: 88px; flex: none; }
.band-text { flex: 1; }
.band-text h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.band-text p:last-child { margin: 10px 0 0; color: rgba(255,255,255,.78); max-width: 52ch; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
.lead { color: var(--muted); font-size: 1.1rem; margin: 14px 0 0; }
.contact-cards { display: grid; gap: 14px; }
.contact-card { display: flex; align-items: center; gap: 16px; background: #fff; padding: 18px 22px; border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; transition: transform .2s; min-width: 0; }
a.contact-card:hover { transform: translateX(4px); }
.contact-card svg { width: 44px; height: 44px; padding: 11px; border-radius: 50%; background: var(--gold-100); fill: var(--gold-600); flex: none; }
.contact-card span { min-width: 0; }
.contact-card small { display: block; color: var(--muted); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; }
.contact-card strong { font-size: 1.05rem; overflow-wrap: anywhere; }

/* ---------- Contact form ---------- */
.contact { align-items: start; }
.contact-info .contact-cards { margin-top: 28px; }
.contact-form { background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: clamp(24px, 4vw, 40px); display: grid; gap: 16px; }
.contact-form h3 { font-size: 1.4rem; font-weight: 900; margin-bottom: 4px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; }
.field span { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brown); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink); width: 100%; min-width: 0;
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--cream);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); background: #fff; box-shadow: 0 0 0 3px rgba(183,120,45,.18); }
.contact-form .btn { justify-self: start; }
.form-note { margin: 0; font-size: .85rem; color: var(--muted); }
.form-note a, .form-status a { color: var(--gold-600); font-weight: 700; }
.form-status:empty { display: none; }
.form-status { padding: 14px 16px; border-radius: 10px; font-weight: 700; }
.form-status.ok { background: #E8F1EA; color: var(--ok); }
.form-status.err { background: #FBEAEA; color: #9B2C2C; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- About page ---------- */
.page-hero { position: relative; color: #fff; background: var(--brown-900); overflow: hidden; }
.page-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(43,32,27,.75) 0%, rgba(43,32,27,.45) 60%, rgba(43,32,27,.2) 100%); }
.page-hero .wrap { position: relative; z-index: 1; padding: calc(var(--header-h) + clamp(56px, 9vw, 110px)) 0 clamp(56px, 8vw, 96px); }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 900; letter-spacing: -.02em; max-width: 18ch; text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.page-hero p.lead-light { font-size: clamp(1.05rem, 1.6vw, 1.2rem); max-width: 58ch; margin: 18px 0 0; color: #fff; font-weight: 400; text-shadow: 0 1px 12px rgba(0,0,0,.55); }
.page-hero .eyebrow { color: #E9B56F; text-shadow: 0 1px 10px rgba(0,0,0,.7); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: -48px; position: relative; z-index: 2; }
.fact { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.fact strong { display: block; font-size: 1.5rem; font-weight: 900; color: var(--brown-900); }
.fact span { font-size: .85rem; color: var(--muted); }
.story { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.story-aside { position: sticky; top: calc(var(--header-h) + 24px); }
.story-aside img { width: 120px; margin-bottom: 20px; }
.story-body p { font-size: 1.1rem; color: #4A3F38; margin: 0 0 20px; }
.story-body p:first-child { font-size: 1.3rem; color: var(--ink); font-weight: 400; }
.story-body blockquote { margin: 8px 0 28px; padding: 6px 0 6px 24px; border-left: 4px solid var(--gold); font-size: 1.35rem; font-weight: 700; color: var(--brown); line-height: 1.4; }
.cta-band { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band .btns { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Footer: "curtain reveal" ----------
   The wrapper sits in the page flow and clips the fixed footer,
   so the footer appears to be uncovered as you scroll to the bottom.
   --p (0 to 1) is set by site.js as the footer comes into view. */
.footer-curtain { --cf-h: clamp(520px, 86vh, 760px); position: relative; height: var(--cf-h); clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
.site-footer {
  --p: 1;
  position: fixed; left: 0; bottom: 0; width: 100%; height: var(--cf-h);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--brown-900); color: rgba(255,255,255,.72);
}
.cf-aurora {
  position: absolute; left: 50%; top: 42%; width: 80vw; height: 60%; border-radius: 50%;
  translate: -50% -50%; filter: blur(80px); pointer-events: none;
  background: radial-gradient(circle, rgba(183,120,45,.32) 0%, rgba(77,56,44,.35) 45%, transparent 70%);
  animation: cfBreathe 8s ease-in-out infinite alternate;
}
@keyframes cfBreathe { from { scale: 1; opacity: .65; } to { scale: 1.1; opacity: 1; } }
.cf-grid {
  position: absolute; inset: 0; pointer-events: none; background-size: 60px 60px;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.035) 1px, transparent 1px);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 70%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 70%, transparent);
}

/* 2. Contact invitation */
.cf-main {
  position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 48px 16px 8px;
  opacity: clamp(0, calc((var(--p) - .35) * 2.2), 1);
  transform: translateY(calc((1 - var(--p)) * 50px));
}
.cf-heading {
  font-size: clamp(2.4rem, 7vw, 5.6rem); font-weight: 900; letter-spacing: -.03em; line-height: 1.02; margin: 0 0 32px;
  background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,.45) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 22px rgba(255,255,255,.12));
}
.cf-heading em { font-style: normal; background: linear-gradient(180deg, #E0A65C 0%, var(--gold) 100%); -webkit-background-clip: text; background-clip: text; }
.cf-sub { margin: 22px 0 0; font-size: .92rem; letter-spacing: .04em; line-height: 1.9; }
.cf-phone { white-space: nowrap; font-weight: 700; }
.cf-sub a { color: #fff; text-decoration: none; }
.cf-sub a:hover { color: var(--gold); }

/* Glass pills */
.cf-pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 18px 38px; border-radius: 999px; color: #fff; text-decoration: none; font-weight: 700; letter-spacing: .03em;
  background: linear-gradient(145deg, rgba(255,255,255,.07), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.5), inset 0 1px 1px rgba(255,255,255,.12), inset 0 -1px 2px rgba(0,0,0,.4);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  transition: background .4s, border-color .4s, box-shadow .4s, transform .9s cubic-bezier(.16,1,.3,1);
}
.cf-pill:hover { background: linear-gradient(145deg, rgba(255,255,255,.14), rgba(255,255,255,.04)); border-color: rgba(255,255,255,.25); }
.cf-pill-gold { background: linear-gradient(145deg, #C98A3C, var(--gold) 60%, var(--gold-600)); border-color: rgba(255,255,255,.18); box-shadow: 0 14px 36px -12px rgba(183,120,45,.7), inset 0 1px 1px rgba(255,255,255,.3); font-size: 1.05rem; }
.cf-pill-gold:hover { background: linear-gradient(145deg, #D4974A, #C07F31 60%, var(--gold)); border-color: rgba(255,255,255,.3); }
.cf-pill svg { width: 18px; height: 18px; transition: transform .3s; }
.cf-pill:hover svg { transform: translateX(4px); }
.magnetic.is-moving { transition: background .4s, border-color .4s, box-shadow .4s, transform .25s ease-out; }

/* 1. Giant wordmark (font size is fitted to the width by site.js) */
.cf-wordmark-wrap { position: relative; z-index: 1; padding: 0 1vw; pointer-events: none; user-select: none; }
.cf-wordmark {
  display: block; width: max-content; margin: 0 auto; white-space: nowrap;
  font-size: 9vw; font-weight: 900; line-height: .82; letter-spacing: -.02em;
  color: transparent; -webkit-text-stroke: 1px rgba(224,166,92,.25);
  background: linear-gradient(180deg, rgba(224,166,92,.95) 0%, rgba(183,120,45,.55) 55%, rgba(183,120,45,.08) 100%);
  -webkit-background-clip: text; background-clip: text;
  transform-origin: 50% 100%;
  transform: translateY(calc((1 - var(--p)) * 9vh)) scale(calc(.86 + .14 * var(--p)));
  opacity: calc(.15 + .85 * var(--p));
}

/* 3. Bottom row */
.cf-bottom {
  position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 14px 28px; flex-wrap: wrap;
  padding: 22px clamp(16px, 4vw, 48px) 26px; border-top: 1px solid rgba(255,255,255,.08); margin-top: 18px;
  font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
}
.cf-meta { display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; margin: 0; }
.cf-meta .dot { color: var(--gold); }
.cf-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.cf-nav a { color: rgba(255,255,255,.8); text-decoration: none; }
.cf-nav a:hover { color: var(--gold); }
.eho { display: inline-flex; align-items: center; gap: 6px; }
.eho svg { width: 18px; height: 18px; fill: currentColor; }
.cf-pill.cf-top { width: 46px; height: 46px; padding: 0; flex: none; color: rgba(255,255,255,.8); }
.cf-top svg { width: 18px; height: 18px; transition: transform .3s; }
.cf-top:hover svg { transform: translateY(-4px); }

/* ---------- Modal ---------- */
.modal { border: 0; padding: 0; width: min(980px, 100% - 32px); max-height: calc(100vh - 48px); border-radius: 20px; box-shadow: var(--shadow-lg); background: #fff; color: var(--ink); overflow: hidden; }
.modal::backdrop { background: rgba(20, 14, 11, .72); backdrop-filter: blur(4px); }
.modal[open] { animation: pop .28s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.modal-inner { max-height: calc(100vh - 48px); overflow-y: auto; overscroll-behavior: contain; position: relative; }
.modal-close { position: absolute; top: 14px; right: 14px; z-index: 3; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); font-size: 1.7rem; line-height: 1; box-shadow: var(--shadow); }
.gallery { position: relative; background: var(--brown-900); aspect-ratio: 16 / 9; }
.gallery img { width: 100%; height: 100%; object-fit: contain; }
.g-nav { position: absolute; top: 50%; translate: 0 -50%; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); font-size: 1.9rem; line-height: 1; padding-bottom: 4px; box-shadow: var(--shadow); }
.g-prev { left: 14px; } .g-next { right: 14px; }
.g-nav[hidden] { display: none; }
.g-count { position: absolute; bottom: 14px; right: 14px; background: rgba(0,0,0,.55); color: #fff; font-size: .8rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.thumbs { display: flex; gap: 8px; padding: 10px 14px; overflow-x: auto; background: var(--brown-900); scrollbar-width: thin; }
.thumbs button { flex: none; width: 84px; height: 60px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; opacity: .55; background: none; transition: opacity .2s, border-color .2s; }
.thumbs button.active, .thumbs button:hover { opacity: 1; border-color: var(--gold); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.modal-body { padding: 28px clamp(20px, 4vw, 40px) 0; }
.m-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.m-head h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.m-city { margin: 4px 0 0; color: var(--muted); font-size: 1.05rem; }
.price-lg { font-size: 2rem; text-align: right; }
.specs-lg { margin: 18px 0 22px; }
.m-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.m-h { font-size: 1.05rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--brown); margin: 30px 0 12px; }
.m-desc { margin: 0 0 12px; color: #4A3F38; }
.features { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.features li { position: relative; padding-left: 26px; }
.features li::before { content: ""; position: absolute; left: 0; top: 5px; width: 16px; height: 16px; border-radius: 50%; background: var(--gold-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%239E6424' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }

/* Unit picker */
.units { display: grid; gap: 8px; }
.unit-row { display: flex; align-items: center; gap: 14px; padding: 10px 14px 10px 10px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; transition: border-color .2s, background .2s; }
.unit-row.active { border-color: var(--gold); background: #FDF8F1; }
.unit-all { width: 100%; text-align: left; padding: 12px 16px; }
.u-pick { flex: 1; display: flex; align-items: center; gap: 14px; border: 0; background: none; padding: 0; text-align: left; min-width: 0; }
.u-pick img { width: 64px; height: 48px; border-radius: 8px; object-fit: cover; flex: none; }
.u-name { display: block; font-weight: 900; }
.u-meta { display: block; font-size: .85rem; color: var(--muted); }
.unit-all .u-name, .unit-all .u-meta { display: inline; margin-right: 10px; }
.u-price { font-weight: 900; font-size: 1.1rem; white-space: nowrap; }
.u-price small { font-weight: 400; color: var(--muted); font-size: .8rem; }

.m-contact { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin: 32px 0 0; padding: 20px 0; border-top: 1px solid var(--line); }
.m-contact p { margin: 0; font-weight: 700; }
.m-contact a { color: var(--gold-600); font-weight: 700; text-decoration: none; }
.m-sticky { position: sticky; bottom: 0; display: flex; gap: 10px; padding: 14px 0 18px; background: linear-gradient(rgba(255,255,255,0), #fff 30%); }
.m-sticky .btn { flex: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .menu-btn { display: flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto; flex-direction: column; gap: 0;
    background: var(--brown-900); padding: 8px 16px 24px; margin: 0;
    transform: translateY(-110%); opacity: 0; pointer-events: none; transition: transform .3s, opacity .3s;
    box-shadow: 0 12px 24px rgba(0,0,0,.25);
  }
  body.menu-open .nav { transform: none; opacity: 1; pointer-events: auto; }
  .nav a { padding: 16px 4px; font-size: 1.05rem; border-bottom: 1px solid rgba(255,255,255,.08); }
  .nav a::after { display: none; }
  .header-actions { margin-left: auto; }
  .steps { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; gap: 28px; }
  .resident-band { flex-direction: column; align-items: flex-start; gap: 20px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .fact:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .story { grid-template-columns: 1fr; }
  .story-aside { position: static; }
  .band-icon { width: 64px; height: 64px; }
}
@media (max-width: 600px) {
  :root { --header-h: 64px; }
  .brand img { height: 36px; }
  .hero { min-height: 88vh; }
  /* Text spans the full width on phones, so darken the whole lower photo */
  .hero-shade { background: linear-gradient(0deg, rgba(43,32,27,.94) 0%, rgba(43,32,27,.82) 45%, rgba(43,32,27,.45) 75%, rgba(43,32,27,.25) 100%); }
  .hero-sub { font-weight: 400; color: #fff; text-shadow: 0 1px 12px rgba(0,0,0,.55); }
  .hero .eyebrow { color: #E9B56F; text-shadow: 0 1px 10px rgba(0,0,0,.7); }
  .page-hero::after { background: linear-gradient(0deg, rgba(43,32,27,.85) 0%, rgba(43,32,27,.6) 60%, rgba(43,32,27,.35) 100%); }
  .hero-content { padding-bottom: 36px; }
  .hero-ctas .btn { flex: 1 1 100%; }
  .hero-stats { margin-top: 32px; }
  .hero-stats dt { font-size: 1.25rem; }
  .hero-stats dd { font-size: .68rem; letter-spacing: .08em; }
  .hero-stats div + div { padding-left: 12px; }
  .grid { grid-template-columns: 1fr; gap: 20px; }
  .section-head { margin-bottom: 24px; }
  .resident-band .btn { width: 100%; }
  .field-row { grid-template-columns: 1fr; }
  .contact-form .btn { justify-self: stretch; }
  .facts { gap: 12px; margin-top: -36px; }
  .fact { padding: 18px; }
  .fact strong { font-size: 1.2rem; }
  .cta-band .btns, .cta-band .btn { width: 100%; }
  .footer-curtain { --cf-h: clamp(520px, 82vh, 640px); }
  .cf-pill { padding: 16px 30px; }
  .cf-bottom { flex-direction: column; text-align: center; gap: 14px; }
  .cf-meta, .cf-nav { justify-content: center; }
  .cf-meta { flex-direction: column; gap: 6px; }
  .cf-meta .dot { display: none; }

  .modal { width: 100%; max-width: 100%; max-height: 100%; height: 100%; border-radius: 0; margin: 0; }
  .modal-inner { max-height: 100%; height: 100%; }
  .gallery { aspect-ratio: 4 / 3; }
  .g-nav { width: 38px; height: 38px; font-size: 1.5rem; }
  .price-lg { text-align: left; font-size: 1.7rem; }
  .m-actions { display: none; } /* sticky bar covers it on phones */
  .unit-row { flex-wrap: wrap; }
  .u-pick { flex: 1 1 100%; }
  .u-price { margin-left: 78px; }
  .unit-row .btn { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .site-footer { --p: 1 !important; }
}
