/* ЖК «Максимум» — экскурсия по дому. Высоту #motion-tour задаёт motion.js по таймлайну. */
:root { --tour-ease: cubic-bezier(.23, 1, .32, 1); --tour-pad: max(24px, calc((100vw - var(--wrap)) / 2 + 16px)); }

#motion-tour { position: relative; height: 640svh; background: var(--navy-deep); }
.motion-stage { position: sticky; top: var(--header-h); height: calc(100svh - var(--header-h)); overflow: hidden; color: var(--white); background: var(--navy-deep); isolation: isolate; }
#motion-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.motion-shade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(6,18,28,.78) 0%, rgba(6,18,28,.42) 30%, rgba(6,18,28,0) 56%),
              linear-gradient(0deg, rgba(6,18,28,.7) 0%, rgba(6,18,28,0) 22%); }
.motion-viz { position: absolute; right: var(--tour-pad); top: 14px; z-index: 2; font: 500 10px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.62); }

/* Главный экран внутри сцены */
.motion-hero { position: absolute; inset: 0; z-index: 3; will-change: opacity, transform; }
.motion-hero .hero { height: 100%; background: none; overflow: visible; }
.motion-hero .hero::after { display: none; }
.motion-hero .hero .wrap { min-height: 0; height: 100%; padding-top: 0; padding-bottom: 104px; align-content: center; gap: 24px; }
.motion-hero .hero h1 { max-width: 13ch; }

