/* ==========================================================================
   Interactive IM design system (see DESIGN.md)
   Base: design-refs/.../tesla/DESIGN.md. Photography carries the emotion,
   the interface stays quiet. One chromatic colour, reserved for primary CTAs.
   ========================================================================== */
/* Manrope (self-hosted variable, 200-800). SIL Open Font License, see assets/fonts. */
@font-face { font-family: 'Manrope'; font-style: normal; font-display: swap; font-weight: 200 800; src: url(../assets/fonts/manrope-latin-wght-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-style: normal; font-display: swap; font-weight: 200 800; src: url(../assets/fonts/manrope-latin-ext-wght-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --canvas: #fcfcfb;
  --ash: #f4f4f2;
  --ash-2: #ebebe8;
  --carbon: #171a1c;
  --graphite: #393c41;
  --pewter: #5c5e62;
  --fog: #8e8e8e;
  --hair: #e6e6e3;
  --accent: #2f6b55;
  --accent-hover: #275a48;
  --accent-ink: #ffffff;
  --available: #4f9a72;
  --sold: #c2554c;
  --reserved: #c48420;
  --font-display: "Manrope", -apple-system, Arial, sans-serif;
  --font-body: "Manrope", -apple-system, Arial, sans-serif;
  --font-mono: "Manrope", ui-monospace, monospace;
  --r-btn: 4px;
  --r-card: 12px;
  --t: .33s;
  --ease: cubic-bezier(.5, 0, 0, .75);
  --topbar: 56px;
  --gutter: clamp(16px, 3.4vw, 48px);
  --max: 1383px;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: var(--topbar); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--graphite); font: 400 15px/1.5 var(--font-body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; color: var(--carbon); line-height: 1.2; letter-spacing: normal; }
p { margin: 0 0 1em; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 999; background: var(--accent); color: #fff; padding: 8px 12px; border-radius: var(--r-btn); }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--pewter); }
.num, .mono { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); }
.display { font-family: var(--font-display); font-weight: 500; }
.lede { font-size: 17px; color: var(--graphite); max-width: 60ch; }
.eyebrow { font-size: 14px; color: var(--pewter); }
.fine { font-size: 12px; color: var(--fog); line-height: 1.45; }

/* ---------- Buttons (4px, colour-only hover, 0.33s) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 20px; border-radius: var(--r-btn); border: 3px solid transparent;
  background: var(--ash); color: var(--carbon); font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color var(--t), border-color var(--t), color var(--t);
}
.btn:hover { background: var(--ash-2); }
.btn.primary, .btn.accent { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover, .btn.accent:hover { background: var(--accent-hover); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: rgba(23, 26, 28, .06); }
.btn.lg { min-width: 200px; }
.btn.sm { min-height: 32px; padding: 0 12px; font-size: 13px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn i { font-size: 16px; }
.icon-btn { width: 40px; padding: 0; position: relative; }
.icon-btn i { font-size: 19px; }
.icon-btn .count { position: absolute; top: 2px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 500; display: grid; place-items: center; }
.icon-btn .count:empty { display: none; }
.link { color: var(--pewter); text-decoration: none; box-shadow: inset 0 -1px 0 transparent; transition: box-shadow var(--t) var(--ease), color var(--t); cursor: pointer; background: none; border: 0; padding: 0; font-size: 14px; }
.link:hover { color: var(--carbon); box-shadow: inset 0 -1px 0 currentColor; }

/* Segmented filters (replaces pills) */
.chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.chip { min-height: 32px; padding: 0 12px; border-radius: var(--r-btn); border: 0; background: transparent; color: var(--pewter); font-size: 13px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: background-color var(--t), color var(--t); }
.chip:hover { color: var(--carbon); }
.chip[aria-pressed="true"] { background: var(--ash-2); color: var(--carbon); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.chip .n { color: var(--fog); font-variant-numeric: tabular-nums; }

.field { display: grid; gap: 6px; }
.field label, .field .label { font-size: 13px; color: var(--graphite); font-weight: 500; }
.input, select.input, textarea.input { width: 100%; min-height: 44px; padding: 0 12px; border-radius: var(--r-btn); border: 1px solid var(--hair); background: #fff; color: var(--carbon); transition: border-color var(--t); }
textarea.input { min-height: 96px; padding: 12px; resize: vertical; }
.input:focus { border-color: var(--accent); outline: none; }
.input::placeholder { color: var(--fog); }
.range { width: 100%; accent-color: var(--accent); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--graphite); }
.check input { margin-top: 2px; accent-color: var(--accent); width: 16px; height: 16px; }

.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; text-transform: capitalize; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.available { color: var(--available); }
.status.sold { color: var(--sold); }
.status.reserved { color: var(--reserved); }
.tag-sample { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--r-btn); background: #f6ecd8; color: #8a5b0c; font-size: 12px; font-weight: 500; }

/* ---------- Top bar (transparent over the story, frosted on canvas) ---------- */
.topbar { position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--topbar); display: flex; align-items: center; gap: 16px; padding: 0 var(--gutter); color: var(--carbon); transition: background-color var(--t), color var(--t); }
.topbar.on-dark { color: #fff; }
.topbar.on-dark .btn.ghost:hover { background: rgba(255, 255, 255, .14); }
.topbar.solid { background: rgba(252, 252, 251, .82); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); color: var(--carbon); }
.brand { text-decoration: none; flex: none; }
.brand-mark { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.brand-mark .big { font-size: 26px; line-height: 1; }
.brand-mark .stack { font-size: 10px; letter-spacing: .18em; line-height: 1.25; }
.brand-mark img { height: 28px; width: auto; }
.chapters { display: flex; gap: 2px; margin: 0 auto; }
.chapters a { padding: 6px 14px; border-radius: var(--r-btn); font-size: 14px; font-weight: 500; text-decoration: none; transition: background-color var(--t); white-space: nowrap; }
.chapters a:hover, .chapters a.active { background: rgba(23, 26, 28, .06); }
.on-dark .chapters a:hover, .on-dark .chapters a.active { background: rgba(255, 255, 255, .14); }
.topbar-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.topbar .btn.primary { min-height: 34px; padding: 0 14px; }
.live-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 0 8px; }
.live-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--available); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.menu-btn { display: none; }
@media (max-width: 1080px) {
  .chapters { display: none; }
  .menu-btn { display: inline-flex; }
  body.menu-open .chapters { display: flex; flex-direction: column; position: fixed; inset: var(--topbar) 0 auto 0; margin: 0; background: var(--canvas); color: var(--carbon); padding: 8px var(--gutter) 20px; }
  body.menu-open .chapters a { font-size: 17px; padding: 14px 0; border-radius: 0; background: none; }
  body.menu-open .topbar { background: var(--canvas); color: var(--carbon); }
}
@media (max-width: 560px) { .hide-sm { display: none !important; } .brand-mark .stack { display: none; } }

/* ==========================================================================
   Story: five pinned beats, renders crossfade as you scroll
   ========================================================================== */
.story { position: relative; height: calc(var(--beats, 5) * 100svh); background: #171a1c; }
.story-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.story-media { position: absolute; inset: 0; }
.story-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06); transition: opacity 1.1s cubic-bezier(.2, .7, .1, 1), transform 6s cubic-bezier(.2, .7, .1, 1); will-change: opacity, transform; }
.story-media img.on { opacity: 1; transform: scale(1); }
.story-stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(10, 12, 13, .62) 0%, rgba(10, 12, 13, .28) 26%, rgba(10, 12, 13, 0) 44%, rgba(10, 12, 13, 0) 62%, rgba(10, 12, 13, .5) 100%); }
.story-copy { position: absolute; inset: 0; z-index: 2; display: grid; grid-template-rows: 1fr auto; padding: calc(var(--topbar) + 9vh) var(--gutter) max(6vh, 32px); text-align: center; color: #fff; pointer-events: none; }
.beat { grid-area: 1 / 1; align-self: start; justify-self: center; max-width: 640px; opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .1, 1); }
.beat.on { opacity: 1; transform: none; }
.beat h1, .beat h2 { color: #fff; font-size: clamp(28px, 3vw, 40px); font-weight: 500; line-height: 1.2; text-shadow: 0 1px 24px rgba(0, 0, 0, .25); }
.beat p { margin: 10px auto 0; font-size: clamp(14px, 1.2vw, 17px); color: rgba(255, 255, 255, .92); max-width: 46ch; text-shadow: 0 1px 16px rgba(0, 0, 0, .35); }
.story-ctas { grid-area: 2 / 1; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; pointer-events: auto; opacity: 0; transform: translateY(10px); transition: opacity .6s ease, transform .6s ease; }
.story-ctas.on { opacity: 1; transform: none; }
.story-ctas .btn { min-width: 200px; }
.story-ctas .btn.light { background: rgba(255, 255, 255, .9); color: var(--graphite); }
.story-ctas .btn.light:hover { background: #fff; }
.story-dots { position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%); z-index: 3; display: grid; gap: 12px; }
.story-dots button { width: 8px; height: 8px; padding: 0; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .45); cursor: pointer; transition: background-color var(--t), transform var(--t); }
.story-dots button[aria-current="true"] { background: #fff; transform: scale(1.35); }
.story-steps { position: absolute; inset: 0; pointer-events: none; }
.story-steps div { height: 100svh; }
.story-bar { position: absolute; left: 0; bottom: 0; height: 2px; z-index: 3; background: rgba(255, 255, 255, .85); width: 100%; transform-origin: left; transform: scaleX(0); }
@supports (animation-timeline: view()) {
  .story-bar { animation: storybar linear both; animation-timeline: --story; }
  .story { view-timeline: --story block; }
  @keyframes storybar { entry 100% { transform: scaleX(0); } exit 0% { transform: scaleX(1); } }
}
@media (max-width: 760px) {
  .story-copy { padding-top: calc(var(--topbar) + 6vh); }
  .story-ctas { flex-direction: column; align-items: center; }
  .story-dots { right: 10px; }
}
@media (prefers-reduced-motion: reduce) { .story-media img { transform: none !important; } }

/* ---------- Sections: one message per screen ---------- */
.section { padding: clamp(80px, 12vh, 140px) var(--gutter); position: relative; }
.wrap { max-width: var(--max); margin: 0 auto; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 24px; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(26px, 3vw, 40px); font-weight: 500; }
.section-head p { margin: 8px 0 0; color: var(--pewter); max-width: 60ch; }

/* ---------- Placeholder slot ---------- */
.slot { position: relative; width: 100%; height: 100%; min-height: 160px; background: var(--ash); }
.slot .slot-label { position: absolute; left: 16px; bottom: 14px; right: 16px; font-size: 12px; color: var(--pewter); display: grid; gap: 4px; }
.slot .slot-label b { color: var(--carbon); font-weight: 500; font-size: 13px; }
.slot .slot-prompt { display: none; font-family: var(--font-mono); font-size: 11px; color: var(--fog); }
body.edit .slot .slot-prompt { display: block; }

/* ---------- Masterplan ---------- */
.mp { display: grid; grid-template-columns: 300px 1fr; gap: 16px; height: min(78vh, 820px); min-height: 540px; }
.mp-side { display: flex; flex-direction: column; min-height: 0; background: var(--ash); border-radius: var(--r-card); overflow: hidden; }
.mp-filters { padding: 18px; display: grid; gap: 16px; }
.mp-filters .row { display: grid; gap: 6px; }
.mp-filters .range-out { display: flex; justify-content: space-between; font-size: 12px; color: var(--pewter); }
.mp-list { overflow: auto; flex: 1; min-height: 0; background: var(--canvas); margin: 0 6px 6px; border-radius: 8px; }
.mp-list button { width: 100%; display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; text-align: left; padding: 10px 14px; border: 0; background: none; cursor: pointer; transition: background-color var(--t); }
.mp-list button + button { box-shadow: inset 0 1px 0 var(--hair); }
.mp-list button:hover, .mp-list button.hot { background: var(--ash); }
.mp-list .u { font-weight: 500; color: var(--carbon); font-size: 15px; }
.mp-list .meta { font-size: 12px; color: var(--pewter); }
.mp-list .p { font-size: 13px; font-weight: 500; color: var(--carbon); text-align: right; }
.mp-stage { position: relative; overflow: hidden; background: var(--ash); border-radius: var(--r-card); touch-action: none; cursor: grab; }
.mp-stage.dragging { cursor: grabbing; }
.mp-canvas { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.mp-canvas img { width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }
.mp-canvas svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.mp-unit { cursor: pointer; transition: opacity var(--t); }
.mp-unit rect, .mp-unit polygon { stroke: var(--ash); stroke-width: 2; vector-effect: non-scaling-stroke; transition: fill var(--t), opacity var(--t); }
.mp-unit text { font: 500 11px var(--font-body); fill: #fff; pointer-events: none; text-anchor: middle; dominant-baseline: central; }
.mp-unit.available rect, .mp-unit.available polygon { fill: var(--available); }
.mp-unit.sold rect, .mp-unit.sold polygon { fill: #d9d8d4; }
.mp-unit.sold text { fill: var(--fog); }
.mp-unit.reserved rect, .mp-unit.reserved polygon { fill: var(--reserved); }
.mp-unit:hover rect, .mp-unit:hover polygon, .mp-unit.hot rect, .mp-unit.hot polygon { fill: var(--accent); }
.mp-unit.selected rect, .mp-unit.selected polygon { fill: var(--carbon); }
.mp-unit.dim { opacity: .15; pointer-events: none; }
.mp-overlay .mp-unit rect, .mp-overlay .mp-unit polygon { fill-opacity: .6; }
.mp-overlay .mp-pin circle { stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }
.mp-site-label { font: 500 12px var(--font-body); fill: var(--pewter); }
.mp-road { fill: #e2e1dd; }
.mp-hud { position: absolute; right: 12px; top: 12px; display: grid; gap: 6px; }
.mp-hud .btn { width: 36px; min-height: 36px; padding: 0; background: rgba(252, 252, 251, .9); border: 0; }
.mp-legend { position: absolute; left: 12px; bottom: 12px; display: flex; gap: 14px; flex-wrap: wrap; padding: 8px 12px; border-radius: 8px; background: rgba(252, 252, 251, .92); font-size: 12px; color: var(--graphite); }
.mp-legend span { display: inline-flex; gap: 6px; align-items: center; }
.mp-legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.mp-compass { position: absolute; left: 14px; top: 12px; font-size: 12px; color: var(--pewter); }
.mp-note { position: absolute; right: 14px; bottom: 14px; font-size: 12px; color: var(--fog); max-width: 260px; text-align: right; }
@media (max-width: 900px) {
  .mp { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .mp-stage { height: 62vh; min-height: 400px; order: -1; touch-action: pan-y; }
  .mp-list { max-height: 48vh; }
  .mp-note { display: none; }
}

/* ---------- Availability ---------- */
.inv-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.inv-bar .left, .inv-bar .right { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.search { position: relative; }
.search input { padding-left: 36px; width: 220px; min-height: 36px; }
.search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--fog); font-size: 16px; }
.table-wrap { overflow: auto; max-height: 72vh; border-radius: var(--r-card); background: #fff; }
table.inv { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 760px; }
table.inv th { position: sticky; top: 0; z-index: 1; background: var(--ash); text-align: left; font-size: 13px; font-weight: 500; color: var(--pewter); padding: 12px 14px; cursor: pointer; user-select: none; white-space: nowrap; }
table.inv th[aria-sort="ascending"]::after { content: " \2191"; color: var(--accent); }
table.inv th[aria-sort="descending"]::after { content: " \2193"; color: var(--accent); }
table.inv th.r, table.inv td.r { text-align: right; }
table.inv td { padding: 12px 14px; font-variant-numeric: tabular-nums; color: var(--carbon); }
table.inv tbody tr { cursor: pointer; transition: background-color var(--t); }
table.inv tbody tr + tr td { box-shadow: inset 0 1px 0 var(--hair); }
table.inv tbody tr:hover { background: var(--ash); }
table.inv tr.is-sold td { color: var(--fog); }
table.inv .star { background: none; border: 0; cursor: pointer; padding: 4px; color: var(--fog); font-size: 18px; }
table.inv .star[aria-pressed="true"] { color: var(--accent); }
.inv-foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 12px; font-size: 12px; color: var(--fog); }
.cards { display: none; }
@media (max-width: 760px) {
  .table-wrap { display: none; }
  .cards { display: grid; gap: 8px; }
  .card-unit { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 14px 16px; border-radius: var(--r-card); background: var(--ash); cursor: pointer; }
  .card-unit .t { font-weight: 500; color: var(--carbon); font-size: 16px; }
  .card-unit .s { font-size: 13px; color: var(--pewter); }
  .search, .search input { width: 100%; flex: 1 1 100%; }
}

/* ---------- Drawer ---------- */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(23, 26, 28, .38); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 70; width: min(520px, 100%); background: var(--canvas); transform: translateX(102%); transition: transform .45s cubic-bezier(.2, .7, .1, 1); overflow-y: auto; overscroll-behavior: contain; }
.drawer.open { transform: none; }
.drawer-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: rgba(252, 252, 251, .92); backdrop-filter: blur(12px); }
.drawer-body { padding: 8px 24px 40px; display: grid; gap: 24px; }
.drawer .eyebrow { font-size: 14px; }
.drawer h3 { font-size: 40px; font-weight: 500; line-height: 1.1; }
.drawer .price { font-size: 22px; font-weight: 500; color: var(--carbon); }
.drawer .plan { aspect-ratio: 4 / 3; border-radius: var(--r-card); overflow: hidden; background: #fff; position: relative; }
.drawer .plan img { width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; padding: 8px; }
.spec { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 0; }
.spec div { background: var(--ash); padding: 12px 14px; border-radius: 8px; }
.spec dt { font-size: 12px; color: var(--pewter); }
.spec dd { margin: 2px 0 0; font-size: 17px; font-weight: 500; color: var(--carbon); font-variant-numeric: tabular-nums; }
.drawer .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.drawer-nav { display: flex; gap: 4px; }

/* Calculator */
.calc { background: var(--ash); border-radius: var(--r-card); overflow: hidden; }
.tabs { display: flex; padding: 4px; gap: 4px; }
.tabs button { flex: 1; min-height: 34px; background: none; border: 0; border-radius: var(--r-btn); color: var(--pewter); font-size: 13px; font-weight: 500; cursor: pointer; transition: background-color var(--t), color var(--t); }
.tabs button[aria-selected="true"] { background: var(--canvas); color: var(--carbon); }
.calc-body { padding: 12px 16px 16px; display: grid; gap: 12px; }
.calc-row { display: grid; grid-template-columns: 1fr 130px; gap: 10px; align-items: center; font-size: 14px; }
.calc-row .input { min-height: 36px; text-align: right; }
.calc-out { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.calc-out div { background: var(--canvas); padding: 12px; border-radius: 8px; }
.calc-out b { display: block; font-size: 19px; font-weight: 500; color: var(--carbon); font-variant-numeric: tabular-nums; }
.calc-out span { font-size: 12px; color: var(--pewter); }

/* ---------- Gallery: 2-up category cards, alternating weight ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.g-item { position: relative; border-radius: var(--r-card); overflow: hidden; cursor: zoom-in; border: 0; padding: 0; background: var(--ash); aspect-ratio: 16 / 10; }
.g-item:nth-child(4n+1), .g-item:nth-child(4n+4) { grid-column: span 2; aspect-ratio: auto; }
.g-item img { width: 100%; height: 100%; object-fit: cover; }
.g-item .cap { position: absolute; left: 16px; top: 14px; color: #fff; font-size: 16px; font-weight: 500; text-shadow: 0 1px 14px rgba(0, 0, 0, .45); text-align: left; }
@media (max-width: 760px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .g-item:nth-child(n) { grid-column: auto; aspect-ratio: 16 / 10; }
}
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(12, 13, 14, .96); color: #fff; display: grid; grid-template-rows: auto 1fr auto; }
.lightbox header, .lightbox footer { display: flex; justify-content: space-between; align-items: center; padding: 12px var(--gutter); gap: 12px; }
.lightbox .btn { background: rgba(255, 255, 255, .12); color: #fff; }
.lightbox .btn:hover { background: rgba(255, 255, 255, .2); }
.lightbox .stage { display: grid; place-items: center; min-height: 0; padding: 0 var(--gutter); }
.lightbox .stage img { max-height: 100%; max-width: 100%; object-fit: contain; }
.lightbox .muted { color: rgba(255, 255, 255, .6); }

/* ---------- Location ---------- */
.loc { display: grid; grid-template-columns: 340px 1fr; gap: 16px; height: min(76vh, 760px); min-height: 520px; }
.loc-side { display: flex; flex-direction: column; min-height: 0; background: var(--ash); border-radius: var(--r-card); overflow: hidden; }
.loc-side .chips { padding: 12px; }
.loc-list { overflow: auto; flex: 1; background: var(--canvas); margin: 0 6px 6px; border-radius: 8px; }
.loc-list button { width: 100%; display: grid; grid-template-columns: 10px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; text-align: left; background: none; border: 0; cursor: pointer; transition: background-color var(--t); }
.loc-list button + button { box-shadow: inset 0 1px 0 var(--hair); }
.loc-list button:hover, .loc-list button.active { background: var(--ash); }
.loc-list i { width: 10px; height: 10px; border-radius: 50%; }
.loc-list .n { font-size: 14px; color: var(--carbon); }
.loc-list .d { font-size: 12px; color: var(--pewter); text-align: right; white-space: nowrap; }
.loc-map { position: relative; background: var(--ash); border-radius: var(--r-card); overflow: hidden; }
.loc-map .maplibregl-popup-content { border-radius: 8px; padding: 10px 12px; font: 400 13px var(--font-body); color: var(--carbon); box-shadow: none; }
.poi-pin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; cursor: pointer; }
.site-pin { width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 500; font-size: 18px; box-shadow: 0 0 0 10px rgba(47, 107, 85, .18), 0 0 0 22px rgba(47, 107, 85, .08); }
.access { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; }
.access b { display: block; font-size: 28px; font-weight: 500; color: var(--carbon); line-height: 1.1; }
.access span { font-size: 14px; color: var(--pewter); }
.map-fallback { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--pewter); padding: 24px; }
@media (max-width: 900px) {
  .loc { grid-template-columns: 1fr; height: auto; }
  .loc-map { height: 56vh; min-height: 360px; order: -1; }
  .loc-list { max-height: 44vh; }
  .access { grid-template-columns: 1fr 1fr; }
}

/* ---------- Construction photos ---------- */
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: min(560px, 82vw); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; }
.strip button { scroll-snap-align: start; border: 0; padding: 0; border-radius: var(--r-card); overflow: hidden; aspect-ratio: 4 / 3; cursor: zoom-in; background: var(--ash); }
.strip img { width: 100%; height: 100%; object-fit: cover; }
.strip-nav { display: flex; gap: 6px; }

/* Tours now style themselves from css/tours.css; the old .tours-grid / .tour
   two-up layout was dropped when "Step inside" became a single stage. */

/* ---------- Contact / data room ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.agents { display: grid; gap: 4px; margin-top: 24px; }
.agent { display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: center; padding: 12px 0; }
.agent .av { width: 48px; height: 48px; border-radius: 50%; background: var(--ash-2); display: grid; place-items: center; font-weight: 500; color: var(--carbon); overflow: hidden; }
.agent .av img { width: 100%; height: 100%; object-fit: cover; }
.agent .n { font-weight: 500; color: var(--carbon); }
.agent .r { font-size: 13px; color: var(--pewter); }
.agent .links { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 2px; font-size: 14px; }
.agent .links a { text-decoration: none; color: var(--pewter); transition: color var(--t); }
.agent .links a:hover { color: var(--carbon); }
.docs { display: grid; gap: 4px; margin-top: 32px; }
.doc { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 8px; background: var(--ash); text-decoration: none; cursor: pointer; text-align: left; width: 100%; border: 0; transition: background-color var(--t); }
.doc:hover { background: var(--ash-2); }
.doc > i { font-size: 20px; color: var(--pewter); }
.doc .t { font-weight: 500; font-size: 14px; color: var(--carbon); }
.doc .s { font-size: 12px; color: var(--pewter); }
.doc .lock { margin-left: auto; font-size: 13px; color: var(--pewter); display: flex; align-items: center; gap: 6px; }
.form-card { background: var(--ash); border-radius: var(--r-card); padding: clamp(20px, 3vw, 36px); }
.form { display: grid; gap: 14px; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form .units-picked { display: flex; flex-wrap: wrap; gap: 6px; }
.form .units-picked span { padding: 4px 10px; border-radius: var(--r-btn); background: var(--canvas); font-size: 13px; }
.steps-ind { display: flex; gap: 6px; }
.steps-ind i { flex: 1; height: 3px; border-radius: 2px; background: var(--ash-2); }
.steps-ind i.on { background: var(--accent); }
@media (max-width: 860px) { .contact-grid, .form .two { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.footer { padding: 48px var(--gutter) 40px; background: var(--ash); font-size: 12px; color: var(--pewter); }
.footer .wrap { display: grid; gap: 18px; }
.footer ol { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.footer .row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }

/* ---------- Modal / toast / tooltip ---------- */
.modal { border: 0; border-radius: var(--r-card); background: var(--canvas); color: var(--graphite); padding: 0; width: min(560px, calc(100% - 32px)); max-height: calc(100svh - 32px); }
.modal.wide { width: min(1000px, calc(100% - 32px)); }
.modal::backdrop { background: rgba(23, 26, 28, .45); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; position: sticky; top: 0; background: var(--canvas); z-index: 1; }
.modal-head h3 { font-size: 20px; }
.modal-body { padding: 4px 20px 22px; }
.compare { width: 100%; border-collapse: collapse; font-size: 14px; }
.compare th, .compare td { padding: 12px; text-align: left; font-variant-numeric: tabular-nums; color: var(--carbon); }
.compare tr + tr th, .compare tr + tr td { box-shadow: inset 0 1px 0 var(--hair); }
.compare th { color: var(--pewter); font-weight: 400; font-size: 13px; }
.compare td.best { color: var(--accent); font-weight: 500; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 100; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; padding: 10px 16px; border-radius: var(--r-btn); background: var(--carbon); color: #fff; font-size: 14px; transition: opacity var(--t), transform var(--t); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.tooltip { position: fixed; z-index: 80; pointer-events: none; padding: 10px 12px; border-radius: 8px; background: var(--carbon); color: #fff; font-size: 13px; min-width: 170px; }
.tooltip b { font-weight: 500; font-size: 15px; }
.tooltip .row { display: flex; justify-content: space-between; gap: 14px; }
.tooltip .muted { color: rgba(255, 255, 255, .65); }
.tooltip .status.sold { color: #f08b83; }

/* ---------- Presentation mode ---------- */
body.present main > section:not(.story) { min-height: 100svh; }
.present-hud { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 55; display: flex; gap: 4px; align-items: center; padding: 4px; border-radius: 8px; background: rgba(23, 26, 28, .88); color: #fff; font-size: 13px; }
.present-hud .btn { color: #fff; min-height: 32px; }
.present-hud .btn:hover { background: rgba(255, 255, 255, .14); }
.present-hud span { padding: 0 8px; min-width: 110px; text-align: center; }

/* ---------- Reveal ---------- */
/* ---------- Scroll progress ---------- */
/* Scroll-driven CSS rather than a scroll listener, per DESIGN.md: it runs on the
   compositor and costs nothing. Browsers without animation-timeline simply never
   show the bar, which is the right failure for pure decoration. */
.scroll-progress { display: none; }
@supports (animation-timeline: scroll()) {
  .scroll-progress {
    display: block; position: fixed; inset: 0 0 auto 0; z-index: 60;
    height: 2px; pointer-events: none; background: transparent;
  }
  .scroll-progress > i {
    display: block; height: 100%; width: 100%; transform-origin: 0 50%;
    background: var(--accent);
    animation: sp-grow linear both;
    animation-timeline: scroll(root block);
  }
  @keyframes sp-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  body.present .scroll-progress { display: none; }
}
@media (prefers-reduced-motion: reduce) { .scroll-progress { display: none; } }
@media print { .scroll-progress { display: none !important; } }

/* ---------- Back to top ---------- */
/* Bottom left, because the enquire pill owns the bottom right and the two must
   never overlap on a narrow desktop window. */
.to-top {
  position: fixed; left: clamp(16px, 2.4vw, 32px); bottom: clamp(16px, 2.4vw, 32px);
  z-index: 44; width: 44px; height: 44px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%; cursor: pointer;
  background: var(--ash); color: var(--carbon); font-size: 18px;
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s linear .3s, background var(--t);
}
.to-top:hover { background: var(--ash-2); }
.to-top.show { opacity: 1; visibility: visible; transform: none; transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s, background var(--t); }
body.present .to-top, body.menu-open .to-top { display: none; }
@media (max-width: 759.98px) { .to-top { display: none; } }  /* the action bar owns the bottom edge */
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }
@media print { .to-top { display: none !important; } }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .1, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .beat, .story-ctas { transform: none; }
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}
.edit-banner { position: fixed; left: 12px; bottom: 12px; z-index: 95; background: #f6ecd8; color: #8a5b0c; font-size: 12px; font-weight: 500; padding: 8px 12px; border-radius: var(--r-btn); }
#mpLegendCounts { gap: 16px; }
.topbar.on-dark .btn.ghost i, .topbar.on-dark .brand-mark, .topbar.on-dark .chapters a { filter: drop-shadow(0 1px 8px rgba(0, 0, 0, .55)); }
.beat p { text-shadow: 0 1px 3px rgba(0, 0, 0, .5), 0 1px 18px rgba(0, 0, 0, .45); }

/* ---------- 3D render view (Choose your space) ---------- */
.mp-head-right { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--ash-2); border-radius: 6px; }
.seg button { min-height: 32px; padding: 0 14px; border: 0; border-radius: var(--r-btn); background: transparent; color: var(--pewter); font-size: 13px; font-weight: 500; cursor: pointer; transition: background-color var(--t), color var(--t); }
.seg button[aria-selected="true"] { background: var(--canvas); color: var(--carbon); }
.mp > .mp-3d, .mp > .mp-stage { grid-column: 2; grid-row: 1; }
.mp-3d { position: relative; border-radius: var(--r-card); overflow: hidden; background: #cfd8de; min-height: 0; }
.r3d { position: absolute; inset: 0; }
.r3d-scenes { position: absolute; left: 12px; top: 12px; z-index: 5; background: rgba(252, 252, 251, .9); border-radius: 6px; padding: 3px; }
.r3d-hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 5; font-size: 12px; color: #fff; background: rgba(23, 26, 28, .55); padding: 6px 10px; border-radius: var(--r-btn); pointer-events: none; white-space: nowrap; }
.r3d-pin { display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 4px; border-radius: 11px; font: 500 10px var(--font-body); color: #fff; border: 2px solid #fff; cursor: pointer; transition: transform .2s, background-color var(--t), opacity var(--t); }
.r3d-pin.available { background: var(--available); }
.r3d-pin.sold { background: #8f8d89; }
.r3d-pin.reserved { background: var(--reserved); }
.r3d-pin:hover, .r3d-pin.hot { background: var(--accent); transform: scale(1.35); }
.r3d-pin.star { box-shadow: 0 0 0 2px var(--accent); }
.r3d-pin.dim { opacity: .18; pointer-events: none; }
.mp-3d .psv-tooltip { background: var(--carbon); border-radius: 8px; font: 400 13px/1.4 var(--font-body); }
.mp-3d .psv-tooltip-content { padding: 8px 10px; }
.mp-3d .psv-navbar { background: rgba(23, 26, 28, .55); }
@media (max-width: 900px) {
  .mp > .mp-3d, .mp > .mp-stage { grid-column: 1; grid-row: 1; height: 62vh; min-height: 400px; }
  .r3d-hint { display: none; }
}
.agent.lead { grid-template-columns: 72px 1fr; }
.agent.lead .av { width: 72px; height: 72px; }
.agent.lead .n { font-size: 17px; }
@media (max-width: 900px) { .r3d-pin { min-width: 17px; height: 17px; font-size: 8px; border-width: 1.5px; padding: 0 2px; } }

/* ==========================================================================
   Intro: scroll-scrubbed construction timelapse
   ========================================================================== */
.intro { position: relative; height: 560svh; background: #cfd8de; }
.intro-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.intro-poster, .intro-canvas, .intro-render, .intro-white, .intro-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.intro-poster, .intro-render { object-fit: cover; }
.intro-poster { transition: opacity .4s; }
.intro-render { opacity: 0; transform: scale(calc(1.06 - var(--p, 0) * .06)); }
.intro-shade { pointer-events: none; background: linear-gradient(180deg, rgba(10, 14, 18, .38) 0%, rgba(10, 14, 18, .1) 38%, rgba(10, 14, 18, 0) 60%, rgba(10, 14, 18, .28) 100%); }
.intro-white { background: var(--canvas); opacity: 0; pointer-events: none; }
.intro-copy { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 0 var(--gutter); color: #fff; pointer-events: none; }
.intro-copy > * { grid-area: 1 / 1; opacity: 0; will-change: opacity, transform; }
.intro-title { color: #fff; font-weight: 200; font-size: clamp(52px, 9.5vw, 164px); letter-spacing: .01em; line-height: 1; text-shadow: 0 2px 40px rgba(0, 0, 0, .28); }
.intro-beat { max-width: 760px; }
.intro-beat h2 { color: #fff; font-weight: 300; font-size: clamp(30px, 4.4vw, 64px); line-height: 1.1; text-shadow: 0 2px 30px rgba(0, 0, 0, .3); }
.intro-beat p { margin: 16px auto 0; max-width: 46ch; font-size: clamp(15px, 1.3vw, 19px); font-weight: 300; color: rgba(255, 255, 255, .94); text-shadow: 0 1px 3px rgba(0, 0, 0, .45), 0 1px 18px rgba(0, 0, 0, .35); }
/* Reduced motion: no scrubbing, the render with the title, beats listed beneath. */
.intro.intro-static { height: auto; }
.intro.intro-static .intro-stage { position: relative; height: 100svh; }
.intro.intro-static .intro-canvas { display: none; }
.intro.intro-static .intro-render { opacity: 1; transform: none; }
.intro.intro-static .intro-title { opacity: 1; }

/* ==========================================================================
   Typography system (Manrope). Fine display weights, quiet UI.
   Display 200 / headings 300 / body 400 / UI 500-600, tabular figures for data.
   ========================================================================== */
body { font-size: 15px; line-height: 1.6; font-feature-settings: "ss01" 0; }
h1, h2, h3, h4 { font-weight: 300; letter-spacing: -0.02em; }
.section-head h2 { font-size: clamp(32px, 3.8vw, 54px); font-weight: 300; letter-spacing: -0.025em; line-height: 1.06; }
.section-head p { font-size: 16px; line-height: 1.55; margin-top: 12px; }
.lede { font-size: 18px; line-height: 1.6; font-weight: 400; }
.btn { font-weight: 600; letter-spacing: 0.005em; }
.chip, .seg button, .tabs button { font-weight: 600; }
.chapters a { font-weight: 500; font-size: 13.5px; letter-spacing: 0.01em; }
.brand-mark .big { font-weight: 300; font-size: 28px; letter-spacing: -0.03em; }
.brand-mark .stack { font-weight: 600; letter-spacing: .22em; }
.field label, .field .label { font-weight: 600; font-size: 12.5px; letter-spacing: 0.01em; }
.status { font-weight: 600; }
table.inv th { font-weight: 600; font-size: 12.5px; letter-spacing: 0.01em; }
table.inv td, .mp-list .p, .spec dd, .calc-out b, .price, .compare td { font-variant-numeric: tabular-nums lining-nums; }
.mp-list .u { font-weight: 600; }
.spec dd { font-weight: 500; }
.calc-out b { font-weight: 500; }
.drawer h3 { font-weight: 200; font-size: 48px; letter-spacing: -0.035em; }
.drawer .price { font-weight: 400; font-size: 24px; letter-spacing: -0.01em; }
.access b { font-weight: 200; font-size: 36px; letter-spacing: -0.03em; }
.agent .n { font-weight: 600; }
.g-item .cap { font-weight: 500; letter-spacing: -0.005em; }
.footer { font-size: 12px; line-height: 1.6; }

/* Intro: hairline display type over the timelapse */
.intro-title { font-weight: 200; font-size: clamp(58px, 10.5vw, 184px); letter-spacing: -0.035em; line-height: .95; }
.intro-beat h2 { font-weight: 200; font-size: clamp(36px, 5vw, 76px); letter-spacing: -0.03em; line-height: 1.04; }
.intro-beat p { font-weight: 400; font-size: clamp(15px, 1.25vw, 18px); letter-spacing: 0.005em; line-height: 1.55; margin-top: 18px; }
.mp-unit text { font-weight: 600; }
.r3d-pin { font-weight: 700; }
.intro-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255, 255, 255, .18); z-index: 3; pointer-events: none; }
.intro-progress i { display: block; height: 100%; background: rgba(255, 255, 255, .9); transform-origin: left; transform: scaleX(0); }
.intro.intro-static .intro-progress { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Construction stages: three renders cross-faded by scroll over a sticky stage. */
.phases { margin: 0 0 32px; }
.phases-track { position: relative; height: 260vh; }
.phases-stage {
  position: sticky; top: calc(var(--topbar) + 16px); margin: 0;
  height: min(72vh, 58vw); border-radius: var(--r-card); overflow: hidden;
  background: var(--ash-2);
}
.ph-poster, .ph-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; user-select: none;
}
.ph-poster { transition: opacity var(--t); }

.ph-steps {
  position: absolute; left: 16px; bottom: 16px; right: 16px;
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.ph-steps li { display: contents; }
.ph-step {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; min-height: 34px; border-radius: var(--r-btn);
  border: 0; font-family: inherit; cursor: pointer; appearance: none;
  background: rgba(252, 252, 251, .82);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: var(--pewter); font-size: 13px; font-weight: 400;
  transition: color var(--t), background-color var(--t);
}
.ph-step i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--fog); transition: background-color var(--t);
}
.ph-step:hover { color: var(--carbon); background: rgba(252, 252, 251, .95); }
.ph-step:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.ph-step.on { color: var(--carbon); font-weight: 500; background: rgba(252, 252, 251, .95); }
.ph-step.on i { background: var(--accent); }
.ph-cap { margin: 12px 0 0; }

/* No scroll scrubbing: show the finished stage and stack the labels under it. */
.phases-static .phases-track { height: auto; }
.phases-static .phases-stage { position: static; height: auto; aspect-ratio: 16 / 9; }
.phases-static .ph-steps { position: static; margin-top: 12px; }

@media (max-width: 760px) {
  .phases-track { height: 220vh; }
  .phases-stage { height: min(52vh, 72vw); }
  .ph-steps { left: 12px; right: 12px; bottom: 12px; gap: 6px; }
  /* 44px minimum tap target: thumbs, not cursors. */
  .ph-step { padding: 0 13px; min-height: 44px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .phases-track { height: auto; }
  .phases-stage { position: static; height: auto; aspect-ratio: 16 / 9; }
}

/* Standing disclaimer over the intro; fades out with the progress bar. */
.intro-fine {
  position: absolute; left: var(--gutter); bottom: 22px; margin: 0;
  color: #fff; font-size: 12px; font-weight: 400; letter-spacing: .01em;
  opacity: .72; text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
  pointer-events: none;
}
.intro.intro-static .intro-fine { opacity: .72; }
@media (max-width: 760px) {
  .intro-fine { bottom: 18px; font-size: 11px; }
}
