/* =============================================================
   ASPET — v3 · тъмна тема
   ============================================================= */

:root {
  --bg: #141310;
  --bg-2: #1b1915;
  --bg-3: #24211b;
  --bg-4: #2f2b23;
  --text: #ede6d9;
  --text-2: #c2b8a6;
  --text-3: #8b8374;
  --accent: #c9b48f;
  --accent-hi: #e3d3b2;
  --copper: #c08f6c;
  --paper: #ece5d8;
  --paper-ink: #18160f;
  --paper-ink-2: #5b5447;

  --serif: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --max: 1320px;
  --gutter: clamp(16px, 4vw, 48px);
  --header-h: 76px;
  --section: clamp(88px, 12vw, 168px);
  --ease: cubic-bezier(0.22, 0.7, 0.18, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  background: var(--bg);
}

body {
  margin: 0;
  font-feature-settings: "lnum" 1;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, dl, dd, figure, ul { margin: 0; }
ul { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--accent); color: var(--bg); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: 8px; top: -60px; z-index: 200; background: var(--accent); color: var(--bg); padding: 10px 14px; }
.skip:focus { top: 8px; }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Type ---------- */

.kicker {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent);
}
.title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.8rem, 6.4vw, 5.4rem); line-height: 0.98; letter-spacing: -0.015em;
}
.lead { font-size: clamp(1.08rem, 1.5vw, 1.25rem); line-height: 1.6; color: var(--text-2); max-width: 34em; }
.num { font-variant-numeric: lining-nums tabular-nums; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 52px; padding: 0 28px;
  background: var(--accent); color: var(--bg);
  font-weight: 600; font-size: 0.95rem; letter-spacing: 0.02em;
  transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}
.btn:hover { background: var(--accent-hi); }
.btn--ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px rgba(237, 230, 217, 0.28); }
.btn--ghost:hover { background: var(--text); color: var(--bg); box-shadow: none; }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: 0.88rem; }

.arrow { width: 20px; height: 12px; flex: none; transition: transform 0.3s var(--ease); }
a:hover > .arrow, button:hover > .arrow { transform: translateX(5px); }

.more {
  display: inline-flex; align-items: center; gap: 12px;
  font-weight: 600; letter-spacing: 0.04em; color: var(--accent);
  min-height: 44px; width: fit-content;
}
.more:hover { color: var(--accent-hi); }

/* ---------- Logo ---------- */

.logo { display: block; height: auto; color: var(--text); overflow: visible; }
.logo .lg-s { fill: none; stroke: currentColor; stroke-width: 15; stroke-linejoin: miter; stroke-miterlimit: 10; }
.logo .lg-tri { fill: var(--accent); transform-box: fill-box; transform-origin: 50% 100%; transition: transform 0.6s var(--ease-out); }

.logo.is-drawing .lg-s { stroke-dasharray: 1; stroke-dashoffset: 1; animation: lg-draw 1s var(--ease) forwards; }
.logo.is-drawing .lg-roof { animation-duration: 1.25s; }
.logo.is-drawing .lg-a { animation-delay: 0.4s; }
.logo.is-drawing .lg-c { animation-delay: 0.5s; }
.logo.is-drawing .lg-p { animation-delay: 0.6s; }
.logo.is-drawing .lg-e { animation-delay: 0.7s; }
.logo.is-drawing .lg-t { animation-delay: 0.8s; }
.logo.is-drawing .lg-tri { opacity: 0; transform: translateY(-45%) scale(0.5); animation: lg-tri 0.9s var(--ease-out) 0.85s forwards; }
@keyframes lg-draw { to { stroke-dashoffset: 0; } }
@keyframes lg-tri { to { opacity: 1; transform: none; } }

.brand { display: inline-flex; align-items: center; min-height: 44px; }
.brand .logo { width: 96px; transition: width 0.4s var(--ease); }
.brand:hover .lg-tri { transform: translateY(-10%); }
.is-scrolled .brand .logo { width: 68px; }