/* Левая колонка: текст остановки, темы, финальные кнопки */
.motion-panel { position: absolute; z-index: 4; left: var(--tour-pad); top: clamp(28px, 6vh, 64px); bottom: 104px; width: min(440px, 36vw); display: flex; flex-direction: column; gap: 22px; pointer-events: none; }
.motion-panel > * { pointer-events: auto; will-change: opacity, transform; }
.motion-copy .label { color: #8dd5e2; }
.motion-copy h2 { font-size: clamp(26px, 2.6vw, 42px); margin: 14px 0 12px; }
.motion-copy p { color: #d5e3eb; font-size: 15px; line-height: 1.6; max-width: 40ch; }
.motion-topics { display: flex; flex-direction: column; min-height: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: #8dd5e2 transparent; border-top: 1px solid rgba(141,213,226,.22); }
.motion-topic { width: 100%; display: grid; grid-template-columns: 30px 1fr 14px; align-items: center; gap: 10px; min-height: 44px; padding: 8px 6px 8px 0; text-align: left; font-size: 14px; color: #e7eff3; background: none; border: 0; border-bottom: 1px solid rgba(141,213,226,.16); cursor: pointer; transition: color 160ms ease, padding-left 220ms var(--tour-ease), background-color 160ms ease; }
.motion-topic::after { content: ""; width: 7px; height: 7px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); opacity: .45; justify-self: end; transition: opacity 160ms ease, transform 220ms var(--tour-ease); }
.motion-topic b { font: 500 11px var(--f-mono); color: #8dd5e2; }
.motion-topic[aria-expanded="true"] { color: var(--white); background: rgba(141,213,226,.1); padding-left: 8px; }
.motion-topic[aria-expanded="true"]::after { opacity: 1; transform: translateX(2px) rotate(45deg); }
@media (hover: hover) and (pointer: fine) {
  .motion-topic:hover { color: var(--white); padding-left: 8px; }
  .motion-topic:hover::after { opacity: 1; transform: translateX(2px) rotate(45deg); }
}
.motion-final { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.motion-final .btn-ghost { --fg: var(--white); --bd: rgba(255,255,255,.35); }

/* Точки на изображении (только десктоп) */
#motion-points { position: absolute; inset: 0; z-index: 3; pointer-events: none; transition: opacity 280ms ease; }
.motion-pin { position: absolute; left: 0; top: 0; margin: -20px 0 0 -20px; width: 40px; height: 40px; padding: 0; border: 0; background: none; cursor: pointer; pointer-events: auto; will-change: transform; }
.motion-pin b { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font: 500 11px var(--f-mono); color: var(--white); background: rgba(16,42,59,.82); border: 1px solid rgba(255,255,255,.85); box-shadow: 0 0 0 6px rgba(255,255,255,.12); transition: background-color 160ms ease, box-shadow 260ms var(--tour-ease); }
.motion-pin b::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid rgba(141,213,226,.7); animation: pin-pulse 2.6s var(--tour-ease) infinite; pointer-events: none; }
.motion-pin span { position: absolute; left: 48px; top: 50%; transform: translate(-4px, -50%); white-space: nowrap; font-size: 12px; padding: 5px 10px; background: rgba(16,41,57,.92); color: var(--white); opacity: 0; transition: opacity 160ms ease, transform 220ms var(--tour-ease); pointer-events: none; }
.motion-pin[aria-expanded="true"] b { background: #16849a; }
@media (hover: hover) and (pointer: fine) {
  .motion-pin:hover b { background: #16849a; box-shadow: 0 0 0 9px rgba(141,213,226,.2); }
  .motion-pin:hover span, .motion-pin:focus-visible span { opacity: 1; transform: translate(0, -50%); }
}
@keyframes pin-pulse { 0% { transform: scale(.85); opacity: .9; } 70%, 100% { transform: scale(1.35); opacity: 0; } }

/* Схема окна и схема отопления */
.motion-window, .motion-engineering { position: absolute; z-index: 3; margin: 0; padding: 18px; background: rgba(13,34,50,.82); border: 1px solid rgba(141,213,226,.24); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.motion-window { right: var(--tour-pad); bottom: 104px; width: clamp(200px, 17vw, 250px); }
.motion-stage[data-chapter="4"] #motion-card { max-height: calc(100% - clamp(28px, 6vh, 64px) - 104px - clamp(200px, 17vw, 250px) * 1.16 - 74px); }
.motion-engineering { right: var(--tour-pad); top: 50%; translate: 0 -56%; width: min(46vw, 600px); pointer-events: none; }
.motion-window svg, .motion-engineering svg { display: block; width: 100%; height: auto; }
.motion-window figcaption, .motion-engineering figcaption { margin-top: 10px; font: 500 10px var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: #a9c2cf; text-align: center; }
.motion-window .win-part { cursor: pointer; outline: none; }
.motion-window svg > g:not(.win-part), .motion-window svg > text { pointer-events: none; }
.motion-window .win-part rect { transition: stroke 160ms ease, fill-opacity 160ms ease; }
.motion-window .win-part:focus-visible rect, .motion-window .win-part.is-active rect { stroke: #8dd5e2; }
@media (hover: hover) and (pointer: fine) { .motion-window .win-part:hover rect { stroke: #8dd5e2; } }
.motion-window .sash { transform-box: fill-box; transition: transform 900ms cubic-bezier(.77, 0, .175, 1); }
.motion-window .sash-l { transform-origin: left center; }
.motion-window .sash-r { transform-origin: right center; }
.motion-window.is-open .sash-l { transform: perspective(700px) rotateY(-34deg); }
.motion-window.is-open .sash-r { transform: perspective(700px) rotateY(34deg); }

/* Карточка подробностей */
#motion-card { position: absolute; z-index: 8; right: var(--tour-pad); top: clamp(28px, 6vh, 64px); width: min(380px, 90vw); max-height: calc(100% - clamp(28px, 6vh, 64px) - 112px); overflow: auto; padding: 22px 26px 26px; background: rgba(12,36,52,.93); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 1px solid rgba(141,213,226,.3); box-shadow: 0 24px 70px rgba(0,0,0,.35); }
#motion-card.is-in { animation: card-in 340ms var(--tour-ease); }
@keyframes card-in { from { opacity: 0; transform: translate3d(12px, 0, 0) scale(.98); } }
.motion-card-head { display: flex; justify-content: space-between; align-items: center; }
.motion-card-head .label { color: #8dd5e2; }
#motion-close { width: 40px; height: 40px; margin-right: -10px; display: grid; place-items: center; border: 0; background: none; color: var(--white); cursor: pointer; border-radius: var(--radius); transition: background-color 160ms ease; }
#motion-close:hover { background: rgba(255,255,255,.08); }
#motion-card h3 { margin: 10px 0 12px; font: 500 22px/1.15 var(--f-display); letter-spacing: -.02em; }
#motion-card-text { margin: 0; padding-left: 18px; font-size: 15px; color: #e0e8ee; }
#motion-card-text li + li { margin-top: 10px; }
#motion-card-text li::marker { color: #8dd5e2; }
#motion-card small { display: block; margin-top: 16px; color: #a9c2cf; font-size: 12px; }
#motion-card small:empty { display: none; }

/* Подсказка прокрутки на первом экране */
/* «Листайте вниз»: заметная, но спокойная — круглая кнопка со стрелкой, стрелка мягко «ныряет» вниз */
.motion-cue { position: absolute; z-index: 6; left: 50%; bottom: 96px; transform: translateX(-50%); display: grid; justify-items: center; gap: 10px; font: 600 11px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: #EAF6F9; text-decoration: none; text-shadow: 0 1px 10px rgba(6,18,28,.9); -webkit-tap-highlight-color: transparent; }
.motion-cue i { position: relative; width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid rgba(141,213,226,.9); background: rgba(10,26,38,.5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: grid; place-items: center; transition: background-color 200ms ease, border-color 200ms ease; }
.motion-cue i::before { content: ""; width: 10px; height: 10px; border: solid #8DD5E2; border-width: 0 2px 2px 0; transform: translateY(-3px) rotate(45deg); animation: cue-arrow 2s cubic-bezier(.77,0,.175,1) infinite; }
.motion-cue i::after { content: ""; position: absolute; inset: -1.5px; border-radius: 50%; border: 1.5px solid #8DD5E2; opacity: 0; animation: cue-ring 2s cubic-bezier(.23,1,.32,1) infinite; }
@keyframes cue-arrow { 0%, 100% { transform: translateY(-4px) rotate(45deg); opacity: 1; } 50% { transform: translateY(3px) rotate(45deg); opacity: .75; } }
@keyframes cue-ring { 0% { transform: scale(1); opacity: .6; } 70%, 100% { transform: scale(1.45); opacity: 0; } }
@media (hover: hover) and (pointer: fine) { .motion-cue:hover i { background-color: rgba(41,178,201,.35); border-color: #8DD5E2; } }
.motion-cue:focus-visible { outline: none; } .motion-cue:focus-visible i { box-shadow: 0 0 0 3px #29B2C9; }
/* Низкий экран (ноутбук 1366×768, планшет): места между цифрами и нижней панелью мало — только круг, без надписи */
@media (min-width: 861px) and (max-height: 860px) {
  .motion-cue { bottom: 92px; }
  .motion-cue span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .motion-cue i { width: 38px; height: 38px; }
}

/* Нижняя панель: этапы с заполнением и быстрые ссылки */
.motion-bar { position: absolute; z-index: 5; left: var(--tour-pad); right: var(--tour-pad); bottom: 0; height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.motion-chapters { display: flex; gap: 4px; flex: 1; max-width: 900px; }
.motion-chapters button { position: relative; flex: 1; min-width: 0; padding: 16px 0 6px; border: 0; background: none; color: #a9bcc7; cursor: pointer; text-align: left; font-size: 12px; display: flex; gap: 8px; align-items: baseline; white-space: nowrap; transition: color 160ms ease; }
.motion-chapters button::before, .motion-chapters button::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; }
.motion-chapters button::before { background: rgba(255,255,255,.18); }
.motion-chapters button::after { background: #8dd5e2; transform-origin: left; transform: scaleX(var(--fill, 0)); }
.motion-chapters button b { font: 500 10px var(--f-mono); }
.motion-chapters button span { overflow: hidden; text-overflow: ellipsis; }
.motion-chapters button[aria-current="step"] { color: var(--white); }
@media (hover: hover) and (pointer: fine) { .motion-chapters button:hover { color: var(--white); } }
.motion-actions { display: flex; align-items: center; gap: 20px; flex: none; }
.motion-all { font-size: 13px; color: #b9e2eb; text-decoration: none; border-bottom: 1px solid rgba(185,226,235,.4); }
.motion-skip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; font-size: 13px; font-weight: 600; text-decoration: none; color: var(--navy-deep); background: var(--cyan); border-radius: var(--radius); transition: background-color 160ms ease, transform 160ms var(--tour-ease); }
.motion-skip:hover { background: #4FC3D6; }
.motion-skip:active { transform: scale(.97); }
@media (max-width: 1180px) { .motion-chapters button span { display: none; } .motion-chapters button { justify-content: center; } }

/* Квартиры сразу после экскурсии */
#flats { padding-top: clamp(56px, 5vw + 24px, 96px); }
#flats .catalog { margin-top: 0; }

/* Библиотека преимуществ */
.benefit-library { background: #eaf0f2; }
.benefit-group { display: grid; grid-template-columns: 1fr 1.5fr; gap: 60px; border-top: 1px solid var(--line); padding: 36px 0; }
.benefit-group h3 { font-size: 26px; font-family: var(--f-display); font-weight: 500; text-transform: none; margin: 16px 0 12px; }
.benefit-group p { color: var(--muted); }
.benefit-group p.note { margin-top: 10px; }
.benefit-detail { border-bottom: 1px solid var(--line); }
.benefit-detail summary { position: relative; list-style: none; cursor: pointer; padding: 18px 36px 18px 0; font-weight: 600; font-size: 17px; }
.benefit-detail summary::-webkit-details-marker { display: none; }
.benefit-detail summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 9px; height: 9px; border-right: 1.5px solid var(--cyan-ink); border-bottom: 1.5px solid var(--cyan-ink); transform: translateY(-70%) rotate(45deg); transition: transform 220ms var(--tour-ease); }
.benefit-detail[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.benefit-detail ul { padding: 0 18px 20px 20px; margin: 0; color: #3f5360; }
.benefit-detail li + li { margin-top: 8px; }

/* ---------- Телефон ---------- */
@media (max-width: 760px) {
  :root { --tour-pad: 16px; }
  .motion-shade { background: linear-gradient(180deg, rgba(6,18,28,.82) 0%, rgba(6,18,28,.35) 34%, rgba(6,18,28,0) 52%, rgba(6,18,28,.25) 70%, rgba(6,18,28,.85) 100%); }
  .motion-viz { display: none; }
  .motion-hero .hero .wrap { align-content: start; padding-top: 36px; padding-bottom: 120px; gap: 18px; }
  .motion-hero h1 { font-size: clamp(32px, 9.4vw, 46px); }
  .motion-hero .lead { font-size: 16px; }
  .motion-hero .hero-eyebrow { flex-wrap: wrap; }
  .motion-hero .btn-row { flex-direction: column; align-items: flex-start; }
  .motion-hero .facts-wrap { display: none; }
  .motion-panel { left: 16px; right: 16px; width: auto; top: 20px; bottom: 74px; gap: 0; justify-content: space-between; }
  .motion-copy h2 { font-size: 25px; margin: 10px 0 8px; max-width: 15ch; }
  .motion-copy p { font-size: 13.5px; line-height: 1.5; }
  .motion-copy .label { font-size: 10px; }
  .motion-final { display: none; }
  /* телефон: на фото только точка текущего пункта, без подписи — название в карточке снизу */
  .motion-pin { margin: -16px 0 0 -16px; width: 32px; height: 32px; }
  .motion-pin b { width: 32px; height: 32px; font-size: 10px; background: #16849a; box-shadow: 0 0 0 6px rgba(141,213,226,.22); }
  .motion-pin span { display: none; }
  .motion-window { right: 16px; top: auto; bottom: 128px; translate: none; width: min(40vw, 170px); padding: 10px; }
  .motion-window figcaption { font-size: 9px; }
  #motion-card { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 64%; padding: 18px 20px calc(22px + env(safe-area-inset-bottom, 0px)); border-width: 1px 0 0; z-index: 12; }
  #motion-card.is-in { animation-name: sheet-in; }
  @keyframes sheet-in { from { transform: translate3d(0, 40px, 0); opacity: 0; } }
  .motion-cue { bottom: 80px; }
  .motion-bar { height: 64px; gap: 12px; }
  .motion-chapters { gap: 3px; }
  .motion-chapters button { padding: 14px 0 6px; justify-content: center; }
  .motion-all { display: none; }
  .motion-skip { min-height: 36px; padding: 0 12px; font-size: 12px; }
  .benefit-group { grid-template-columns: 1fr; gap: 16px; padding: 28px 0; }
  .benefit-group h3 { font-size: 22px; }
}

/* ---------- Без движения: сцены сменяются без наездов, высота короче ---------- */
@media (prefers-reduced-motion: reduce) {
  .motion-pin b::after, .motion-cue i::before, .motion-cue i::after { animation: none; }
  #motion-card.is-in { animation: none; }
}

/* ================= v4 ================= */

/* Шапка: онлайн-трансляция */
.live-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; background: none; color: #fff; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: border-color 160ms ease, background-color 160ms ease; }
.live-btn:hover { border-color: #ff6b5e; background: rgba(255,107,94,.08); }
.live-btn i { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #ff4d3d; flex: none; }
.live-btn i::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1.5px solid #ff4d3d; animation: live-pulse 1.8s ease-out infinite; }
@keyframes live-pulse { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
.live-btn-lg { margin-top: 12px; min-height: 48px; font-size: 16px; justify-content: center; }
.header .nav a { padding: 8px 10px; }
.header .header-actions .live-btn { display: none; }
@media (min-width: 1100px) { .header .header-actions .live-btn { display: inline-flex; } .header .header-phone { display: none; } .header .wrap { gap: 18px; } .header .nav { margin-left: 8px; } }
@media (min-width: 1100px) and (max-width: 1499px) { .logo span { display: none; } }
@media (min-width: 1100px) and (max-width: 1259px) { .header .nav a { padding: 8px 6px; font-size: 13px; } .live-btn { padding: 0 10px; font-size: 12px; } }
/* телефон на широких экранах — первым пунктом меню */
.mobile-menu .live-btn { align-self: flex-start; }

/* Слоган */
.motion-hero .hero h1 { font-size: clamp(40px, 5.4vw, 88px); max-width: none; transform-origin: left bottom; will-change: opacity, transform; }
.motion-hero .hero h1 em { color: #57c9dc; }
.motion-hero .hero .wrap > * { will-change: opacity, transform; }
mark.tbd { background: rgba(246,180,70,.22); color: inherit; padding: 0 .25em; border-radius: 2px; box-shadow: inset 0 -1px 0 rgba(246,180,70,.8); }
.hero mark.tbd, .motion-stage mark.tbd { color: #ffd894; }

/* Пункты остановки: компактный список, текущий подсвечен, «Подробнее» — справа */
.motion-topic-row { position: relative; border-bottom: 1px solid rgba(141,213,226,.16); }
.motion-topic { border-bottom: 0; grid-template-columns: 30px 1fr auto; padding-right: 4px; }
.motion-topic::after { display: none; }
.motion-topic b i { font-style: normal; opacity: .5; display: none; }
.motion-topic-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: #8dd5e2; transform: scaleY(0); transform-origin: top; transition: transform 320ms var(--tour-ease); }
.motion-topic-row.is-active::before { transform: scaleY(1); }
.motion-topic-row.is-active { background: linear-gradient(90deg, rgba(141,213,226,.14), rgba(141,213,226,.02)); }
.motion-topic-row.is-active .motion-topic { color: #fff; padding-left: 10px; }
.motion-more { justify-self: end; display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border: 1px solid rgba(141,213,226,.45); border-radius: 999px; font: 600 12px/1 var(--f-body); font-style: normal; color: #8dd5e2; white-space: nowrap; opacity: .0; transform: translateX(-6px); transition: opacity 200ms ease, transform 260ms var(--tour-ease), background-color 160ms ease, color 160ms ease; }
.motion-more::after { content: "→"; }
.motion-topic-row.is-active .motion-more { opacity: 1; transform: none; }
.motion-topic:hover .motion-more { opacity: 1; transform: none; background: #8dd5e2; color: var(--navy-deep); }
.motion-topic-lead { display: none; }
.motion-topics { border-top: 1px solid rgba(141,213,226,.22); }

/* Номера на схеме окна */
.win-badge { cursor: pointer; outline: none; }
.win-badge circle { fill: #0e2a3b; stroke: #8dd5e2; stroke-width: 1.5; transition: fill 160ms ease; }
.win-badge text { fill: #fff; font: 600 12px var(--f-mono); text-anchor: middle; pointer-events: none; }
.win-badge.is-current circle, .win-badge:hover circle, .win-badge:focus-visible circle { fill: #16849a; }

/* Точки: подпись видна у текущей, по наведению — у любой */
.motion-pin[hidden] { display: none; }
.motion-pin.is-current b { background: #16849a; box-shadow: 0 0 0 9px rgba(141,213,226,.22); }
.motion-pin.is-current span { opacity: 1; transform: translate(0, -50%); }
.motion-pin span { font-weight: 500; }
.motion-hint { position: absolute; left: 0; top: 0; z-index: 4; pointer-events: none; opacity: 0; transition: opacity 300ms ease; }
.motion-hint span { position: absolute; left: -20px; top: 34px; width: 230px; padding: 10px 12px; font-size: 13px; line-height: 1.4; color: var(--navy-deep); background: #8dd5e2; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.motion-hint span::before { content: ""; position: absolute; left: 32px; top: -6px; width: 12px; height: 12px; background: #8dd5e2; transform: rotate(45deg); }
.motion-hint.is-on { opacity: 1; animation: hint-bob 2.4s ease-in-out infinite; }
@keyframes hint-bob { 50% { translate: 0 4px; } }

/* Схема окна */
.motion-window { width: clamp(210px, 17vw, 250px); }
.motion-window .win-frame path { fill: #d9e6ec; }
.motion-window .win-part.is-current rect, .motion-window .win-part.is-active rect { stroke: #8dd5e2; }
.motion-window .win-part.is-current > rect:first-child { fill-opacity: .85; }

/* Финал экскурсии */
.motion-final { flex-direction: column; align-items: flex-start; gap: 14px; padding-top: 6px; }
.motion-final p { margin: 0; font-size: 18px; color: #fff; }
.motion-final p b { color: #57c9dc; font-weight: 600; }

/* Карточка: схема и ссылка */
#motion-card.has-scheme { width: min(480px, 92vw); }
.cmp-scheme { margin: 18px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cmp-scheme > div { padding: 8px; background: rgba(255,255,255,.04); border: 1px solid rgba(141,213,226,.18); }
.cmp-scheme svg { display: block; width: 100%; height: auto; font-family: var(--f-body); }
.cmp-scheme figcaption { margin-top: 6px; font-size: 12px; line-height: 1.35; color: #b9cdd8; }
.cmp-scheme figcaption b { display: block; color: #fff; font-size: 13px; }
.cmp-scheme > div:last-of-type figcaption b { color: #f0a597; }
.cmp-scheme small { grid-column: 1 / -1; font-size: 11px; color: #8fa6b3; }
.motion-card-link { display: inline-block; margin-top: 16px; color: #8dd5e2; font-weight: 600; font-size: 14px; text-decoration: none; border-bottom: 1px solid rgba(141,213,226,.5); }
.motion-card-link[hidden] { display: none; }

/* Каталог: планировка входом вниз */
.card-plan { container-type: size; padding: 20px 20px 30px; }
.plan-fig { position: relative; display: block; width: min(100cqw, 100cqh * var(--ar)); aspect-ratio: var(--ar); }
.card-plan .plan-fig img, .plan-fig img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: contain; mix-blend-mode: multiply; padding: 0; border: 0; background: none; }
.plan-entry { position: absolute; top: 100%; transform: translate(-50%, 4px); display: inline-flex; flex-direction: column; align-items: center; font: 600 10px/1 var(--f-body); letter-spacing: .04em; text-transform: uppercase; color: #fff; background: var(--cyan-ink); padding: 3px 6px; border-radius: 2px; white-space: nowrap; }
.plan-entry::before { content: ""; position: absolute; top: -5px; left: 50%; margin-left: -5px; border: 5px solid transparent; border-top: 0; border-bottom-color: var(--cyan-ink); }
.plan-big { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 20px 40px; container-type: inline-size; }
.plan-big .plan-fig { width: 100%; }
.plan-links { display: grid; gap: 6px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; }
.plan-links b { font-size: 13px; color: var(--muted); font-weight: 500; }
.plan-links a { color: var(--cyan-ink); font-weight: 600; text-decoration: none; }
.plan-links a:hover { text-decoration: underline; }
.card-instal { margin: -6px 0 0; font-size: 13px; font-weight: 600; color: var(--cyan-ink); }

/* Подъезды и холлы: карусель */
.gal-head { max-width: none; grid-template-columns: 1fr auto; align-items: end; }
.gal-nav { display: flex; gap: 8px; }
.gal-arrow { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); font-size: 18px; color: var(--navy); cursor: pointer; transition: background-color 160ms ease, border-color 160ms ease, opacity 160ms ease; }
.gal-arrow:hover:not(:disabled) { background: var(--navy); color: #fff; border-color: var(--navy); }
.gal-arrow:disabled { opacity: .35; cursor: default; }
.gallery { margin: 0 calc(-1 * var(--gutter)); }
.gal-track { list-style: none; margin: 0; padding: 4px var(--gutter) 12px; display: grid; grid-auto-flow: column; grid-auto-columns: clamp(240px, 27vw, 380px); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: thin; scrollbar-color: var(--navy) transparent; cursor: grab; }
.gal-track.is-drag { cursor: grabbing; scroll-snap-type: none; }
.gal-track.is-drag button { pointer-events: none; }
.gal-item { scroll-snap-align: start; }
.gal-item button { position: relative; display: block; width: 100%; aspect-ratio: 4 / 5; padding: 0; border: 0; border-radius: var(--radius); overflow: hidden; background: var(--navy); cursor: zoom-in; }
.gal-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--tour-ease); -webkit-user-drag: none; user-select: none; }
.gal-item span { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 14px; text-align: left; font-size: 14px; font-weight: 600; line-height: 1.35; color: #fff; background: linear-gradient(transparent, rgba(14,30,44,.88)); }
@media (hover: hover) and (pointer: fine) { .gal-item button:hover img { transform: scale(1.04); } }
@media (min-width: 1240px) { .gallery { margin-right: calc((1240px - 100vw) / 2 - 16px); } }

/* Просмотр фото */
dialog.modal.is-lightbox { background: var(--navy-deep); color: #fff; }
dialog.modal.is-lightbox .modal-head { background: var(--navy-deep); border-color: var(--line-dark); }
dialog.modal.is-lightbox .modal-close { background: transparent; color: #fff; border-color: var(--line-dark); }
dialog.modal.is-lightbox .note { color: var(--muted-dark); }
dialog.modal.is-lightbox .btn-ghost { --fg: #fff; --bd: rgba(255,255,255,.3); }
.lightbox { margin: 0; display: grid; gap: 10px; }
.lb-stage { overflow: hidden; border-radius: var(--radius); background: #08131c; cursor: zoom-in; touch-action: pan-y; }
.lb-stage img { display: block; width: 100%; max-height: 70vh; object-fit: contain; transition: transform 360ms var(--tour-ease); }
.lb-stage.is-zoom { cursor: zoom-out; }
.lb-stage.is-zoom img { transform: scale(2.2); }
.lightbox figcaption { display: flex; justify-content: space-between; gap: 16px; font-size: 15px; }
.lightbox figcaption span { font: 500 13px var(--f-mono); color: var(--muted-dark); }
.lb-nav { justify-content: space-between; }

/* Онлайн-трансляция */
.live-frame { position: relative; aspect-ratio: 16 / 9; background: var(--navy-deep); border-radius: var(--radius); overflow: hidden; }
.live-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.live-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #cfdde5; padding: 24px; }
.live-empty p { max-width: 40ch; line-height: 1.55; }
.live-empty b { display: block; color: #fff; font-size: 18px; margin-bottom: 6px; }
.live-dot { width: 14px; height: 14px; border-radius: 50%; background: #ff4d3d; box-shadow: 0 0 0 6px rgba(255,77,61,.2); margin-bottom: 12px; animation: live-pulse-dot 1.8s ease-in-out infinite; }
@keyframes live-pulse-dot { 50% { box-shadow: 0 0 0 12px rgba(255,77,61,0); } }

/* Покупка */
.buy-item.is-accent { background: var(--navy); color: #fff; }
.buy-item.is-accent p { color: #d5e3eb; }
.buy-item.is-accent h3 { color: #57c9dc; font-family: var(--f-display); font-weight: 500; font-size: 26px; }
.buy-item.is-accent .btn { justify-self: start; margin-top: 6px; }
.lead-later { width: 100%; }
.benefit-link { margin: -8px 0 18px 20px; font-size: 14px; }
.benefit-link a, .benefit-group .link-arrow { color: var(--cyan-ink); font-weight: 600; text-decoration: none; }
.benefit-group .link-arrow { display: inline-block; margin-top: 14px; font-size: 14px; }

@media (max-width: 760px) {
  .motion-hero .hero h1 { font-size: clamp(38px, 11.5vw, 54px); }
  /* на телефоне виден один раскрытый пункт со счётчиком; остальные открываются по прокрутке */
  .motion-topics { border-top: 0; overflow: visible; flex: none; background: rgba(10,30,44,.88); border: 1px solid rgba(141,213,226,.25); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
  .motion-topic-row { display: none; border: 0; }
  .motion-topic-row.is-active { display: block; background: none; animation: topic-in 380ms cubic-bezier(.23,1,.32,1); }
  @keyframes topic-in { from { opacity: 0; transform: translate3d(0, 10px, 0); } }
  .motion-topic b i { display: inline; }
  .motion-topic { font-size: 15px; font-weight: 600; min-height: 0; }
  .motion-topic-row.is-active .motion-topic { padding-left: 12px; }
  .motion-topic::after { display: none; }
  .gal-head { grid-template-columns: 1fr; }
  .gal-nav { display: none; }
  .gal-track { grid-auto-columns: 78vw; }
  .cmp-scheme { grid-template-columns: 1fr 1fr; }
  .buy-item.is-accent h3 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { .live-btn i::after, .live-dot, .motion-hint.is-on, .motion-topic-row.is-active { animation: none; } }

/* ================= Страница УК ================= */
.uk-page { background: var(--navy-deep); color: #fff; }
.uk-hero { min-height: calc(100svh - var(--header-h)); display: grid; align-items: center; padding-block: clamp(40px, 6vw, 96px); }
.uk-grid { display: grid; gap: clamp(32px, 5vw, 72px); align-items: center; }
@media (min-width: 960px) { .uk-grid { grid-template-columns: 1.05fr .95fr; } }
.uk-copy { display: grid; gap: 22px; }
.uk-copy .label { color: #8dd5e2; }
.uk-copy h1 { font-size: clamp(36px, 5vw, 72px); text-transform: uppercase; max-width: 12ch; }
.uk-copy .lead { color: #d5e3eb; max-width: 46ch; }
.uk-copy .btn-ghost { --fg: #fff; --bd: rgba(255,255,255,.35); }
.uk-copy .note { color: var(--muted-dark); }
.uk-soon { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line-dark); border: 1px solid var(--line-dark); }
.uk-soon li { background: var(--navy-deep); padding: 14px 16px; display: grid; gap: 4px; }
.uk-soon b { font-weight: 600; }
.uk-soon span { font-size: 13px; color: var(--muted-dark); }
.uk-tariff { font-size: 18px; }
.uk-anim { margin: 0; }
.uk-anim svg { width: 100%; max-width: 520px; display: block; margin-inline: auto; overflow: visible; }
.uk-anim figcaption { text-align: center; font: 500 11px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted-dark); margin-top: 8px; }
.uk-house .f { fill: #17384b; stroke: #8dd5e2; stroke-width: 1.2; transform-box: fill-box; transform-origin: center bottom; animation: uk-floor 8s var(--tour-ease, ease) infinite; }
.uk-house .f1 { animation-delay: 0s; } .uk-house .f2 { animation-delay: .6s; } .uk-house .f3 { animation-delay: 1.2s; }
.uk-house .f4 { animation-delay: 1.8s; } .uk-house .f5 { animation-delay: 2.4s; } .uk-house .f6 { animation-delay: 3s; }
@keyframes uk-floor { 0%, 4% { opacity: 0; transform: translateY(-26px); } 12%, 88% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; transform: none; } }
.uk-windows path { fill: #e9c27c; opacity: 0; animation: uk-lights 8s ease infinite; }
@keyframes uk-lights { 0%, 52% { opacity: 0; } 60%, 88% { opacity: .85; } 96%, 100% { opacity: 0; } }
.uk-jib { transform-origin: 318px 74px; animation: uk-swing 8s ease-in-out infinite; }
@keyframes uk-swing { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-3deg); } }
.uk-trolley { animation: uk-trolley 4s ease-in-out infinite; }
@keyframes uk-trolley { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(34px); } }
.uk-cable { transform-origin: 170px 79px; animation: uk-cable 4s ease-in-out infinite; }
.uk-load { animation: uk-load 4s ease-in-out infinite; }
@keyframes uk-cable { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.45); } }
@keyframes uk-load { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(32px); } }
@media (max-width: 760px) { .uk-soon { grid-template-columns: 1fr; } .uk-anim { order: -1; max-width: 320px; margin-inline: auto; } }
@media (prefers-reduced-motion: reduce) {
  .uk-house .f, .uk-windows path, .uk-jib, .uk-trolley, .uk-cable, .uk-load { animation: none; opacity: 1; transform: none; }
}

/* ===== v4.1 ===== */
#motion-card { top: auto; bottom: 104px; width: min(370px, 90vw); max-height: calc(100% - 104px - clamp(28px, 6vh, 64px)); }
#motion-card.is-in { animation: card-in-up 360ms var(--tour-ease); }
@keyframes card-in-up { from { opacity: 0; transform: translate3d(0, 14px, 0); } }
#motion-card.has-scheme { width: min(450px, 92vw); }
.motion-window { top: clamp(28px, 6vh, 64px); bottom: auto; width: clamp(190px, 15vw, 230px); }
.motion-stage[data-chapter="4"] #motion-card { max-height: calc(100% - 104px - clamp(28px, 6vh, 64px) - clamp(190px, 15vw, 230px) * 1.1 - 80px); }

/* Выбор дома */
.house-pick { display: grid; gap: 8px; margin-top: 20px; }
.house-card { display: grid; gap: 4px; justify-items: start; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.house-card span { font-size: 12px; color: var(--muted); }
.house-card b { font: 500 20px/1.2 var(--f-display); text-transform: uppercase; }
.house-card em { font-style: normal; font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.house-card.is-on { border-color: var(--cyan-ink); box-shadow: inset 3px 0 0 var(--cyan-ink); }

@media (max-width: 760px) {
  .motion-hero .hero h1 { font-size: clamp(28px, 9.4vw, 52px); letter-spacing: -.04em; }
  #motion-card { bottom: 0; max-height: 66%; width: auto; }
  #motion-card.has-scheme { width: auto; }
  .motion-window { top: auto; bottom: 150px; }
  /* телефон: один текущий пункт с кратким текстом; «Подробнее» справа */
  .motion-topic { grid-template-columns: 54px 1fr auto; padding: 10px 10px 4px 12px; }
  .motion-topic b i { display: inline; }
  .motion-more { opacity: 1; transform: none; }
  .motion-topic-row.is-active .motion-topic { padding-left: 12px; }
  .motion-topic-lead { display: block; margin: 0; padding: 0 12px 12px 66px; font-size: 13.5px; line-height: 1.45; color: #d5e3eb; }
  .motion-topic-row::before { display: none; }
  .motion-topic-row.is-active { background: none; }
}

/* ===== Полноэкранная галерея ===== */
.lbx { position: fixed; inset: 0; z-index: 90; display: grid; grid-template-rows: auto 1fr auto; color: #fff; }
.lbx[hidden] { display: none; }
.lbx-bg { position: absolute; inset: 0; background: rgba(6,14,21,.94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); opacity: 0; transition: opacity 360ms ease; }
.lbx.is-open .lbx-bg { opacity: 1; }
.lbx-top, .lbx-bottom, .lbx-arrow { opacity: 0; transition: opacity 320ms ease 120ms, transform 420ms var(--tour-ease) 120ms; }
.lbx.is-open .lbx-top, .lbx.is-open .lbx-bottom, .lbx.is-open .lbx-arrow { opacity: 1; }
.lbx-top { position: relative; display: flex; justify-content: space-between; align-items: center; padding: 18px var(--tour-pad); transform: translateY(-8px); }
.lbx.is-open .lbx-top, .lbx.is-open .lbx-bottom { transform: none; }
.lbx-count { font: 500 13px var(--f-mono); letter-spacing: .08em; color: #a9c2cf; }
.lbx-close { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; background: rgba(255,255,255,.04); color: #fff; cursor: pointer; transition: background-color 160ms ease, transform 200ms var(--tour-ease); }
.lbx-close:hover { background: rgba(255,255,255,.12); transform: rotate(90deg); }
.lbx-stage { position: relative; min-height: 0; margin: 0 clamp(16px, 7vw, 120px); display: grid; place-items: center; overflow: hidden; }
.lbx-img { grid-area: 1 / 1; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 2px; box-shadow: 0 30px 80px rgba(0,0,0,.45); opacity: 0; pointer-events: none; cursor: zoom-in; transition: transform 380ms var(--tour-ease); user-select: none; -webkit-user-drag: none; }
.lbx-img.is-cur { opacity: 1; pointer-events: auto; }
.lbx.is-zoom .lbx-img.is-cur { transform: scale(2); cursor: zoom-out; transition: transform 380ms var(--tour-ease), transform-origin 120ms linear; }
.lbx-arrow { position: absolute; top: 50%; z-index: 2; width: 56px; height: 56px; margin-top: -28px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; background: rgba(14,30,44,.55); color: #fff; cursor: pointer; transition: opacity 320ms ease 120ms, background-color 160ms ease, transform 200ms var(--tour-ease); }
.lbx-arrow:hover { background: #8dd5e2; color: var(--navy-deep); }
.lbx-arrow:active { transform: scale(.94); }
.lbx-prev { left: clamp(12px, 2.4vw, 40px); }
.lbx-next { right: clamp(12px, 2.4vw, 40px); }
.lbx.is-zoom .lbx-arrow { opacity: 0; pointer-events: none; }
.lbx-bottom { position: relative; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 24px; padding: 16px var(--tour-pad) 22px; transform: translateY(8px); }
.lbx-cap b { display: block; font-size: 17px; font-weight: 600; }
.lbx-cap span { font-size: 12px; color: #8fa6b3; }
.lbx-thumbs { display: flex; gap: 6px; max-width: min(46vw, 560px); overflow-x: auto; scrollbar-width: none; padding: 2px; }
.lbx-thumbs::-webkit-scrollbar { display: none; }
.lbx-thumbs button { flex: none; width: 56px; height: 42px; padding: 0; border: 0; border-radius: 2px; overflow: hidden; background: none; cursor: pointer; opacity: .45; outline: 1px solid transparent; outline-offset: 2px; transition: opacity 200ms ease, outline-color 200ms ease; }
.lbx-thumbs button:hover { opacity: .8; }
.lbx-thumbs button.is-on { opacity: 1; outline-color: #8dd5e2; }
.lbx-thumbs img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) {
  .lbx-stage { margin: 0; }
  .lbx-img { box-shadow: none; border-radius: 0; }
  .lbx-arrow { display: none; }
  .lbx-bottom { grid-template-columns: 1fr; gap: 12px; }
  .lbx-thumbs { max-width: 100%; }
  .lbx-cta { justify-self: start; }
}
@media (prefers-reduced-motion: reduce) { .lbx-bg, .lbx-top, .lbx-bottom, .lbx-arrow, .lbx-img { transition: none; } }
.motion-scheme-btn { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 16px; padding: 12px 14px; border: 1px solid rgba(141,213,226,.35); border-radius: var(--radius); background: rgba(141,213,226,.06); color: #8dd5e2; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; transition: background-color 160ms ease, border-color 160ms ease; }
.motion-scheme-btn:hover { background: rgba(141,213,226,.16); border-color: #8dd5e2; }
.motion-scheme-btn span::after { content: " →"; }
.scheme-modal .cmp-scheme { margin: 0; padding: 18px; gap: 14px; background: var(--navy-deep); border-radius: var(--radius); }
.scheme-modal .cmp-scheme figcaption { font-size: 14px; }
.scheme-modal .cmp-scheme figcaption b { font-size: 16px; }
.scheme-modal .cmp-scheme small { font-size: 12px; }
@media (max-width: 760px) { .scheme-modal .cmp-scheme { grid-template-columns: 1fr; } }

/* ===== v4.2 ===== */
/* Пункт экскурсии: «Подробнее» — ссылка в раздел «Подробно о доме», справа в строке */
@media (min-width: 761px) { .motion-topic-row { display: grid; grid-template-columns: 1fr auto; align-items: center; } }
.motion-topic-row > .motion-topic { grid-column: 1; }
.motion-topic-row > .motion-topic-lead { grid-column: 1 / -1; }
.motion-topic-row > .motion-more { grid-column: 2; grid-row: 1; margin-right: 4px; text-decoration: none; pointer-events: none; }
.motion-topic-row.is-active > .motion-more { pointer-events: auto; }
.motion-topic-row > .motion-more:hover { background: #8dd5e2; color: var(--navy-deep); }
.motion-card-more { display: block; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(141,213,226,.18); color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; }
.motion-card-more::after { content: " →"; color: #8dd5e2; }
.motion-card-more:hover { color: #8dd5e2; }
@media (max-width: 760px) { .motion-topic-row > .motion-more { pointer-events: auto; align-self: start; margin-top: 8px; } }

/* Условия покупки: шесть равных ячеек, тёмные — по диагонали */
.buy { grid-auto-rows: 1fr; }
.buy-item { align-content: start; padding: 28px; }
.buy-item.is-cta { align-content: space-between; }
.buy-item.is-cta h3 { font-family: var(--f-body); font-weight: 600; font-size: var(--fs-h3); color: #fff; }
@media (max-width: 719px) { .buy { grid-auto-rows: auto; } }

/* Подробно о доме */
.about-house { background: var(--surface-2); }
.about-group { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); padding-block: clamp(40px, 5vw, 72px); border-top: 1px solid var(--line); }
.about-side { align-self: start; position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 14px; }
.about-step { display: flex; gap: 10px; align-items: baseline; font-size: 14px; font-weight: 600; color: var(--cyan-ink); }
.about-step b { font: 500 13px var(--f-mono); }
.about-side h3 { font: 500 clamp(24px, 2.2vw, 34px)/1.12 var(--f-display); letter-spacing: -.02em; text-transform: uppercase; }
.about-side p { color: var(--muted); max-width: 46ch; }
.about-side figure { margin: 6px 0 0; }
.about-side img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); }
.about-side figcaption { margin-top: 8px; font-size: 12px; color: var(--muted); }
.about-tour { justify-self: start; font-size: 14px; font-weight: 600; color: var(--cyan-ink); text-decoration: none; border-bottom: 1px solid currentColor; }
.about-items { display: grid; gap: 4px; }
.about-item { padding: 24px 0 26px; border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 24px); transition: background-color 600ms ease; }
.about-item:last-child { border-bottom: 0; }
.about-item h4 { margin: 0 0 12px; display: flex; gap: 14px; align-items: baseline; font: 600 clamp(18px, 1.4vw, 21px)/1.3 var(--f-body); color: var(--ink); }
.about-item h4 span { font: 500 12px var(--f-mono); color: var(--cyan-ink); }
.about-item ul { margin: 0; padding: 0 0 0 36px; display: grid; gap: 8px; color: #33475a; line-height: 1.6; max-width: 62ch; }
.about-item li::marker { color: var(--cyan-ink); }
.about-scheme { margin: 18px 0 0 36px; }
.about-scheme .cmp-scheme { margin: 0; padding: 16px; background: var(--navy-deep); border-radius: var(--radius); gap: 12px; }
.about-scheme .cmp-scheme figcaption { font-size: 13px; }
.about-link { display: inline-block; margin: 14px 0 0 36px; font-size: 14px; font-weight: 600; color: var(--cyan-ink); text-decoration: none; }
.about-link::after { content: " →"; }
.about-item.is-flash { background: rgba(41,178,201,.1); box-shadow: -12px 0 0 rgba(41,178,201,.1), 12px 0 0 rgba(41,178,201,.1); }
.reveal-about .about-item { opacity: 0; transform: translate3d(0, 22px, 0); transition: opacity 600ms ease var(--d, 0ms), transform 700ms var(--tour-ease) var(--d, 0ms), background-color 600ms ease; }
.reveal-about .about-item.is-in { opacity: 1; transform: none; }
@media (max-width: 899px) {
  .about-group { grid-template-columns: 1fr; gap: 20px; }
  .about-side { position: static; }
  .about-item ul, .about-scheme, .about-link { margin-left: 0; padding-left: 20px; }
  .about-scheme { padding-left: 0; }
  .about-scheme .cmp-scheme { grid-template-columns: 1fr 1fr; }
}

/* Галерея: фото всегда целиком и по центру */
.lbx-stage { position: relative; display: block; }
.lbx-img { position: absolute; inset: 0; margin: auto; width: auto; height: auto; max-width: 100%; max-height: 100%; grid-area: auto; }
.mobile-bar .btn-ghost { --fg: #fff; --bd: rgba(255,255,255,.35); }
@media (max-width: 760px) { .motion-hero .lead { font-size: 18px; line-height: 1.5; } }

/* ===== Телефон: один текущий пункт, компактно, визуал открыт ===== */
@media (max-width: 760px) {
  .motion-topics { max-height: none; overflow: hidden; }
  .motion-topic-row { display: none; grid-template-columns: 1fr auto; align-items: start; }
  .motion-topic-row.is-active { display: grid; animation: row-in 460ms var(--tour-ease); }
  .motion-topic { grid-column: 1; grid-template-columns: 50px 1fr; gap: 6px; padding: 12px 6px 4px 12px; font-size: 15px; line-height: 1.25; }
  .motion-topic-row.is-active .motion-topic { padding-left: 12px; }
  .motion-topic b { padding-top: 2px; }
  .motion-topic-row > .motion-more { grid-column: 2; grid-row: 1; margin: 10px 10px 0 0; padding: 6px 10px; font-size: 12px; opacity: 1; transform: none; pointer-events: auto; }
  .motion-topic-lead { grid-column: 1 / -1; margin: 0 12px 12px 62px; padding: 0; font-size: 13.5px; line-height: 1.45; color: #d5e3eb;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .motion-topic-row.is-active .motion-topic-lead { animation: lead-in 520ms var(--tour-ease) 80ms both; }
}
@keyframes row-in { from { opacity: 0; transform: translate3d(0, 12px, 0); } }
@keyframes lead-in { from { opacity: 0; transform: translate3d(0, 6px, 0); } }
@media (prefers-reduced-motion: reduce) { .motion-topic-row.is-active, .motion-topic-row.is-active .motion-topic-lead { animation: none; } }

/* ===== Аудит 4.4 ===== */
/* Шапка: полное меню только от 1280 px, ниже — бургер, «Стройка онлайн» и «Выбрать квартиру» */
@media (min-width: 1100px) and (max-width: 1279px) {
  .header .nav { display: none; }
  .header .burger { display: grid; }
  .header .header-actions { margin-left: auto; }
}
@media (min-width: 1280px) and (max-width: 1439px) { .header .nav a { padding: 8px 7px; font-size: 13.5px; } .header .wrap { gap: 14px; } }
/* Планшет: шире колонка пунктов, карточка не наезжает на неё, факты главного экрана скрыты */
@media (min-width: 761px) and (max-width: 1023px) {
  .motion-panel { width: min(440px, 46vw); }
  #motion-card { width: min(370px, calc(54vw - 64px)); }
  .motion-hero .facts-wrap { display: none; }
  .motion-hint { display: none; }
}
/* Галерея: отступ между заголовком и текстом */
.gal-head > div { display: grid; gap: 20px; }
/* Ипотека и рассрочка: текст читается */
.buy-item p { font-size: 15px; }
/* Шапка не шире сетки страницы: подпись у логотипа и телефон — только когда меню свёрнуто в бургер (телефон есть в меню, подвале и форме) */
@media (min-width: 1280px) { .header .logo span { display: none; } .header .header-phone { display: none !important; } }
@media (min-width: 1100px) and (max-width: 1279px) { .header .logo span { display: block; } }
/* Телефон: текст главного экрана читается поверх светлого фасада */
@media (max-width: 760px) {
  .motion-shade { background: linear-gradient(180deg, rgba(6,18,28,.86) 0%, rgba(6,18,28,.62) 42%, rgba(6,18,28,.18) 64%, rgba(6,18,28,.3) 78%, rgba(6,18,28,.88) 100%); }
}

/* v5.6: точки экскурсии и «Подробнее» — рыжий акцент (как пометки), пульсация сохранена */
.motion-pin b { color: #10202c; font-weight: 600; background: #f3a845; border-color: rgba(255,240,214,.95); box-shadow: 0 0 0 6px rgba(246,180,70,.18); }
.motion-pin b::after { border-color: rgba(246,180,70,.85); }
.motion-pin[aria-expanded="true"] b, .motion-pin.is-current b { background: #ffbf5e; box-shadow: 0 0 0 9px rgba(246,180,70,.26); }
@media (hover: hover) and (pointer: fine) { .motion-pin:hover b { background: #ffbf5e; box-shadow: 0 0 0 9px rgba(246,180,70,.26); } }
@media (max-width: 760px) { .motion-pin b { background: #f3a845; box-shadow: 0 0 0 6px rgba(246,180,70,.22); } }
.motion-more { border-color: rgba(246,180,70,.6); color: #ffcf86; }
.motion-topic:hover .motion-more, .motion-topic-row > .motion-more:hover { background: #f3a845; color: #10202c; }
.motion-card-more::after { color: #ffcf86; }
.motion-card-more:hover { color: #ffcf86; }
.win-badge circle { fill: #f3a845; stroke: rgba(255,240,214,.95); }
.win-badge text { fill: #10202c; }
.win-badge.is-current circle, .win-badge:hover circle, .win-badge:focus-visible circle { fill: #ffbf5e; stroke: #fff; stroke-width: 2.5; }

/* v5.9: телефон — автопоказ пунктов сцены, полоска времени до следующего пункта */
@keyframes tour-auto { to { transform: scaleX(1); } }
@media (max-width: 760px) {
  .motion-topic-row.is-auto::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: #F3A845; transform-origin: left; transform: scaleX(0); animation: tour-auto 4200ms linear forwards; }
}
@media (prefers-reduced-motion: reduce) { .motion-topic-row.is-auto::after { display: none; } }

/* v6.0: телефон — сцена целиком, как титры в ролике. Заголовок выезжает по словам из-под маски,
   под ним чертёжная линия и все пункты сцены списком, по очереди слева. Нажатие на пункт открывает подробности. */
.motion-copy h2 .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.motion-copy h2 .w > span { display: inline-block; }
@media (max-width: 760px) {
  .motion-panel { top: 16px; bottom: 72px; }
  .motion-stage:not([data-chapter="0"]) .motion-shade { background: linear-gradient(180deg, rgba(6,18,28,.9) 0%, rgba(6,18,28,.6) 26%, rgba(6,18,28,.42) 36%, rgba(6,18,28,.8) 50%, rgba(6,18,28,.93) 64%, rgba(6,18,28,.97) 100%); }
  #motion-points, .motion-window, .motion-hint { display: none !important; }

  /* заголовок сцены */
  .motion-copy .label { display: inline-flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: .14em; }
  .motion-copy .label::before { content: ""; width: 32px; height: 1px; background: #8dd5e2; transform: scaleX(0); transform-origin: left; }
  .motion-copy h2 { font-size: clamp(24px, 7vw, 30px); line-height: 1.08; margin: 12px 0 10px; max-width: none; }
  .motion-copy h2 .w > span { transform: translate3d(0, 112%, 0); }
  .motion-copy .label, .motion-copy p { opacity: 0; transform: translate3d(0, 10px, 0); }
  .motion-copy p { font-size: 14px; line-height: 1.45; color: #d5e3eb; max-width: 36ch; }
  .motion-copy:has(+ .motion-topics .motion-topic-row:nth-child(5)) p { display: none; }

  /* пункты — все сразу */
  .motion-topics { border: 0; overflow: visible; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .motion-topic b i { display: none; }
  .motion-topics::before { content: ""; display: block; height: 1px; margin-bottom: 4px; background: rgba(141,213,226,.4); transform: scaleX(0); transform-origin: left; }
  .motion-topic-row, .motion-topic-row.is-active { display: grid; grid-template-columns: 1fr; animation: none; background: none; border-bottom: 1px solid rgba(141,213,226,.13); opacity: 0; transform: translate3d(-28px, 0, 0); }
  .motion-topic-row:last-child { border-bottom: 0; }
  .motion-topic-row::before, .motion-topic-row.is-auto::after, .motion-topic-row > .motion-more { display: none; }
  .motion-topic, .motion-topic-row.is-active .motion-topic { grid-template-columns: 28px 1fr; gap: 8px; min-height: 0; padding: 8px 0 2px; font-size: 15px; font-weight: 600; line-height: 1.25; color: #fff; }
  .motion-topic b { padding-top: 2px; font-size: 11px; color: #f3a845; }
  .motion-topic span::after { content: "  ›"; color: #f3a845; font-weight: 500; }
  .motion-topic-lead, .motion-topic-row.is-active .motion-topic-lead { display: block; -webkit-line-clamp: unset; overflow: visible; margin: 0 0 8px 36px; padding: 0; font-size: 13px; line-height: 1.4; color: #c4d4de; animation: none; }

  /* выезд, когда сцена встала */
  .motion-panel.is-in .motion-copy .label { opacity: 1; transform: none; transition: opacity 320ms ease, transform 520ms cubic-bezier(.22,1,.36,1); }
  .motion-panel.is-in .motion-copy .label::before { transform: scaleX(1); transition: transform 640ms cubic-bezier(.65,0,.35,1) 80ms; }
  .motion-panel.is-in .motion-copy h2 .w > span { transform: none; transition: transform 680ms cubic-bezier(.22,1,.36,1) calc(120ms + var(--i) * 45ms); }
  .motion-panel.is-in .motion-copy p { opacity: 1; transform: none; transition: opacity 420ms ease 360ms, transform 600ms cubic-bezier(.22,1,.36,1) 360ms; }
  .motion-panel.is-in .motion-topics::before { transform: scaleX(1); transition: transform 760ms cubic-bezier(.65,0,.35,1) 420ms; }
  .motion-panel.is-in .motion-topic-row { opacity: 1; transform: none; transition: opacity 420ms ease calc(520ms + var(--i) * 90ms), transform 640ms cubic-bezier(.22,1,.36,1) calc(520ms + var(--i) * 90ms); }
  .motion-topic-row.is-active .motion-topic b { color: #ffbf5e; }
}
@media (max-width: 760px) {
  .motion-panel.is-tight .motion-copy p { display: none; }
  .motion-panel.is-tight .motion-copy h2 { font-size: clamp(22px, 6.4vw, 27px); margin: 8px 0 4px; }
  .motion-panel.is-tight .motion-topic { padding-top: 6px; }
  .motion-panel.is-tight .motion-topic-lead { line-height: 1.35; }
  .motion-panel.is-tight .motion-topic-lead { font-size: 12.5px; margin-bottom: 6px; }
  .motion-panel.is-compact .motion-topic-lead { display: none; }
  .motion-panel.is-compact .motion-topic { padding: 11px 0; }
}
@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  .motion-copy h2 .w > span, .motion-copy .label, .motion-copy .label::before, .motion-copy p, .motion-topics::before, .motion-topic-row { opacity: 1; transform: none; transition: none; }
}
