/* Прототип H: дополнения к base.css (брендбук wse.am) */

.btn--ghost { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.35); backdrop-filter: blur(6px); }
.btn--ghost:hover { background: rgba(255,255,255,.2); }
.play-dot { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #fff; color: var(--ink); font-size: 10px; padding-left: 2px; }
.crumbs--light { color: var(--on-dark-2); }
.crumbs--light a:hover { color: #fff; }

/* ===== герой с фильмом ===== */
.hh { position: relative; min-height: min(92vh, 820px); display: flex; background: var(--ink); color: #fff; overflow: hidden; }
.hh__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hh__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,19,26,.55) 0%, rgba(18,19,26,.1) 30%, rgba(18,19,26,.35) 58%, rgba(18,19,26,.9) 100%); }
.hh__in { position: relative; width: 100%; display: flex; flex-direction: column; padding-block: 24px 28px; }
.hh__text { margin-top: auto; max-width: 760px; }
.hh .display { max-width: 12ch; }
.hh__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hh__facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 36px 0 0; border-top: 1px solid rgba(255,255,255,.22); }
.hh__facts div { padding: 14px 16px 0 0; }
.hh__facts dt { font-size: 12.5px; color: var(--on-dark-2); }
.hh__facts dd { margin: 4px 0 0; font: 750 20px/1.2 var(--font-body); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 760px) {
  .hh { min-height: 680px; }
  .hh__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 8px; }
  .hh__facts dd { font-size: 17px; }
}

/* ===== подменю ===== */
.subnav { position: sticky; top: var(--header-h); z-index: 15; background: var(--card); border-bottom: 1px solid var(--line); }
.subnav__in { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; height: 52px; align-items: center; }
.subnav a { flex: none; text-decoration: none; font-size: 14px; font-weight: 600; color: var(--ink-2); padding: 8px 12px; border-radius: var(--r-pill); }
.subnav a:hover { background: var(--paper-2); }
.subnav a.is-on { background: var(--ink); color: #fff; }
.subnav .subnav__cta { margin-left: auto; color: var(--amber-text); }
[id] { scroll-margin-top: calc(var(--header-h) + 64px); }

.sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 32px; margin-bottom: 24px; }
.sec-head .h2 { margin: 0; }
.sec-head__note { max-width: 46ch; margin: 0; font-size: 14.5px; color: var(--ink-2); }

/* ===== фильтр планировок ===== */
.pf { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 18px; }
.pf__budget { display: flex; align-items: center; gap: 12px; flex: 1 1 280px; min-width: 0; }
.pf__budget input { flex: 1; min-width: 0; accent-color: var(--ink); }
.pf__budget b { font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 15px; }

