/* ЖК «Максимум» — дизайн-система и стили страницы.
   Концепция: архитектурный чертёж. Сетка из тонких линий, размерные выноски, моноширинные подписи.
   Один осознанный вид: светлые «бумажные» разделы чередуются с глубокими синими полосами бренда. */

:root {
  /* Цвет — из логотипа МДК */
  --navy: #172E42;          /* фирменный тёмно-синий */
  --navy-deep: #0E1E2C;     /* подложка тёмных разделов */
  --navy-soft: #24435C;     /* линии и плашки на тёмном */
  --cyan: #29B2C9;          /* фирменный акцент (на тёмном фоне) */
  --cyan-ink: #11707F;      /* акцент для текста на светлом фоне: 5.8:1 на белом, 4.6:1 на сером бетоне */
  --paper: #F2F4F5;         /* холодный белый */
  --concrete: #E2E7EA;      /* светлый архитектурный серый */
  --white: #FFFFFF;
  --surface: #FFFFFF;       /* фон карточек и полей; на тёмных страницах переопределяется */
  --surface-2: #F2F4F5;     /* вторичная подложка внутри разделов */
  --ink: #13212D;           /* основной текст */
  --muted: #566775;         /* вторичный текст на светлом */
  --muted-dark: #9FB3C2;    /* вторичный текст на тёмном */
  --line: rgba(23, 46, 66, .14);
  --line-dark: rgba(159, 179, 194, .2);
  --amber: #7E520E;         /* значок «уточняется» */
  --amber-bg: #F6ECD9;
  --danger: #B3261E;
  color-scheme: light;

  /* Шрифты */
  --f-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --f-body: "Golos Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Шкала */
  --fs-xs: .75rem;
  --fs-sm: .875rem;
  --fs-md: 1rem;
  --fs-lg: 1.1875rem;
  --fs-h3: clamp(1.125rem, 1rem + .6vw, 1.375rem);
  --fs-h2: clamp(1.625rem, 1.1rem + 2.4vw, 3rem);
  --fs-h1: clamp(2.25rem, 1.2rem + 5vw, 5.25rem);

  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --wrap: 1240px;
  --radius: 4px;            /* архитектурно: почти прямые углы */
  --header-h: 64px;

  /* Движение */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --t-fast: 160ms;
  --t-med: 320ms;
  --t-slow: 640ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 var(--fs-md)/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--navy-deep); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Типографика ---------- */
h1, h2, h3 { margin: 0; font-family: var(--f-display); font-weight: 500; line-height: 1.08; letter-spacing: -.02em; text-wrap: balance; }
h1 { font-size: var(--fs-h1); text-transform: uppercase; letter-spacing: -.035em; line-height: .98; }
h2 { font-size: var(--fs-h2); text-transform: uppercase; }
h3 { font-size: var(--fs-h3); font-family: var(--f-body); font-weight: 600; letter-spacing: -.01em; line-height: 1.25; }
p { margin: 0; text-wrap: pretty; }
.lead { font-size: var(--fs-lg); color: var(--muted); max-width: 60ch; }
.on-dark .lead { color: var(--muted-dark); }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.label {
  font-family: var(--f-mono); font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase;
  color: var(--cyan-ink); display: inline-flex; align-items: center; gap: .75em;
}
.on-dark .label { color: var(--cyan); }
/* размерная выноска перед подписью раздела: |—————| как на чертеже */
.label::before {
  content: ""; width: 40px; height: 9px; flex: none;
  background:
    linear-gradient(currentColor, currentColor) left center / 1px 9px no-repeat,
    linear-gradient(currentColor, currentColor) right center / 1px 9px no-repeat,
    linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat;
}
.note { font-size: var(--fs-xs); color: var(--muted); }
.on-dark .note { color: var(--muted-dark); }

/* ---------- Каркас ---------- */
.band { padding-block: clamp(48px, 3.5vw + 24px, 96px); position: relative; }
.band.tight { padding-block: clamp(32px, 2.5vw + 16px, 56px); }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.on-dark { background: var(--navy-deep); color: var(--white); }
.on-concrete { background: var(--concrete); }
.on-white { background: var(--white); }
.grid-lines { /* сетка чертежа на тёмных разделах */
  background-image: linear-gradient(var(--line-dark) 1px, transparent 1px), linear-gradient(90deg, var(--line-dark) 1px, transparent 1px);
  background-size: 96px 96px; background-position: -1px -1px;
}
.sec-head { display: grid; gap: 20px; margin-bottom: clamp(32px, 4vw, 56px); max-width: 860px; }
.split { display: grid; gap: clamp(32px, 4vw, 64px); }
@media (min-width: 960px) { .split { grid-template-columns: 1fr 1fr; align-items: center; } .split.wide-left { grid-template-columns: 1.15fr .85fr; } }
.split > * { min-width: 0; }