/* ---------- Header ---------- */

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  height: var(--header-h);
  transition: background 0.35s, height 0.35s var(--ease);
}
.site-header::before {
  content: ""; position: absolute; inset: 0 0 -48px 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(20, 19, 16, 0.72), rgba(20, 19, 16, 0));
  transition: opacity 0.35s;
}
.site-header.is-scrolled { background: rgba(20, 19, 16, 0.96); height: 64px; }
.site-header.is-scrolled::before { opacity: 0; }
.site-header .wrap { position: relative; height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.nav { display: flex; align-items: center; gap: clamp(20px, 2.6vw, 40px); }
.nav a {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text); opacity: 0.86; transition: opacity 0.2s, color 0.2s, background 0.2s;
  min-height: 44px; display: inline-flex; align-items: center;
}
.nav a:hover, .nav a[aria-current="page"] { opacity: 1; color: var(--accent); }
.nav .nav-phone {
  letter-spacing: 0.06em; padding: 0 18px; opacity: 1;
  box-shadow: inset 0 0 0 1px rgba(201, 180, 143, 0.5); color: var(--accent);
}
.nav .nav-phone:hover { background: var(--accent); color: var(--bg); }

.menu-btn { display: none; width: 48px; height: 48px; margin-right: -12px; position: relative; }
.menu-btn span { position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--text); transition: transform 0.35s var(--ease), top 0.35s var(--ease); }
.menu-btn span:nth-child(1) { top: 19px; }
.menu-btn span:nth-child(2) { top: 28px; }
.menu-open .menu-btn span:nth-child(1) { top: 23.5px; transform: rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { top: 23.5px; transform: rotate(-45deg); }

@media (max-width: 900px) {
  :root { --header-h: 68px; }
  .brand .logo { width: 72px; }
  .is-scrolled .brand .logo { width: 60px; }
  .menu-btn { display: block; }
  .nav {
    position: fixed; inset: 0; z-index: -1;
    flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px;
    padding: 96px var(--gutter) 40px; background: var(--bg);
    visibility: hidden; opacity: 0;
    transition: opacity 0.35s, visibility 0s 0.35s;
  }
  .menu-open .nav { visibility: visible; opacity: 1; transition: opacity 0.35s; }
  .nav a {
    font-family: var(--serif); font-weight: 500; font-size: clamp(2.6rem, 11vw, 3.6rem);
    letter-spacing: -0.01em; text-transform: none; opacity: 1; line-height: 1.15;
    transform: translateY(14px); transition: transform 0.5s var(--ease-out), color 0.2s;
  }
  .menu-open .nav a { transform: none; }
  .nav .nav-phone {
    margin-top: 32px; font-family: var(--sans); font-size: 1.05rem; font-weight: 600;
    letter-spacing: 0.04em; padding: 0 22px; min-height: 56px;
  }
  .menu-open { overflow: hidden; }
  .menu-open .site-header { background: transparent; }
  .menu-open .site-header::before { opacity: 0; }
}

/* ---------- Intro (index, веднъж на сесия) ---------- */

.intro {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: var(--bg);
}
.intro .logo { width: min(620px, 74vw); }
.intro-skip {
  position: absolute; right: var(--gutter); bottom: 24px;
  font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-3);
  min-height: 44px; padding: 0 6px;
}
.intro-skip:hover { color: var(--text); }

/* ---------- Hero ---------- */

.hero, .page-hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden; isolation: isolate;
}
.page-hero { min-height: 78vh; min-height: 78svh; }
.hero-media { position: absolute; inset: 0; z-index: -1; }
.hero-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%;
  filter: saturate(0.72) brightness(0.62) contrast(1.05);
}
.hero .hero-media img { transform: scale(1.08); transition: transform 2.8s var(--ease-out); }
.is-ready .hero .hero-media img { transform: none; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(20, 19, 16, 0.86) 0%, rgba(20, 19, 16, 0.35) 55%, rgba(20, 19, 16, 0.08) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(20, 19, 16, 0) 45%);
}
.hero-content { padding-top: 140px; padding-bottom: clamp(56px, 9vw, 112px); display: grid; gap: 30px; }
.hero h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(3.6rem, 10.5vw, 9.4rem); line-height: 0.92; letter-spacing: -0.025em; }
.hero-name { display: flex; align-items: baseline; gap: 20px; width: fit-content; transition: color 0.3s; }
.hero-name:hover { color: var(--accent-hi); }
.hero-name .cnt {
  font-family: var(--sans); font-size: clamp(0.7rem, 1vw, 0.82rem); font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent); white-space: nowrap;
  opacity: 0; transform: translateX(-8px); transition: opacity 0.35s, transform 0.35s var(--ease);
}
.hero-name:hover .cnt, .hero-name:focus-visible .cnt { opacity: 1; transform: none; }
@media (hover: none) { .hero-name .cnt { opacity: 1; transform: none; } }
.hero-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 28px 40px; }