/* ===== карточки планировок ===== */
.types { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.type { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; cursor: pointer; text-align: left; padding: 0; transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.type:hover { box-shadow: var(--sh-3); transform: translateY(-2px); }
.type__img { position: relative; aspect-ratio: 1 / 1; background: #fff; display: grid; place-items: center; padding: 18px; border-bottom: 1px solid var(--line); }
.type__img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.type__key { position: absolute; right: 10px; bottom: 10px; width: 34%; border-radius: 8px; border: 1px solid var(--line); background: #fff; box-shadow: var(--sh-2); }
.type__tag { position: absolute; left: 12px; top: 12px; }
.type__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.type__title { font: 700 18px/1.2 var(--font-display); letter-spacing: -.02em; }
.type__where { font-size: 13px; color: var(--muted); }
.type__price { font: 750 20px/1.2 var(--font-body); font-variant-numeric: tabular-nums; margin-top: 6px; }
.type__month { font-size: 13.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.type__free { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px; }
.type__free span { font-size: 11.5px; font-weight: 650; padding: 3px 7px; border-radius: 6px; background: var(--st-free-soft); color: var(--st-free); }
.type__free span.none { background: var(--paper-2); color: var(--muted); }
.type.is-out { opacity: .5; }

/* ===== окно планировки ===== */
.sheet { position: fixed; inset: 0; z-index: 40; background: rgba(18,19,26,.55); display: flex; justify-content: flex-end; }
.sheet__panel { position: relative; width: min(1180px, 100%); height: 100%; background: var(--paper); overflow-y: auto; box-shadow: var(--sh-pop); animation: sheetIn .35s var(--ease); }
@keyframes sheetIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet__close { position: sticky; top: 12px; float: right; margin: 12px 12px 0 0; z-index: 3; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--card); font-size: 26px; line-height: 1; cursor: pointer; }
.sheet__body { padding: clamp(18px, 3vw, 36px); }
.sh-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 900px) { .sh-grid { grid-template-columns: 1fr; } }
.sh-title { font: 800 clamp(26px, 3vw, 38px)/1.05 var(--font-display); letter-spacing: -.035em; margin: 6px 0 4px; }
.sh-title em { font-family: var(--font-accent); font-style: italic; font-weight: 500; }
.sh-sub { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.sh-plan { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; display: grid; place-items: center; cursor: zoom-in; width: 100%; }
.sh-plan img { max-height: 62vh; object-fit: contain; }
.sh-row2 { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 14px; margin-top: 14px; }
@media (max-width: 560px) { .sh-row2 { grid-template-columns: 1fr; } }
.sh-key { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px; }
.sh-key figcaption { font-size: 12px; color: var(--muted); margin-top: 6px; }
.expl { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 6px 14px; margin: 0; }
.expl div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.expl div:first-child { border-top: 0; }
.expl dt { color: var(--ink-2); }
.expl dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }
.expl .expl__sum { font-weight: 700; }

/* выбор конкретной квартиры: этажи × корпуса */
.fl { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; }
.fl__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.fl__head b { font: 700 16px var(--font-display); }
.fl__head span { font-size: 12.5px; color: var(--muted); }
.fl__grid { display: grid; gap: 3px; }
.fl__row { display: grid; grid-template-columns: 34px repeat(var(--b), minmax(0, 1fr)); gap: 3px; }
.fl__row--head span { text-align: center; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.fl__f { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; font-variant-numeric: tabular-nums; }
.fl__c { height: 28px; border: 0; border-radius: 4px; font-size: 11px; font-weight: 650; font-variant-numeric: tabular-nums; cursor: pointer; padding: 0 2px; }
.fl__c--free { background: var(--st-free); color: #fff; }
.fl__c--reserved { background: repeating-linear-gradient(135deg, rgba(58,62,75,.5) 0 1.5px, transparent 1.5px 5px), var(--card); box-shadow: inset 0 0 0 1px var(--st-reserved); color: var(--ink); cursor: default; }
.fl__c--sold { background: var(--st-sold); color: rgba(18,19,26,.4); cursor: default; }
.fl__c--none { background: transparent; cursor: default; }
.fl__c.is-on { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }
.fl__c.top { outline: 1px dashed rgba(255,255,255,.7); outline-offset: -4px; }
.fl__legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.fl__legend i { display: inline-block; width: 11px; height: 11px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }

.deal { margin-top: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; }
.deal__apt { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.deal__apt b { font: 700 17px var(--font-display); }
.deal__apt span { font-size: 13px; color: var(--muted); }
.deal__price { font: 750 30px/1.1 var(--font-body); font-variant-numeric: tabular-nums; margin: 10px 0 2px; letter-spacing: -.01em; }
.deal__meta { font-size: 13px; color: var(--muted); }
.deal__sch { display: grid; gap: 6px; margin-top: 14px; }
.dsch { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); cursor: pointer; text-align: left; font-variant-numeric: tabular-nums; }
.dsch:hover { background: var(--paper); }
.dsch.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.dsch b { font: 700 15px var(--font-display); }
.dsch small { grid-column: 1; font-size: 12px; color: var(--muted); }
.dsch.is-on small { color: var(--on-dark-2); }
.dsch strong { grid-row: 1 / span 2; grid-column: 2; text-align: right; font-size: 15px; }
.dsch strong small { display: block; font-weight: 500; }
.deal__bar { display: flex; gap: 3px; height: 34px; margin-top: 14px; }
.deal__bar span { display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 650; border-radius: 5px; overflow: hidden; white-space: nowrap; min-width: 0; }
.deal__rows { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0 0; }
.deal__rows dt { font-size: 12px; color: var(--muted); }
.deal__rows dd { margin: 2px 0 0; font-weight: 750; font-variant-numeric: tabular-nums; font-size: 15px; }
.deal__rows dd small { display: block; font-weight: 500; font-size: 11.5px; color: var(--muted); }
@media (max-width: 520px) { .deal__rows { grid-template-columns: 1fr; } }
.deal__more { margin-top: 10px; font-size: 13px; }
.deal__cta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
@media (max-width: 520px) { .deal__cta { grid-template-columns: 1fr; } }
.deal__note { font-size: 12px; color: var(--muted); margin: 10px 0 0; }

/* ===== способы оплаты ===== */
.ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .ways { grid-template-columns: 1fr; } }
.way { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.way h3 { margin: 0; font: 700 20px/1.2 var(--font-display); letter-spacing: -.02em; }
.way > p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.way__list { display: grid; gap: 6px; margin-top: auto; }
.way__it { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; padding: 8px 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.way__it b { font-size: 14.5px; }
.way__it span { font-size: 12.5px; color: var(--muted); }
.way__it em { grid-row: 1 / span 2; grid-column: 2; font-style: normal; font-size: 13px; font-weight: 650; color: var(--amber-text); align-self: center; }
.way__ex { font-size: 13px; color: var(--ink-2); background: var(--paper); border-radius: var(--r); padding: 10px 12px; }

/* ===== медиатека ===== */
.mlib { min-height: 300px; }
.m-film { position: relative; border-radius: var(--r-xl); overflow: hidden; background: var(--ink); aspect-ratio: 16 / 9; }
.m-film video { width: 100%; height: 100%; object-fit: cover; }
.m-film__play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 12px; padding: 14px 22px 14px 14px; border: 0; border-radius: 999px; background: rgba(18,19,26,.72); color: #fff; font-weight: 650; font-size: 15px; cursor: pointer; backdrop-filter: blur(6px); }
.m-film__play .play-dot { width: 40px; height: 40px; font-size: 14px; }
.m-film__cap { position: absolute; left: 18px; bottom: 14px; color: var(--on-dark); font-size: 13px; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.m-loops { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 12px; }
.m-loop { margin: 0; }
.m-loop video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-lg); background: var(--ink); }
.m-loop figcaption { font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.m-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.m-chip { border: 1px solid var(--line-2); background: var(--card); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.m-chip.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.m-grid { columns: 3 280px; column-gap: 12px; }
.m-grid .zoom { margin-bottom: 12px; break-inside: avoid; position: relative; }
.m-grid img { width: 100%; height: auto; border-radius: var(--r-lg); }
.m-grid .zoom span { position: absolute; left: 10px; bottom: 10px; right: 10px; font-size: 12px; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.6); text-align: left; opacity: 0; transition: opacity .2s var(--ease); }
.m-grid .zoom:hover span, .m-grid .zoom:focus-visible span { opacity: 1; }
.m-reels { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
.m-reel { flex: 0 0 min(260px, 70%); scroll-snap-align: start; margin: 0; }
.m-reel video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: var(--r-lg); background: var(--ink); }
.m-reel figcaption { font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.m-reel .badge { margin-top: 6px; }

/* ===== стройка ===== */
.prog { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .prog { grid-template-columns: 1fr; } }
.prog__view { position: relative; border-radius: var(--r-xl); overflow: hidden; background: #000; aspect-ratio: 16 / 10; }
.prog__view img, .prog__view video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.prog__month { position: absolute; left: 16px; top: 14px; font: 800 28px/1 var(--font-display); letter-spacing: -.03em; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.prog__side { display: flex; flex-direction: column; gap: 14px; }
.prog__scale { width: 100%; accent-color: var(--st-free); }
.prog__ticks { display: flex; justify-content: space-between; font-size: 12px; color: var(--on-dark-2); }
.prog__thumbs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.prog__thumbs button { padding: 0; border: 0; border-radius: 4px; overflow: hidden; cursor: pointer; opacity: .55; aspect-ratio: 4 / 3; background: #000; }
.prog__thumbs button.is-on { opacity: 1; box-shadow: 0 0 0 2px var(--st-free); }
.prog__thumbs img { width: 100%; height: 100%; object-fit: cover; }

/* ===== расположение ===== */
.place { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) { .place { grid-template-columns: 1fr; } }
.place figure { margin: 0; }
.place img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r-lg); }
.place figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.place__facts { grid-column: 1 / -1; }

.lightbox video { max-height: 84vh; max-width: 100%; margin: 0 auto; border-radius: var(--r); background: #000; }

/* ===== корпуса 1-24 ===== */
.sec--tight { padding-top: 0; }
.early { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.ecard { flex: 0 0 min(300px, 80%); scroll-snap-align: start; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; }
.ecard__img { aspect-ratio: 4 / 3; background: #fff; border-radius: 0; border-bottom: 1px solid var(--line); padding: 12px; display: grid; place-items: center; }
.ecard__img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ecard__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 3px; }
.ecard__n { font-size: 12px; color: var(--muted); }
.ecard__body b { font: 700 17px/1.2 var(--font-display); letter-spacing: -.01em; }
.ecard__meta { font-size: 13px; color: var(--ink-2); }
.ecard__price { font: 750 18px var(--font-body); font-variant-numeric: tabular-nums; margin: 6px 0 4px; }

/* правки после скриншотов */
.hh .display { max-width: 18ch; font-size: clamp(36px, 4.6vw, 62px); }
.hh__shade { background: linear-gradient(90deg, rgba(18,19,26,.72) 0%, rgba(18,19,26,.35) 45%, rgba(18,19,26,0) 70%), linear-gradient(180deg, rgba(18,19,26,.5) 0%, rgba(18,19,26,0) 28%, rgba(18,19,26,.2) 60%, rgba(18,19,26,.88) 100%); }
.band .sec-head__note { color: var(--on-dark-2); }
@media (max-width: 760px) {
  .hh__shade { background: linear-gradient(180deg, rgba(18,19,26,.55) 0%, rgba(18,19,26,.45) 30%, rgba(18,19,26,.78) 55%, rgba(18,19,26,.94) 100%); }
}

/* ── КАЛЬКУЛЯТОР РАССРОЧКИ (только Гюрджан) ──
   Повторяет таблицу из файла застройщика: строка на схему, все суммы рядом. */
.pcalc { display: grid; gap: 16px; }
.pcalc__in { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px 16px;
  padding: 16px 18px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); }
.pcalc__f { display: grid; gap: 6px; align-content: start; }
.pcalc__f > span { font: 600 12px/1.2 var(--font-body); letter-spacing: .02em; text-transform: uppercase; color: var(--muted); }
.pcalc__f select, .pcalc__f input { font: 500 15px/1.2 var(--font-body); color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; min-height: 44px; width: 100%; }
.pcalc__f--wide { grid-column: span 2; }
@media (max-width: 640px) { .pcalc__f--wide { grid-column: span 1; } }
.pcalc__sum { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; font-size: 14px; color: var(--muted); }
.pcalc__sum b { color: var(--ink); font-variant-numeric: tabular-nums; }
.pcalc__wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; }
.pcalc__tbl { width: 100%; min-width: 880px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.pcalc__tbl th { font: 600 11.5px/1.25 var(--font-body); letter-spacing: .03em; text-transform: uppercase; color: var(--muted);
  text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: bottom; }
.pcalc__tbl td { padding: 12px 10px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: top; }
.pcalc__tbl tr:last-child td { border-bottom: 0; }
.pcalc__tbl td span { display: block; font-size: 12.5px; color: var(--muted); }
.pcalc__name { min-width: 230px; }
.pcalc__name b { display: block; font-size: 14.5px; }
.pcalc__name span { margin-top: 2px; }
.pcalc__total b { font-size: 15px; }
.pcalc__tbl tbody tr:hover { background: var(--paper); }
@media (max-width: 760px) { .pcalc__tbl td, .pcalc__tbl th { padding: 10px 8px; } .pcalc__name { min-width: 190px; } }

/* Справа висит панель мессенджеров: последняя колонка не должна уезжать под неё */
@media (min-width: 1100px) {
  .pcalc__tbl thead th:last-child, .pcalc__tbl tbody td:last-child { padding-right: 104px; }
}
