/* ЖК «Тоо Шамалы» — демо-сайт застройщика. Сайт и дизайн: Азиз Омуров. */
@font-face { font-family: "Unbounded"; font-weight: 500 900; font-display: swap; src: url(/fonts/unbounded-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-weight: 500 900; font-display: swap; src: url(/fonts/unbounded-latin.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: "Geologica"; font-weight: 400 700; font-display: swap; src: url(/fonts/geologica-cyrillic-ext.woff2) format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Geologica"; font-weight: 400 700; font-display: swap; src: url(/fonts/geologica-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Geologica"; font-weight: 400 700; font-display: swap; src: url(/fonts/geologica-latin.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: "Geologica Fallback"; src: local("Arial"); size-adjust: 125.62%; ascent-override: 77.61%; descent-override: 21.89%; line-gap-override: 0%; }
@font-face { font-family: "Unbounded Fallback"; src: local("Arial Black"), local("Arial"); size-adjust: 112%; ascent-override: 86%; descent-override: 21%; line-gap-override: 0%; }

:root {
  --night: #15183D;
  --night-2: #1D2047;
  --night-3: #2A2D5E;
  --lamp: #FFCF7A;
  --lamp-2: #FFC05A;
  --snow: #F1F3F7;
  --paper: #FFFFFF;
  --ink: #181C33;
  --ink-2: #4B5170;
  --line: #D5DAE5;
  --line-2: #E7EAF1;
  --brand: #2F3577;
  --brand-2: #232861;
  --free: #22785A;
  --booked: #F3C24F;
  --booked-ink: #3A2C05;
  --sold: #DDE1EA;
  --sold-ink: #555B74;
  --error: #B42318;
  --on-dark: #F1F3F7;
  --on-dark-2: #C9CBE6;
  --ring: #2F3577;
  --f-body: "Geologica", "Geologica Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-disp: "Unbounded", "Unbounded Fallback", "Geologica", sans-serif;
  --gutter: 16px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--snow);
  color: var(--ink);
  font: 400 1rem/1.55 var(--f-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--brand); text-underline-offset: .18em; }
b, strong { font-weight: 600; }
p, dd, li { text-wrap: pretty; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; }
.hero-shell, .site-foot, .chat-head, .crm-head, .toast { --ring: var(--lamp); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px;
}
.skip:focus { top: 12px; }

.wrap { max-width: 1200px; margin: 0 auto; padding-inline: var(--gutter); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .7em 1.35em;
  border: 2px solid transparent; border-radius: 12px;
  font: 600 1rem/1.2 var(--f-body); text-align: center; text-decoration: none;
  cursor: pointer; transition: background-color .18s, border-color .18s, color .18s;
  text-wrap: balance;
}
.btn-sm { min-height: 40px; padding: .45em 1em; font-size: .9375rem; border-radius: 10px; }
.btn-lg { min-height: 56px; padding: .9em 1.6em; font-size: 1.0625rem; }
.btn-block { width: 100%; }
.btn-lamp { background: var(--lamp); color: var(--ink); }
.btn-lamp:hover { background: var(--lamp-2); }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-2); }
.btn-line { border-color: var(--brand); color: var(--brand); background: transparent; }
.btn-line:hover { background: rgba(47, 53, 119, .07); }
.btn-line-light { border-color: rgba(241, 243, 247, .5); color: var(--on-dark); background: transparent; }
.btn-line-light:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-text {
  background: none; border: 0; padding: 6px 2px; cursor: pointer;
  color: var(--brand); font-weight: 600; text-decoration: underline; text-underline-offset: .2em;
}

/* ---------- Плашка демо ---------- */
.demo-bar {
  background: var(--snow); color: var(--ink-2);
  font-size: .8125rem; line-height: 1.35; text-align: center;
  padding: 8px var(--gutter); border-bottom: 1px solid var(--line);
}
.demo-bar a { color: var(--brand); font-weight: 600; white-space: nowrap; }

