/* Floorplate - HTML template for one residential development
   Colours and fonts: change them here only (tokens on :root). */

:root {
  --paper: #f4efe6;
  --stone: #e5dbca;
  --ink: #17203a;
  --muted: #636a7c;
  --accent: #b98a4b;
  --line: rgba(23, 32, 58, .16);
  --on-photo: #f6f4ef;
  --glow: 0 0 2px rgba(10, 10, 9, .35), 0 0 14px rgba(10, 10, 9, .55), 0 0 34px rgba(10, 10, 9, .35);
  --f-head: "Red Hat Display", system-ui, sans-serif;
  --f-text: "Red Hat Text", system-ui, sans-serif;
  --f-mono: "Reddit Mono", ui-monospace, monospace;
  --head-w: 300;
  --head-track: -.03em;
  --side: clamp(16px, 4vw, 56px);
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.6 var(--f-text); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, dl, dd, ol, figure { margin: 0; padding: 0; }
ol { list-style: none; }
::selection { background: var(--accent); color: var(--paper); }
.wrap { width: 100%; max-width: 1480px; margin: 0 auto; padding-left: var(--side); padding-right: var(--side); }
.head { font-family: var(--f-head); font-weight: var(--head-w); letter-spacing: var(--head-track); line-height: 1.04; }
.mono { font-family: var(--f-mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; line-height: 1.4; }
.kicker { color: var(--muted); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 14px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }

/* Buttons = a lift. Label + a small lift panel (arrow). On hover the fill climbs floor by floor
   (4 stepped bands, faint slab lines between them) and the arrow rides up to the next floor. */
.btn { position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: stretch; min-height: 48px;
  font: 500 14px/1 var(--f-text); text-decoration: none; border: 1px solid var(--ink); transition: color 0s .2s; }
.btn-t { flex: 1; display: flex; align-items: center; justify-content: center; padding: 0 20px; }
.btn-lvl { display: grid; place-items: center; width: 46px; border-left: 1px solid currentColor; overflow: hidden; font-size: 13px; }
.btn-lvl i { font-style: normal; text-shadow: 0 2.4em currentColor; transition: transform .55s cubic-bezier(.6, 0, .2, 1); }
.btn::before { content: ""; position: absolute; z-index: -1; inset: 0; clip-path: inset(100% 0 0 0);
  background: repeating-linear-gradient(to top, transparent 0 calc(25% - 1px), rgba(255, 255, 255, .22) calc(25% - 1px) 25%) var(--fill);
  transition: clip-path .5s steps(4, end); }
.btn:hover::before, .btn:focus-visible::before { clip-path: inset(0 0 0 0); }
.btn:hover .btn-lvl i, .btn:focus-visible .btn-lvl i { transform: translateY(-2.4em); }
.btn-solid { --fill: var(--accent); background: var(--ink); color: var(--paper); }
.btn-solid:hover, .btn-solid:focus-visible { color: var(--ink); }
.btn-line { --fill: var(--ink); color: var(--ink); }
.btn-line:hover, .btn-line:focus-visible { color: var(--paper); }
@media (prefers-reduced-motion: reduce) { .btn::before, .btn-lvl i { transition: none; } }
.btns { display: flex; flex-wrap: wrap; gap: 10px; }

/* Header */
.header { position: fixed; z-index: 30; top: 0; left: 0; right: 0; height: var(--header-h); display: flex; align-items: center; gap: 28px;
  padding: 0 var(--side); transition: background .4s, box-shadow .4s; }
.header.scrolled { background: color-mix(in srgb, var(--paper) 90%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); }
.logo { display: inline-flex; align-items: center; gap: 10px; font: 500 16px/1 var(--f-text); text-decoration: none; margin-right: auto; }
.logo-mark { display: grid; gap: 3px; width: 18px; }
.logo-mark i { display: block; height: 3px; background: currentColor; }
.logo-mark i:nth-child(1) { width: 60%; }
.logo-mark i:nth-child(2) { width: 80%; }
.nav-links { display: flex; gap: 26px; }
.nav-links a { font-size: 14px; text-decoration: none; position: relative; padding: 6px 0; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .4s; }
.nav-links a:hover::after, .nav-links a[aria-current]::after { transform: scaleX(1); }
.header-cta { min-height: 40px; font-size: 13px; }
.header-cta .btn-t { padding: 0 14px; }
.header-cta .btn-lvl { width: 38px; }
.menu-btn { display: none; background: none; border: 1px solid var(--ink); color: var(--ink); font: 500 13px/1 var(--f-text); min-height: 40px; padding: 0 16px; cursor: pointer; }
.menu { position: fixed; inset: 0; z-index: 25; background: var(--paper); padding: calc(var(--header-h) + 24px) var(--side) 32px; display: flex; flex-direction: column; justify-content: space-between; }
.menu[hidden] { display: none; }
.menu nav { display: grid; }
.menu nav a { display: flex; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font: var(--head-w) clamp(30px, 8vw, 48px)/1.1 var(--f-head); text-decoration: none; }
.menu nav a .mono { color: var(--muted); }
.menu-foot { display: grid; gap: 8px; }
@media (max-width: 900px) {
  .nav-links { display: none; }
  .menu-btn { display: inline-flex; align-items: center; }
  .header-cta { display: none; }
}

/* HERO: the building goes up floor by floor (main.js, FLOOR BY FLOOR) */
.hero { position: relative; height: 100svh; min-height: 620px; display: grid; grid-template-rows: 1fr auto; padding-top: calc(var(--header-h) + 8px); }
.hero { --gut: clamp(16px, 5.5vw, 92px); }
.hero-sheet { position: relative; margin: 0 var(--gut); min-height: 0; }
.hero-photo { position: absolute; inset: 0; overflow: hidden; background: var(--stone); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.motion .hero:not(.is-built) .hero-photo { clip-path: inset(100% 0 0 0); }
/* Slides: the next photo comes in from the right over the current one, the title swaps the other way */
.hero-slides { position: absolute; inset: 0; overflow: hidden; }
.hero-photo { visibility: hidden; }
.hero-photo.on, .hero-slides:not(.live) .hero-photo:first-child { visibility: visible; }
.hero-title { display: grid; }
.motion .hero:not(.is-built) .hero-title, .motion .hero:not(.is-built) .hero-foot { visibility: hidden; }
.ht { grid-area: 1 / 1; }
.ht:not(.on) { visibility: hidden; }
.hero-title:not(.live) .ht:first-child { visibility: visible; }
.hero-dots { position: absolute; z-index: 2; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 2px;
  color: var(--on-photo); text-shadow: var(--glow); }
.hero:not(.is-built) .hero-dots, .no-slides .hero-dots { visibility: hidden; }
.hero-count { margin-right: 10px; font-size: 13px; white-space: nowrap; }
@media (max-width: 600px) { .hero-dots button { width: 44px; } .hero-count { margin-right: 6px; } }
.hero-dots button { width: 64px; height: 36px; padding: 0; background: none; border: 0; cursor: pointer; display: grid; align-items: center; }
.hero-dots i { position: relative; display: block; height: 5px; margin: 0 3px; background: rgba(246, 244, 239, .45); box-shadow: 0 0 0 1px rgba(10, 10, 9, .25), 0 0 14px rgba(10, 10, 9, .55); }
.hero-dots i::after { content: ""; position: absolute; inset: 0; background: var(--on-photo); transform: scaleX(0); transform-origin: left; }
.hero-dots .on i::after { animation: dash var(--t, 6500ms) linear forwards; }
.hero-dots .done i::after { transform: scaleX(1); }
@keyframes dash { to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .hero-dots .on i::after { animation: none; transform: scaleX(1); } }
.hero-draw { position: absolute; inset: 0; pointer-events: none; }
.hero-draw > * { position: absolute; }
.g-ground { left: calc(-1 * var(--gut)); right: calc(-1 * var(--gut)); bottom: 0; height: 1px; background: var(--ink); transform-origin: left; }
.g-edge { top: calc(-1 * var(--header-h)); bottom: -12px; width: 1px; background: var(--line); transform-origin: top; }
.g-edge.l { left: 0; }
.g-edge.r { right: 0; }
.g-slab { left: -10px; right: -10px; height: 1px; background: var(--accent); transform-origin: left; }
.g-slab.set { transform: scaleX(0) !important; transform-origin: right; transition: transform .8s cubic-bezier(.6, 0, .2, 1); }
.g-lvl { right: calc(100% + 8px); transform: translateY(-50%); color: var(--muted); font-size: 10px; }
.g-lvl.now { color: var(--accent); }
.g-dim { left: calc(100% + 12px); bottom: 0; width: 1px; background: var(--ink); }
.g-dim::before, .g-dim::after { content: ""; position: absolute; left: -4px; width: 9px; height: 1px; background: var(--ink); }
.g-dim::before { top: 0; }
.g-dim::after { bottom: 0; }
.g-dim span { position: absolute; top: -20px; left: -4px; white-space: nowrap; font-size: 10px; }
.g-note { left: 0; top: -22px; color: var(--muted); font-size: 10px; }
.hero-text.wrap { max-width: none; padding-left: var(--gut); padding-right: var(--gut); }
.hero-text { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px 48px; align-items: end; padding-top: 22px; padding-bottom: 26px; }
.hero-text .kicker { grid-column: 1 / -1; }
.hero-title { font-size: clamp(42px, 6.4vw, 104px); }
.hero-foot { display: grid; gap: 18px; justify-items: start; padding-bottom: 6px; }
.hero-lead { max-width: 46ch; color: var(--muted); }
.motion .hero:not(.is-built) .hero-text .kicker { clip-path: inset(0 -40px 100% -40px); transform: translateY(-100%); }
.hero-text .kicker { clip-path: inset(-40px); transition: clip-path .9s .3s cubic-bezier(.2, .7, .2, 1), transform .9s .3s cubic-bezier(.2, .7, .2, 1); }
@media (max-width: 900px) {
  .hero { min-height: 640px; }
  .hero-text { grid-template-columns: 1fr; padding-top: 18px; }
  .hero-lead { font-size: 15px; }
  /* no gutter on a phone: the level marks and the height sit inside the photo */
  .g-lvl { right: auto; left: 6px; color: var(--on-photo); text-shadow: var(--glow); }
  .g-dim { left: auto; right: 10px; background: var(--on-photo); }
  .g-dim::before, .g-dim::after { background: var(--on-photo); }
  .g-dim span { left: auto; right: -4px; color: var(--on-photo); text-shadow: var(--glow); }
}
@media (max-width: 600px) {
  .hero-title { font-size: clamp(38px, 11vw, 56px); }
  .hero-foot .btn { flex: 1 1 auto; }
}

/* Headings slide in from off the screen on the left, like the hero title; the text that goes with them (.from-r)
   comes from the right, like the hero buttons. Both move as one block, no fade. */
.rise-in { display: block; }
.motion .rise .rise-in, .motion .from-r { transition: transform 1.1s cubic-bezier(.7, 0, .2, 1); }
.motion .rise:not(.run) .rise-in { transform: translateX(-100vw); }
.motion .from-r:not(.run) { transform: translateX(100vw); }
.motion .from-r { transition-delay: .12s; }

/* Photo built floor by floor: --f = how many floors (steps), a slab line rides on the edge */
/* the clip sits on the img, not the figure: a clipped element is never reported by IntersectionObserver */
.build { position: relative; overflow: hidden; }
.build img { width: 100%; height: 100%; object-fit: cover; background: var(--stone); }
.build::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--accent); opacity: 0; }
.motion .build img { clip-path: inset(100% 0 0 0); }
.motion .build.run img { animation: build 1s steps(var(--f, 4), jump-start) both; }
.motion .build.run::after { animation: build-line 1s steps(var(--f, 4), jump-start) both, line-out .5s 1s both; transform-origin: right; }
@keyframes build { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes build-line { from { top: 100%; opacity: 1; } to { top: 0; opacity: 1; } }
@keyframes line-out { from { opacity: 1; transform: scaleX(1); } to { opacity: 1; transform: scaleX(0); } }

/* Intro */
.intro { padding-top: clamp(80px, 12vw, 170px); padding-bottom: clamp(80px, 10vw, 150px); display: grid; gap: clamp(48px, 6vw, 80px); }
.intro-text { font-size: clamp(26px, 3.3vw, 50px); line-height: 1.16; max-width: 26ch; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.fact { padding: 18px 16px 0 0; display: grid; gap: 10px; }
.fact + .fact { border-left: 1px solid var(--line); padding-left: 16px; }
.fact dt { color: var(--muted); }
.fact dd { font-size: clamp(34px, 4.4vw, 68px); }
@media (max-width: 700px) {
  .facts { grid-template-columns: 1fr 1fr; }
  .fact:nth-child(3) { border-left: 0; padding-left: 0; }
  .fact:nth-child(n+3) { margin-top: 18px; border-top: 1px solid var(--line); }
}

/* CHAPTERS: full screen, one wheel turn = next chapter (main.js, CHAPTERS) */
.chapters { position: relative; background: #111; color: var(--on-photo); }
.ch-stage { position: relative; }
.ch { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; }
.ch-photo { position: absolute; inset: 0; }
.ch-photo img { width: 100%; height: 100%; object-fit: cover; }
.ch-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 10, 9, .72), rgba(10, 10, 9, .18) 55%, rgba(10, 10, 9, .05)); }
/* every text that sits on a photo gets a soft dark glow, so it reads on any picture the buyer puts in */
.ch-text, .ch-index { text-shadow: var(--glow); }
.ch-text { position: relative; padding-bottom: clamp(32px, 6vh, 72px); padding-top: 120px; display: grid; gap: 16px; }
.ch-no span { color: color-mix(in srgb, var(--accent) 55%, #fff); }
.ch-title { font-size: clamp(40px, 6.6vw, 112px); max-width: 14ch; }
.ch-lead { max-width: 46ch; font-size: 17px; opacity: .88; }
.ch-stats { display: flex; flex-wrap: wrap; gap: 0 44px; margin-top: 14px; padding-top: 16px; border-top: 1px solid rgba(246, 244, 239, .3); }
.ch-stats div { display: grid; gap: 4px; }
.ch-stats dt { opacity: .72; order: 2; }
.ch-stats dd { font-size: clamp(30px, 3.4vw, 52px); }
.ch-index { display: none; }
/* with JS the chapters stack in one sticky screen and build over each other */
.js .chapters { height: calc(var(--n, 5) * 100svh); }
.js .ch-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.js .ch { position: absolute; inset: 0; min-height: 0; }
.js .ch + .ch { clip-path: inset(100% 0 0 0); }
/* inside a chapter: the title slides in from the left and the text and numbers from the right, like the hero */
.js .ch-text > * { transition: transform 1.1s cubic-bezier(.7, 0, .2, 1); }
.js .ch-no { clip-path: inset(-40px); transition: clip-path .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1); }
.js .ch:not(.on) .ch-no { clip-path: inset(0 -40px 100% -40px); transform: translateY(-40%); }
.js .ch:not(.on) .ch-title { transform: translateX(-100vw); }
.js .ch:not(.on) .ch-lead, .js .ch:not(.on) .ch-stats { transform: translateX(100vw); }
.js .ch.on .ch-lead { transition-delay: .12s; }
.js .ch.on .ch-stats { transition-delay: .2s; }
.js .ch-index { display: grid; position: absolute; z-index: 3; right: var(--side); top: 50%; transform: translateY(-50%); gap: 2px; }
.ch-index a { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 6px 0; text-decoration: none; opacity: .7; transition: opacity .4s; }
.ch-index a em { font-style: normal; max-width: 0; overflow: hidden; white-space: nowrap; transition: max-width .6s cubic-bezier(.2, .7, .2, 1); }
.ch-index a span { display: inline-block; width: 26px; padding-bottom: 4px; border-bottom: 1px solid currentColor; text-align: right; }
.ch-index a.on, .ch-index a:hover { opacity: 1; }
.ch-index a.on em, .ch-index a:hover em { max-width: 160px; }
@media (max-width: 700px) {
  .ch-index a em { display: none; }
  .js .ch-index { top: auto; bottom: auto; top: calc(var(--header-h) + 12px); transform: none; grid-auto-flow: column; gap: 12px; }
  .ch-text { padding-bottom: 28px; }
  .ch-lead { font-size: 15px; }
}

/* Section heads */
.sec-head { display: grid; gap: 14px; margin-bottom: clamp(36px, 5vw, 64px); }
.sec-title { font-size: clamp(36px, 5vw, 80px); max-width: 18ch; }

/* Home types */
.types { padding-top: clamp(90px, 12vw, 170px); padding-bottom: clamp(70px, 9vw, 130px); }
.type-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px 24px; }
.type { text-decoration: none; display: grid; gap: 10px; align-content: start; }
.type-photo { aspect-ratio: 4 / 5; margin-bottom: 8px; }
.type-photo img { transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.type:hover .type-photo.run img { transform: scale(1.04); }
.type-no { color: var(--muted); }
.type-name { font-size: clamp(26px, 2.4vw, 36px); }
.type-data { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 0 22px; padding-top: 12px; border-top: 1px solid var(--line); }
.type-data dt { color: var(--muted); }
.type-data dd { text-transform: none; }
@media (max-width: 1000px) { .type-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .type-grid { grid-template-columns: 1fr; } }

/* Around */
.around { padding-bottom: clamp(90px, 12vw, 170px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 clamp(32px, 5vw, 80px); align-items: start; }
.around .sec-head { grid-column: 1 / -1; }
.around-photo { aspect-ratio: 4 / 3; }
.around-list { border-top: 1px solid var(--ink); }
.around-list li { display: grid; grid-template-columns: 90px 110px 1fr; align-items: baseline; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.around-min { font-size: clamp(32px, 3vw, 46px); }
.around-list .mono { color: var(--muted); }
.around-place { font-size: 17px; }
.around-more { grid-column: 2; justify-self: start; margin-top: 28px; }
@media (max-width: 900px) {
  .around { grid-template-columns: 1fr; }
  .around-photo { margin-bottom: 28px; }
  .around-more { grid-column: 1; }
  .around-list li { grid-template-columns: 64px 1fr; }
  .around-list li .around-place { grid-column: 2; }
  .around-list li .mono { grid-column: 2; grid-row: 2; }
}

/* Footer */
.footer { background: var(--stone); padding: clamp(70px, 9vw, 120px) 0 28px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 28px; padding-bottom: clamp(50px, 7vw, 90px); }
.footer-ask { font-size: clamp(34px, 5vw, 76px); max-width: 16ch; flex: 1 1 520px; }
.footer-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 24px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 15px; }
.footer-cols .label { color: var(--muted); margin-bottom: 10px; }
.footer-cols a { text-decoration: none; }
.footer-cols a:hover { text-decoration: underline; }
.footer-small { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 64px; color: var(--muted); font-size: 11px; }
@media (max-width: 800px) { .footer-cols { grid-template-columns: 1fr 1fr; } }

/* Back to top */
.to-top { position: fixed; z-index: 20; right: var(--side); bottom: 20px; width: 44px; height: 44px; display: grid; place-items: center; background: var(--ink); color: var(--paper);
  transform: translateY(90px); pointer-events: none; transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
.to-top.show { transform: none; pointer-events: auto; }


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
.hero { overflow-x: clip; }

/* ---------- inner pages ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.page-head { padding-top: calc(var(--header-h) + clamp(48px, 8vw, 120px)); padding-bottom: clamp(40px, 6vw, 80px);
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px 48px; align-items: end; }
.page-head .kicker { grid-column: 1 / -1; }
.page-head .kicker a { text-decoration: none; border-bottom: 1px solid var(--line); }
.page-title { font-size: clamp(44px, 7vw, 120px); }
.page-lead { max-width: 48ch; color: var(--muted); font-size: 17px; }
@media (max-width: 900px) { .page-head { grid-template-columns: 1fr; } }

/* filter chips (also the form choices) */
.filters { display: grid; gap: 10px; margin-bottom: 28px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--line); background: none;
  color: var(--ink); font: 500 14px/1 var(--f-text); cursor: pointer; transition: border-color .3s; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"], .chip:has(input:checked) { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip:has(input:focus-visible) { outline: 1px solid var(--accent); outline-offset: 3px; }

/* residences */
.types-page { padding-top: 0; }
.type-text { color: var(--muted); max-width: 40ch; }
.avail { padding-bottom: clamp(90px, 12vw, 160px); }
.types-page + .avail { padding-top: clamp(40px, 6vw, 80px); }
.avail-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.avail-table th, .avail-table td { text-align: left; padding: 14px 12px 14px 0; border-bottom: 1px solid var(--line); font-weight: 400; white-space: nowrap; }
.avail-table thead th { font: 400 11px/1.4 var(--f-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); border-bottom-color: var(--ink); }
.avail-table tbody tr { transition: background .25s; }
.motion .avail-table tbody tr > * { transition: clip-path .5s steps(2, end); }
.motion .avail-table tbody tr:not(.run) > * { clip-path: inset(100% 0 0 0); }
.avail-table tbody tr:not([data-status="sold"]) { cursor: pointer; }
.avail-table tbody tr:not([data-status="sold"]):hover { background: var(--stone); }
.avail-table td a { text-decoration: none; }
.avail-table tr[data-status="sold"] { color: var(--muted); }
.avail-table tr[data-status="sold"] .row-ask { visibility: hidden; }
.status { display: inline-flex; align-items: center; gap: 8px; }
.status::before { content: ""; width: 8px; height: 8px; border: 1px solid currentColor; }
.s-available { color: #2f6b45; }
.s-available::before { background: currentColor; }
.s-reserved { color: #9a6c2e; }
.s-reserved::before { background: linear-gradient(to top, currentColor 50%, transparent 50%); }
.row-ask { text-decoration: none; border-bottom: 1px solid currentColor; }
.avail-empty { padding: 28px 0; }
.avail-note { margin-top: 18px; color: var(--muted); }
.avail-note a { color: var(--ink); }
@media (max-width: 900px) {
  .avail-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .avail-table, .avail-table tbody { display: block; }
  .avail-table tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .avail-table tr[hidden] { display: none; }
  .avail-table th, .avail-table td { padding: 0; border: 0; white-space: normal; }
  .avail-table tbody th { grid-column: 1 / -1; font-size: 15px; }
  .avail-table td[data-l]::before { content: attr(data-l); display: block; font: 400 10px/1.5 var(--f-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
  .avail-table td:last-child { align-self: end; }
}

/* one home type */
.res-head { grid-template-columns: 1fr; }
.res-data { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); margin-top: 18px; }
.res-data div { display: grid; gap: 8px; padding: 16px 16px 0 0; }
.res-data div + div { border-left: 1px solid var(--line); padding-left: 16px; }
.res-data dt { color: var(--muted); }
.res-data dd { font-size: clamp(22px, 2.6vw, 38px); }
@media (max-width: 700px) {
  .res-data { grid-template-columns: 1fr 1fr; }
  .res-data div:nth-child(3) { border-left: 0; padding-left: 0; }
  .res-data div:nth-child(n+3) { margin-top: 12px; }
}
.res-photo { aspect-ratio: 16 / 8; }
@media (max-width: 700px) { .res-photo { aspect-ratio: 4 / 3; } }
.res-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px clamp(32px, 6vw, 96px); padding-top: clamp(60px, 8vw, 120px); padding-bottom: clamp(60px, 8vw, 120px); align-items: start; }
.res-long { font-size: clamp(20px, 1.8vw, 26px); line-height: 1.45; }
.res-list { list-style: none; margin: 32px 0 36px; padding: 0; border-top: 1px solid var(--line); }
.res-list li { padding: 11px 0 11px 28px; border-bottom: 1px solid var(--line); position: relative; }
.res-list li::before { content: ""; position: absolute; left: 0; top: 50%; width: 14px; height: 1px; background: var(--accent); }
@media (max-width: 900px) { .res-body { grid-template-columns: 1fr; } }

/* floor plan: the walls are drawn, then every room fills from the floor up and shows its size */
.plan { position: sticky; top: calc(var(--header-h) + 24px); }
.plan svg { display: block; width: 100%; height: auto; overflow: visible; }
.room-fill { fill: var(--stone); transform-box: fill-box; transform-origin: bottom; }
.room-wall { fill: none; stroke: var(--ink); stroke-width: .5; stroke-dasharray: 1; }
.room-name, .room-m2 { text-anchor: middle; dominant-baseline: middle; fill: var(--ink); transform-box: fill-box; transform-origin: center bottom; }
.room-name { font: 500 3.1px var(--f-text); }
.room-m2 { font: 400 2.6px var(--f-mono); fill: var(--muted); }
.plan figcaption { margin-top: 14px; color: var(--muted); }
.motion .plan .room-wall { stroke-dashoffset: 1; }
.motion .plan .room-fill, .motion .plan text { transform: scaleY(0); }
.motion .plan.run .room-wall { stroke-dashoffset: 0; transition: stroke-dashoffset 1.1s cubic-bezier(.6, 0, .2, 1) calc(var(--d) * 90ms); }
.motion .plan.run .room-fill { transform: none; transition: transform .7s steps(3, end) calc(900ms + var(--d) * 90ms); }
.motion .plan.run text { transform: none; transition: transform .5s cubic-bezier(.2, .7, .2, 1) calc(1300ms + var(--d) * 90ms); }
@media (max-width: 900px) { .plan { position: static; } }

.res-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.res-gallery .ph { aspect-ratio: 4 / 5; }
@media (max-width: 700px) { .res-gallery { grid-template-columns: 1fr 1fr; } .res-gallery .ph:first-child { grid-column: 1 / -1; aspect-ratio: 4 / 3; } }
.res-gallery + .avail { padding-top: clamp(80px, 10vw, 140px); }
.res-next { display: grid; gap: 10px; padding-top: 40px; padding-bottom: clamp(80px, 10vw, 140px); text-decoration: none; border-top: 1px solid var(--ink); }
.res-next-name { font-size: clamp(44px, 7vw, 110px); transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.res-next:hover .res-next-name { transform: translateX(18px); }

/* location */
.map { aspect-ratio: 16 / 7; background: var(--stone); }
.map iframe { display: block; width: 100%; height: 100%; border: 0; filter: grayscale(1) contrast(1.05); mix-blend-mode: multiply; }
.motion .map iframe { clip-path: inset(100% 0 0 0); }
.motion .map.run iframe { animation: build 1s steps(var(--f, 4), jump-start) both; }
@media (max-width: 700px) { .map { aspect-ratio: 4 / 5; } }
.groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px clamp(32px, 5vw, 80px); padding-top: clamp(70px, 9vw, 130px); padding-bottom: clamp(70px, 9vw, 130px); }
.group-name { margin-bottom: 14px; color: var(--muted); font-weight: 400; }
@media (max-width: 800px) { .groups { grid-template-columns: 1fr; } }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-bottom: clamp(90px, 12vw, 160px); }
.pair figure { aspect-ratio: 4 / 5; }
.pair-text { gap: clamp(32px, 6vw, 96px); align-items: center; }
.pair-copy { display: grid; gap: 18px; }
@media (max-width: 700px) { .pair { grid-template-columns: 1fr; } .pair figure { aspect-ratio: 4 / 3; } }

/* gallery: a plain grid that fills left to right */
.gallery { padding-bottom: clamp(90px, 12vw, 160px); }
.gal { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 16px; }
.gal .ph { display: grid; gap: 10px; align-content: start; }
.gal .ph img { aspect-ratio: 4 / 3; height: auto; }
.gal figcaption { display: flex; gap: 12px; color: var(--muted); }
.gal .ph[hidden] { display: none; }
@media (max-width: 900px) { .gal { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .gal { grid-template-columns: 1fr; } }
.zoomable { cursor: zoom-in; }

/* lightbox: it goes up floor by floor, like everything else */
.lb { position: fixed; inset: 0; z-index: 200; background: #121316; color: #f1efe9; display: grid; grid-template-rows: 1fr auto; touch-action: none; }
.lb[hidden] { display: none; }
.motion .lb { clip-path: inset(100% 0 0 0); transition: clip-path .5s steps(5, end); }
.motion .lb.on { clip-path: inset(0 0 0 0); }
.lb-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 64px 88px 0; cursor: grab; user-select: none; -webkit-user-select: none; }
.lb-stage:active { cursor: grabbing; }
.lb-img { max-width: 100%; max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); width: auto; height: auto; object-fit: contain;
  transition: transform .35s cubic-bezier(.2, .7, .2, 1); -webkit-user-drag: none; pointer-events: none; }
.lb-count, .lb-cap { margin: 0; font: 400 12px/1.5 var(--f-mono); letter-spacing: .04em; text-transform: uppercase; }
.lb-count { position: absolute; left: var(--side); top: 26px; }
.lb-cap { padding: 18px var(--side) 24px; text-align: center; min-height: 66px; color: #b9b7b1; }
.lb-btn { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 1px solid rgba(241, 239, 233, .3); background: #121316; color: inherit; cursor: pointer; transition: border-color .3s; }
.lb-btn:hover { border-color: var(--accent); }
.lb-close { right: var(--side); top: 12px; }
.lb-prev, .lb-next { top: calc(50% - 48px); }
.lb-prev { left: var(--side); }
.lb-next { right: var(--side); }
.lb.single .lb-prev, .lb.single .lb-next, .lb.single .lb-count { display: none; }
.lb-open, .lb-open body { overflow: hidden; }
@media (max-width: 700px) {
  .lb-stage { padding: 64px 0 0; }
  .lb-img { max-height: calc(100dvh - 190px); }
  .lb-prev, .lb-next { top: auto; bottom: 16px; }
  .lb-cap { display: flex; align-items: center; justify-content: center; min-height: 80px; padding: 12px 76px 16px; }
}

/* developer */
.progress { display: grid; grid-template-columns: minmax(120px, 220px) minmax(0, 1fr); gap: clamp(32px, 6vw, 100px); padding-top: clamp(40px, 6vw, 80px); padding-bottom: clamp(90px, 12vw, 160px); align-items: end; }
/* the tower: nine floors, filled up to the share that is built */
.progress-tower { position: relative; height: clamp(300px, 40vw, 460px); border: 1px solid var(--ink);
  background: repeating-linear-gradient(to top, transparent 0 calc(100% / 9 - 1px), var(--line) calc(100% / 9 - 1px) calc(100% / 9)); }
.progress-tower i { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--p) * 1%); background: var(--accent); }
.motion .progress-tower i { clip-path: inset(100% 0 0 0); }
.motion .progress-tower.run i { animation: build 1.4s steps(6, jump-start) both; }
.progress-num { font-size: clamp(60px, 10vw, 170px); margin: 12px 0 28px; }
.phases { border-top: 1px solid var(--ink); }
.phases li { display: grid; grid-template-columns: 36px minmax(0, 1.2fr) minmax(0, .8fr) minmax(0, 1.4fr) 52px; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.phase-date, .phase-done { color: var(--muted); }
.phase-done { text-align: right; }
.phase-bar { height: 6px; background: var(--stone); position: relative; }
.phase-bar i { position: absolute; top: 0; bottom: 0; left: 0; width: calc(var(--done) * 1%); background: var(--ink); }
@media (max-width: 800px) {
  .progress { grid-template-columns: 1fr; }
  .progress-tower { height: 220px; width: 120px; }
  .phases li { grid-template-columns: 30px 1fr 52px; }
  .phase-date { grid-column: 2; grid-row: 2; }
  .phase-done { grid-column: 3; grid-row: 1; }
  .phase-bar { grid-column: 1 / -1; }
}
.materials { padding-bottom: clamp(90px, 12vw, 160px); }
.mat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.mat { display: grid; gap: 12px; align-content: start; padding: 20px 20px 0 0; }
.mat + .mat { border-left: 1px solid var(--line); padding-left: 20px; }
.mat .mono { color: var(--muted); }
.mat-name { font-size: clamp(28px, 2.6vw, 40px); }
@media (max-width: 900px) { .mat-grid { grid-template-columns: 1fr 1fr; } .mat:nth-child(3) { border-left: 0; padding-left: 0; } .mat:nth-child(n+3) { margin-top: 28px; } }
@media (max-width: 480px) { .mat-grid { grid-template-columns: 1fr; } .mat + .mat { border-left: 0; padding-left: 0; margin-top: 24px; } }
.past { padding-bottom: clamp(90px, 12vw, 160px); }
.past-list { border-top: 1px solid var(--ink); }
.past-list li { display: grid; grid-template-columns: 80px minmax(0, 1fr) 120px minmax(0, 1.4fr); gap: 16px; align-items: baseline; padding: 20px 0; border-bottom: 1px solid var(--line); }
.past-list .mono { color: var(--muted); }
.past-name { font-size: clamp(28px, 3vw, 46px); }
@media (max-width: 800px) { .past-list li { grid-template-columns: 1fr 1fr; } .past-name, .past-text { grid-column: 1 / -1; } }

/* contact */
.ask { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 56px clamp(32px, 6vw, 100px); padding-bottom: clamp(90px, 12vw, 160px); align-items: start; }
.form { display: grid; gap: 30px; }
.form > [hidden] { display: none; }
.field-set { margin: 0; padding: 0; border: 0; min-width: 0; }
.field-set legend { padding: 0; margin-bottom: 14px; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 10px; }
.field label { color: var(--muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.field input, .field textarea { width: 100%; padding: 10px 0; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; background: none; color: var(--ink);
  font: 400 18px/1.4 var(--f-text); outline: 0; resize: vertical; transition: border-color .3s; }
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.field input::placeholder { color: var(--muted); opacity: .6; }
.field.bad input { border-color: #b3261e; }
.field-error { font: 400 12px/1.4 var(--f-mono); color: #b3261e; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.form-done { padding: 28px 0; border-top: 1px solid var(--ink); display: grid; gap: 14px; }
.form-done-title { font-size: clamp(28px, 3vw, 44px); max-width: 20ch; }
.ask-side { display: grid; gap: 28px; position: sticky; top: calc(var(--header-h) + 24px); }
.ask-side figure { aspect-ratio: 4 / 3; }
.ask-data { border-top: 1px solid var(--ink); }
.ask-data div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ask-data dt { color: var(--muted); padding-top: 3px; }
.ask-data a { text-decoration: none; }
@media (max-width: 900px) { .ask { grid-template-columns: 1fr; } .ask-side { position: static; } }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }

/* 404: a building with one floor missing */
.nf { min-height: 100svh; display: grid; grid-template-columns: minmax(140px, 260px) minmax(0, 1fr); gap: clamp(40px, 8vw, 140px); align-items: center;
  padding-top: calc(var(--header-h) + 40px); padding-bottom: 60px; }
.nf-tower { display: flex; flex-direction: column-reverse; height: clamp(320px, 56vh, 560px); border-left: 1px solid var(--ink); border-right: 1px solid var(--ink); }
.nf-tower i { flex: 1; border-top: 1px solid var(--ink); background: var(--stone); position: relative; }
.nf-tower i.gap { background: none; border-top-style: dashed; }
.nf-tower i.gap span { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: var(--accent); }
.nf-text { display: grid; gap: 22px; justify-items: start; }
@media (max-width: 700px) { .nf { grid-template-columns: 1fr; } .nf-tower { height: 240px; width: 140px; } }

/* privacy */
.prose > * { max-width: 760px; }
.prose { padding-bottom: clamp(90px, 12vw, 160px); display: grid; gap: 14px; }
.prose h2 { font-size: clamp(26px, 2.6vw, 36px); margin-top: 26px; }
.prose p { color: var(--muted); font-size: 17px; }

/* mail links copy the address too */
a[href^="mailto:"] { position: relative; }
.copied-tip { position: absolute; left: 0; bottom: calc(100% + 6px); padding: 4px 8px; background: var(--ink); color: var(--paper); font: 400 11px/1.3 var(--f-mono); text-transform: uppercase; white-space: nowrap; pointer-events: none; }