.js .stage { opacity: 0; transform: translateY(28px); }
.is-ready .stage { opacity: 1; transform: none; transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out); }
.is-ready .stage-2 { transition-delay: 0.1s; }
.is-ready .stage-3 { transition-delay: 0.2s; }
.is-ready .stage-4 { transition-delay: 0.3s; }
.is-ready .stage-5 { transition-delay: 0.45s; }

.scroll-cue {
  position: absolute; right: var(--gutter); bottom: clamp(56px, 9vw, 112px);
  writing-mode: vertical-rl; font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--text-3);
  display: flex; align-items: center; gap: 14px;
}
.scroll-cue::after { content: ""; width: 1px; height: 56px; background: linear-gradient(var(--text-3), transparent); animation: cue 2.4s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
@media (max-width: 700px) { .scroll-cue { display: none; } }

.page-hero-content { padding-top: 140px; padding-bottom: clamp(48px, 7vw, 88px); display: grid; gap: 18px; }
.page-hero h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(4.4rem, 15vw, 12rem); line-height: 0.86; letter-spacing: -0.03em; padding-bottom: 0.14em; }
.facts-line { display: flex; flex-wrap: wrap; gap: 6px 26px; color: var(--text-2); }
.facts-line b { color: var(--text); font-weight: 600; }
.facts-line .is-accent b { color: var(--accent); }
.crumbs { font-size: 0.8rem; letter-spacing: 0.06em; color: var(--text-3); }
.crumbs a:hover { color: var(--text); }
.crumbs span { margin: 0 8px; }

/* ---------- Sections ---------- */

.section { padding-block: var(--section); }
.section--2 { background: var(--bg-2); }
.section-head { display: grid; gap: 22px; margin-bottom: clamp(48px, 7vw, 88px); }
.section-head .kicker { margin-bottom: 4px; }
@media (min-width: 960px) {
  .section-head { grid-template-columns: 1fr 1fr; align-items: end; gap: 64px; }
  .section-head .lead { justify-self: end; }
}

/* buildings (index) */
.blds { display: grid; gap: clamp(80px, 11vw, 144px); }
.bld { display: grid; gap: 28px; align-items: center; }
@media (max-width: 899px) { .bld-media { order: -1; } }
.bld-media { display: block; overflow: hidden; background: var(--bg-2); }
.bld-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; filter: saturate(0.82) brightness(0.9); transition: transform 1.2s var(--ease-out), filter 0.6s; }
.bld:hover .bld-media img { transform: scale(1.035); filter: saturate(0.95) brightness(1); }
.bld-body { display: grid; gap: 20px; align-content: center; }
.bld-no { font-family: var(--serif); font-size: 1.6rem; color: var(--accent); line-height: 1; }
.bld-name { font-family: var(--serif); font-weight: 500; font-size: clamp(3.6rem, 8vw, 7rem); line-height: 0.9; letter-spacing: -0.02em; }
.bld-name a { transition: color 0.3s; }
.bld-name a:hover { color: var(--accent-hi); }
.bld-meta { color: var(--text-2); max-width: 28em; }
@media (min-width: 900px) {
  .bld { grid-template-columns: 5fr 7fr; gap: clamp(48px, 6vw, 96px); }
  .bld:nth-child(even) { grid-template-columns: 7fr 5fr; }
  .bld:nth-child(even) .bld-media { order: -1; }
}

.dots-wrap { display: grid; gap: 10px; }
.dots { display: flex; flex-wrap: wrap; gap: 7px; max-width: 320px; }
.dot { width: 11px; height: 11px; border-radius: 50%; background: var(--accent); }
.dot.is-sold { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(237, 230, 217, 0.24); }
.dot.is-reserved { background: var(--copper); }
.avail { font-size: 0.92rem; color: var(--text-2); }
.avail b { color: var(--accent); font-weight: 700; }

