/* Морска панорама Виница. Цветовете идват от фасадата: бяла мазилка, антрацит, стъкло. */
@font-face { font-family: "Geologica"; src: url("../fonts/geologica-cyr.woff2") format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Geologica"; src: url("../fonts/geologica-lat.woff2") format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Golos Text"; src: url("../fonts/golos-cyr.woff2") format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; src: url("../fonts/golos-lat.woff2") format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --paper: #f4f5f3;
  --tint: #e9ecea;
  --card: #ffffff;
  --ink: #22272b;
  --soft: #586067;
  --line: #cfd4d1;
  --glass: #1d5f66;
  --glass-dark: #164a50;
  --glass-pale: #dcebea;
  --head: "Geologica", "Segoe UI", Arial, sans-serif;
  --body: "Golos Text", "Segoe UI", Arial, sans-serif;
  --r: 12px;
  --lift: 0 1px 2px rgba(34, 39, 43, .08), 0 8px 16px -8px rgba(34, 39, 43, .14), 0 28px 56px -20px rgba(34, 39, 43, .3);
  --lift-big: 0 2px 4px rgba(20, 40, 60, .1), 0 18px 30px -14px rgba(20, 40, 60, .28), 0 50px 90px -30px rgba(20, 40, 60, .55);
  --wrap: 1240px;
  --pad: clamp(20px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; font-feature-settings: "locl" 0 !important; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.6; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--head); font-weight: 600; line-height: 1.08; margin: 0; letter-spacing: -0.015em; }
h2 { font-size: clamp(32px, 4.4vw, 56px); }
h3 { font-size: 22px; line-height: 1.2; }
p { margin: 0 0 1em; max-width: 62ch; }
a { color: var(--glass); }
a, button, input, textarea { -webkit-tap-highlight-color: transparent; }
button { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--glass); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--card); padding: 10px 14px; border-radius: 8px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }

