/* Концепт сайта застройщика: одна таблица стилей на все концепты.
   Цвета застройщика приходят из data (--accent, --ink) и ставятся на :root из concept.js. */

:root {
  --accent: #e8553d;
  --accent-ink: #fff;
  --ink: #14202b;
  --sea: #1d7fa6;
  --sea-2: #5cc3d6;
  --sand: #f6efe4;
  --paper: #fffdf9;
  --line: rgba(20, 32, 43, .12);
  --muted: rgba(20, 32, 43, .62);
  --free: #2fb57c;
  --hold: #f0a63a;
  --sold: #c9ced4;
  --r: 18px;
  --shadow: 0 18px 50px -20px rgba(20, 32, 43, .35);
  --h: "Unbounded", "Rubik", "Noto Sans Georgian", system-ui, sans-serif;
  --b: "Rubik", "Noto Sans Georgian", system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 var(--b);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--h); line-height: 1.1; margin: 0; letter-spacing: -.01em; }
h2 { font-size: clamp(28px, 4.2vw, 48px); }
h3 { font-size: 20px; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
section { padding-block: clamp(56px, 9vw, 110px); }
.kicker { font: 600 13px/1 var(--b); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 640px; margin: 18px 0 0; }

/* ——— плашка «это концепт» ——— */
.demo-bar {
  position: sticky; top: 0; z-index: 60;
  background: #111; color: #fff;
  font-size: 13px; line-height: 1.4;
  padding: 8px 16px;
  display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap;
  text-align: center;
}
.demo-bar b { color: #ffd166; }
.demo-bar a { color: #ffd166; }

/* ——— шапка ——— */
.top {
  position: sticky; top: var(--bar-h, 36px); z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 22px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font: 700 19px/1 var(--h); text-decoration: none; min-width: 0; }
.brand img { height: 34px; width: auto; max-width: 140px; object-fit: contain; }
.brand .mono {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font-size: 16px; flex: none;
}
.nav { display: flex; gap: 22px; margin-inline-start: auto; }
.nav a { text-decoration: none; font-size: 15px; color: var(--muted); }
.nav a:hover { color: var(--ink); }
.langs { display: flex; gap: 2px; background: rgba(20,32,43,.06); padding: 3px; border-radius: 999px; }
.langs button { border: 0; background: none; padding: 5px 9px; border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--muted); }
.langs button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 14px 24px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -10px var(--accent); }
.btn.ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; }
.btn.small { padding: 9px 16px; font-size: 14px; }
.btn.wa { background: #25d366; color: #06371c; }
.top .btn { flex: none; }

/* ——— первый экран ——— */
.hero { position: relative; min-height: min(90vh, 860px); padding-top: 90px !important; display: grid; align-items: end; color: #fff; overflow: hidden; padding: 0; }
.hero .bg { position: absolute; inset: 0; background: linear-gradient(160deg, var(--sea) 0%, #0d3b52 55%, #0a2233 100%); }
.hero .bg img { width: 100%; height: 100%; object-fit: cover; }
.hero .bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,15,25,.72) 0%, rgba(5,15,25,.35) 55%, rgba(5,15,25,0) 85%), linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(5,15,25,.8) 100%); }
[dir="rtl"] .hero .bg::after { background: linear-gradient(270deg, rgba(5,15,25,.72) 0%, rgba(5,15,25,.35) 55%, rgba(5,15,25,0) 85%), linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(5,15,25,.8) 100%); }
.hero .sky { position: absolute; inset: auto 0 0 0; height: 72%; opacity: .9; }
.hero .wrap { position: relative; padding-block: 0 64px; }
.hero h1 { font-size: clamp(34px, 5.4vw, 72px); max-width: 16ch; text-wrap: balance; text-shadow: 0 2px 24px rgba(0,0,0,.35); }
.hero .lead { color: rgba(255,255,255,.86); }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.hero .btn.ghost { color: #fff; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; margin-top: 48px; background: rgba(255,255,255,.18); border-radius: var(--r); overflow: hidden; backdrop-filter: blur(10px); }
.stats div { background: rgba(10, 30, 45, .45); padding: 18px 20px; }
.stats b { display: block; font: 700 clamp(26px, 3vw, 36px)/1 var(--h); }
.stats span { font-size: 14px; color: rgba(255,255,255,.78); }

/* ——— проекты ——— */
.head-row { display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 36px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1.5px solid var(--line); background: #fff; border-radius: 999px;
  padding: 8px 15px; font-size: 14px; font-weight: 500; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
.card {
  background: #fff; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column; cursor: pointer; text-align: start; border: 0; padding: 0;
  transition: transform .2s;
}
.card:hover { transform: translateY(-4px); }
.card .pic { aspect-ratio: 4 / 3; position: relative; background: linear-gradient(160deg, var(--sea-2), var(--sea)); overflow: hidden; }
.card .pic img { width: 100%; height: 100%; object-fit: cover; }
.card .pic .ph { position: absolute; inset: 0; }
.status { position: absolute; top: 14px; inset-inline-start: 14px; padding: 6px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #fff; color: var(--ink); }
.status.build { background: #ffd166; }
.status.start { background: var(--accent); color: var(--accent-ink); }
.status.done { background: #d7f5e6; color: #0b5e3b; }
.card .body { padding: 20px 22px 22px; display: grid; gap: 8px; }
.card .meta { color: var(--muted); font-size: 14px; display: flex; gap: 14px; flex-wrap: wrap; }
.card .price { font: 700 18px/1.2 var(--h); margin-top: 6px; }
.card .price small { font: 400 13px var(--b); color: var(--muted); }

/* ——— выбор квартиры ——— */
.picker { background: var(--sand); }
.picker-grid { display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: 28px; align-items: start; }
.tower-box { background: linear-gradient(180deg, #cfe9f1 0%, #eaf6f9 60%, #f3e6cf 100%); border-radius: var(--r); padding: 22px 18px 14px; position: sticky; top: 130px; box-shadow: var(--shadow); }
.tower-box h3 { font-size: 16px; margin-bottom: 4px; }
.tower-box .hint { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.tower { width: 100%; height: auto; display: block; }
.tower .unit { cursor: pointer; transition: opacity .15s; }
.tower .unit:hover { opacity: .75; }
.tower .unit.dim { opacity: .18; }
.tower .floorline.on rect { fill: rgba(255,255,255,.55); }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); margin-top: 10px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-inline-end: 5px; vertical-align: -1px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.filters label { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.filters input[type=range] { accent-color: var(--accent); width: 140px; }
.filters select { border: 1.5px solid var(--line); border-radius: 999px; padding: 7px 12px; background: #fff; }
.units { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.unit-card {
  background: #fff; border-radius: 14px; padding: 14px; border: 0; text-align: start; cursor: pointer;
  display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: center;
  box-shadow: 0 6px 18px -12px rgba(20,32,43,.4); transition: transform .15s;
}
.unit-card:hover { transform: translateY(-2px); }
.unit-card svg { width: 84px; height: 84px; }
.unit-card b { font: 700 15px/1.2 var(--h); display: block; }
.unit-card span { font-size: 13px; color: var(--muted); display: block; }
.unit-card .p { color: var(--ink); font-weight: 600; font-size: 14px; margin-top: 4px; }
.demo-note { font-size: 12px; color: var(--muted); margin-top: 14px; }
.more { margin-top: 16px; }

/* ——— модалка квартиры ——— */
dialog { border: 0; border-radius: 22px; padding: 0; width: min(980px, 100% - 24px); max-height: calc(100% - 24px); box-shadow: 0 40px 120px -30px rgba(0,0,0,.6); color: var(--ink); background: var(--paper); }
dialog::backdrop { background: rgba(8, 18, 28, .6); backdrop-filter: blur(4px); }
.dlg { display: grid; grid-template-columns: 1.25fr 1fr; }
.dlg .plan { background: #fff; padding: 22px; display: grid; place-items: center; min-height: 380px; }
.dlg .plan svg { width: 100%; height: auto; max-height: 520px; }
.dlg .info { padding: 28px; display: grid; gap: 14px; align-content: start; }
.dlg .x { position: absolute; top: 12px; inset-inline-end: 12px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(20,32,43,.08); cursor: pointer; font-size: 20px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kv div { background: #fff; border-radius: 12px; padding: 10px 12px; }
.kv small { display: block; color: var(--muted); font-size: 12px; }
.kv b { font-size: 16px; }
.rooms { display: grid; gap: 4px; font-size: 14px; }
.rooms div { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dashed var(--line); padding-block: 4px; }
.rooms i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 7px; }
.bigprice { font: 700 30px/1 var(--h); }
.bigprice small { display: block; font: 400 14px var(--b); color: var(--muted); margin-top: 6px; }

/* ——— калькуляторы ——— */
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.calc { background: #fff; border-radius: var(--r); padding: 28px; box-shadow: var(--shadow); display: grid; gap: 16px; align-content: start; }
.calc.dark { background: var(--ink); color: #fff; }
.calc.dark .muted { color: rgba(255,255,255,.65); }
.calc label { display: grid; gap: 6px; font-size: 14px; }
.calc label span { display: flex; justify-content: space-between; }
.calc label b { font-variant-numeric: tabular-nums; }
.calc input[type=range] { width: 100%; accent-color: var(--accent); }
.calc .out { border-top: 1px solid var(--line); padding-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.calc.dark .out { border-color: rgba(255,255,255,.15); }
.calc .out small { display: block; font-size: 13px; opacity: .7; }
.calc .out b { font: 700 24px/1.2 var(--h); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }

/* ——— ход строительства ——— */
.progress { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 30%); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; }
.progress figure { margin: 0; scroll-snap-align: start; background: #fff; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.progress .pic { aspect-ratio: 4 / 3; background: linear-gradient(160deg, #d9cbb3, #a7957a); position: relative; }
.progress .pic img { width: 100%; height: 100%; object-fit: cover; }
.progress figcaption { padding: 14px 16px; font-size: 14px; }
.progress figcaption b { display: block; font-family: var(--h); font-size: 15px; margin-bottom: 2px; }

/* ——— почему мы ——— */
.why { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; margin-top: 36px; }
.why div { border-top: 3px solid var(--accent); padding-top: 16px; }
.why b { font-family: var(--h); display: block; margin-bottom: 6px; }
.why p { margin: 0; color: var(--muted); font-size: 15px; }

/* ——— карта и контакты ——— */
.contact { background: var(--ink); color: #fff; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: stretch; }
.map { border-radius: var(--r); overflow: hidden; min-height: 380px; background: #0e2a3b; }
.map iframe { width: 100%; height: 100%; min-height: 380px; border: 0; filter: saturate(.85); }
.form { display: grid; gap: 12px; margin-top: 26px; }
.form input, .form select { width: 100%; padding: 14px 16px; border-radius: 12px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); color: #fff; }
.form input::placeholder { color: rgba(255,255,255,.5); }
.form select option { color: #000; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form .ok { background: rgba(47,181,124,.18); border: 1px solid rgba(47,181,124,.5); padding: 14px 16px; border-radius: 12px; font-size: 15px; }
.links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.contact .lead { color: rgba(255,255,255,.75); }
.contact .btn.ghost { color: #fff; }
.addr { margin-top: 18px; color: rgba(255,255,255,.75); font-size: 15px; }

footer { background: #0b141c; color: rgba(255,255,255,.6); font-size: 13px; padding: 28px 0 90px; }
footer .wrap { display: grid; gap: 8px; }
footer a { color: #ffd166; }

/* ——— плавающие кнопки ——— */
.float { position: fixed; bottom: 18px; inset-inline-end: 18px; z-index: 40; display: flex; flex-direction: column; gap: 10px; }
.float a { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 10px 28px -8px rgba(0,0,0,.45); }
.float svg { width: 28px; height: 28px; }
.float .wa { background: #25d366; }
.float .tg { background: #2aabee; }

/* ——— узкие экраны ——— */
@media (max-width: 920px) {
  .nav { display: none; }
  .picker-grid, .calc-grid, .contact-grid, .dlg { grid-template-columns: 1fr; }
  .tower-box { position: static; }
  .dlg .plan { min-height: 0; }
}
@media (max-width: 560px) {
  .top .btn { display: none; }
  .top .wrap { gap: 10px; }
  .langs { margin-inline-start: auto; }
  .brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .projects { grid-template-columns: 1fr; }
  .form .row { grid-template-columns: 1fr; }
  .progress { grid-auto-columns: 82%; }
  .unit-card { grid-template-columns: 64px 1fr; }
  .unit-card svg { width: 64px; height: 64px; }
  .dlg .info { padding: 20px; }
}

/* ——— мастер-план ——— */
.master-box { margin-top: 30px; max-width: 980px; background: #fff; border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); }
.master { width: 100%; height: auto; display: block; border-radius: 10px; }
.master .blk { cursor: pointer; transition: opacity .15s; }
.master .blk:hover { opacity: .78; }
.master .blk.nop { cursor: default; }
.master .blk.nop:hover { opacity: 1; }