.teaser { display: grid; gap: 40px; align-items: center; background: var(--bg-2); padding: clamp(24px, 5vw, 72px); margin-top: clamp(96px, 12vw, 168px); }
@media (min-width: 900px) { .teaser { grid-template-columns: 7fr 5fr; gap: 72px; } }
.teaser h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(2.6rem, 5vw, 4.2rem); line-height: 1; margin: 14px 0 18px; }
.teaser p { color: var(--text-2); }
.teaser .avail { margin: 18px 0 26px; }

/* drawings on dark: inverted like a blueprint */
.ink { filter: invert(1) hue-rotate(180deg) saturate(0.5) brightness(0.84) sepia(0.12); }

/* ---------- About (light) ---------- */

.about { background: var(--paper); color: var(--paper-ink); }
.about .kicker { color: #8a6f43; }
.about-quote { font-family: var(--serif); font-weight: 500; font-size: clamp(2.1rem, 4.4vw, 3.8rem); line-height: 1.1; letter-spacing: -0.01em; max-width: 21ch; margin-top: 22px; }
.about-grid { display: grid; gap: 56px; margin-top: clamp(56px, 7vw, 96px); }
@media (min-width: 900px) { .about-grid { grid-template-columns: 1fr 1fr; gap: 88px; } }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px 40px; align-content: start; }
.facts dt { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--paper-ink-2); margin-bottom: 6px; }
.facts dd { font-size: 1.08rem; font-weight: 600; }
.people { display: grid; gap: 36px; }
.person h3 { font-family: var(--serif); font-weight: 600; font-size: 1.75rem; line-height: 1.1; margin-bottom: 8px; }
.person p { color: var(--paper-ink-2); }
.about-note { color: var(--paper-ink-2); }

/* ---------- Contact ---------- */

.contact-grid { display: grid; gap: 56px; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: 5fr 7fr; gap: 80px; align-items: stretch; } }
.contact .title { font-size: clamp(3rem, 7.5vw, 6.2rem); }
.clist { display: grid; gap: 26px; margin-top: 40px; }
.clist dt { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); margin-bottom: 4px; }
.clist dd a, .clist dd span { font-size: clamp(1.2rem, 2vw, 1.5rem); font-weight: 500; font-variant-numeric: tabular-nums; }
.clist dd a:hover { color: var(--accent); }
.clist dd + dd { margin-top: 2px; }
.map { position: relative; min-height: 380px; height: 100%; background: var(--bg-2); overflow: hidden; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: invert(0.9) hue-rotate(180deg) saturate(0.35) brightness(0.92) contrast(0.95); }

/* ---------- Footer ---------- */

.site-footer { color: var(--text-3); font-size: 0.88rem; padding-block: 36px 44px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; }
.site-footer .logo { width: 62px; color: var(--text-2); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0 24px; }
.site-footer a { min-height: 44px; display: inline-flex; align-items: center; }
.site-footer a:hover { color: var(--text); }

/* ---------- Apartment explorer ---------- */

.explorer { display: grid; gap: 32px; }
@media (min-width: 1000px) { .explorer { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; align-items: start; } }

.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.chip {
  min-height: 42px; padding: 0 16px; font-size: 0.85rem; font-weight: 600; letter-spacing: 0.02em;
  color: var(--text-2); background: var(--bg-2); transition: background 0.2s, color 0.2s;
}
.chip:hover { color: var(--text); background: var(--bg-3); }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--bg); }
.chip-sep { width: 14px; }
.chip--n { min-width: 44px; padding: 0 12px; }