/* Горна лента: прозрачна върху снимката, плътна след скрол */
.top { position: fixed; inset: 0 0 auto 0; z-index: 20; color: #fff; transition: background-color .25s, color .25s, box-shadow .25s; }
.top-in { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { white-space: nowrap; display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; font-family: var(--head); font-weight: 600; font-size: 19px; letter-spacing: -0.01em; text-shadow: 0 1px 14px rgba(10, 30, 50, .45); }
.brand-mark { flex: none; display: block; width: 37px; height: 30px; filter: drop-shadow(0 2px 6px rgba(10, 30, 50, .4)); }
/* логото на клиента (27.11.2026) като маска: цветът идва от лентата, бял над снимката, тюркоазен на светло */
.brand-mark i { display: block; width: 100%; height: 100%; background: currentColor; -webkit-mask: url(../img/logo-mark.png) center / contain no-repeat; mask: url(../img/logo-mark.png) center / contain no-repeat; }
/* разстоянието между пунктите се свива до 1021 px, за да се събере менюто с два езика */
.nav { --gap: clamp(18px, 2.2vw, 30px); display: flex; gap: var(--gap); }
.nav a { color: inherit; text-decoration: none; font-size: 16px; font-weight: 500; padding: 8px 0; text-shadow: 0 1px 12px rgba(10, 30, 50, .5); border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: currentColor; }
/* смяна на езика: отделена с черта от разделите */
.nav .lang { position: relative; margin-left: 2px; }
.nav .lang::before { content: ""; position: absolute; left: calc(var(--gap) / -2 - 1px); top: 9px; bottom: 9px; width: 1px; background: currentColor; opacity: .5; }
.nav .lang + .lang { margin-left: calc(16px - var(--gap)); }
.nav .lang + .lang::before { display: none; }
.menu-btn { display: none; font: 500 16px var(--body); color: inherit; background: none; border: 1.5px solid currentColor; border-radius: var(--r); padding: 9px 16px; cursor: pointer; }
.top.solid { background: rgba(244, 245, 243, .9); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: var(--ink); box-shadow: 0 1px 0 var(--line), 0 12px 24px -18px rgba(34, 39, 43, .45); }
.top.solid .brand, .top.solid .nav a { text-shadow: none; }
.top.solid .brand-mark { filter: none; color: var(--glass); }

/* Менюто за телефон е <dialog>, извън лентата, за да не го реже backdrop-filter */
.menu { border: 0; padding: 20px var(--pad) 32px; margin: 0; width: 100%; max-width: none; height: 100%; max-height: none; background: var(--paper); color: var(--ink); }
.menu::backdrop { background: var(--paper); }
.menu-close { display: block; margin-left: auto; font: 500 16px var(--body); background: none; border: 1.5px solid var(--ink); border-radius: var(--r); padding: 9px 16px; color: var(--ink); cursor: pointer; }
.menu nav { display: grid; margin-top: 28px; }
.menu nav a { font-family: var(--head); font-size: 30px; font-weight: 600; color: var(--ink); text-decoration: none; padding: 16px 0; border-bottom: 1px solid var(--line); }

/* Начало: заглавието стои в небето на визуализацията */
.hero { position: relative; height: min(100svh, 920px); min-height: 560px; overflow: hidden; background: #3f79c4; }
.hero-img { width: 100%; height: 100%; object-fit: cover; object-position: 55% 0; }
.hero::before { content: ""; position: absolute; inset: 0 0 45% 0; background: linear-gradient(180deg, rgba(18, 52, 98, .5), rgba(18, 52, 98, 0)); pointer-events: none; z-index: 1; }
.hero-text { will-change: transform, opacity; position: absolute; z-index: 2; left: 0; right: 0; top: clamp(96px, 12vh, 128px); max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); color: #fff; }
.hero h1 span { display: block; white-space: nowrap; }
.hero h1 { font-size: clamp(30px, 9.4vw, 112px); font-weight: 700; letter-spacing: -0.035em; line-height: .95; text-shadow: 0 2px 30px rgba(14, 44, 88, .35); }
/* „Морская панорама“ е с една буква по-дълго от българското: малко по-малко, за да има запас до 320 px */
html[lang="ru"] .hero h1 { font-size: clamp(28px, 8.8vw, 112px); }
.hero-text p { text-wrap: balance; font-size: clamp(18px, 1.7vw, 23px); margin: 20px 0 0; max-width: 30ch; line-height: 1.35; font-weight: 500; text-shadow: 0 1px 16px rgba(14, 44, 88, .55); }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 140px; background: linear-gradient(180deg, rgba(20, 34, 30, 0), rgba(20, 34, 30, .42)); pointer-events: none; z-index: 1; }
.render-note { position: absolute; z-index: 2; right: var(--pad); bottom: 92px; margin: 0; font-size: 13px; color: #fff; background: rgba(34, 39, 43, .62); padding: 4px 10px; border-radius: 6px; }

/* Секции */
.sec { padding: clamp(64px, 9vw, 128px) 0; }
/* оцветените секции са хлътнали: сянка отгоре и отдолу */
.sec-tint { background: var(--tint); box-shadow: inset 0 22px 30px -24px rgba(34, 39, 43, .3), inset 0 -22px 30px -24px rgba(34, 39, 43, .22); }
.lead { font-size: clamp(19px, 1.6vw, 22px); line-height: 1.5; color: var(--ink); }
.sec p { color: var(--soft); }
.sec p.lead { color: var(--ink); }
.sec h2 + p, .sec h2 + .lead { margin-top: 24px; }
.sec-head { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 48px; align-items: end; margin-bottom: 36px; }
.sec-head p { margin: 0; }

.proekt, .two { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px clamp(32px, 6vw, 96px); align-items: start; }
.proekt { grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); align-items: center; gap: 40px clamp(32px, 5vw, 72px); }
/* какво дава домът: кратък списък под текста за проекта */
/* на компютър: пет клетки в една карта; под 1020 px: списък */
.perks { list-style: none; margin: clamp(48px, 6vw, 80px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--glass); border-radius: var(--r); box-shadow: var(--lift); }
.perks li { position: relative; padding: 24px clamp(16px, 1.6vw, 24px) 26px; border-left: 1px solid var(--line); }
.perks li:first-child { border-left: 0; }
.perks li::before { content: ""; display: block; margin-bottom: 14px; width: 12px; height: 12px; border-radius: 3px; background: var(--glass); box-shadow: 0 3px 6px -2px rgba(29, 95, 102, .6); }
.perks b { display: block; font-family: var(--head); font-weight: 600; font-size: 18px; line-height: 1.3; color: var(--ink); }
.perks span { display: block; margin-top: 3px; font-size: 15.5px; line-height: 1.5; color: var(--soft); }
.shot { margin: 0; position: relative; }
/* плоча зад снимката, изместена встрани, за да се чете пласт */
.shot::before { content: ""; position: absolute; inset: 28px -22px -22px 28px; background: var(--glass-pale); border: 1px solid #c3d9d7; border-radius: var(--r); }
.shot img { position: relative; width: 100%; border-radius: var(--r); box-shadow: var(--lift-big); }
.shot figcaption { position: absolute; left: 12px; bottom: 12px; font-size: 13px; color: #fff; background: rgba(34, 39, 43, .62); padding: 4px 10px; border-radius: 6px; }
.bar-wrap { position: relative; z-index: 3; margin-top: -76px; }
.facts.facts-bar { grid-template-columns: repeat(6, minmax(0, 1fr)); column-gap: 0; padding: 0; border-top-width: 4px; box-shadow: var(--lift-big); }
.facts.facts-bar > div { display: flex; flex-direction: column; justify-content: space-between; gap: 4px; border-bottom: 0; padding: 22px clamp(12px, 1.6vw, 24px) 24px; border-left: 1px solid var(--line); }
.facts.facts-bar > div:first-child { border-left: 0; }
.facts.facts-bar dd { font-size: clamp(26px, 2.5vw, 36px); white-space: nowrap; }
.sec-first { padding-top: clamp(56px, 7vw, 96px); }
.proekt .shot { margin: 0 22px 22px 0; }
.facts { margin: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--glass); border-radius: var(--r); padding: 6px clamp(18px, 2.4vw, 28px); box-shadow: var(--lift); }
.facts > div { padding: 18px 0 20px; border-bottom: 1px solid var(--line); }
.facts-col > div:last-child { border-bottom: 0; }
.facts dt { font-size: 15px; color: var(--soft); }
.facts dd { margin: 4px 0 0; font-family: var(--head); font-weight: 600; font-size: clamp(30px, 3.2vw, 44px); line-height: 1.05; letter-spacing: -0.02em; }
.facts-col { grid-template-columns: 1fr; }
.facts-col > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.facts-col dd { margin: 0; font-size: clamp(26px, 2.6vw, 36px); white-space: nowrap; }


/* Бутони: радиус 12px, един плътен на група */
.btn:active { transform: translateY(1px); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 12px 24px; border-radius: var(--r); font: 600 16px var(--body); text-decoration: none; cursor: pointer; border: 1.5px solid transparent; transition: background-color .15s, color .15s, border-color .15s; }
.btn-primary { background: var(--glass); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 10px 20px -10px rgba(29, 95, 102, .75); }
@media (hover: hover) { .btn-primary:hover { background: var(--glass-dark); } }
.btn-outline { background: var(--card); color: var(--ink); border-color: var(--ink); box-shadow: 0 8px 16px -10px rgba(34, 39, 43, .45); }
@media (hover: hover) { .btn-outline:hover { background: var(--ink); color: #fff; } }
.link-btn { background: none; border: 0; padding: 6px 0; font: 500 16px var(--body); color: var(--glass); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }

/* Етажите: схема на сградата, клетка = апартамент */
.explorer { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(300px, 1fr); gap: 24px; align-items: stretch; }
.ex-board, .chosen, .ex-plan { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--lift); }
.ex-board { padding: clamp(16px, 2.2vw, 28px); }
.board-top { display: flex; justify-content: space-between; align-items: center; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 22px; }
.seg { box-shadow: 0 6px 14px -8px rgba(34, 39, 43, .4); display: grid; grid-template-columns: 1fr 1fr; border: 1.5px solid var(--ink); border-radius: var(--r); overflow: hidden; background: var(--card); min-width: 232px; }
.seg button { font: 600 16px var(--body); padding: 11px 18px; border: 0; background: transparent; color: var(--ink); cursor: pointer; transition: background-color .18s ease, color .18s ease; }
.seg button + button { border-left: 1.5px solid var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.seg button:focus-visible { outline-offset: -4px; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; color: var(--soft); }
.legend li { display: flex; align-items: center; gap: 7px; }
.sw { width: 16px; height: 16px; border-radius: 4px; border: 1px solid rgba(34, 39, 43, .28); }
.sw-1, .cell.t1 { background: #f0f5f4; }
.sw-2, .cell.t2 { background: #cfe2e0; }
.sw-3, .cell.t3 { background: #a4c9c6; }
/* резервиран: сив, с коси черти, за да се чете и без цвят */
.sw-r, .cell.res { background: #e6e8e7 repeating-linear-gradient(135deg, transparent 0 6px, rgba(34, 39, 43, .13) 6px 7px); }
.cell.res b, .cell.res span, .cell.res em { color: #5f676c; }
.cell.res { box-shadow: none; }

/* лентата с етажите и редовете с вид се показват само на телефон */
.levels, .plan-hint { display: none; }
/* в малката клетка „Апартамент“ и видът са само за екранния четец; на телефон се показват */
.cell { position: relative; }
.cell .pre, .cell em { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; font-style: normal; }
.board { display: grid; gap: 5px; padding-bottom: 5px; border-bottom: 3px solid var(--ink); }
.board-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: stretch; gap: 10px; }
.board-label { display: flex; align-items: center; font-family: var(--head); font-weight: 600; font-size: 15.5px; color: var(--soft); }
.board-row.on .board-label { color: var(--ink); }
.board-cells { display: flex; gap: 5px; min-width: 0; }
/* четвъртият етаж е отдръпнат навътре, както е в сградата */
.board-row[data-level="4"] .board-cells { padding: 0 21%; }
.cell { font-family: var(--body); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 2px 3px rgba(34, 39, 43, .12); flex: 1 1 0; min-width: 0; height: 66px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border: 1px solid rgba(34, 39, 43, .3); border-radius: 5px; color: var(--ink); cursor: pointer; padding: 0 2px; transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease; }
.cell b { font-family: var(--head); font-weight: 600; font-size: 19px; line-height: 1.1; }
.cell { container-type: inline-size; }
.cell span { transition: color .18s ease; font-size: 12.5px; font-size: clamp(12.5px, calc((100cqw - 6px) / 4.75), 14px); font-weight: 600; line-height: 1.2; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.cell.t1 { min-width: 72px; }
/* нивото с гаражите, както на плана: складът/кабинетът е висока клетка вляво, гаражите са на два равни реда (5 и 4),
   за да остане площта едра при всяка ширина (на един ред с девет гаража и склада 20,03 м² не се побира) */
.board { container: board / inline-size; }
.cell.tg { min-width: 0; }
.board-row[data-level="0"] .board-cells { display: grid; grid-template-columns: minmax(92px, 1.2fr) repeat(5, minmax(0, 1fr)); }
.board-row[data-level="0"] .cell.ts { grid-row: span 2; height: auto; }
.cell.tg { height: 54px; background: #e4e7e5; position: relative; }
.cell.tg::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: repeating-linear-gradient(0deg, transparent 0 7px, rgba(34, 39, 43, .09) 7px 8px); pointer-events: none; }
.cell.tg > * { position: relative; }
/* складът/кабинетът: вместо номер е името му */
.cell.ts { background: #eceeec; }
.cell.ts b { font-size: 14.5px; text-align: center; }
/* запетаите между частите на името са само за екранния четец, навсякъде */
.cell i.sep { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (hover: hover) { .cell:hover { box-shadow: inset 0 0 0 2px var(--glass), 0 6px 12px -4px rgba(34, 39, 43, .3); } }
.cell[aria-pressed="true"], .cell.tg[aria-pressed="true"] { background: var(--glass); border-color: var(--glass-dark); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 10px 20px -6px rgba(29, 95, 102, .6); }
.cell[aria-pressed="true"] span { color: #fff; }
.cell.res[aria-pressed="true"] { background: #5b6368; border-color: #454c51; box-shadow: 0 8px 16px -8px rgba(34, 39, 43, .6); }
.cell.res[aria-pressed="true"] b, .cell.res[aria-pressed="true"] span, .cell.res[aria-pressed="true"] em { color: #fff; }
.cell:focus-visible { outline-offset: 2px; position: relative; z-index: 1; }
.sec .board-note { font-size: 14px; margin: 16px 0 0; max-width: 70ch; color: var(--soft); }

.chosen { box-shadow: var(--lift-big); border: 1.5px solid var(--glass); padding: clamp(20px, 2.4vw, 30px); display: flex; flex-direction: column; }
.sec .chosen-where { margin: 0 0 6px; font-size: 15px; color: var(--soft); }
.chosen h3 { font-size: clamp(28px, 2.6vw, 36px); letter-spacing: -0.02em; }
.chosen-facts { margin: 22px 0 24px; display: grid; border-top: 1px solid var(--line); }
.chosen-facts > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.chosen-facts dt { font-size: 15px; color: var(--soft); }
.chosen-facts dd { margin: 0; font-family: var(--head); font-weight: 600; font-size: 19px; white-space: nowrap; }
.chosen .btn { margin-top: auto; }
.sec .chosen-res { margin: auto 0 0; padding: 14px 16px; background: #eef0ef; border: 1px solid var(--line); border-radius: 10px; font-size: 15.5px; color: var(--ink); }

.ex-plan { grid-column: 1 / -1; padding: clamp(16px, 2.2vw, 28px); }
.plan-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 16px; margin-bottom: 14px; }
.plan-head h3 { margin-right: auto; }

/* 3D модел на етажа (js/plan3d.js) */
.seg.view-seg { min-width: 0; box-shadow: none; border-width: 1.5px; }
.view-seg button { padding: 8px 16px; font-size: 15px; }
/* с пръст: нагоре и надолу превърта страницата, настрани върти модела (същото е и в js/plan3d.js).
   На всички устройства: лаптоп с тъчскрийн е pointer: fine, а на мишката touch-action не влияе. */
.plan3d { position: relative; height: clamp(360px, 40vw, 560px); border-radius: 10px; overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none;
  background: radial-gradient(120% 90% at 50% 35%, #f6f8f7 0%, #e3e8e6 100%); box-shadow: inset 0 0 0 1px var(--line); }
.plan3d canvas { display: block; outline: none; }
.plan3d.loading::after { content: attr(data-msg); position: absolute; inset: 0; display: grid; place-items: center; font-size: 15px; color: var(--soft); }
.l3d-layer { position: absolute; inset: 0; pointer-events: none; }
.l3d-layer.dense .l3d { padding: 2px 5px 3px; }
.l3d-layer.dense .l3d b { font-size: 14px; }
.l3d-layer.dense .l3d i { font-size: 12px; }
.l3d-layer.row .l3d { flex-direction: row; align-items: baseline; gap: 5px; padding: 2px 7px; }
.l3d { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; padding: 3px 8px 4px; border-radius: 7px;
  background: rgba(255, 255, 255, .9); box-shadow: 0 2px 8px -2px rgba(34, 39, 43, .35); color: var(--ink); line-height: 1.15; white-space: nowrap; }
.l3d b { font-family: var(--head); font-weight: 600; font-size: 16px; }
.l3d i { font-style: normal; font-size: 13px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.l3d.res { background: rgba(236, 238, 237, .94); color: #5f676c; }
.l3d.res i { color: #5f676c; }
.l3d.on { background: var(--glass); color: #fff; }
.l3d.on i { color: #fff; }
.sec .plan3d-note { margin: 10px 0 0; font-size: 14px; color: var(--soft); max-width: none; }
.plan { display: block; width: 100%; padding: 0; background: none; border: 0; cursor: zoom-in; }
.plan img { width: 100%; aspect-ratio: 2911 / 1182; object-fit: contain; transition: opacity .2s ease; }
.plan img.swap { opacity: 0; }

/* Запитване */
.two-form { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
.firm { margin-top: 28px; font-size: 16px; }
.firm-role { margin-top: 2px; font-size: 15.5px; color: var(--soft); }
/* контактите на фирмата: етикет вляво, стойност вдясно; телефонът и имейлът се натискат */
.contact { list-style: none; margin: 14px 0 0; padding: 0; border-top: 1px solid var(--line); max-width: 460px; }
.contact li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact span { font-size: 15px; color: var(--soft); }
.contact a, .contact b { font-family: var(--head); font-weight: 600; font-size: 19px; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.contact a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 5px; }
@media (hover: hover) { .contact a:hover { color: var(--glass); text-decoration-color: currentColor; } }
.form { box-shadow: var(--lift); display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(20px, 3vw, 36px); }
.form label { display: grid; gap: 7px; font-size: 15px; font-weight: 500; color: var(--ink); }
.form .opt { font-weight: 400; color: var(--soft); font-size: 13.5px; }
.form .full { grid-column: 1 / -1; }
/* скритото поле: хората не го виждат, ботовете го попълват */
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form button[disabled] { opacity: .7; cursor: progress; }
.form input, .form textarea { box-shadow: inset 0 1px 2px rgba(34, 39, 43, .08); width: 100%; font: 400 17px var(--body); color: var(--ink); background: #fbfcfb; border: 1.5px solid #9aa2a6; border-radius: 10px; padding: 12px 14px; }
.form textarea { resize: vertical; min-height: 110px; }
.form input:focus-visible, .form textarea:focus-visible { outline: 3px solid var(--glass); outline-offset: 1px; border-color: var(--glass); }
.form input.bad { border-color: #b3261e; background: #fff6f5; }
.form-end { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.form-msg { margin: 0; font-size: 15.5px; color: var(--ink); flex: 1 1 240px; }

.foot { border-top: 1px solid var(--line); padding: 28px 0 36px; font-size: 14.5px; color: var(--soft); }
.foot-in { display: flex; justify-content: space-between; gap: 12px 32px; flex-wrap: wrap; }
.foot p { margin: 0; max-width: none; }
.foot a { color: inherit; }
.form-note { margin: 0; font-size: 14px; color: var(--soft); }

/* Текстови страници (Поверителност): плътна горна лента, тясна колона за четене */
.doc-top .top-in { gap: 16px; }
.doc-nav { display: flex; align-items: center; gap: 22px; }
.doc-nav a { color: inherit; text-decoration: none; font-weight: 500; font-size: 16px; padding: 8px 0; border-bottom: 2px solid transparent; }
@media (hover: hover) { .doc-nav a:hover { border-bottom-color: currentColor; } }
.doc { max-width: 760px; margin: 0 auto; padding: 128px var(--pad) 88px; }
/* „Конфиденциальность“ е дълга дума: заглавието се смалява с ширината и никога не излиза от екрана */
.doc h1 { font-size: clamp(26px, 8vw, 56px); overflow-wrap: anywhere; }
html[lang="ru"] .doc h1 { font-size: clamp(22px, 6.6vw, 56px); }
.doc-date { margin: 14px 0 28px; font-size: 15px; color: var(--soft); }
.doc h2 { font-size: 22px; margin: 36px 0 10px; }
.doc p { color: var(--soft); }
.doc .lead { color: var(--ink); }
.doc a { color: var(--glass); }
/* страница 404: един бутон към началото (цветът на връзките в .doc не важи за него) */
.doc a.btn-primary { color: #fff; margin-top: 26px; }
.nf { min-height: calc(100vh - 120px); }
.nf .lead { margin-top: 16px; }
@media (max-width: 600px) { .doc-nav { gap: 14px; } .doc-nav a { font-size: 15px; } .doc { padding-top: 104px; } }
/* на тесен телефон името на фирмата отстъпва място; знакът пак води към началото */
@media (max-width: 420px) { .doc-top .brand-name { display: none; } }

/* Увеличен план */
.zoom { border: 0; padding: 0; margin: 0; width: 100%; height: 100%; max-width: none; max-height: none; background: var(--card); }
.zoom-scroll { width: 100%; height: 100%; overflow: auto; padding: 72px 16px 24px; -webkit-overflow-scrolling: touch; }
.zoom-scroll img { width: max(100%, 1500px); max-width: none; }
.zoom-close { position: fixed; top: 14px; right: 16px; z-index: 2; font: 600 16px var(--body); background: var(--ink); color: #fff; border: 0; border-radius: var(--r); padding: 11px 18px; cursor: pointer; }

@media (max-width: 1020px) {
  .nav { display: none; }
  .menu-btn { display: block; }
  .explorer { grid-template-columns: minmax(0, 1fr); }
  .perks { display: block; background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; margin-top: 40px; }
  .perks li { padding: 15px 0 15px 28px; border-left: 0; border-bottom: 1px solid var(--line); }
  .perks li::before { position: absolute; left: 0; top: 22px; margin: 0; }
}
@media (max-width: 820px) {
  body { font-size: 16.5px; }
  .proekt, .two, .two-form, .sec-head { grid-template-columns: minmax(0, 1fr); }
  .sec-head { margin-bottom: 32px; }
  .top-in { height: 64px; }
  .hero { height: min(88svh, 720px); min-height: 500px; }
  .hero-img { object-position: 66% 100%; }
  .hero::before { inset: 0 0 30% 0; background: linear-gradient(180deg, rgba(14, 40, 80, .66), rgba(14, 40, 80, .38) 60%, rgba(14, 40, 80, 0)); }
  .hero-text { top: 96px; }
  .shot::before { inset: 18px -10px -14px 18px; }
  .bar-wrap { margin-top: -56px; }
  .facts.facts-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .facts.facts-bar > div:nth-child(4) { border-left: 0; }
  .facts.facts-bar > div:nth-child(n+4) { border-top: 1px solid var(--line); }
  .render-note { bottom: 72px; }
}
/* малък таблет и тесен компютър (схемата до картата): колоната с етажите и разстоянията отстъпват място на площите */
@media (min-width: 601px) and (max-width: 720px), (min-width: 1021px) and (max-width: 1120px) {
  .board-row { grid-template-columns: 50px minmax(0, 1fr); gap: 6px; }
  .board-label { font-size: 14px; }
  .board-cells { gap: 3px; }
  .cell { padding: 0 1px; }
}
@media (min-width: 601px) and (max-width: 640px) {
  .board-row { grid-template-columns: 42px minmax(0, 1fr); gap: 4px; }
  .board-label { font-size: 13px; }
  .cell span { font-size: clamp(11.5px, calc((100cqw - 4px) / 4.75), 14px); }
}
@media (max-width: 600px) {
  .form { grid-template-columns: minmax(0, 1fr); }
  .facts.facts-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts.facts-bar > div { padding: 14px 16px 16px; }
  .facts.facts-bar > div:nth-child(n) { border-left: 0; border-top: 0; }
  .facts.facts-bar > div:nth-child(even) { border-left: 1px solid var(--line); }
  .facts.facts-bar > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  /* Телефон: вместо схема на цялата сграда, един етаж наведнъж.
     Ред: блок, етаж, план, списък с апартаментите, избраният апартамент. */
  .explorer { gap: 14px; }
  .ex-board { display: contents; }
  .board-top { order: 1; margin: 0; }
  .legend { display: none; }
  .levels { order: 2; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1.5px solid var(--ink); border-radius: var(--r); overflow: hidden; background: var(--card); box-shadow: 0 6px 14px -8px rgba(34, 39, 43, .4); }
  .levels button { font: 600 14px var(--body); padding: 13px 2px; border: 0; background: transparent; color: var(--ink); cursor: pointer; white-space: nowrap; transition: background-color .18s ease, color .18s ease; }
  .levels button + button { border-left: 1px solid #9aa2a6; }
  .levels button[aria-pressed="true"] { background: var(--ink); color: #fff; }
  .levels button:focus-visible { outline-offset: -4px; }

  .ex-plan { order: 3; padding: 16px 16px 12px; }
  .plan-head { margin-bottom: 10px; }
  .plan-head h3 { font-size: 19px; }
  .plan-head .link-btn { display: none; }
  /* на телефон моделът е по-нисък, за да остане място за превъртане на страницата */
  .plan3d { height: min(58vh, 430px); margin: 0 -16px; border-radius: 0; }
  .l3d { padding: 2px 6px 3px; }
  .l3d b { font-size: 14px; }
  .l3d i { font-size: 12px; }
  .plan-scroll { overflow-x: auto; margin: 0 -16px; padding: 0 16px 6px; -webkit-overflow-scrolling: touch; }
  .plan { width: max-content; }
  .plan img { width: auto; height: 250px; }
  .sec .plan-hint { display: block; margin: 8px 0 0; font-size: 13.5px; color: var(--soft); }

  .board { order: 4; border-bottom: 0; padding: 0; gap: 0; }
  .board-row { display: none; }
  .board-row.on { display: block; }
  .board-label { display: none; }
  .board-row .board-cells { flex-direction: column-reverse; gap: 6px; padding: 0; }
  .board-row[data-level="4"] .board-cells { padding: 0; }
  .cell { flex: 0 0 auto !important; height: auto; min-height: 60px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px; row-gap: 1px; padding: 9px 16px; border-radius: 10px; text-align: left; }
  .cell b { grid-column: 1; font-size: 17px; }
  .cell .pre, .cell em { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; }
  .cell em { display: block; grid-column: 1; font-style: normal; font-size: 13.5px; color: var(--soft); transition: color .18s ease; }
  .cell span { grid-column: 2; grid-row: 1 / span 2; font-size: 16px; font-weight: 600; color: var(--ink); }
  .cell[aria-pressed="true"] em { color: #d9ecec; }
  .cell[aria-pressed="true"] span { color: #fff; }
  .cell.t1, .cell.tg { min-width: 0; }
  /* гаражите са девет: в две колони */
  .board-row[data-level="0"] .board-cells { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .cell.tg { min-height: 52px; height: auto; padding: 8px 12px; column-gap: 6px; }
  .cell.tg b { font-size: 15.5px; }
  .cell.tg span { font-size: 14.5px; grid-row: 1; }
  .board-row[data-level="0"] .cell.ts { grid-column: 1 / -1; grid-row: auto; height: auto; min-height: 52px; padding: 8px 12px; column-gap: 6px; }
  .cell.ts b { text-align: left; font-size: 15.5px; }
  .cell.ts span { font-size: 14.5px; grid-row: 1; }

  .chosen { order: 5; }
  .chosen .btn { margin-top: 0; }
  .sec .board-note { order: 6; margin: 2px 0 0; }
  .note-wide { display: none; }
  .seg { width: 100%; }
  .brand-name { font-size: 17px; }
}
@media (max-width: 360px) {
  .top-in { gap: 12px; }
  .brand { gap: 9px; }
  .brand-mark { width: 32px; height: 26px; }
  .brand-name { font-size: 15px; }
  .menu-btn { padding: 8px 13px; }
}