/* ---------- Герой ---------- */
.hero-shell { position: relative; background: var(--night); color: var(--on-dark); overflow: hidden; }
.site-head {
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 1200px; margin: 0 auto; padding: 14px var(--gutter);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--on-dark); text-decoration: none; }
.brand-mark { width: 34px; height: 34px; color: var(--lamp); flex: none; }
.brand-name { font: 600 .9375rem/1.1 var(--f-disp); letter-spacing: -.01em; }
.brand-name small { display: block; margin-top: 3px; font: 400 .75rem/1.2 var(--f-body); color: var(--on-dark-2); letter-spacing: 0; }
.site-nav { display: none; }
.site-head .btn .lg-only { display: none; }

.hero { position: relative; z-index: 2; }
.hero-copy { padding: 18px var(--gutter) 0; max-width: 640px; }
.hero-by { font-size: .875rem; color: var(--on-dark-2); }
.hero-title {
  margin: 10px 0 14px;
  font: 600 clamp(3.2rem, 1.9rem + 6vw, 6.6rem)/.92 var(--f-disp);
  letter-spacing: -.035em;
}
.hero-title span { display: block; }
.hero-title span + span { padding-left: .55em; }
.hero-lead { font-size: 1.0625rem; line-height: 1.5; color: #DEDFF2; max-width: 34ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero-cta .btn { flex: 1 1 auto; }

.hero-stage {
  --tw-h: 470px;
  position: relative; height: calc(var(--tw-h) + 8px); margin-top: 8px;
  background: linear-gradient(var(--night), rgba(21, 24, 61, 0) 34%), url(hero-bg.svg) 84% 100% / auto 128% no-repeat, var(--night);
}
.tower {
  position: absolute; right: 14px; bottom: 0;
  height: var(--tw-h); width: calc(var(--tw-h) * .4545);
}
.hero-callout {
  position: absolute; top: 9%; left: var(--gutter);
  right: calc(var(--tw-h) * .4545 + 30px);
  font-size: .8125rem; line-height: 1.4; color: var(--on-dark);
}
.callout-text { display: block; padding: 10px 12px; background: rgba(21, 24, 61, .72); border-radius: 10px; border: 1px solid rgba(255, 207, 122, .35); }
.hero-callout::after {
  content: ""; position: absolute; top: 22px; right: -26px; width: 22px; height: 1px; background: var(--lamp);
}
.hero-callout::before {
  content: ""; position: absolute; top: 19px; right: -31px; width: 7px; height: 7px; border-radius: 50%; background: var(--lamp);
}
.hero-callout b { color: var(--lamp); }

.hero-facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
  padding: 18px var(--gutter) 22px; background: #16183A;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.hero-facts dt { font-size: .75rem; color: var(--on-dark-2); }
.hero-facts dd { margin-top: 3px; font-size: .875rem; line-height: 1.35; font-weight: 600; }

/* Вход: окна загораются одно за другим */
.tower .tw-lit { opacity: 0; transition: opacity .5s ease-out; }
.tower .tw-lit.on { opacity: 1; }
.hero-copy > * { animation: rise .8s var(--ease) both; }
.hero-copy > :nth-child(2) { animation-delay: .08s; }
.hero-copy > :nth-child(3) { animation-delay: .16s; }
.hero-copy > :nth-child(4) { animation-delay: .24s; }
.hero-callout { animation: rise .8s var(--ease) 1.4s both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Секции ---------- */
.sec { padding-block: clamp(56px, 7vw, 104px); }
.sec-head { max-width: 720px; margin-bottom: 28px; }
.sec h2, .aziz h2 {
  font: 500 clamp(1.7rem, 1.15rem + 2.2vw, 2.75rem)/1.1 var(--f-disp);
  letter-spacing: -.025em;
}
.sec-head p { margin-top: 12px; font-size: 1.0625rem; color: var(--ink-2); max-width: 52ch; }
#kvartiry { scroll-margin-top: 8px; }
#kvartiry:focus { outline: none; }

/* ---------- Шахматка ---------- */
.chess-layout { display: grid; gap: 16px; }
.filters {
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px; display: grid; gap: 16px;
}
.f-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.f-group legend, .f-top label { padding: 0; font-size: .875rem; font-weight: 600; margin-bottom: 8px; }
.f-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.f-top label { margin: 0; }
.f-top output { font-size: .9375rem; font-weight: 600; color: var(--brand); font-variant-numeric: tabular-nums; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.seg-btn {
  min-height: 44px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--paper);
  font: 600 1rem/1 var(--f-disp); cursor: pointer; transition: background-color .15s, border-color .15s, color .15s;
}
.seg-btn:hover { border-color: var(--brand); }
.seg-btn[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.f-floors { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.f-floors label { display: flex; align-items: center; gap: 8px; font-size: .9375rem; color: var(--ink-2); }
select {
  flex: 1; min-width: 0; height: 44px; padding: 0 34px 0 12px;
  border: 1.5px solid var(--line); border-radius: 10px; background: var(--paper);
  appearance: none; -webkit-appearance: none; color: var(--ink); font-size: 1rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%232F3577' stroke-width='1.8'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 12px 8px;
}
select:hover { border-color: var(--brand); }
.f-check { display: flex; align-items: center; gap: 10px; font-size: .9375rem; cursor: pointer; }
.f-check input { width: 20px; height: 20px; accent-color: var(--brand); margin: 0; }
.f-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.f-count { font-size: .9375rem; font-weight: 600; }

/* Ползунки */
.range { --fill: 100%; width: 100%; height: 28px; margin: 0; background: transparent; appearance: none; -webkit-appearance: none; cursor: pointer; }
.range::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--brand) var(--fill), var(--line) var(--fill)); }
.range::-moz-range-track { height: 6px; border-radius: 3px; background: var(--line); }
.range::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--brand); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%; background: #fff; border: 3px solid var(--brand); box-shadow: 0 2px 6px rgba(24, 28, 51, .25); }
.range::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--brand); box-shadow: 0 2px 6px rgba(24, 28, 51, .25); }
.range:focus-visible { outline: none; }
.range:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--ring); outline-offset: 2px; }
.range:focus-visible::-moz-range-thumb { outline: 3px solid var(--ring); outline-offset: 2px; }

