/* Публічна сторінка будинку. Окремий файл: CRM (style.css) сюди не підвантажується.
   Шрифт Inter — ті самі файли, що й у CRM. Стилі лише тут: CSP забороняє інлайн. */
@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(/static/fonts/inter-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: Inter; font-weight: 500; font-display: swap; src: url(/static/fonts/inter-cyrillic-500-normal.woff2) format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url(/static/fonts/inter-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: Inter; font-weight: 700; font-display: swap; src: url(/static/fonts/inter-cyrillic-700-normal.woff2) format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(/static/fonts/inter-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+2000-206F,U+20AC,U+2122,U+2212; }
@font-face { font-family: Inter; font-weight: 500; font-display: swap; src: url(/static/fonts/inter-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+2000-206F,U+20AC,U+2122,U+2212; }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url(/static/fonts/inter-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+2000-206F,U+20AC,U+2122,U+2212; }
@font-face { font-family: Inter; font-weight: 700; font-display: swap; src: url(/static/fonts/inter-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+2000-206F,U+20AC,U+2122,U+2212; }

:root {
  --ink: #0f172a; --muted: #64748b; --line: #e2e8f0; --bg: #f8fafc; --card: #ffffff;
  --night: #0b1220; --night-2: #16233b; --on-night: #e2e8f0; --on-night-muted: #94a3b8;
  --go: #22c55e; --go-deep: #047857; --go-ink: #052e16; --sun: #fbbf24; --blue: #2563eb;
  --r: 18px; --shadow: 0 1px 2px rgba(15,23,42,.04), 0 12px 32px rgba(15,23,42,.06);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
a { color: var(--blue); }
.in { width: min(1080px, 100% - 32px); margin-inline: auto; }
.loading { padding: 80px 0; text-align: center; color: var(--muted); }

/* ── Перший екран ── */
.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, #eaf3fc 0%, #c5dbf0 46%, var(--bg) 78%); padding: 20px 0 16px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.01em; }
.brand svg { width: 34px; height: 34px; flex: none; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: #fff; box-shadow: var(--shadow); white-space: nowrap; }
.pill.warn { background: #fef3c7; color: #92400e; }
.hero-head { position: relative; z-index: 3; }
.hero h1 { font-size: clamp(30px, 5.2vw, 56px); line-height: 1.08; letter-spacing: -.03em; font-weight: 700; }
.hero h1 em { font-style: normal; color: var(--go-deep); }
.lead { margin: 14px 0 0; font-size: clamp(16px, 1.6vw, 19px); color: #475569; max-width: 56ch; }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 12px; font: inherit; font-weight: 600; text-decoration: none; border: 1px solid transparent; transition: transform .12s ease, background-color .15s ease, border-color .15s ease; }
.btn:active { transform: scale(.98); }
.btn.go { background: #059669; color: #fff; }
.btn.go:hover { background: var(--go-deep); }
.btn.ghost { background: #fff; color: var(--go-deep); border-color: #059669; }
.btn.ghost:hover { background: #ecfdf5; }

/* Прогрес: фото будинку на всю ширину, кожна половина фасаду заливається зліва направо; над дахом — шкала з позначкою кворуму.
   Картки секцій: на широкому екрані — поверх фото, над дахом, на вузькому — під ним. */
.stage { position: relative; margin-top: -2vw; }
.house { position: relative; aspect-ratio: 1672 / 941; }
.house img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%); mask-image: linear-gradient(to bottom, transparent 0, #000 22%); }
/* Низ затемнення й заливки розчиняється: перед будинком дерева, різка межа по них була б помітна. */
.house .dim { filter: grayscale(1) brightness(.6) contrast(1.1); -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 72%, transparent 82%); mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 72%, transparent 82%); clip-path: inset(35% 9.7% 18% 9.6%); }
.house .tint { position: absolute; top: 35%; bottom: 18%; width: 0; background: linear-gradient(180deg, rgba(52,211,153,.36), rgba(5,150,105,.32));
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 100%), linear-gradient(to right, #000 calc(100% - 3.2vw), transparent 100%); mask-image: linear-gradient(to bottom, #000 78%, transparent 100%), linear-gradient(to right, #000 calc(100% - 3.2vw), transparent 100%);
  -webkit-mask-composite: source-in; mask-composite: intersect; }
/* Шкала над дахом: сіра лінія на всю половину, зелена — зібране, жовта позначка — кворум. */
.house .scale { position: absolute; bottom: 71.5%; height: 3px; border-radius: 3px; background: #475569; cursor: ew-resize; touch-action: none; }
/* Зона, за яку зручно вхопити шкалу мишкою чи пальцем: сама лінія лише 3 px заввишки. */
.scale-hit { position: absolute; inset: -18px 0; }
.house .scale.grab { cursor: grabbing; }
.house .scale::before, .house .scale::after, .scale-fill::after { content: ""; position: absolute; top: 50%; width: 9px; height: 9px; border-radius: 50%; transform: translate(-50%, -50%); }
.house .scale::before { left: 0; background: #059669; }
.house .scale::after { left: 100%; background: #475569; }
.scale-fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 3px; background: #059669; }
.scale-fill::after { left: 100%; width: 14px; height: 14px; background: #059669; box-shadow: 0 0 0 3px rgba(255,255,255,.9), 0 2px 8px rgba(15,23,42,.35); transition: transform .15s ease; }
.scale.grab .scale-fill::after, .scale:hover .scale-fill::after { transform: translate(-50%, -50%) scale(1.25); }
.scale-goal { position: absolute; top: -6px; bottom: -6px; width: 3px; margin-left: -1px; border-radius: 2px; background: #f59e0b; }
.scale-goal span { position: absolute; top: calc(100% + 4px); left: 50%; transform: translateX(-50%); padding: .15em .6em; border-radius: 999px; background: rgba(15,23,42,.74); color: #fde68a; font-size: clamp(10px, 1vw, 13px); font-weight: 600; white-space: nowrap; }
.house .tag b { color: var(--go-deep); }
.house .tag { position: absolute; bottom: 75%; transform: translateX(-50%); padding: .35em .9em; border-radius: 999px; background: #ecfdf5; color: #064e3b; font-size: 12px; font-weight: 700; white-space: nowrap; box-shadow: 0 2px 10px rgba(15,23,42,.18); }
.house .split { position: absolute; left: 50%; top: 31%; bottom: 16%; border-left: 2px dashed rgba(255,255,255,.9); }
.sec-card { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); }
.sec-n span { font-size: 13px; color: var(--muted); }
.sec-cards { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: -5vw 14px 0; }
.sec-card { padding: 12px 16px; }
.sec-card h3 { font-size: 16px; }
.sec-card h3 span { font-size: 12px; font-weight: 600; color: var(--go-deep); }
.sec-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; margin-top: 2px; }
.pct { font-size: clamp(32px, 4vw, 44px); line-height: 1.05; font-weight: 700; letter-spacing: -.03em; color: var(--go-deep); }
.pct small { font-size: .62em; font-weight: 700; }
.sec-n { display: flex; align-items: center; gap: 8px; color: var(--go-deep); }
.sec-n svg { width: 24px; height: 24px; flex: none; }
.sec-n div { display: grid; line-height: 1.25; }
.sec-n b { font-size: 15px; color: var(--ink); white-space: nowrap; }
.hero-head .cta { display: none; }
.foot .cta { margin-top: 14px; }
.foot .btn { flex: 1 1 260px; min-height: 54px; }
@media (min-width: 1000px) {
  /* Заголовок і кнопки — над фото, заходять на його небо; картки висять над дахом своїх половин, підсумок — унизу фото. */
  .hero { padding-bottom: 0; }
  .hero-head { text-align: center; }
  .lead { margin-inline: auto; }
  .hero-head .cta { display: flex; }
  .foot { display: none; }
  .stage { margin-top: min(0px, calc(118px - 14.35vw)); }
  .house .tag { display: none; }
  .sec-cards { position: absolute; z-index: 2; left: 9.6%; right: 9.7%; bottom: 74.5%; margin: 0; gap: 0; justify-items: center; align-items: end; }
  .sec-card { position: relative; padding: 12px 20px 14px; }
  .sec-card::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 14px; height: 14px; background: var(--card); transform: translateX(-50%) rotate(45deg); border-radius: 2px; }
  .sec-row { flex-wrap: nowrap; gap: 16px; }
  .sec-n { border-left: 1px solid var(--line); padding-left: 16px; }
}

/* ── Розділи ── */

/* ── Схема будинку ── */


/* Під фото: панелі секцій заходять на низ знімка. У кожній — прогрес, вибір поверху й приміщення цього поверху. */
#house { position: relative; z-index: 2; margin-top: -6vw; }
.panels { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.panel { background: var(--card); border-radius: 18px; padding: 18px; box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; gap: 12px; }
.panel-ico { flex: none; width: 40px; height: 40px; display: grid; place-items: center; color: var(--go-deep); }
.panel-ico svg { width: 34px; height: 34px; }
.panel-name { flex: 1; min-width: 0; display: grid; }
.panel-name h3 { font-size: 17px; }
.panel-name p { display: flex; flex-wrap: wrap; gap: 0 6px; font-size: 13.5px; color: var(--muted); }
.panel-name p span + span::before { content: "· "; }
.panel-head > b { font-size: 22px; letter-spacing: -.02em; color: var(--go-deep); }
.track { position: relative; height: 8px; border-radius: 999px; background: var(--line); margin: 12px 0 16px; }
.track .fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 999px; background: linear-gradient(90deg, #047857, #10b981); transition: width 1.2s cubic-bezier(.23,1,.32,1); }
.track .goal { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1px; border-radius: 2px; background: #f59e0b; }
.floors { display: flex; align-items: center; gap: 5px; }
.floors span { flex: none; font-size: 13.5px; margin-right: 6px; }
.floors button { flex: 1 1 0; min-width: 0; max-width: 36px; height: 32px; padding: 0; border: 0; border-radius: 9px; background: #f1f5f9; color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; transition: background-color .15s ease; }
.floors button:hover { background: #e2e8f0; }
.floors button.on { background: var(--go-deep); color: #fff; font-weight: 700; }
.tiles-box { margin-top: 12px; display: grid; gap: 6px; }
.tiles-row { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px; align-items: center; }
.tiles-row > span { font-size: 12px; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
/* Нежитлові приміщення: без підпису підʼїзду, плитки ширші — у них довші номери. */
.tiles-row.wide { grid-template-columns: minmax(0, 1fr); }
.tiles-row.wide .tiles { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
.tiles-row.wide .apt { font-size: 12px; }
.apt { height: 38px; border-radius: 9px; display: grid; place-items: center; font-style: normal; font-size: 13px; font-weight: 500; background: #eef2f6; color: #64748b; }
.apt.on { background: linear-gradient(180deg, #6ee7b7, #34d399); color: #064e3b; font-weight: 700; box-shadow: inset 0 0 0 1.5px #059669; }
.note { font-size: 13px; color: var(--muted); margin: 14px 0 8px; }
footer { border-top: 1px solid var(--line); padding: 26px 0 40px; color: var(--muted); font-size: 14px; }
footer .in { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

@media (max-width: 999px) {
  .sec-cards { display: none; }
  #house { margin-top: 14px; }
  .foot .cta { margin-top: -5vw; position: relative; z-index: 2; }
}
@media (max-width: 860px) {
  .panels { grid-auto-flow: row; }
  .top { margin-bottom: 28px; }
}
@media (max-width: 560px) {
  .in { width: calc(100% - 28px); }
  .sec-card { padding: 12px; }
  .floors { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
  .floors span { grid-column: 1 / -1; margin: 0; }
  .floors button { max-width: none; height: 36px; }
  .panel-name p span { display: block; width: 100%; }
  .panel-name p span + span::before { content: none; }
  .panel { padding: 16px; }
  .scale-goal span { display: none; }
  .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn, .scale-fill::after { transition: none; } }