.units { display: grid; gap: 4px; }
.unit {
  width: 100%; text-align: left;
  display: grid; grid-template-columns: 58px 1fr auto 18px; align-items: center; gap: 16px;
  padding: 14px 18px; background: var(--bg-2);
  transition: background 0.2s;
}
.unit:hover { background: var(--bg-3); }
.unit[aria-current="true"] { background: var(--bg-4); }
.unit-no { font-family: var(--serif); font-size: 2.1rem; line-height: 1; }
.unit[aria-current="true"] .unit-no { color: var(--accent); }
.unit-main { display: grid; gap: 1px; min-width: 0; }
.unit-area { font-weight: 600; font-variant-numeric: tabular-nums; }
.unit-floor { font-size: 0.82rem; color: var(--text-3); }
.unit-chev { width: 18px; height: 18px; color: var(--text-3); transition: transform 0.25s var(--ease), color 0.2s; }
.unit:hover .unit-chev, .unit[aria-current="true"] .unit-chev { color: var(--accent); transform: translateX(3px); }
.unit.is-sold .unit-no, .unit.is-sold .unit-area { color: var(--text-3); }
.units-empty { padding: 24px 18px; background: var(--bg-2); color: var(--text-3); }

.badge { display: inline-flex; align-items: center; gap: 8px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge--free { color: var(--accent); }
.badge--reserved { color: var(--copper); }
.badge--sold { color: var(--text-3); }

.viewer { background: var(--bg-2); padding: clamp(16px, 2vw, 28px); display: grid; gap: 20px; }
@media (min-width: 1000px) { .explorer .viewer { position: sticky; top: 84px; } }
.viewer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.viewer-title { font-family: var(--serif); font-weight: 500; font-size: clamp(2rem, 3vw, 2.7rem); line-height: 1; }
.viewer-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--text-3); font-size: 0.88rem; margin-top: 8px; }
.viewer-nav { display: flex; gap: 4px; flex: none; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; background: var(--bg-3); color: var(--text-2); transition: background 0.2s, color 0.2s; }
.icon-btn:hover { background: var(--accent); color: var(--bg); }
.icon-btn svg { width: 18px; height: 18px; }
.viewer-specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 24px; }
@media (min-width: 560px) { .viewer-specs { grid-template-columns: repeat(4, 1fr); } }
.viewer-specs dt { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); margin-bottom: 4px; }
.viewer-specs dd { font-size: 1.1rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.viewer-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* plan + polygons */
.plan { position: relative; width: 100%; background: #141310; overflow: hidden; }
.plan > img { width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }
.plan > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.plan .p-dim { fill: rgba(12, 11, 9, 0.72); }
.plan .p-unit { fill: transparent; stroke: rgba(237, 230, 217, 0.18); stroke-width: 2; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill 0.2s, stroke 0.2s; }
.plan .p-unit:hover { fill: rgba(201, 180, 143, 0.14); stroke: rgba(201, 180, 143, 0.75); }
.plan .p-unit.is-sold { stroke-dasharray: 5 5; }
.plan .p-sel { fill: rgba(201, 180, 143, 0.24); stroke: var(--accent); stroke-width: 3; vector-effect: non-scaling-stroke; pointer-events: none; animation: sel-in 0.7s var(--ease-out); }
.plan .p-sel.is-sold { fill: rgba(139, 131, 116, 0.2); stroke: var(--text-2); }
@keyframes sel-in { from { opacity: 0; } to { opacity: 1; } }
.plan-btn { display: block; width: 100%; position: relative; cursor: zoom-in; }
.plan-hint {
  position: absolute; right: 10px; bottom: 10px; pointer-events: none;
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-2); background: rgba(20, 19, 16, 0.8); padding: 6px 10px;
}

/* dialogs */
.sheet, .lightbox {
  width: 100vw; max-width: none; height: 100vh; height: 100dvh; max-height: none;
  margin: 0; padding: 0; border: 0; background: var(--bg); color: var(--text);
}
.sheet::backdrop, .lightbox::backdrop { background: rgba(10, 9, 8, 0.7); }
.sheet[open] { display: block; overflow-y: auto; overscroll-behavior: contain; }
.dlg-bar {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 60px; padding: 8px var(--gutter); background: var(--bg);
}
.dlg-title { flex: 1; min-width: 0; font-weight: 600; font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dlg-actions { display: flex; gap: 4px; flex: none; }
.sheet-body { padding: 0 var(--gutter) 32px; }
.sheet .viewer { padding: 0; background: transparent; }

.lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); overflow: hidden; }
.lb-stage { overflow: auto; display: grid; place-items: center; padding: 8px var(--gutter) 16px; overscroll-behavior: contain; }
.lb-stage > img, .lb-stage > .plan { max-width: 100%; max-height: calc(100dvh - 92px); width: auto; object-fit: contain; }
.lb-stage > .plan { height: calc(100dvh - 92px); }
.lb-stage > .plan > img { object-fit: contain; }
.lb-stage.is-zoomed { place-items: start; }
.lb-stage.is-zoomed > img, .lb-stage.is-zoomed > .plan { max-width: none; max-height: none; width: min(2600px, 240vw); height: auto; }