/* Лист с фасадом */
.sheet {
  min-width: 0; background-color: var(--paper);
  background-image: linear-gradient(var(--line-2) 1px, transparent 1px), linear-gradient(90deg, var(--line-2) 1px, transparent 1px);
  background-size: 24px 24px; background-position: -1px -1px;
  border: 1px solid var(--line); border-radius: 16px; padding: 14px 10px 14px 6px;
}
.pick-banner p { flex: 1 1 220px; }
.pick-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.pick-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px;
  margin: 0 0 12px 4px; padding: 10px 14px; border-radius: 12px; background: #E9EAF7; color: var(--ink); font-size: .9375rem;
}
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 14px 6px; font-size: .875rem; color: var(--ink-2); }
.legend li { display: flex; align-items: center; gap: 7px; }
.legend .lg-unit { color: var(--ink-2); font-size: .8125rem; }
.sw { width: 16px; height: 16px; border-radius: 3px; }
.sw-free { background: var(--free); }
.sw-booked { background: repeating-linear-gradient(135deg, #F3C24F 0 4px, #E2AA2A 4px 8px); }
.sw-sold { background: var(--sold); box-shadow: inset 0 0 0 1px #C2C8D6; }

.facade-frame { --lab: 26px; --gap: 5px; }
.facade-roof {
  position: relative; height: 14px; margin-left: calc(var(--lab) - 2px);
  border: 2px solid #2B3050; border-bottom: 0; border-radius: 2px 2px 0 0;
}
.facade-roof::before {
  content: ""; position: absolute; bottom: 100%; left: 14%; width: 22%; height: 12px;
  border: 2px solid #2B3050; border-bottom: 0;
}
.facade-views {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap);
  margin: 0 0 0 calc(var(--lab) - 2px); padding: 6px 7px 6px 5px;
  border-inline: 2px solid #2B3050; font-size: .75rem; color: var(--ink-2); text-align: center;
}
.facade-views span { border-bottom: 1px solid #AEB5C8; padding-bottom: 3px; }
.facade { position: relative; display: grid; gap: var(--gap); padding-bottom: var(--gap); }
.facade::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--lab) - 2px); right: 0;
  border-inline: 2px solid #2B3050; pointer-events: none;
}
.f-row { display: grid; grid-template-columns: var(--lab) repeat(6, minmax(0, 1fr)); column-gap: var(--gap); padding-right: 7px; align-items: stretch; }
.f-row > .f-lab {
  display: flex; align-items: center; justify-content: flex-end; padding-right: 7px;
  font-size: .75rem; color: var(--ink-2); font-variant-numeric: tabular-nums;
}
.f-row > .f-cellwrap { min-width: 0; }
.cell {
  position: relative; width: 100%; min-height: 50px; padding: 5px 2px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  border: 0; border-radius: 4px; cursor: pointer; line-height: 1.1;
  transition: opacity .25s, box-shadow .15s;
}
.cell .c-rooms { font: 600 .8125rem/1.1 var(--f-disp); }
.cell .c-area { font-size: .75rem; font-variant-numeric: tabular-nums; }
.cell .c-unit { display: none; }
.cell .c-price { display: none; font-size: .75rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.cell.st-free { background: var(--free); color: #fff; }
.cell.st-booked { background: repeating-linear-gradient(135deg, #F3C24F 0 6px, #EBB641 6px 12px); color: var(--booked-ink); }
.cell.st-sold { background: var(--sold); color: var(--sold-ink); }
.cell:hover { box-shadow: inset 0 0 0 2px rgba(24, 28, 51, .45); }
.cell:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; z-index: 2; }
.cell.is-dim { opacity: .18; }
.cell.is-pick { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--brand); z-index: 1; opacity: 1; }
.cell.is-pick::after {
  content: attr(data-pick); position: absolute; top: -10px; right: -10px;
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand); color: #fff; font: 700 .75rem/1 var(--f-body); box-shadow: 0 0 0 2px #fff;
}
.facade-ground {
  margin-left: calc(var(--lab) - 2px); padding: 12px 10px; border: 2px solid #2B3050; border-top-width: 4px;
  background: repeating-linear-gradient(90deg, #F4F5FA 0 18px, #ECEEF5 18px 20px);
  font-size: .8125rem; color: var(--ink-2); text-align: center;
}
.facade-hint { margin: 12px 0 0 6px; font-size: .8125rem; color: var(--ink-2); }

/* ---------- Рассрочка ---------- */
.sec-calc { background: #E8EBF3; }
.calc-layout { display: grid; gap: 28px; }
.calc-intro p { margin-top: 12px; color: var(--ink-2); font-size: 1.0625rem; max-width: 46ch; }
.terms { margin-top: 22px; max-width: 420px; }
.terms div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid #CDD3E1; }
.terms div:last-child { border-bottom: 1px solid #CDD3E1; }
.terms dt { font-weight: 600; }
.terms dd { color: var(--ink-2); }
.calc-intro .calc-small { font-size: .875rem; margin-top: 14px; }
.calc-card { background: var(--paper); border-radius: 20px; padding: 20px 18px; border: 1px solid var(--line); }

.calc { display: grid; gap: 20px; }
.calc .field-r .f-top label { font-size: .9375rem; }
.calc-apt { font-size: .9375rem; color: var(--ink-2); padding: 10px 12px; border-radius: 10px; background: var(--snow); }
.calc-apt b { color: var(--ink); }
.calc-res { border-top: 1px solid var(--line-2); padding-top: 16px; }
.calc-monthly span { display: block; font-size: .875rem; color: var(--ink-2); }
.calc-monthly strong { display: block; margin-top: 4px; font: 600 clamp(1.6rem, 1.3rem + 1.4vw, 2.2rem)/1.1 var(--f-disp); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.calc-rows { margin-top: 14px; }
.calc-rows div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: .9375rem; border-top: 1px dashed var(--line); }
.calc-rows dt { color: var(--ink-2); }
.calc-rows dd { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.calc .btn { margin-top: 4px; }

/* ---------- О доме ---------- */
.about-layout { display: grid; gap: 40px; }
.about-text > p { margin-top: 14px; font-size: 1.0625rem; color: var(--ink-2); max-width: 58ch; }
.specs { margin-top: 24px; }
.specs div { display: grid; gap: 2px; padding: 12px 0; border-top: 1px solid var(--line); }
.specs dt { font-size: .875rem; color: var(--ink-2); }
.specs dd { font-weight: 600; }
.progress { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 22px 20px; align-self: start; }
.progress h3 { font: 500 1.25rem/1.2 var(--f-disp); letter-spacing: -.01em; }
.progress-now { margin-top: 8px; color: var(--ink-2); font-size: .9375rem; }
.bar { margin-top: 14px; height: 10px; border-radius: 5px; background: var(--line-2); overflow: hidden; }
.bar-fill { display: block; height: 100%; width: 46%; background: var(--brand); border-radius: 5px; }
.timeline { margin-top: 20px; counter-reset: st; }
.timeline li { position: relative; padding: 0 0 18px 34px; display: grid; gap: 2px; counter-increment: st; }
.timeline li::before {
  content: counter(st); position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font: 700 .6875rem/1 var(--f-body);
  border: 2px solid #AEB5C8; color: var(--ink-2); background: var(--paper);
}
.timeline li::after { content: ""; position: absolute; left: 10px; top: 24px; bottom: 2px; width: 2px; background: var(--line); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::after { display: none; }
.timeline li.done::before { background: var(--free); border-color: var(--free); color: #fff; }
.timeline li.now::before { background: var(--brand); border-color: var(--brand); color: #fff; }
.timeline span { font-size: .875rem; color: var(--ink-2); }

/* ---------- Показ ---------- */
.sec-visit { padding-top: 0; }
.visit { display: grid; gap: 20px; padding-top: clamp(40px, 5vw, 64px); border-top: 1px solid var(--line); }
.visit p { margin-top: 12px; color: var(--ink-2); font-size: 1.0625rem; max-width: 52ch; }
.visit .btn { justify-self: start; }

/* ---------- Подвал ---------- */
.site-foot { background: #101230; color: #D9DBEF; padding: 56px 0 120px; }
.aziz {
  display: grid; gap: 22px; padding: 26px 20px; border-radius: 20px;
  background: linear-gradient(160deg, #23275C, #171A42); border: 1px solid rgba(255, 255, 255, .12);
}
.aziz h2 { color: #fff; font-size: clamp(1.45rem, 1.05rem + 1.8vw, 2.25rem); max-width: 20ch; }
.aziz p { margin-top: 12px; color: #C9CBE6; max-width: 56ch; }
.aziz .btn { justify-self: start; }
.foot-row { display: grid; gap: 8px; margin-top: 32px; font-size: .875rem; color: #A9ADCC; }
.foot-demo { color: #D9DBEF; }
.foot-credit a { color: var(--lamp); font-weight: 600; }

/* ---------- Диалоги ---------- */
.dlg {
  border: 0; padding: 0; color: var(--ink); background: var(--paper);
  width: 100%; max-width: 100%; max-height: 92dvh; margin: auto 0 0 0;
  border-radius: 20px 20px 0 0; overflow-y: auto; overscroll-behavior: contain;
}
.dlg::backdrop { background: rgba(12, 14, 36, .58); }
.dlg[open] { animation: sheet .3s var(--ease); }
@keyframes sheet { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.dlg-inner { padding: 18px 16px 24px; }
.x {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px;
  border: 0; border-radius: 50%; background: var(--snow); color: var(--ink); cursor: pointer;
}
.x svg { width: 22px; height: 22px; }
.x:hover { background: var(--line-2); }
.x-light { background: rgba(255, 255, 255, .1); color: #fff; }
.x-light:hover { background: rgba(255, 255, 255, .2); }

.apt-head { display: grid; grid-template-columns: 1fr auto auto; align-items: start; gap: 10px; margin-bottom: 14px; }
.apt-num { font-size: .875rem; color: var(--ink-2); }
.apt-title { font: 600 1.375rem/1.2 var(--f-disp); letter-spacing: -.02em; margin-top: 2px; }
.pill { align-self: center; padding: 5px 10px; border-radius: 999px; font-size: .8125rem; font-weight: 600; white-space: nowrap; }
.pill.st-free { background: #DDF0E7; color: #165A41; }
.pill.st-booked { background: #FCEFC9; color: #5C4507; }
.pill.st-sold { background: var(--sold); color: #3F4560; }
.apt-body { display: grid; gap: 18px; }
.apt-plan { background: #F5F6FA; border-radius: 14px; padding: 12px 12px 10px; }
.apt-plan figcaption { margin-top: 8px; font-size: .8125rem; color: var(--ink-2); }
.plan { width: 100%; height: auto; }
.plan .pl-living { fill: #fff; stroke: #2B3050; stroke-width: .6; }
.plan .pl-wet { fill: #DEEAF5; stroke: #2B3050; stroke-width: .6; }
.plan .pl-hall { fill: #EEEFF5; stroke: #2B3050; stroke-width: .6; }
.plan .pl-balcony { fill: #E7F0E6; stroke: #2B3050; stroke-width: .5; stroke-dasharray: 1.4 .9; }
.plan .pl-outline { fill: none; stroke: #181C33; stroke-width: 1.8; }
.plan .pl-win-gap { fill: #fff; }
.plan .pl-win { fill: none; stroke: #5E9BD0; stroke-width: .7; }
.plan .pl-door-gap { fill: #F5F6FA; }
.plan .pl-door { fill: none; stroke: #4B5170; stroke-width: .45; }
.plan .pl-t { font: 600 3.2px var(--f-body); fill: var(--ink); text-anchor: middle; }
.plan .pl-a { font: 400 2.9px var(--f-body); fill: var(--ink-2); text-anchor: middle; }
.plan .pl-t-s { font-size: 2.4px; }
.apt-price { font: 600 1.75rem/1.15 var(--f-disp); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.apt-ppm { margin-top: 4px; color: var(--ink-2); font-size: .9375rem; }
.apt-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.apt-facts dt { font-size: .8125rem; color: var(--ink-2); }
.apt-facts dd { font-weight: 600; }
.apt-note { margin-top: 16px; padding: 10px 12px; border-radius: 10px; background: var(--snow); font-size: .9375rem; color: var(--ink-2); }
.apt-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.apt-actions .btn { flex: 1 1 180px; padding-inline: .8em; }
.apt-calc { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line-2); }

.lead-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.lead-head h2 { font: 600 1.375rem/1.2 var(--f-disp); letter-spacing: -.02em; padding-top: 6px; }
.lead-ctx { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--snow); color: var(--ink-2); font-size: .9375rem; }
.lead-ctx:empty { display: none; }
.lead-form { display: grid; gap: 16px; margin-top: 18px; }
.field { display: grid; gap: 6px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field label, .field legend { font-size: .9375rem; font-weight: 600; padding: 0; }
.field input[type="text"], .field input[type="tel"] {
  height: 52px; padding: 0 14px; border: 1.5px solid #BFC6D6; border-radius: 12px; background: #fff;
  font-size: 1.0625rem; color: var(--ink);
}
.field input:hover { border-color: var(--brand); }
.field input:focus-visible { outline: 3px solid rgba(47, 53, 119, .35); outline-offset: 0; border-color: var(--brand); }
.field input[aria-invalid="true"] { border-color: var(--error); }
.hint { font-size: .8125rem; color: var(--ink-2); }
.err { font-size: .875rem; color: var(--error); font-weight: 600; }
.when { display: flex; flex-wrap: wrap; gap: 8px; }
.when legend { margin-bottom: 8px; width: 100%; }
.chip { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer; font-size: .9375rem; }
.chip input { accent-color: var(--brand); width: 18px; height: 18px; margin: 0; }
.chip:has(input:checked) { border-color: var(--brand); background: #ECEDF8; }
.chip:has(input:focus-visible) { outline: 3px solid var(--ring); outline-offset: 2px; }
.demo-small { font-size: .8125rem; color: var(--ink-2); text-align: center; }

/* ---------- Панель менеджера (CRM) ---------- */
.crm {
  position: fixed; z-index: 60; left: 8px; right: 8px; bottom: 8px;
  max-height: 80dvh; overflow-y: auto; overscroll-behavior: contain;
  background: #fff; color: var(--ink); border-radius: 18px;
  box-shadow: 0 24px 60px rgba(12, 14, 36, .35), 0 0 0 1px rgba(12, 14, 36, .08);
  animation: crm-in .35s var(--ease);
}
@keyframes crm-in { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.crm-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; padding: 14px 14px 14px 18px; background: #262A45; color: #fff; position: sticky; top: 0; z-index: 1; }
.crm-head h2 { font: 600 1rem/1.25 var(--f-body); }
.crm-head p { font-size: .8125rem; color: #C3C6DD; margin-top: 2px; }
.crm-body { padding: 16px 18px 6px; }
.crm-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .8125rem; color: var(--ink-2); }
.crm-tag { padding: 3px 9px; border-radius: 6px; background: #DDF0E7; color: #165A41; font-weight: 600; }
.crm-lead h3 { margin-top: 10px; font: 600 1.0625rem/1.3 var(--f-body); }
.crm-stages { display: flex; gap: 3px; margin-top: 12px; }
.crm-stages li { flex: 1; padding: 5px 2px; text-align: center; font-size: .6875rem; color: var(--ink-2); background: var(--snow); border-radius: 4px; }
.crm-stages li.on { background: var(--free); color: #fff; font-weight: 600; }
.crm-fields { margin-top: 12px; }
.crm-fields div { display: grid; grid-template-columns: 96px 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-2); font-size: .875rem; }
.crm-fields dt { color: var(--ink-2); }
.crm-fields dd { font-weight: 600; overflow-wrap: anywhere; }
.crm-task { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #FFF4DC; font-size: .875rem; color: #4A3708; }
.crm-foot { padding: 10px 18px 16px; font-size: .75rem; color: var(--ink-2); }

/* ---------- Тост ---------- */
.toast {
  position: fixed; z-index: 70; left: 12px; right: 12px; top: 12px;
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  background: var(--ink); color: #fff; border-radius: 14px; box-shadow: 0 16px 40px rgba(12, 14, 36, .35);
  animation: crm-in .3s var(--ease);
}
.toast svg { width: 22px; height: 22px; color: var(--lamp); flex: none; }
.toast p { font-size: .9375rem; line-height: 1.35; }

/* ---------- Консультант ---------- */
.chat-launch {
  position: fixed; z-index: 40; right: 14px; bottom: 14px;
  display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 18px 0 14px;
  border: 0; border-radius: 999px; background: var(--brand); color: #fff; cursor: pointer;
  font-weight: 600; font-size: .9375rem; box-shadow: 0 10px 28px rgba(21, 24, 61, .35);
}
.chat-launch svg { width: 24px; height: 24px; }
.chat-launch:hover { background: var(--brand-2); }
.chat-launch[aria-expanded="true"] { display: none; }
.chat-launch .lg-only { display: none; }

.chat {
  position: fixed; z-index: 50; left: 0; right: 0; bottom: 0;
  height: min(86dvh, 680px); display: flex; flex-direction: column;
  background: #fff; border-radius: 20px 20px 0 0; overflow: hidden;
  box-shadow: 0 -10px 40px rgba(12, 14, 36, .3);
  animation: crm-in .3s var(--ease);
}
.chat-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; padding: 14px 14px 14px 18px; background: var(--night-2); color: #fff; }
.chat-head h2 { font: 600 1.0625rem/1.25 var(--f-disp); letter-spacing: -.01em; }
.chat-head p { font-size: .8125rem; color: var(--on-dark-2); margin-top: 3px; }
.chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.msg { max-width: 86%; padding: 10px 14px; font-size: .9375rem; line-height: 1.45; }
.msg-bot { align-self: flex-start; background: #EEF0F6; border-radius: 16px 16px 16px 4px; }
.msg-me { align-self: flex-end; background: var(--brand); color: #fff; border-radius: 16px 16px 4px 16px; }
.msg-typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.msg-typing i { width: 7px; height: 7px; border-radius: 50%; background: #8A8FAA; animation: blink 1s infinite; }
.msg-typing i:nth-child(2) { animation-delay: .15s; }
.msg-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
.chat-picks { display: grid; gap: 8px; align-self: stretch; }
.pick-card {
  display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center; text-align: left;
  padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer;
}
.pick-card:hover { border-color: var(--brand); }
.pick-card .pk-n { grid-row: span 2; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 700; font-size: .8125rem; }
.pick-card .pk-t { font-weight: 600; font-size: .9375rem; }
.pick-card .pk-s { font-size: .8125rem; color: var(--ink-2); }
.chat-replies { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px 16px; border-top: 1px solid var(--line-2); }
.chat-replies:empty { display: none; }
.reply {
  min-height: 44px; padding: 0 16px; border: 1.5px solid var(--brand); border-radius: 999px;
  background: #fff; color: var(--brand); font-weight: 600; font-size: .9375rem; cursor: pointer;
}
.reply:hover { background: #ECEDF8; }
.reply.reply-main { background: var(--brand); color: #fff; }
.reply.reply-main:hover { background: var(--brand-2); }

/* ---------- Планшет и десктоп ---------- */
@media (min-width: 600px) {
  .hero-facts dd { font-size: .9375rem; }
  .cell { min-height: 56px; }
  .cell .c-unit { display: inline; }
  .legend .lg-unit { display: none; }
  .facade-frame { --lab: 30px; --gap: 6px; }
}

@media (min-width: 768px) {
  :root { --gutter: 32px; }
  .site-head .btn .lg-only { display: inline; }
  .site-head .btn .sm-only { display: none; }
  .dlg { margin: auto; width: min(920px, calc(100vw - 48px)); max-height: calc(100dvh - 48px); border-radius: 20px; }
  .dlg-lead { width: min(500px, calc(100vw - 48px)); }
  .dlg-inner { padding: 24px 28px 28px; }
  .apt-body { grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
  .chat { left: auto; right: 20px; bottom: 20px; width: 400px; height: min(620px, calc(100dvh - 40px)); border-radius: 20px; }
  .chat-launch .lg-only { display: inline; }
  .chat-launch .sm-only { display: none; }
  .crm { left: auto; right: 20px; top: 20px; bottom: auto; width: 380px; max-height: calc(100dvh - 110px); }
  .toast { left: 50%; right: auto; transform: translateX(-50%); width: max-content; max-width: min(560px, calc(100vw - 40px)); top: auto; bottom: 24px; animation: none; }
  .cell .c-price { display: block; }
  .cell { min-height: 64px; }
  .calc-card { padding: 28px; }
  .aziz { padding: 36px; }
}

@media (min-width: 1000px) {
  .site-nav { display: flex; gap: 28px; }
  .site-nav a { color: var(--on-dark); text-decoration: none; font-size: .9375rem; padding: 6px 0; border-bottom: 1.5px solid transparent; }
  .site-nav a:hover { border-color: var(--lamp); }
  .brand-name { font-size: 1.0625rem; }

  .hero-shell { background: var(--night) url(hero-bg.svg) 50% 100% / cover no-repeat; }
  .hero {
    max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter);
    display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    grid-template-areas: "copy stage" "facts stage";
    min-height: clamp(640px, calc(100svh - 106px), 860px);
  }
  .hero-copy { grid-area: copy; align-self: center; padding: 40px 0 0; }
  .hero-lead { font-size: 1.1875rem; }
  .hero-stage { grid-area: stage; --tw-h: min(720px, calc(100svh - 150px)); height: auto; margin: 0; background: none; align-self: stretch; }
  .tower { right: 4%; }
  .hero-cta .btn { flex: 0 0 auto; }
  .hero-callout { top: 57%; left: auto; right: calc(var(--tw-h) * .4545 + 4% + 34px); width: 190px; font-size: .875rem; }
  .hero-facts { grid-area: facts; align-self: end; grid-template-columns: repeat(3, auto); justify-content: start; background: none; border: 0; padding: 0 0 44px; gap: 32px; }
  .hero-facts div { border-top: 1px solid rgba(255, 255, 255, .22); padding-top: 12px; }
  .hero-facts dd { font-size: 1rem; }

  .chess-layout { grid-template-columns: 290px minmax(0, 1fr); gap: 32px; align-items: start; }
  .filters { position: sticky; top: 20px; padding: 20px; gap: 20px; }
  .sheet { padding: 20px 24px 20px 14px; }
  .facade-frame { --lab: 34px; --gap: 7px; }
  .cell { min-height: 60px; }
  .cell .c-rooms { font-size: .9375rem; }
  .cell .c-area, .cell .c-price { font-size: .8125rem; }

  .calc-layout { grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); gap: 64px; align-items: center; }
  .about-layout { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 64px; }
  .visit { grid-template-columns: 1fr auto; align-items: end; }
  .aziz { grid-template-columns: 1fr auto; align-items: center; gap: 40px; padding: 44px 48px; }
  .foot-row { grid-template-columns: 1.4fr 1.2fr auto; align-items: start; gap: 24px; }
  .site-foot { padding-bottom: 72px; }
}

@media (min-width: 1300px) {
  .hero-callout { right: calc(var(--tw-h) * .4545 + 4% + 40px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}