/* ---------- Кнопки ---------- */
.btn {
  --bg: var(--navy); --fg: var(--white); --bd: var(--navy);
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 48px; padding: 0 22px; border-radius: var(--radius); border: 1px solid var(--bd);
  background: var(--bg); color: var(--fg); font-weight: 600; font-size: var(--fs-sm); letter-spacing: .02em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out), border-color var(--t-fast), transform var(--t-fast) var(--ease-out);
}
.btn:hover { --bg: var(--navy-soft); --bd: var(--navy-soft); }
.btn:active { transform: scale(.97); }
.btn-accent { --bg: var(--cyan); --fg: var(--navy-deep); --bd: var(--cyan); }
.btn-accent:hover { --bg: #4FC3D6; --bd: #4FC3D6; }
.btn-ghost { --bg: transparent; --fg: var(--navy); --bd: var(--line); }
.btn-ghost:hover { --bg: var(--white); --bd: var(--navy); }
.on-dark .btn-ghost, .hero .btn-ghost { --fg: var(--white); --bd: rgba(255,255,255,.35); }
.on-dark .btn-ghost:hover, .hero .btn-ghost:hover { --bg: rgba(255,255,255,.08); --bd: var(--white); }
.btn-sm { min-height: 40px; padding: 0 16px; }
.btn[disabled] { opacity: .55; cursor: progress; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.link-arrow { color: var(--cyan-ink); font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 1px; cursor: pointer; background: none; border-top: 0; border-left: 0; border-right: 0; }
.on-dark .link-arrow { color: var(--cyan); }

/* значок для неподтверждённых сведений */
.unconf {
  display: inline-block; vertical-align: middle; margin-left: .5em; padding: 1px 6px; border-radius: 2px;
  font: 500 10px/1.5 var(--f-mono); letter-spacing: .06em; text-transform: uppercase;
  color: var(--amber); background: var(--amber-bg); white-space: nowrap;
}
.no-unconf .unconf { display: none; }

/* ---------- Шапка ---------- */
.header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--navy-deep); color: var(--white);
  border-bottom: 1px solid var(--line-dark);
}
.header .wrap { height: var(--header-h); display: flex; align-items: center; gap: 24px; }
.logo { display: flex; align-items: center; gap: 14px; text-decoration: none; flex: none; }
.logo img { width: 104px; height: auto; }
.logo span { font: 500 10px/1.3 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted-dark); border-left: 1px solid var(--line-dark); padding-left: 14px; display: none; }
@media (min-width: 520px) { .logo span { display: block; } }
.nav { display: none; gap: 4px; margin-left: auto; }
.nav a { white-space: nowrap; padding: 8px 12px; font-size: var(--fs-sm); text-decoration: none; color: #D5E0E8; border-radius: var(--radius); transition: color var(--t-fast), background var(--t-fast); }
.nav a:hover { color: var(--white); background: rgba(255,255,255,.06); }
.header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.header-phone { display: none; font: 500 var(--fs-sm) var(--f-mono); text-decoration: none; white-space: nowrap; }
.burger { width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 1px solid var(--line-dark); border-radius: var(--radius); cursor: pointer; }
.burger span, .burger span::before, .burger span::after { display: block; width: 18px; height: 1.5px; background: currentColor; position: relative; transition: transform var(--t-med) var(--ease-out); }
.burger span::before, .burger span::after { content: ""; position: absolute; left: 0; }
.burger span::before { top: -6px; } .burger span::after { top: 6px; }
.menu-open .burger span { background: transparent; }
.menu-open .burger span::before { transform: translateY(6px) rotate(45deg); }
.menu-open .burger span::after { transform: translateY(-6px) rotate(-45deg); }
.header .btn-accent { display: none; }
@media (min-width: 1100px) {
  .nav { display: flex; margin-left: 24px; }
  .header-actions { margin-left: auto; }
  .header-phone { display: block; }
  .header .btn-accent { display: inline-flex; }
  .burger { display: none; }
}
@media (min-width: 720px) and (max-width: 1099px) { .header .btn-accent { display: inline-flex; } }
.mobile-menu {
  position: fixed; inset: calc(var(--header-h) + env(safe-area-inset-top, 0px)) 0 0; z-index: 45; background: var(--navy-deep); color: var(--white);
  padding: 24px var(--gutter-r) calc(24px + env(safe-area-inset-bottom, 0px)) var(--gutter);
  display: flex; flex-direction: column; gap: 4px; overflow-y: auto;
  transform: translateY(-8px); opacity: 0; visibility: hidden;
  transition: transform var(--t-med) var(--ease-out), opacity var(--t-med) var(--ease-out), visibility 0s linear var(--t-med);
}
.menu-open .mobile-menu { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
.mobile-menu a { font: 500 1.375rem/1.2 var(--f-display); text-transform: uppercase; text-decoration: none; padding: 14px 0; border-bottom: 1px solid var(--line-dark); }
.mobile-menu .mm-contacts { margin-top: auto; padding-top: 24px; display: grid; gap: 8px; color: var(--muted-dark); font-size: var(--fs-sm); }
.mobile-menu .mm-contacts strong { color: var(--white); font: 500 1.25rem var(--f-mono); }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--navy-deep); color: var(--white); overflow: hidden; isolation: isolate; }
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 40%; transform-origin: 60% 50%; will-change: transform; }
.hero::after { /* градиент для читаемости текста */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(14,30,44,.55) 0%, rgba(14,30,44,.1) 30%, rgba(14,30,44,.25) 55%, rgba(14,30,44,.92) 100%),
    linear-gradient(90deg, rgba(14,30,44,.75) 0%, rgba(14,30,44,0) 60%);
}
.hero .wrap { padding-top: clamp(72px, 10vw, 140px); padding-bottom: 28px; display: grid; gap: 28px; min-height: min(86svh, 860px); align-content: end; }
.hero-eyebrow { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.hero .label { color: #7FD6E5; line-height: 1.4; }
.hero h1 { max-width: 12ch; }
.hero h1 em { font-style: normal; color: var(--cyan); }
.hero .lead { color: #DCE6EE; max-width: 46ch; }
.hero-viz { position: absolute; right: var(--gutter-r); top: 16px; font: 500 10px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.7); }
.facts {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid rgba(255,255,255,.2); margin-top: 12px;
}
.fact { padding: 18px 16px 4px 0; display: grid; gap: 4px; min-width: 0; }
.fact + .fact { padding-left: 16px; border-left: 1px solid rgba(255,255,255,.2); }
.fact:nth-child(3) { border-left: 0; padding-left: 0; }
@media (min-width: 860px) { .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } .fact:nth-child(3) { border-left: 1px solid rgba(255,255,255,.2); padding-left: 16px; } }
.fact b { font: 500 clamp(1.25rem, 1rem + 1.2vw, 1.875rem)/1.1 var(--f-display); letter-spacing: -.02em; }
.fact span { font-size: var(--fs-xs); color: #D6E2EA; }
/* Цифры корпуса 1.1: мягкая тёмная подложка снизу-слева (без плашки — только градиент), чтобы читались на любом кадре */
.facts-wrap { position: relative; }
.facts { position: relative; }
.facts::before { content: ""; position: absolute; z-index: -1; inset: -56px -12vw -140px calc(-1 * var(--tour-pad, 24px)); pointer-events: none;
  background: radial-gradient(120% 100% at 30% 70%, rgba(6,18,28,.72) 0%, rgba(6,18,28,.5) 45%, rgba(6,18,28,0) 75%); }
.fact b, .fact span { text-shadow: 0 1px 12px rgba(6,18,28,.65); }
/* Подпись над цифрами: о каком доме речь — по центру линии */
.facts-cap { position: absolute; z-index: 1; left: 50%; top: 12px; transform: translate(-50%, -50%); margin: 0; padding: 5px 14px; white-space: nowrap; border-radius: 999px; border: 1px solid rgba(141,213,226,.45); background: rgba(10,26,38,.78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); font: 500 11px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: #C9D8E1; }
.facts-cap b { color: #8DD5E2; font-weight: 600; margin-right: .5em; }

/* ---------- Знакомство с домом (scroll-story) ---------- */
.story { display: grid; gap: 32px; }
.story-visual { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--navy); aspect-ratio: 4 / 5; max-width: 100%; }
.story-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.04); transition: opacity var(--t-slow) var(--ease-out), transform 1.2s var(--ease-out); }
.story-visual img.is-on { opacity: 1; transform: none; }
.story-visual figcaption { position: absolute; left: 12px; bottom: 12px; z-index: 2; font: 500 10px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; background: rgba(14,30,44,.7); color: #DCE6EE; padding: 4px 8px; border-radius: 2px; }
.hotspot {
  position: absolute; z-index: 3; width: 32px; height: 32px; margin: -16px 0 0 -16px; border-radius: 50%;
  background: var(--cyan); border: 0; cursor: pointer; display: grid; place-items: center; color: var(--navy-deep);
  font: 600 13px var(--f-mono); box-shadow: 0 0 0 6px rgba(41,178,201,.25);
  opacity: 0; transform: scale(.6); transition: opacity var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out), box-shadow var(--t-fast);
}
.story-visual.show-hotspots .hotspot { opacity: 1; transform: none; }
.hotspot:hover, .hotspot[aria-expanded="true"] { box-shadow: 0 0 0 10px rgba(41,178,201,.35); }
.hotspot-card {
  position: absolute; z-index: 4; left: 12px; right: 12px; bottom: 44px; background: var(--surface); color: var(--ink);
  padding: 16px; border-radius: var(--radius); box-shadow: 0 12px 40px rgba(14,30,44,.3); display: grid; gap: 6px;
}
.hotspot-card h3 { font-size: 1rem; }
.hotspot-card p { font-size: var(--fs-sm); color: var(--muted); }
.story-steps { display: grid; gap: 0; counter-reset: step; }
.step { padding: 28px 0; border-top: 1px solid var(--line); display: grid; gap: 10px; opacity: .45; transition: opacity var(--t-med) var(--ease-out); }
.step.is-active { opacity: 1; }
.step .mono { font-size: var(--fs-xs); color: var(--cyan-ink); letter-spacing: .1em; }
.step p { color: var(--muted); max-width: 52ch; }
@media (min-width: 960px) {
  .story { grid-template-columns: 1.05fr .95fr; gap: 72px; align-items: start; }
  .story-visual { position: sticky; top: calc(var(--header-h) + 32px); aspect-ratio: 4 / 4.6; }
  .step { padding: 56px 0; min-height: 52vh; align-content: center; }
}
@media (max-width: 959px) { .step { opacity: 1; } .story-visual .hotspot { opacity: 1; transform: none; } }

/* ---------- Технологии: разрез стены ---------- */
.wall-figure { position: relative; background: var(--navy); border-radius: var(--radius); padding: clamp(16px, 3vw, 32px); overflow: hidden; }
.wall-svg { width: 100%; height: auto; display: block; }
.wall-svg .layer { cursor: pointer; transition: transform var(--t-slow) var(--ease-out), filter var(--t-fast); }
.wall-svg .layer:hover, .wall-svg .layer.is-active { filter: brightness(1.12); }
.wall-svg .layer.is-active .layer-edge { stroke: var(--cyan); stroke-width: 3; }
.wall-figure.exploded .layer[data-i="1"] { transform: translateX(26px); }
.wall-figure.exploded .layer[data-i="2"] { transform: translateX(52px); }
.wall-figure.exploded .layer[data-i="3"] { transform: translateX(78px); }
.layer-tabs { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.layer-tab { display: grid; grid-template-columns: 28px 1fr; gap: 12px; text-align: left; padding: 16px; background: var(--surface); border: 0; cursor: pointer; transition: background var(--t-fast); }
.layer-tab .mono { color: var(--muted); font-size: var(--fs-xs); padding-top: 3px; }
.layer-tab b { font-weight: 600; }
.layer-tab p { grid-column: 2; font-size: var(--fs-sm); color: var(--muted); display: none; }
.layer-tab[aria-selected="true"] { background: #E9F6F8; }
.layer-tab[aria-selected="true"] p { display: block; }
.layer-tab[aria-selected="true"] .mono { color: var(--cyan-ink); }
.tech-list { display: grid; gap: 1px; background: var(--line); margin-top: clamp(40px, 5vw, 72px); border: 1px solid var(--line); }
@media (min-width: 720px) { .tech-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .tech-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tech-item { background: var(--surface-2); padding: 28px 24px; display: grid; gap: 10px; align-content: start; }
.tech-item p { color: var(--muted); font-size: var(--fs-sm); }

/* ---------- Окна ---------- */
.window-figure { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(16px, 3vw, 40px); display: grid; gap: 16px; }
.window-svg { width: 100%; max-width: 560px; margin-inline: auto; display: block; }
.sash { transition: transform var(--t-slow) var(--ease-in-out); transform-box: fill-box; }
.sash-l { transform-origin: left center; }
.sash-r { transform-origin: right center; }
.window-figure.open .sash-l { transform: perspective(600px) rotateY(-38deg); }
.window-figure.open .sash-r { transform: perspective(600px) rotateY(38deg); }
.win-part { cursor: pointer; }
.win-part:hover rect, .win-part.is-active rect { stroke: var(--cyan-ink); stroke-width: 3; }
.win-info { min-height: 72px; padding: 16px; background: var(--surface-2); border-radius: var(--radius); display: grid; gap: 4px; }
.win-info p { font-size: var(--fs-sm); color: var(--muted); }
.benefits { display: grid; gap: 0; margin-top: 24px; }
.benefits li { list-style: none; padding: 14px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 24px 1fr; gap: 12px; }
.benefits li::before { content: ""; width: 10px; height: 10px; margin-top: 7px; border: 1.5px solid var(--cyan-ink); transform: rotate(45deg); }
.on-dark .benefits li { border-color: var(--line-dark); }
.on-dark .benefits li::before { border-color: var(--cyan); }
.benefits { padding: 0; margin-block: 24px 0; }

/* ---------- Инженерия ---------- */
.eng-grid { display: grid; gap: 1px; background: var(--line-dark); border: 1px solid var(--line-dark); }
@media (min-width: 720px) { .eng-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .eng-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .eng-grid .eng-item:first-child { grid-column: span 2; } }
.eng-item { background: var(--navy-deep); padding: 28px 24px; display: grid; gap: 10px; align-content: start; }
.eng-item .mono { font-size: var(--fs-xs); color: var(--cyan); }
.eng-item p { color: var(--muted-dark); font-size: var(--fs-sm); }
.eng-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 32px; padding: 24px; border: 1px solid var(--line-dark); border-radius: var(--radius); }
.heat-svg { width: 100%; height: auto; display: block; }
.heat-svg text { font-family: var(--f-body); }

/* ---------- Тишина ---------- */
.noise-types { display: grid; gap: 12px; margin-top: 28px; }
@media (min-width: 720px) { .noise-types { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.noise-type { padding: 20px; background: var(--surface); border-radius: var(--radius); display: grid; gap: 6px; align-content: start; }
.noise-type .mono { font-size: var(--fs-xs); color: var(--cyan-ink); }
.noise-type p { font-size: var(--fs-sm); color: var(--muted); }
.floor-figure { background: var(--white); border-radius: var(--radius); padding: clamp(16px, 3vw, 32px); }
.floor-svg { width: 100%; height: auto; display: block; }
.floor-svg .fl { transition: transform var(--t-slow) var(--ease-out); }
.floor-figure.exploded .fl[data-i="1"] { transform: translateY(-14px); }
.floor-figure.exploded .fl[data-i="2"] { transform: translateY(-28px); }
.floor-figure.exploded .fl[data-i="3"] { transform: translateY(-42px); }

/* ---------- Квартиры ---------- */
.whitebox { display: grid; gap: clamp(24px, 3vw, 48px); }
@media (min-width: 960px) { .whitebox { grid-template-columns: 1.2fr .8fr; align-items: stretch; } }
.whitebox-gallery { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 8px; min-height: 360px; }
.whitebox-gallery figure { margin: 0; position: relative; overflow: hidden; border-radius: var(--radius); }
.whitebox-gallery figure:first-child { grid-row: span 2; }
.whitebox-gallery img { width: 100%; height: 100%; object-fit: cover; }
.disclaimer { font-size: var(--fs-xs); color: var(--muted); margin-top: 10px; }
.ceiling { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; padding: 24px; background: var(--navy); color: var(--white); border-radius: var(--radius); margin-top: 16px; }
.ceiling svg { width: 44px; height: 120px; color: var(--cyan); }
.ceiling b { font: 500 2.5rem/1 var(--f-display); letter-spacing: -.03em; display: block; }
.ceiling p { color: var(--muted-dark); font-size: var(--fs-sm); margin-top: 6px; }
.checklist { padding: 0; margin: 20px 0 0; display: grid; gap: 0; }
.checklist li { list-style: none; padding: 12px 0; border-top: 1px solid var(--line); display: flex; gap: 12px; }
.checklist li::before { content: "✓"; color: var(--cyan-ink); font-weight: 700; }

/* каталог */
.catalog { margin-top: clamp(56px, 6vw, 96px); }
.filters { display: grid; gap: 16px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 24px; }
@media (min-width: 860px) { .filters { grid-template-columns: auto auto 1fr; align-items: end; gap: 24px 28px; } }
@media (min-width: 1180px) { .filters { grid-template-columns: auto auto 1fr 1fr auto; } }
.filters fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 8px; }
.filters legend, .filters label.f-label { font: 500 var(--fs-xs) var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0; margin-bottom: 8px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { padding: 10px 16px; cursor: pointer; font-size: var(--fs-sm); font-weight: 600; transition: background var(--t-fast), color var(--t-fast); min-width: 48px; text-align: center; }
.seg label + input + label, .seg label + label { border-left: 1px solid var(--line); }
.seg input:checked + label { background: var(--navy); color: var(--white); }
.seg input:focus-visible + label { outline: 2px solid var(--cyan); outline-offset: -2px; }
.range { display: grid; gap: 8px; }
.range-out { font: 500 var(--fs-sm) var(--f-mono); }
input[type=range] { width: 100%; accent-color: var(--navy); height: 28px; }
.select { min-height: 44px; padding: 0 36px 0 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23172E42' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center; appearance: none; font: inherit; font-size: var(--fs-sm); color: var(--ink); }
.catalog-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; align-items: baseline; margin-bottom: 16px; }
.cards { display: grid; gap: 16px; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: grid; grid-template-rows: auto 1fr; overflow: hidden; transition: border-color var(--t-fast), transform var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .card:hover { border-color: rgba(23,46,66,.35); transform: translateY(-2px); box-shadow: 0 14px 40px -18px rgba(14,30,44,.35); } }
.card-plan { position: relative; aspect-ratio: 4 / 3; background: var(--white); border: 0; padding: 20px; cursor: zoom-in; display: grid; place-items: center; border-bottom: 1px solid var(--line); }
.card-plan { overflow: hidden; }
.card-plan img { position: absolute; inset: 20px; width: calc(100% - 40px); height: calc(100% - 40px); max-width: none; object-fit: contain; mix-blend-mode: multiply; transition: transform 600ms cubic-bezier(.23, 1, .32, 1); }
@media (hover: hover) and (pointer: fine) { .card:hover .card-plan img { transform: scale(1.03); } }
.card-fav { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--muted); transition: color var(--t-fast), transform var(--t-fast) var(--ease-out); }
.card-fav:active { transform: scale(.9); }
.card-fav[aria-pressed="true"] { color: var(--cyan-ink); border-color: var(--cyan-ink); }
.card-fav[aria-pressed="true"] path { fill: currentColor; }
.card-body { padding: 20px; display: grid; gap: 14px; align-content: start; }
.card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.card-area { font: 500 1.75rem/1 var(--f-display); letter-spacing: -.03em; }
.card-area small { font-size: .55em; margin-left: 2px; }
.card-rooms { font: 500 var(--fs-xs) var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.specs { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 0; font-size: var(--fs-sm); }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-family: var(--f-mono); font-variant-numeric: tabular-nums; text-align: right; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 2px; color: var(--muted); }
.card-price { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 14px; border-top: 1px dashed var(--line); }
.card-price b { font: 600 1.125rem var(--f-body); }
.card-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.cmp-check { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--muted); cursor: pointer; }
.cmp-check input { width: 18px; height: 18px; accent-color: var(--navy); }
.empty { padding: 40px; text-align: center; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }
.compare-tray {
  position: fixed; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom, 0px)); z-index: 40;
  padding: 12px var(--gutter-r) 12px var(--gutter); display: flex; justify-content: center; pointer-events: none;
  transform: translateY(16px); opacity: 0; transition: transform var(--t-med) var(--ease-out), opacity var(--t-med) var(--ease-out);
}
.compare-tray.is-on { transform: none; opacity: 1; }
.compare-tray:not(.is-on) > div { pointer-events: none; visibility: hidden; } /* скрытая панель не должна перехватывать нажатия внизу экрана */
.compare-tray > div { pointer-events: auto; background: var(--navy-deep); color: var(--white); border-radius: var(--radius); padding: 10px 10px 10px 16px; display: flex; align-items: center; gap: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.3); font-size: var(--fs-sm); }
@media (min-width: 960px) { .compare-tray { bottom: 24px; } }
.cmp-table-wrap { overflow-x: auto; }
.cmp-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 480px; }
.cmp-table th, .cmp-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.cmp-table td { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.cmp-table img { width: 140px; mix-blend-mode: multiply; }

/* ---------- Общественные пространства ---------- */
.mop-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 860px) { .mop-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 180px; grid-auto-flow: dense; } }
.mop-item { margin: 0; position: relative; overflow: hidden; border-radius: var(--radius); background: var(--navy); border: 0; padding: 0; cursor: zoom-in; aspect-ratio: 3 / 4; }
@media (min-width: 860px) {
  .mop-item { aspect-ratio: auto; }
  .mop-item.portrait { grid-row: span 2; }
  .mop-item.wide { grid-column: span 2; }
  .mop-item.big { grid-column: span 2; grid-row: span 2; }
}
.mop-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .mop-item:hover img { transform: scale(1.04); } }
.mop-item span { position: absolute; left: 0; right: 0; bottom: 0; padding: 32px 14px 12px; text-align: left; font-size: var(--fs-sm); font-weight: 600; color: var(--white); background: linear-gradient(transparent, rgba(14,30,44,.85)); }
.safety { display: grid; gap: 0; margin-top: clamp(32px, 4vw, 56px); padding: 0; }
@media (min-width: 720px) { .safety { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; } }
@media (min-width: 1100px) { .safety { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.safety li { list-style: none; padding: 16px 0; border-top: 1px solid var(--line); font-weight: 500; display: flex; align-items: baseline; gap: 12px; }
.safety li::before { content: ""; width: 8px; height: 8px; flex: none; background: var(--cyan-ink); transform: translateY(-1px); }

/* ---------- Двор ---------- */
.yard-media { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.yard-media figure { margin: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1; }
.yard-media figure:first-child { grid-column: span 2; aspect-ratio: 16 / 10; }
.yard-media img { width: 100%; height: 100%; object-fit: cover; }
.yard-list { display: grid; gap: 0; padding: 0; margin: 0; }
.yard-list li { list-style: none; padding: 18px 0; border-top: 1px solid var(--line-dark); display: grid; gap: 4px; }
.yard-list li p { color: var(--muted-dark); font-size: var(--fs-sm); }

/* ---------- Район ---------- */
.district { display: grid; gap: clamp(24px, 3vw, 48px); }
@media (min-width: 960px) { .district { grid-template-columns: 1.3fr .7fr; align-items: center; } }
.district figure { margin: 0; background: var(--white); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.district figcaption { padding: 10px 14px; font-size: var(--fs-xs); color: var(--muted); border-top: 1px solid var(--line); }
.tep { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 24px; }
.tep div { background: var(--surface-2); padding: 18px 16px; display: grid; gap: 2px; }
.tep b { font: 500 1.625rem/1.1 var(--f-display); letter-spacing: -.02em; }
.tep span { font-size: var(--fs-xs); color: var(--muted); }
.loc { margin-top: clamp(48px, 5vw, 80px); display: grid; gap: 24px; }
@media (min-width: 960px) { .loc { grid-template-columns: .9fr 1.1fr; } }
.loc-map {
  position: relative; min-height: 320px; border-radius: var(--radius); overflow: hidden; background: var(--navy-deep); color: var(--white);
  display: grid; place-items: center; text-align: center; padding: 32px;
}
.loc-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.loc-map .loc-map-body { position: relative; display: grid; gap: 12px; justify-items: center; max-width: 36ch; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 14px; font-size: var(--fs-sm); cursor: pointer; transition: background var(--t-fast), color var(--t-fast); }
.chip[aria-pressed="true"] { background: var(--navy); color: var(--white); border-color: var(--navy); }
.nearby { padding: 0; margin: 0; display: grid; }
.nearby li { list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.nearby li span:last-child { font-family: var(--f-mono); font-size: var(--fs-sm); color: var(--muted); text-align: right; }

/* ---------- Застройщик, документы, покупка ---------- */
.docs { display: grid; gap: 1px; background: var(--line-dark); border: 1px solid var(--line-dark); margin-top: 32px; }
@media (min-width: 720px) { .docs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .docs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.doc { background: var(--navy-deep); padding: 24px; display: grid; gap: 8px; align-content: start; }
.doc .mono { font-size: var(--fs-xs); color: var(--cyan); }
.doc p { color: var(--muted-dark); font-size: var(--fs-sm); }
.buy { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (min-width: 720px) { .buy { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.buy-item { background: var(--surface); padding: 24px; display: grid; gap: 8px; align-content: start; }
.buy-item p { color: var(--muted); font-size: var(--fs-sm); }

/* ---------- Формы ---------- */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-size: var(--fs-sm); font-weight: 500; }
.field input, .field select {
  min-height: 50px; padding: 0 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface);
  font: inherit; color: var(--ink); transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(41,178,201,.3); }
.field.has-error input { border-color: var(--danger); }
.field .err { font-size: var(--fs-xs); color: var(--danger); min-height: 0; }
.on-dark .field label { color: #DCE6EE; }
.on-dark .field input { background: rgba(255,255,255,.06); border-color: var(--line-dark); color: var(--white); }
.on-dark .field input::placeholder { color: #7F95A6; }
.consent { display: flex; gap: 10px; font-size: var(--fs-xs); color: var(--muted); align-items: flex-start; }
.consent input { width: 18px; height: 18px; margin-top: 1px; flex: none; accent-color: var(--navy); }
.on-dark .consent { color: var(--muted-dark); }
.form-row { display: grid; gap: 14px; }
@media (min-width: 560px) { .form-row { grid-template-columns: 1fr 1fr; } }
.form-success { display: grid; gap: 10px; padding: 24px; border: 1px solid var(--cyan); border-radius: var(--radius); }
.final { display: grid; gap: 40px; }
@media (min-width: 960px) { .final { grid-template-columns: 1fr 1fr; align-items: start; } }

/* ---------- Модальные окна ---------- */
dialog.modal {
  border: 0; padding: 0; border-radius: var(--radius); background: var(--paper); color: var(--ink);
  width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); overflow: auto;
  box-shadow: 0 30px 80px rgba(0,0,0,.35);
}
dialog.modal.wide { width: min(1080px, calc(100vw - 24px)); }
dialog.modal::backdrop { background: rgba(9, 20, 30, .62); backdrop-filter: blur(3px); }
dialog.modal[open] { animation: modal-in var(--t-med) var(--ease-out); }
dialog.modal[open]::backdrop { animation: fade-in var(--t-med) var(--ease-out); }
dialog.modal.closing { animation: modal-out 180ms var(--ease-out) forwards; }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes modal-out { to { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes fade-in { from { opacity: 0; } }
.modal-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 16px 16px 24px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 1.125rem; text-transform: none; font-family: var(--f-body); font-weight: 600; letter-spacing: -.01em; }
.modal-close { width: 44px; height: 44px; flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); cursor: pointer; display: grid; place-items: center; }
.modal-body { padding: 24px; display: grid; gap: 16px; }
.modal-body .lightbox-img { width: 100%; max-height: 70vh; object-fit: contain; background: var(--navy-deep); border-radius: var(--radius); }
.plan-modal { display: grid; gap: 24px; }
@media (min-width: 860px) { .plan-modal { grid-template-columns: 1.4fr 1fr; align-items: start; } }
.plan-modal img { width: 100%; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; mix-blend-mode: multiply; }

/* ---------- Подвал и мобильная панель ---------- */
.footer { background: var(--navy-deep); color: var(--muted-dark); font-size: var(--fs-sm); padding-block: 56px calc(96px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 960px) { .footer { padding-bottom: 40px; } }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 860px) { .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; } }
.footer a { color: #DCE6EE; }
.footer strong { color: var(--white); display: block; margin-bottom: 8px; font-weight: 600; }
.footer-legal { border-top: 1px solid var(--line-dark); margin-top: 40px; padding-top: 24px; font-size: var(--fs-xs); display: grid; gap: 8px; }
.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 44; display: grid; grid-template-columns: 1fr auto; gap: 8px;
  padding: 10px var(--gutter-r) calc(10px + env(safe-area-inset-bottom, 0px)) var(--gutter);
  background: rgba(14, 30, 44, .94); backdrop-filter: blur(10px); border-top: 1px solid var(--line-dark);
  transform: translateY(110%); transition: transform var(--t-med) var(--ease-out);
}
.mobile-bar.is-on { transform: none; }
@media (min-width: 960px) { .mobile-bar { display: none; } }
.toast { position: fixed; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 16px); opacity: 0; z-index: 70; background: var(--ink); color: var(--white); padding: 12px 18px; border-radius: var(--radius); font-size: var(--fs-sm); transition: opacity var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out); pointer-events: none; max-width: calc(100vw - 32px); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Появление при прокрутке: элементы видны всегда, двигается только положение ---------- */
.reveal { transition: transform 900ms var(--ease-out); }
.js .reveal.pre { transform: translateY(28px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal.pre { transform: none; }
  .hero-media img { transform: none !important; }
}

/* v5.3: заголовок первого экрана, анонс «Как устроен», ссылки-чипы, подвал, ловушка для ботов */
.hero-h1-kw { display: block; margin-bottom: 16px; font: 500 var(--fs-sm)/1.4 var(--f-body); text-transform: none; letter-spacing: 0; color: #7FD6E5; }
.modal-head .modal-title { margin: 0; font: 600 1.125rem/1.3 var(--f-body); letter-spacing: -.01em; }
.toc { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.toc a { display: flex; align-items: baseline; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: inherit; text-decoration: none; transition: border-color var(--t-fast); }
.toc a:hover { border-color: var(--cyan-ink); }
.toc b { font: 500 var(--fs-xs)/1 var(--f-mono); color: var(--cyan-ink); }
.toc-big { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); margin-bottom: 28px; }
.toc-big a { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; padding: 18px; }
.toc-big span { font-weight: 600; }
.toc-big em { grid-column: 2; font-style: normal; color: var(--muted); font-size: var(--fs-sm); }
.chips-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.chips-row > span { color: var(--muted); font-size: var(--fs-sm); margin-right: 4px; }
.chip-link { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: inherit; text-decoration: none; font-size: var(--fs-sm); transition: border-color var(--t-fast); }
.chip-link:hover { border-color: var(--cyan-ink); }
.chip-link.is-cur { background: var(--navy); color: var(--white); border-color: var(--navy); }
.flats-seo { padding-block: 0 clamp(32px, 3vw, 48px); }
@media (min-width: 1000px) { .footer-grid.footer-grid-4 { grid-template-columns: 1.3fr 1fr 1fr 1fr; } }
.footer a { color: inherit; }
.footer-korp a { margin-right: 6px; }
.footer-korp span { opacity: .7; margin-right: 4px; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Первая кнопка героя — вход в 3D-квартал: заголовок + подпись */
.btn-3d { flex-direction: column; align-items: flex-start; gap: 2px; height: auto; min-height: 56px; padding-top: 10px; padding-bottom: 10px; text-align: left; line-height: 1.2; }
.btn-3d-t { font-size: 16px; font-weight: 700; }
.btn-3d-s { font-size: 12.5px; font-weight: 500; opacity: .78; letter-spacing: 0; }
/* «Выбери свой дом»: мягкая пульсация в цвет кнопки — свечение дышит, от кнопки расходится тонкое кольцо */
.btn-3d { position: relative; isolation: isolate; }
.btn-3d::before, .btn-3d::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1; }
.btn-3d::before { box-shadow: 0 0 22px 2px rgba(41,178,201,.75), 0 0 48px 8px rgba(41,178,201,.35); opacity: .3; animation: btn3d-glow 2.8s ease-in-out 1s infinite; }
.btn-3d::after { border: 1.5px solid rgba(141,213,226,.85); opacity: 0; animation: btn3d-ring 2.8s cubic-bezier(.23,1,.32,1) 1s infinite; }
@keyframes btn3d-glow { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
@keyframes btn3d-ring { 0% { opacity: .7; transform: scale(1); } 60%, 100% { opacity: 0; transform: scale(1.06, 1.32); } }
@media (hover: hover) and (pointer: fine) { .btn-3d:hover::before { animation: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .btn-3d::before { animation: none; opacity: .6; } .btn-3d::after { animation: none; } }

/* Подвал: ссылки с зоной нажатия не меньше 24 px (WCAG 2.2, target-size) */
.footer-grid p a { display: inline-block; padding-block: 3px; }
.mobile-bar .btn-ghost { --fg: #fff; --bd: rgba(255,255,255,.35); }
/* Телефон — первый пункт меню, акцентный голубой, как кнопки */
.header .nav a.nav-phone { color: var(--cyan); font: 600 var(--fs-sm) var(--f-body); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.header .nav a.nav-phone:hover { color: #6FD0E0; background: rgba(41,178,201,.1); }
.mobile-menu a.nav-phone { color: var(--cyan); font: 600 1.375rem/1.2 var(--f-body); text-transform: none; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
@media (min-width: 1100px) { .header .header-phone { display: none !important; } }

/* ================= Фото людей (иллюстрации) ================= */
.life-card { display: grid; gap: 0; margin-top: 28px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 860px) { .life-card { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: stretch; } }
.life-card-img { position: relative; margin: 0; min-height: 240px; }
.life-card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.life-card-img figcaption, .life-fig figcaption { position: absolute; left: 10px; bottom: 8px; padding: 2px 8px; border-radius: 2px; background: rgba(14,30,44,.55); color: #fff; font-size: 11px; }
.life-card-body { display: grid; gap: 14px; align-content: center; padding: clamp(20px, 3vw, 40px); }
.life-card-body h3 { font: 500 clamp(1.25rem, 1rem + 1vw, 1.75rem)/1.15 var(--f-display); text-transform: uppercase; letter-spacing: -.02em; }
.life-card-body p { margin: 0; color: var(--muted); }
.life-card-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: var(--fs-sm); }
.life-card-list li { padding-left: 18px; position: relative; }
.life-card-list li::before { content: ""; position: absolute; left: 0; top: .6em; width: 8px; height: 2px; background: var(--cyan-ink); }
.life-card-body .btn { justify-self: start; }
.life-fig { position: relative; margin: 0; overflow: hidden; border-radius: var(--radius); }
.life-fig img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* шапка окна «Точный расчёт ипотеки» */
.modal-photo { margin: -4px 0 14px; border-radius: var(--radius); overflow: hidden; aspect-ratio: 5 / 2; }
.modal-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 75% 50%; display: block; }
/* альбом «Жизнь в квартале» */
.life-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .life-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 220px; grid-auto-flow: dense; } .life-grid .is-big { grid-column: span 2; grid-row: span 2; } .life-grid .is-wide { grid-column: span 2; } }
@media (max-width: 899px) { .life-grid .is-big { grid-column: span 2; } }
.life-grid a { display: block; position: relative; aspect-ratio: 3 / 2; border-radius: var(--radius); overflow: hidden; }
@media (min-width: 900px) { .life-grid a { aspect-ratio: auto; height: 100%; } }
.life-grid img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 500ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .life-grid a:hover img { transform: scale(1.03); } }
.life-grid a:focus-visible { outline: 2px solid var(--cyan-ink); outline-offset: 2px; }
.zoom-img { width: 100%; height: auto; display: block; border-radius: var(--radius); }

.live-alt { margin: 12px 0 0; font-size: var(--fs-sm); }
.live-alt a { color: var(--cyan-ink); font-weight: 600; }

/* Уведомление о cookie */
.cookie-bar { position: fixed; z-index: 60; left: 16px; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); max-width: 560px; margin: 0 auto; display: grid; gap: 12px; padding: 16px 18px; border-radius: var(--radius); background: rgba(14, 30, 44, .97); color: #DCE6EE; border: 1px solid var(--line-dark); box-shadow: 0 12px 40px rgba(0,0,0,.35); font-size: var(--fs-xs); line-height: 1.5; opacity: 0; transform: translateY(12px); transition: opacity var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out); }
.cookie-bar.is-on { opacity: 1; transform: none; }
.cookie-bar p { margin: 0; }
.cookie-bar a { color: var(--cyan); }
.cookie-bar .btn { justify-self: start; min-height: 40px; }
@media (min-width: 720px) { .cookie-bar { grid-template-columns: 1fr auto; align-items: center; } }
@media (min-width: 960px) { .cookie-bar { left: 24px; right: auto; bottom: 24px; margin: 0; } }
@media (prefers-reduced-motion: reduce) { .cookie-bar { transition: none; } }

/* v5.9: каталог на телефоне — компактный фильтр, первые планировки и кнопка «Показать все» */
.filters-more { display: none; }
@media (max-width: 639px) {
  .filters { gap: 14px; padding: 16px; }
  .filters-more { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 44px; padding: 0 14px; font: 600 var(--fs-sm)/1.2 var(--f-body); color: var(--navy); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
  .filters-more::after { content: ""; width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform var(--t-fast) var(--ease-out); }
  .filters-more[aria-expanded="true"]::after { transform: translateY(2px) rotate(-135deg); }
  .filters-more span { margin-left: auto; margin-right: 10px; color: var(--cyan-ink); }
  .filters:not(.is-open) > :not(fieldset:first-of-type):not(.filters-more) { display: none; }
}
.cards-more { display: grid; margin-top: 16px; }
.cards-more .btn { width: 100%; }
.cards-more[hidden] { display: none; }
.next-steps { display: grid; gap: 1px; margin-top: 24px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 760px) { .next-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.next-step { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; column-gap: 14px; align-items: center; padding: 16px 18px; min-height: 64px; background: var(--white); color: var(--ink); text-align: left; font: inherit; border: 0; cursor: pointer; text-decoration: none; transition: background-color var(--t-fast) ease; }
.next-step .mono { grid-row: 1 / 3; font-size: var(--fs-xs); color: var(--cyan-ink); }
.next-step b { font-weight: 600; font-size: var(--fs-md); }
.next-step small { grid-column: 2; color: var(--muted); font-size: var(--fs-xs); }
.next-step::after { content: ""; grid-row: 1 / 3; grid-column: 3; width: 8px; height: 8px; border-top: 1.5px solid var(--cyan-ink); border-right: 1.5px solid var(--cyan-ink); transform: rotate(45deg); transition: transform var(--t-fast) var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .next-step:hover { background: var(--surface); } .next-step:hover::after { transform: translateX(3px) rotate(45deg); } }
.next-step:focus-visible { outline: 2px solid var(--cyan-ink); outline-offset: -2px; }