/* floors */
.floor-tiles { display: grid; gap: 4px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.floor-tile { background: var(--bg-2); padding: 28px 26px 30px; display: grid; gap: 8px; align-content: start; }
.floor-tile h3 { font-family: var(--serif); font-weight: 500; font-size: 2.3rem; line-height: 1; }
.floor-tile .lvl { font-size: 0.8rem; color: var(--text-3); letter-spacing: 0.04em; }
.floor-tile p { color: var(--text-2); margin-top: 6px; }
.ground-note { margin-top: 28px; color: var(--text-3); max-width: 62em; font-size: 0.95rem; }

/* gallery */
.gallery { display: grid; gap: 4px; }
.gallery button { display: block; width: 100%; overflow: hidden; background: var(--bg-2); cursor: zoom-in; }
.gallery img { width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: cover; filter: saturate(0.85); transition: transform 1.2s var(--ease-out); }
.gallery button:hover img { transform: scale(1.03); }
@media (min-width: 760px) { .gallery { grid-template-columns: 1fr 1fr; } }

/* other buildings */
.others { display: grid; gap: 4px; }
@media (min-width: 760px) { .others { grid-template-columns: repeat(3, 1fr); } }
.others a { background: var(--bg-2); padding: 32px 28px 36px; display: grid; gap: 8px; transition: background 0.25s; }
.others a:hover { background: var(--bg-3); }
.others strong { font-family: var(--serif); font-weight: 500; font-size: 2.8rem; line-height: 1; transition: color 0.25s; }
.others a:hover strong { color: var(--accent-hi); }
.others a[aria-current="page"] { display: none; }

/* complex page */
.split { display: grid; gap: 48px; }
@media (min-width: 960px) { .split { grid-template-columns: 5fr 7fr; gap: 72px; align-items: start; } }
.prose { color: var(--text-2); max-width: 38em; }
.prose p + p { margin-top: 1em; }
.spec-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 24px; margin-top: 44px; }
.spec-list dt { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); margin-bottom: 4px; }
.spec-list dd { font-family: var(--serif); font-size: 2.2rem; line-height: 1.05; }
.spec-list dd small { font-family: var(--sans); font-size: 0.95rem; color: var(--text-3); margin-left: 4px; }
.drawing { display: block; width: 100%; background: var(--bg); cursor: zoom-in; }
.caption { display: flex; justify-content: space-between; gap: 16px; margin-top: 12px; font-size: 0.82rem; color: var(--text-3); }
.caption a { color: var(--accent); }

.parking-groups { display: grid; gap: 40px; }
@media (min-width: 900px) { .parking-groups { grid-template-columns: repeat(3, 1fr); gap: 48px; } }
.parking-group h3 { font-family: var(--serif); font-weight: 500; font-size: 2rem; line-height: 1.1; }
.parking-group p { color: var(--text-3); font-size: 0.9rem; margin: 4px 0 16px; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 4px; }
.spot { height: 52px; display: grid; place-items: center; font-weight: 600; font-size: 0.9rem; font-variant-numeric: tabular-nums; background: var(--accent); color: var(--bg); }
.spot.is-sold { background: var(--bg-3); color: var(--text-3); }
.spot.is-reserved { background: var(--copper); color: var(--bg); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 28px; font-size: 0.82rem; color: var(--text-3); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 12px; height: 12px; background: var(--accent); }
.legend i.is-sold { background: var(--bg-4); }
.legend i.is-reserved { background: var(--copper); }

/* ---------- Reveal ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(32px); transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out); }
  .js .reveal.is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-delay: 0s !important; }
}

/* ---------- 404 ---------- */

.notfound { min-height: 100vh; display: grid; align-content: center; gap: 28px; padding-block: 140px 80px; }
.notfound h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(4rem, 12vw, 9rem); line-height: 0.9; letter-spacing: -0.02em; }
