/* ==========================================================================
   Шрифты лежат на самом сайте (public/assets/fonts) — без запросов к Google Fonts.
   Onest и IBM Plex Mono, Cormorant Garamond — свободная лицензия SIL OFL.
   unicode-range: браузер скачивает только те файлы, символы из которых есть на странице.
   ========================================================================== */

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/cormorant-garamond-italic-500-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/cormorant-garamond-italic-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-400-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-500-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/assets/fonts/onest-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/assets/fonts/onest-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================================
   City365 — базовый слой: токены, сброс, типографика, анимации появления
   ========================================================================== */

:root {
  /* бумага и чернила */
  --paper: #f3efe8;
  --paper-2: #e9e3d8;
  --paper-3: #fbf9f5;
  --ink: #171512;
  --ink-2: #57524b;
  --ink-3: #8a8378;
  --line: rgba(23, 21, 18, 0.14);
  --line-2: rgba(23, 21, 18, 0.08);

  /* фирменный оранжевый из логотипа */
  --accent: #e7601e;
  --accent-2: #f4915a;
  --accent-ink: #e7601e; /* цвет курсивных слов в заголовках */

  /* ночные секции */
  --night: #141210;
  --night-2: #1e1b18;
  --night-3: #2b2723;
  --on-night: #f0eae0;
  --on-night-2: #a8a196;
  --line-night: rgba(240, 234, 224, 0.14);

  --f-sans: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --f-serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --pad: clamp(16px, 3.4vw, 56px);
  --side: max(var(--pad), calc((100vw - 1680px) / 2 + var(--pad)));
  --gap: clamp(12px, 1.6vw, 24px);
  --r-xl: clamp(22px, 2.6vw, 40px);
  --r-lg: clamp(18px, 1.8vw, 28px);
  --r-md: 16px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.24, 1);
  --header-h: 76px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  /* в паре с таким же правилом у body: всё, что оказалось шире экрана, обрезается и не растягивает
     страницу — иначе на Android закреплённые шапка и кнопка звонка уезжают за правый край */
  overflow-x: clip;
}

html.is-locked {
  overflow: hidden;
}

body {
  margin: 0;
  /* едва заметное зерно — «бумажная» фактура фона */
  background: var(--paper)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .09 0 0 0 0 .08 0 0 0 0 .07 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 1rem;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

h1,
h2,
h3,
h4,
p,
figure,
ul,
ol,
dl,
dd {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

::selection {
  background: var(--accent);
  color: var(--paper-3);
}

.container {
  width: 100%;
  max-width: 1680px;
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* Ссылка «к содержимому» для клавиатуры: спрятана обрезкой, а не вынесена за верхний край —
   закреплённый элемент в зоне строки состояния заставляет Safari 26 рисовать там сплошную
   полосу цвета страницы (см. .header и .dock). */
.skip {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 2000;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper-3);
  clip-path: inset(50%);
  opacity: 0;
  transition: opacity 0.3s;
}

.skip:focus {
  clip-path: none;
  opacity: 1;
}

.ico {
  width: 20px;
  height: 20px;
  flex: none;
}

/* ---------- типографика ---------- */

.h-xl {
  font-size: clamp(2.75rem, 8.05vw, 9rem);
  line-height: 0.94;
  letter-spacing: -0.048em;
  font-weight: 500;
}

.h-l {
  font-size: clamp(2.3rem, 5.9vw, 6.25rem);
  line-height: 0.98;
  letter-spacing: -0.044em;
  font-weight: 500;
}

.h-m {
  font-size: clamp(1.75rem, 3.2vw, 3.25rem);
  line-height: 1.04;
  letter-spacing: -0.036em;
  font-weight: 500;
}

/* курсивная антиква — акцентные слова в заголовках */
h1 em,
h2 em,
h3 em,
.h-m em {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.13em;
  line-height: 0.8;
  letter-spacing: -0.03em;
}

.label {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  line-height: 1.3;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--ink-2);
}

/* ---------- появление при скролле ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
  transition:
    opacity 1s var(--ease-out) var(--d, 0s),
    transform 1.2s var(--ease-out) var(--d, 0s);
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

.js [data-reveal='clip'] {
  opacity: 1;
  transform: none;
  clip-path: inset(14% 7% 14% 7% round var(--r-xl));
  transition: clip-path 1.5s var(--ease-out) var(--d, 0s);
}

.js [data-reveal='clip'].is-in {
  clip-path: inset(0 0 0 0 round var(--r-xl));
}

/* слова заголовка выезжают из-под маски */
.w {
  display: inline-block;
  clip-path: inset(-0.2em -0.14em -0.26em -0.14em);
}

.w > span {
  display: inline-block;
}

.js [data-words] .w > span {
  transform: translate3d(0, 125%, 0) rotate(5deg);
  transform-origin: 0 100%;
  transition: transform 1.2s var(--ease-out);
  transition-delay: calc(var(--wi) * 55ms + var(--d, 0s));
}

.js [data-words].is-in .w > span {
  transform: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(231, 96, 30, 0.65);
  }
  70%,
  100% {
    box-shadow: 0 0 0 10px rgba(231, 96, 30, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}

/* знак белорусского рубля: «Б» с чертой поперёк ножки (см. BYN в ui.mjs) */
.byn {
  position: relative;
  display: inline-block;
  line-height: 1;
}

.byn::after {
  content: '';
  position: absolute;
  left: -0.05em;
  width: 0.4em;
  top: 0.58em;
  height: max(1px, 0.075em);
  background: currentColor;
}

/* ==========================================================================
   UI-компоненты: кнопки, чипы, цена, поля, калькулятор, лента, курсор, заставка
   ========================================================================== */

/* ---------- кнопка ---------- */

.btn {
  --bg: var(--ink);
  --fg: var(--paper-3);
  --ico-bg: var(--accent);
  --ico-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  height: 54px;
  padding: 0 8px 0 24px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: transform 0.5s var(--ease-out);
}

.btn__label {
  position: relative;
  display: block;
  overflow: hidden;
  line-height: 1.35;
}

.btn__label span {
  display: block;
  transition: transform 0.55s var(--ease-out);
}

.btn__label span + span {
  position: absolute;
  left: 0;
  top: 0;
  transform: translateY(125%);
}

.btn__ico {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--ico-bg);
  color: var(--ico-fg);
  transition: transform 0.55s var(--ease-out);
}

.btn__ico .ico {
  width: 18px;
  height: 18px;
}

.btn--accent {
  --bg: var(--accent);
  --fg: #fff;
  --ico-bg: #fff;
  --ico-fg: var(--accent);
}

.btn--light {
  --bg: var(--paper-3);
  --fg: var(--ink);
}

.btn--line {
  --bg: transparent;
  --fg: var(--ink);
  --ico-bg: var(--ink);
  --ico-fg: var(--paper-3);
  box-shadow: inset 0 0 0 1px var(--line);
}

@media (hover: hover) {
  .btn:hover .btn__label span:first-child {
    transform: translateY(-125%);
  }

  .btn:hover .btn__label span + span {
    transform: none;
  }

  .btn:hover .btn__ico {
    transform: scale(1.1);
  }
}

.btn:active {
  transform: scale(0.97);
}

/* ---------- мелочи ---------- */

.chip {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.875rem;
  font-weight: 500;
  transition:
    background 0.3s,
    color 0.3s,
    border-color 0.3s;
}

.chip:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper-3);
}

.round {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  transition:
    background 0.3s,
    color 0.3s,
    opacity 0.3s;
}

.round:hover {
  background: var(--ink);
  color: var(--paper-3);
}

.round:disabled {
  opacity: 0.3;
  pointer-events: none;
}

.more {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  font-size: 0.95rem;
  white-space: nowrap;
}

.more__ico {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper-3);
  transition:
    transform 0.5s var(--ease-out),
    background 0.3s,
    color 0.3s;
}

.more:hover .more__ico {
  transform: translateX(6px);
  background: var(--accent);
  color: #fff;
}

.price {
  display: flex;
  align-items: baseline;
  gap: 0.6em;
  white-space: nowrap;
}

.price b {
  font-size: clamp(2.2rem, 3.6vw, 3.6rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 0.9;
}

.price span {
  font-family: var(--f-mono);
  font-size: clamp(0.85rem, 1vw, 1rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* ---------- поля и калькулятор ---------- */

.calc {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field--hidden {
  display: none;
}

.field__label {
  font-family: var(--f-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.field__input {
  width: 100%;
  min-width: 0;
  height: 52px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  appearance: none;
  -webkit-appearance: none;
  transition:
    border-color 0.25s,
    background 0.25s;
}

.field__input:hover,
.field__input:focus {
  border-color: var(--ink);
  background: var(--paper-3);
  outline: none;
}

select.field__input {
  padding-right: 38px;
  text-overflow: ellipsis;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23171512' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field--stepper {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.stepper {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.stepper button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition:
    background 0.25s,
    color 0.25s;
}

.stepper button:hover {
  background: var(--ink);
  color: var(--paper-3);
}

.stepper .ico {
  width: 16px;
  height: 16px;
}

.stepper output {
  min-width: 30px;
  text-align: center;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.calc__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-top: 4px;
  padding: 16px 0 6px;
  border-top: 1px dashed var(--line);
}

.calc__total span {
  font-size: 0.9rem;
  color: var(--ink-2);
}

.calc__total b {
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
  white-space: nowrap;
}

.calc__call {
  width: 100%;
}

.calc__send {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.calc__send-label {
  width: 100%;
  font-size: 0.82rem;
  color: var(--ink-2);
}

.calc__note {
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--ink-3);
}

/* ---------- горизонтальная лента ---------- */

.rail {
  overflow: hidden;
}

.rail__track {
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  padding: 4px var(--side) 22px;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--side);
  scrollbar-width: none;
  cursor: grab;
  outline-offset: -4px;
}

.rail__track::-webkit-scrollbar {
  display: none;
}

.rail__track.is-drag {
  cursor: grabbing;
  scroll-snap-type: none;
  scroll-behavior: auto;
  user-select: none;
}

.rail__track > * {
  flex: none;
  scroll-snap-align: start;
}

.rail__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 6px;
}

.rail__bar {
  position: relative;
  flex: 1;
  max-width: 420px;
  height: 1px;
  background: var(--line);
}

.rail__bar i {
  position: absolute;
  left: 0;
  top: -1px;
  width: 30%;
  height: 3px;
  border-radius: 3px;
  background: var(--ink);
}

.rail__btns {
  display: flex;
  gap: 8px;
}

/* ---------- курсор-подсказка ---------- */

.cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 900;
  width: 0;
  height: 0;
  pointer-events: none;
}

.cursor span {
  position: absolute;
  left: -46px;
  top: -46px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  transform: scale(0);
  transition: transform 0.45s var(--ease-out);
}

.cursor.is-on span {
  transform: scale(1);
}

@media (hover: none), (pointer: coarse) {
  .cursor {
    display: none;
  }
}

/* ---------- заставка и шторка перехода ---------- */

.loader {
  display: none;
}

.js .loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: var(--night);
  color: var(--on-night);
  clip-path: inset(0);
  transition: clip-path 1s var(--ease-io);
  /* страховка: если скрипт не отработал, заставка уйдёт сама */
  animation: loader-safe 0.01s linear 6s forwards;
}

/* дом со шпилем с площади Ленина (тот же рисунок, что на схеме главной): поднимается,
   пока бежит счётчик, по очереди загораются три окна — три наши квартиры */
.loader__house {
  width: clamp(150px, 16vw, 220px);
  margin-bottom: clamp(4px, 1vw, 14px);
  overflow: visible;
  animation: loader-house 0.9s var(--ease-out) both;
}

.loader__house .house__win.is-lit {
  animation: loader-lit 0.35s ease-out both;
}

.loader__house .house__wing--l .is-lit {
  animation-delay: 0.55s;
}

.loader__house .house__wing--r .is-lit {
  animation-delay: 0.85s;
}

.loader__house .house > .is-lit {
  animation-delay: 1.15s;
}

@keyframes loader-house {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@keyframes loader-lit {
  from {
    fill: rgba(240, 234, 224, 0.2);
  }
}

.loader__word {
  display: flex;
  align-items: baseline;
  font-size: clamp(3.4rem, 12vw, 11rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1;
}

.loader__num {
  margin-left: 0.04em;
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 1.22em;
  line-height: 0.8;
  letter-spacing: -0.02em;
  color: var(--accent);
  font-variant-numeric: lining-nums;
  /* ширина готового «365»: пока счётчик бежит, слово не дёргается */
  width: 1.2em;
  white-space: nowrap;
}

.loader__note {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-night-2);
}

.js .loader.is-done {
  clip-path: inset(0 0 100% 0);
}

/* повторные заходы в рамках сессии — без счётчика, только шторка */
.seen [data-loader-num] {
  display: none;
}

.seen .loader .loader__num::before {
  content: '365';
}

/* переход между страницами: шторка закрывается с той же заставкой (дом, логотип, подпись), новая страница
   открывается с ней же на том же месте — они не прыгают, а уезжают вверх вместе со шторкой */
.seen .loader__house,
.curtain .loader__house {
  animation: none;
}

.seen .loader__house .house__win.is-lit,
.curtain .loader__house .house__win.is-lit {
  animation: none;
}

.seen .loader {
  transition-duration: 0.75s;
}

@media (prefers-reduced-motion: reduce) {
  .loader__house,
  .loader__house .house__win.is-lit {
    animation: none;
  }
}

@keyframes loader-safe {
  to {
    visibility: hidden;
  }
}

.curtain {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--on-night);
  background: var(--night);
  clip-path: inset(100% 0 0 0);
  pointer-events: none;
  transition: clip-path 0.55s var(--ease-io);
}

.curtain.is-on {
  clip-path: inset(0);
}

.curtain > * {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.3s var(--ease-out) 0.18s,
    transform 0.5s var(--ease-out) 0.18s;
}

.curtain.is-on > * {
  opacity: 1;
  transform: none;
}

/* ---------- мобильная кнопка звонка ---------- */

.dock {
  position: fixed;
  /* по краям — те же поля, что у контента (.container), чтобы плашка была ровно по ширине блоков */
  left: var(--pad);
  right: var(--pad);
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: space-between;
  height: 62px;
  padding: 0 9px 0 22px;
  border-radius: 999px;
  background: var(--paper-3);
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--line);
  /* Скрытая плашка не уезжает за нижний край, а гаснет на месте: Safari 26 считает закреплённый
     элемент в зоне своей нижней панели «контентом под панелью» и подкладывает под неё сплошную
     полосу цвета страницы — она висела даже под тёмным подвалом. */
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px) scale(0.96);
  transition:
    opacity 0.45s var(--ease-out),
    transform 0.6s var(--ease-out),
    visibility 0s 0.45s;
}

.dock.is-on {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}

.dock__text {
  display: flex;
  flex-direction: column;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.dock__text small {
  font-family: var(--f-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.dock__ico {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
}

@media (max-width: 760px) {
  .dock {
    display: flex;
  }
}

/* самые узкие телефоны (меньше 345px): даты — друг под другом, большая кнопка — без иконки,
   иначе дата и подпись кнопки обрезаются */
@media (max-width: 344px) {
  .field-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .calc__call {
    justify-content: center;
    padding: 0 16px;
    font-size: 0.9rem;
  }

  .calc__call .btn__ico {
    display: none;
  }
}

/* ==========================================================================
   Шапка: три «таблетки» — логотип, навигация, телефон. Мобильное меню.
   ========================================================================== */

.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px var(--side);
  pointer-events: none;
  transition:
    opacity 0.45s var(--ease-out),
    transform 0.7s var(--ease-out),
    display 0.45s allow-discrete;
}

.header > * {
  pointer-events: auto;
}

/* Скрытая шапка гаснет и полностью убирается из раскладки (display: none), а не уезжает вверх:
   пока у страницы есть закреплённый элемент у верхнего края, Safari 26 на iPhone рисует под строкой
   состояния сплошную полосу цвета страницы вместо прозрачной панели. Смена display анимируется
   через allow-discrete и @starting-style; где это не поддерживается — шапка просто исчезает. */
.header.is-hidden {
  display: none;
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
}

@starting-style {
  .header {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }
}

.logo {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 18px 0 6px;
  border-radius: 999px;
  background: var(--paper-3);
  box-shadow:
    0 0 0 1px var(--line-2),
    0 10px 30px -14px rgba(23, 21, 18, 0.3);
  font-weight: 600;
  font-size: 1.08rem;
  letter-spacing: -0.035em;
}

.logo__mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  transition: transform 0.7s var(--ease-out);
}

.logo:hover .logo__mark {
  transform: rotate(-90deg);
}

.logo__mark .ico {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}

/* «365» — тем же курсивом, что и акцентные слова в заголовках */
.logo__word span {
  margin-left: 0.04em;
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.22em;
  line-height: 0.8;
  letter-spacing: -0.02em;
  font-variant-numeric: lining-nums;
  color: var(--accent-ink);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 48px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(251, 249, 245, 0.74);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  box-shadow:
    0 0 0 1px var(--line-2),
    0 10px 30px -14px rgba(23, 21, 18, 0.3);
}

.nav__link {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 15px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition:
    background 0.3s,
    color 0.3s;
}

.nav__link:hover {
  background: var(--ink);
  color: var(--paper-3);
}

.header__side {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header__phone {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 20px 0 6px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper-3);
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  box-shadow: 0 10px 30px -14px rgba(23, 21, 18, 0.5);
}

.header__phone-ico {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  transition: transform 0.5s var(--ease-out);
}

.header__phone:hover .header__phone-ico {
  transform: rotate(14deg) scale(1.08);
}

.header__phone-ico .ico {
  width: 17px;
  height: 17px;
}

/* ---------- бургер и меню ---------- */

.burger {
  display: none;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 7px 0 18px;
  border-radius: 999px;
  background: var(--paper-3);
  box-shadow: 0 0 0 1px var(--line-2);
  font-weight: 500;
  font-size: 0.92rem;
}

.burger__icon {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ink);
}

.burger__icon i {
  position: absolute;
  left: 10px;
  right: 10px;
  top: calc(50% - 0.75px);
  height: 1.5px;
  background: var(--paper-3);
  transition: transform 0.5s var(--ease-out);
}

.burger__icon i:first-child {
  transform: translateY(-3.5px);
}

.burger__icon i:last-child {
  transform: translateY(3.5px);
}

.burger[aria-expanded='true'] .burger__icon i:first-child {
  transform: rotate(45deg);
}

.burger[aria-expanded='true'] .burger__icon i:last-child {
  transform: rotate(-45deg);
}

.menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: 104px var(--pad) calc(28px + env(safe-area-inset-bottom));
  background: var(--night);
  color: var(--on-night);
  overflow-y: auto;
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition:
    clip-path 0.8s var(--ease-io),
    visibility 0s 0.8s;
}

.menu.is-open {
  clip-path: inset(0);
  visibility: visible;
  transition:
    clip-path 0.8s var(--ease-io),
    visibility 0s;
}

.menu__link {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-night);
  font-size: clamp(2.2rem, 11vw, 4.2rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.05;
  overflow: hidden;
}

.menu__link .label {
  color: var(--on-night-2);
}

.menu__word {
  display: block;
  transform: translateY(110%);
  transition: transform 0.9s var(--ease-out);
  transition-delay: calc(var(--i) * 60ms + 0.25s);
}

.menu.is-open .menu__word {
  transform: none;
}

.menu__phone {
  display: block;
  margin-bottom: 12px;
  font-size: 1.7rem;
  font-weight: 500;
  letter-spacing: -0.035em;
  color: var(--accent-2);
}

.menu__foot .label {
  color: var(--on-night-2);
}

@media (max-width: 980px) {
  .header {
    grid-template-columns: 1fr auto;
  }

  .nav {
    display: none;
  }

  .burger {
    display: inline-flex;
  }
}

@media (max-width: 560px) {
  .header {
    padding-block: 10px;
  }

  .header__phone {
    padding: 0 6px;
  }

  .header__phone-num,
  .burger__label {
    display: none;
  }

  .burger {
    padding: 0 7px;
  }
}

/* ==========================================================================
   Первый экран: крупный заголовок + «фильм» о квартирах.
   При скролле кадр раскрывается на весь экран.
   ========================================================================== */

.hero {
  position: relative;
  padding-top: calc(var(--header-h) + clamp(14px, 2.6vw, 40px));
}

.hero__top {
  position: relative;
  z-index: 3;
  padding-bottom: clamp(20px, 2.4vw, 36px);
}

.hero__meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(14px, 1.7vw, 26px);
}

.hero__title {
  font-size: clamp(2.9rem, 8.1vw, 9.2rem);
  line-height: 0.93;
  letter-spacing: -0.05em;
  font-weight: 500;
}

.hero__title em {
  color: var(--accent-ink);
}

.hero__aside {
  position: absolute;
  right: var(--pad);
  top: calc(clamp(14px, 1.7vw, 26px) + 1.6rem);
  width: min(21vw, 310px);
  display: grid;
  gap: 18px;
  justify-items: start;
}

.hero__aside p {
  font-size: clamp(0.88rem, 1.04vw, 1.04rem);
  line-height: 1.45;
  color: var(--ink-2);
}

.hero__cta {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
}

/* вращающаяся печать на стыке заголовка и кадра */
.badge {
  position: absolute;
  right: calc(var(--pad) + 1.4vw);
  bottom: -62px;
  z-index: 4;
  width: 124px;
  height: 124px;
  border-radius: 50%;
  /* кольцо с текстом — квадрат, при вращении его углы выходят за круг; обрезаем, чтобы они
     не расширяли страницу у правого края экрана */
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  transition: transform 0.7s var(--ease-out);
}

.badge:hover {
  transform: scale(1.08) rotate(-8deg);
}

.badge__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: spin 22s linear infinite;
}

.badge__ring text {
  font-family: var(--f-mono);
  font-size: 9.2px;
  font-weight: 500;
  letter-spacing: 0.1em;
  fill: currentColor;
}

.badge__core {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--accent);
}

/* ---------- закрепление и раскрытие кадра ----------
   Блок с видео всегда размером с экран и сам не меняется — браузеру не нужно на каждом кадре
   пересчитывать раскладку и перерисовывать ролик. «Рамку» рисует clip-path: скрипт раскрывает
   её от карточки со скруглениями до полного экрана, поэтому движение получается плавным. */

.hero__pin {
  position: relative;
  height: calc(100vh + 62vh);
  height: calc(100svh + 62vh);
}

.hero__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
}

.film {
  --b: 0px; /* сколько кадра скрыто снизу на первом экране (ставит скрипт) */
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  clip-path: inset(0 var(--side) var(--b) var(--side) round var(--r-xl));
  background: var(--paper-2);
  /* вертикальный жест листает страницу, горизонтальный — кадры */
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

@media (hover: hover) and (pointer: fine) {
  .film {
    cursor: grab;
  }

  .film.is-grabbing {
    cursor: grabbing;
  }
}

/* слой с роликами чуть выше кадра и сдвинут вверх: пока рамка мала, в ней видна середина видео,
   а при раскрытии он едет вдвое медленнее страницы */
.film__slides {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: calc(100% + 8vh);
  /* кадры вне очереди сдвинуты вбок на 14%: без обрезки страница становится шире экрана,
     и на Android закреплённые шапка и кнопка звонка уезжают за правый край (clip-path этого не лечит) */
  overflow: hidden;
  transform: translate3d(0, calc(var(--b) / -2), 0);
  will-change: transform;
}

.film__slide,
.film__move {
  position: absolute;
  inset: 0;
}

.film__slide {
  margin: 0;
  z-index: 0;
  visibility: hidden;
  clip-path: inset(0 0 0 100%);
}

.film__slide.is-active {
  z-index: 2;
  visibility: visible;
  clip-path: inset(0);
  transition: clip-path 1.35s var(--ease-io);
}

.film__slide.is-prev {
  z-index: 1;
  visibility: visible;
  clip-path: inset(0);
}

.film__move {
  transform: translate3d(14%, 0, 0);
}

.film__slide.is-active .film__move {
  transform: none;
  transition: transform 1.35s var(--ease-io);
}

.film__slide.is-prev .film__move {
  transform: translate3d(-14%, 0, 0);
  transition: transform 1.35s var(--ease-io);
}

/* листание назад: шторка и сдвиг кадров зеркальные */
.film.is-back .film__slide {
  clip-path: inset(0 100% 0 0);
}

.film.is-back .film__slide.is-active,
.film.is-back .film__slide.is-prev {
  clip-path: inset(0);
}

.film.is-back .film__move {
  transform: translate3d(-14%, 0, 0);
}

.film.is-back .film__slide.is-active .film__move {
  transform: none;
}

.film.is-back .film__slide.is-prev .film__move {
  transform: translate3d(14%, 0, 0);
}

.film__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  will-change: transform;
}

/* медленный наезд камеры — фото оживает, как видео */
.film__slide.is-active .film__img,
.film__slide.is-prev .film__img {
  animation: film-in 9s linear both;
}

.film__slide:nth-child(even).is-active .film__img,
.film__slide:nth-child(even).is-prev .film__img {
  animation-name: film-out;
}

.film.is-paused .film__img {
  animation-play-state: paused;
}

/* настоящее видео движется само — наезд ему не нужен */
.film__slide .film__img--video {
  animation: none !important;
  transform: none !important;
}

@keyframes film-in {
  from {
    transform: scale(1.03);
  }
  to {
    transform: scale(1.12) translate3d(-1.2%, 0.6%, 0);
  }
}

@keyframes film-out {
  from {
    transform: scale(1.12) translate3d(1.2%, -0.6%, 0);
  }
  to {
    transform: scale(1.03);
  }
}

/* ---------- интерфейс поверх кадра ---------- */

/* подпись и полоски «прилипают» к низу экрана, пока кадр выше экрана */
.film__ui {
  position: sticky;
  bottom: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 calc(var(--side) + clamp(12px, 1.5vw, 24px)) calc(18px + clamp(12px, 1.5vw, 24px));
  pointer-events: none;
}

.film__ui > * {
  pointer-events: auto;
}

/* лёгкое затемнение под подписью — чтобы белые полоски читались на светлом видео */
.film__ui::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  height: clamp(150px, 26vh, 260px);
  background: linear-gradient(180deg, rgba(20, 18, 16, 0) 0%, rgba(20, 18, 16, 0.48) 100%);
  pointer-events: none;
}

.film__caption {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
  min-width: 0;
  padding: 11px 11px 11px 20px;
  border-radius: 22px;
  background: rgba(251, 249, 245, 0.94);
  color: var(--ink);
}

.film__caption-text {
  display: grid;
  gap: 4px;
  min-width: 0;
  transition:
    opacity 0.32s,
    transform 0.5s var(--ease-out);
}

.film__caption.is-swap .film__caption-text {
  opacity: 0;
  transform: translateY(8px);
}

.film__caption-title {
  font-size: clamp(1rem, 1.4vw, 1.35rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.film__caption-arrow {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--ink);
  color: var(--paper-3);
  transition:
    background 0.3s,
    color 0.3s,
    transform 0.6s var(--ease-out);
}

.film__caption:hover .film__caption-arrow {
  background: var(--accent);
  color: #fff;
  transform: rotate(45deg);
}

.film__caption .label b {
  font-weight: 500;
  color: var(--ink);
}

/* полоски прогресса — как в сторис — и пауза */
.film__ctrl {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(40%, 470px);
}

.film__bars {
  flex: 1;
  display: flex;
  gap: 6px;
}

.film__toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  background: rgba(20, 18, 16, 0.5);
  color: #fff;
  transition: background 0.3s;
}

.film__toggle:hover {
  background: rgba(20, 18, 16, 0.72);
}

.film__toggle .ico {
  width: 18px;
  height: 18px;
}

.film__toggle .ico--play,
.film.is-user-paused .film__toggle .ico--pause {
  display: none;
}

.film.is-user-paused .film__toggle .ico--play {
  display: block;
}

.film__bar {
  position: relative;
  flex: 1;
  height: 34px;
}

.film__bar::before,
.film__bar i {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: calc(50% - 1.5px);
  height: 3px;
  border-radius: 3px;
}

.film__bar::before {
  background: rgba(255, 255, 255, 0.36);
  transition: background 0.3s;
}

.film__bar:hover::before {
  background: rgba(255, 255, 255, 0.6);
}

.film__bar i {
  background: #fff;
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.film__bar.is-done i {
  transform: scaleX(1);
}

.film__bar.is-active i {
  animation: bar 6s linear forwards;
}

.film.is-paused .film__bar.is-active i {
  animation-play-state: paused;
}

@keyframes bar {
  to {
    transform: scaleX(1);
  }
}

/* вступление после заставки */
.js .film {
  opacity: 0;
  translate: 0 60px;
  transition:
    opacity 1.1s var(--ease-out) 0.35s,
    translate 1.4s var(--ease-out) 0.35s;
}

.js.is-ready .film {
  opacity: 1;
  translate: none;
}

.js .badge {
  scale: 0;
  transition:
    scale 0.9s var(--ease-out) 1s,
    transform 0.7s var(--ease-out);
}

.js.is-ready .badge {
  scale: 1;
}

/* ---------- адаптив ---------- */

@media (max-width: 1100px) {
  .hero__aside {
    position: static;
    width: auto;
    max-width: 560px;
    margin-top: clamp(18px, 3vw, 28px);
  }

  .hero__cta {
    display: flex;
  }

  .hero__aside p {
    font-size: 1rem;
  }

  .hero__coords {
    display: none;
  }

  .badge {
    right: calc(var(--pad) + 8px);
    bottom: -48px;
    width: 104px;
    height: 104px;
  }

  .badge__core {
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 760px) {
  .hero__title {
    font-size: clamp(2.75rem, 13.4vw, 5rem);
    line-height: 0.95;
  }

  .hero__title br {
    display: none;
  }

  .hero__cta .btn {
    height: 52px;
  }

  /* «Позвонить» — компактная кнопка без иконки, чтобы обе влезали в ряд */
  [data-hero-call] {
    justify-content: center;
    padding: 0 20px;
  }

  [data-hero-call] .btn__ico {
    display: none;
  }

  /* на телефоне кадр не закрепляется: обычный блок, у которого раскрываются только края */
  .hero__pin {
    height: auto;
  }

  .hero__sticky {
    position: relative;
    height: min(122vw, 74vh);
    height: min(122vw, 74svh);
  }

  .film__slides {
    height: 100%;
    transform: none;
  }

  /* полоски — сверху, как в сторис; подпись — снизу */
  .film__ui {
    display: contents;
  }

  .film::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    z-index: 3;
    height: 96px;
    background: linear-gradient(180deg, rgba(20, 18, 16, 0.42) 0%, rgba(20, 18, 16, 0) 100%);
    pointer-events: none;
  }

  .film__ctrl,
  .film__caption {
    position: absolute;
    left: calc(var(--side) + 12px);
    right: calc(var(--side) + 12px);
    z-index: 4;
  }

  .film__ctrl {
    top: 6px;
    width: auto;
    gap: 8px;
  }

  .film__bars {
    gap: 4px;
  }

  .film__toggle {
    width: 34px;
    height: 34px;
  }

  .film__caption {
    bottom: 12px;
    justify-content: space-between;
  }

  .film__caption-title {
    white-space: normal;
  }

  /* на узких экранах печать встаёт в «карман» справа от 2–3 строк заголовка */
  .badge {
    display: none;
  }

  .badge__core {
    width: 32px;
    height: 32px;
  }

  .badge__core .ico {
    width: 16px;
    height: 16px;
  }
}

@media (max-width: 560px) {
  .badge {
    display: grid;
    top: calc(25.5vw - 13px);
    right: var(--pad);
    bottom: auto;
    width: 86px;
    height: 86px;
  }

  /* кнопки делят строку на двоих; если не помещаются — встают друг под друга, а не вылезают за край */
  .hero__cta .btn {
    flex: 1 1 auto;
  }
}

/* узкие телефоны (360px и меньше): кнопки компактнее, чтобы оставались в одной строке */
@media (max-width: 380px) {
  .hero__cta .btn {
    gap: 10px;
    font-size: 0.9rem;
  }

  .hero__cta .btn:not([data-hero-call]) {
    padding-left: 18px;
  }

  .hero__cta [data-hero-call] {
    padding: 0 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__pin {
    height: auto;
  }

  .hero__sticky {
    position: relative;
    height: var(--h0, 60vh);
  }

  .film {
    clip-path: inset(0 var(--side) 0 var(--side) round var(--r-xl));
  }

  .film__slides {
    height: 100%;
    transform: none;
  }

  .film__ui {
    padding-bottom: clamp(12px, 1.5vw, 24px);
  }
}

/* ==========================================================================
   Секции главной: вступление, квартиры, бегущая строка, сервис, локация,
   отзывы, бронирование
   ========================================================================== */

/* ---------- вступление ---------- */

.intro {
  padding: clamp(80px, 11vw, 190px) 0 clamp(64px, 8vw, 130px);
}

.intro__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
}

.intro__label {
  grid-column: 1 / 3;
  padding-top: 1.1em;
}

.intro__text {
  grid-column: 3 / 13;
  font-size: clamp(1.6rem, 3.6vw, 3.7rem);
  line-height: 1.12;
  letter-spacing: -0.038em;
  font-weight: 400;
}

.intro__text em {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.13em;
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--accent-ink);
}

.pill {
  position: relative;
  top: -0.07em;
  display: inline-block;
  vertical-align: middle;
  width: 1.8em;
  height: 0.9em;
  margin: 0 0.06em;
  border-radius: 999px;
  overflow: hidden;
  background: var(--paper-2);
}

.pill img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* текст «проявляется» по мере скролла */
.js .sw {
  opacity: 0.16;
  transition: opacity 0.5s linear;
}

.js .pill.sw {
  opacity: 0.3;
  transform: scale(0.82);
  transition:
    opacity 0.5s linear,
    transform 0.7s var(--ease-out);
}

.js .sw.is-lit {
  opacity: 1;
  transform: none;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
  margin-top: clamp(56px, 8vw, 130px);
}

.stat {
  display: grid;
  gap: 12px;
  align-content: start;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.stat__num {
  display: flex;
  align-items: baseline;
  gap: 0.12em;
  font-size: clamp(2.7rem, 5.4vw, 5.6rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.stat__num b {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.stat__num small {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--ink-2);
  margin: 0 0.5em;
}

.stat__num small:first-child {
  margin-left: 0;
}

/* знак валюты после цены — крупнее подписей «от»/«до», чтобы читался рядом с цифрой */
.stat__num small.stat__cur {
  font-family: inherit;
  font-size: 0.6em;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink);
  margin-left: 0.12em;
}

.stat__text {
  max-width: 26ch;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--ink-2);
}

/* ---------- квартиры: карточки складываются стопкой ---------- */

.apts {
  padding-bottom: clamp(64px, 8vw, 130px);
}

.apts__head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
  align-items: end;
  margin-bottom: clamp(28px, 4vw, 64px);
}

.apts__head > div {
  grid-column: 1 / 9;
  display: grid;
  gap: 18px;
}

.apts h2 em {
  color: var(--accent-ink);
}

.apts__hint {
  grid-column: 9 / 13;
  padding-bottom: 0.5em;
  font-size: clamp(0.95rem, 1.1vw, 1.08rem);
  line-height: 1.5;
  color: var(--ink-2);
}

.apts__stack {
  display: grid;
  gap: clamp(16px, 2vw, 28px);
}

.apt {
  position: sticky;
  top: calc(var(--header-h) + 8px + var(--i) * 12px);
}

.apt__inner {
  --card: var(--paper-3);
  --fg: var(--ink);
  --fg-2: var(--ink-2);
  --ln: var(--line);
  --dim: 0;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.34fr) minmax(0, 1fr);
  gap: clamp(16px, 2.6vw, 44px);
  min-height: min(74vh, 720px);
  padding: clamp(10px, 1vw, 14px);
  border-radius: var(--r-xl);
  background: var(--card);
  color: var(--fg);
  transform-origin: 50% 0;
  will-change: transform;
  box-shadow:
    inset 0 0 0 1px var(--line-2),
    0 -30px 60px -44px rgba(23, 21, 18, 0.4);
}

/* затемнение карточки, уходящей под следующую */
.apt__inner::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 5;
  border-radius: inherit;
  background: var(--ink);
  opacity: var(--dim);
  pointer-events: none;
}

.apt:nth-child(2) .apt__inner {
  --card: #ebe5da;
}

.apt:nth-child(3) .apt__inner {
  --card: #f4dccb;
}

.apt:nth-child(4) .apt__inner {
  --card: var(--night-2);
  --fg: var(--on-night);
  --fg-2: var(--on-night-2);
  --ln: var(--line-night);
  box-shadow: 0 -30px 60px -44px rgba(23, 21, 18, 0.5);
}

.apt:nth-child(5) .apt__inner {
  --card: #e0d8ca;
}

.apt__media {
  position: relative;
  display: block;
  min-height: clamp(260px, 38vw, 560px);
  border-radius: calc(var(--r-xl) - 9px);
  overflow: hidden;
  isolation: isolate;
  background: var(--paper-2);
}

.apt__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.6s var(--ease-out);
}

.apt__media:hover .apt__img {
  transform: scale(1.05);
}

.apt__second {
  position: absolute;
  right: clamp(10px, 1.3vw, 20px);
  bottom: clamp(10px, 1.3vw, 20px);
  width: clamp(104px, 14vw, 210px);
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  border: 4px solid var(--card);
  box-shadow: 0 22px 40px -18px rgba(0, 0, 0, 0.55);
  transform: rotate(-4deg);
  transition: transform 0.9s var(--ease-out);
}

.apt__media:hover .apt__second {
  transform: rotate(0deg) translateY(-6px);
}

.apt__second img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.apt__tags {
  position: absolute;
  left: clamp(10px, 1.3vw, 20px);
  top: clamp(10px, 1.3vw, 20px);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.apt__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-family: var(--f-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.apt__tag--video {
  padding-left: 11px;
  background: rgba(251, 249, 245, 0.94);
  color: var(--ink);
}

.apt__tag--video .ico {
  width: 13px;
  height: 13px;
  fill: currentColor;
  stroke: none;
}

/* видео-обзор поверх обложки: на десктопе играет при наведении */
.apt__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s var(--ease-out);
}

.apt__media.is-playing .apt__video {
  opacity: 1;
}

.apt__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(10px, 1.4vw, 22px) clamp(10px, 1.8vw, 30px) clamp(8px, 1.1vw, 16px) 0;
}

.apt__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(18px, 3vw, 46px);
}

.apt__top .label,
.apt__specs dt,
.apt .price span {
  color: var(--fg-2);
}

.apt__addr {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.apt__addr .ico {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.apt__title {
  font-size: clamp(1.9rem, 3.5vw, 3.7rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 500;
}

.apt__title em {
  display: block;
  margin-top: 0.06em;
}

.apt__title a {
  display: block;
}

.apt__lead {
  max-width: 44ch;
  margin-top: clamp(12px, 1.5vw, 22px);
  font-size: clamp(0.92rem, 1.05vw, 1.05rem);
  line-height: 1.5;
  color: var(--fg-2);
}

.apt__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: clamp(14px, 1.6vw, 24px);
}

.apt__chips li {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--ln);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  white-space: nowrap;
}

.apt__specs {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: clamp(16px, 2.6vw, 44px);
  margin-top: auto;
  padding-top: clamp(18px, 2vw, 30px);
  border-top: 1px solid var(--ln);
}

.apt__lead + .apt__specs {
  margin-top: auto;
}

.apt__specs dt {
  margin-bottom: 7px;
  font-family: var(--f-mono);
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.apt__specs dd {
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.apt__icons {
  display: flex;
  gap: 8px;
}

.apt__icons .ico {
  width: 22px;
  height: 22px;
}

.apt__foot {
  display: flex;
  flex-wrap: wrap; /* если цена и кнопка не помещаются рядом, кнопка уходит на вторую строку */
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px 16px;
  margin-top: clamp(18px, 2.2vw, 32px);
}

.apt__foot .more {
  margin-left: auto;
}

.apt:nth-child(4) .more__ico {
  background: var(--accent);
  color: #fff;
}

/* ---------- бегущая строка ---------- */

.marquee {
  overflow: hidden;
  padding: clamp(26px, 4.4vw, 70px) 0;
  border-block: 1px solid var(--line);
  white-space: nowrap;
}

.marquee__track {
  display: flex;
  width: max-content;
  will-change: transform;
  animation: marquee 50s linear infinite;
}

.marquee__row {
  display: flex;
  align-items: center;
  flex: none;
}

.marquee__word {
  padding: 0 0.16em;
  font-size: clamp(3rem, 9.2vw, 9.6rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1;
}

.marquee__word.is-outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ink);
}

.marquee__sep {
  width: clamp(36px, 5vw, 84px);
  height: clamp(36px, 5vw, 84px);
  margin: 0 clamp(14px, 2.4vw, 40px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--accent);
  color: #fff;
}

.marquee__sep .ico {
  width: 46%;
  height: 46%;
}

@keyframes marquee {
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

/* ---------- сервис: бенто-сетка ---------- */

.service {
  padding: clamp(80px, 10vw, 170px) 0;
}

.service__head,
.loc__head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
  align-items: end;
  margin-bottom: clamp(28px, 4vw, 64px);
}

.service__head > div,
.loc__head > div {
  grid-column: 1 / 8;
  display: grid;
  gap: 18px;
}

.service__text,
.loc__text {
  grid-column: 8 / 13;
  padding-bottom: 0.5em;
  font-size: clamp(0.98rem, 1.15vw, 1.12rem);
  line-height: 1.5;
  color: var(--ink-2);
}

.service h2 em {
  color: var(--accent-ink);
}

.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: clamp(190px, 17.5vw, 260px);
  gap: var(--gap);
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(18px, 1.8vw, 28px);
  border-radius: var(--r-lg);
  overflow: hidden;
  isolation: isolate;
  background: var(--paper-3);
  box-shadow: inset 0 0 0 1px var(--line-2);
}

.tile__ico {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--paper);
}

.tile__ico .ico {
  width: 22px;
  height: 22px;
}

.tile__body {
  display: grid;
  gap: 6px;
}

.tile__title {
  font-size: clamp(1.1rem, 1.55vw, 1.5rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.tile__text {
  max-width: 36ch;
  font-size: 0.92rem;
  line-height: 1.42;
  color: var(--ink-2);
}

.tile--linen {
  grid-column: 1 / 6;
  grid-row: 1 / 3;
}

.tile--wifi {
  grid-column: 6 / 9;
  grid-row: 1;
}

.tile--tea {
  grid-column: 6 / 9;
  grid-row: 2;
  background: var(--accent);
  box-shadow: none;
}

.tile--kitchen {
  grid-column: 9 / 13;
  grid-row: 1 / 3;
}

.tile--wash {
  grid-column: 1 / 4;
  grid-row: 3;
}

.tile--clean {
  grid-column: 4 / 7;
  grid-row: 3;
  background: var(--paper-2);
}

.tile--docs {
  grid-column: 7 / 11;
  grid-row: 3;
  background: var(--night-2);
  color: var(--on-night);
  box-shadow: none;
}

.tile--parking {
  grid-column: 11 / 13;
  grid-row: 3;
}

.tile--tea .tile__ico {
  background: var(--ink);
  color: var(--paper-3);
}

.tile--tea .tile__text {
  color: rgba(23, 21, 18, 0.78);
}

.tile--docs .tile__ico {
  background: var(--night-3);
  color: var(--accent-2);
}

.tile--docs .tile__text {
  color: var(--on-night-2);
}

.tile--clean .tile__ico {
  background: var(--paper-3);
}

.tile--photo {
  color: #fff;
  box-shadow: none;
}

.tile__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.tile__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.6s var(--ease-out);
}

.tile__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 18, 16, 0.08) 25%, rgba(20, 18, 16, 0.78) 100%);
}

.tile--photo:hover .tile__media img {
  transform: scale(1.05);
}

.tile--photo .tile__ico {
  background: rgba(251, 249, 245, 0.92);
  color: var(--ink);
}

.tile--photo .tile__text {
  color: rgba(255, 255, 255, 0.84);
}

/* ---------- локация: тёмная «комната» с окном ---------- */

.loc {
  margin-inline: clamp(0px, 0.7vw, 12px);
  padding: clamp(72px, 9vw, 150px) 0 clamp(56px, 7vw, 110px);
  border-radius: var(--r-xl);
  background: var(--night);
  color: var(--on-night);
}

.loc .label {
  color: var(--on-night-2);
}

.loc__text {
  color: var(--on-night-2);
}

.loc h2 em {
  color: var(--accent-2);
}

.window {
  position: relative;
  aspect-ratio: 21 / 9;
  border-radius: var(--r-xl);
  overflow: hidden;
  isolation: isolate;
  background: var(--night-2);
}

.window__img {
  position: absolute;
  left: 0;
  top: -14%;
  width: 100%;
  height: 128%;
  object-fit: cover;
  object-position: 50% 58%;
  will-change: transform;
}

/* переплёт окна */
.window__bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 33.333%;
  width: clamp(10px, 1.2vw, 18px);
  background: var(--night);
  transform: translateX(-50%);
}

.window__bar + .window__bar {
  left: 66.666%;
}

.window__cap {
  position: absolute;
  left: clamp(12px, 1.5vw, 24px);
  bottom: clamp(12px, 1.5vw, 24px);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 38px;
  padding: 0 15px;
  border-radius: 999px;
  background: rgba(20, 18, 16, 0.5);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: #fff;
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.window__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.2s infinite;
}

.loc__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
  align-items: center;
  margin-top: clamp(40px, 6vw, 96px);
}

.addr {
  grid-column: 1 / 8;
  container-type: inline-size;
  --ln: var(--line-night);
  --fg-2: var(--on-night-2);
  --hl: var(--accent-2);
}

.addr--light {
  --ln: var(--line);
  --fg-2: var(--ink-2);
  --hl: var(--accent-ink);
}

.addr__item {
  border-top: 1px solid var(--ln);
}

.addr__item:last-child {
  border-bottom: 1px solid var(--ln);
}

.addr__link {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: clamp(12px, 2vw, 30px);
  padding: clamp(18px, 2.3vw, 34px) 0;
  transition: padding 0.6s var(--ease-out);
}

.addr__idx {
  color: var(--fg-2);
}

.addr__title {
  font-size: clamp(1.5rem, 3vw, 3.1rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.05;
  transition: color 0.3s;
}

.addr__meta {
  display: grid;
  gap: 2px;
  text-align: right;
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--fg-2);
}

.addr__meta b {
  font-size: 0.95rem;
  font-weight: 500;
  color: currentColor;
}

.loc .addr__meta b {
  color: var(--on-night);
}

.addr--light .addr__meta b {
  color: var(--ink);
}

.addr__go {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 12px 0 18px;
  border-radius: 999px;
  border: 1px solid var(--ln);
  font-size: 0.86rem;
  font-weight: 500;
  white-space: nowrap;
  transition:
    background 0.3s,
    color 0.3s,
    border-color 0.3s;
}

.addr__go .ico {
  width: 18px;
  height: 18px;
}

@media (hover: hover) {
  .addr__link:hover {
    padding-left: 14px;
  }

  .addr__link:hover .addr__title {
    color: var(--hl);
  }

  .addr__link:hover .addr__go {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
  }
}

/* узкий список: подпись уходит под название */
@container (max-width: 720px) {
  .addr__link {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 8px;
  }

  .addr__idx {
    display: none;
  }

  .addr__meta {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
    text-align: left;
  }

  .addr__go {
    grid-column: 2;
    grid-row: 1 / 3;
  }
}

/* арочные «окна» с видами */
.arches {
  grid-column: 8 / 13;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(8px, 1vw, 16px);
  align-items: end;
  padding-left: clamp(0px, 3.4vw, 56px);
}

.arch {
  display: grid;
  gap: 10px;
}

.arch figcaption {
  text-align: center;
  font-size: 0.62rem;
}

.arch__frame {
  position: relative;
  display: block;
  aspect-ratio: 1 / 2.1;
  border-radius: 999px 999px 14px 14px;
  overflow: hidden;
  isolation: isolate;
  background: var(--night-2);
}

.arch__frame img {
  position: absolute;
  left: 0;
  top: -10%;
  width: 100%;
  height: 120%;
  object-fit: cover;
  will-change: transform;
}

.arch--0 {
  margin-bottom: clamp(16px, 3vw, 48px);
}

.arch--2 {
  margin-bottom: clamp(32px, 6vw, 96px);
}

/* высота блока растёт вместе с текстом; карта после нажатия занимает его целиком */
.map {
  position: relative;
  display: grid;
  min-height: clamp(320px, 34vw, 520px);
  margin-top: clamp(40px, 6vw, 96px);
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--night-2);
}

.map__poster {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: clamp(30px, 4vw, 48px) 24px;
  text-align: center;
  background-image: radial-gradient(circle at 1px 1px, rgba(240, 234, 224, 0.13) 1px, transparent 0);
  background-size: 22px 22px;
}

/* схема: три адреса в реальных пропорциях, на площади — дом со шпилем */
.map__scheme {
  width: min(100%, 560px);
  overflow: visible;
}

.map__route {
  fill: none;
  stroke: var(--on-night-2);
  stroke-width: 1;
  stroke-dasharray: 3 5;
}

.map__point > circle {
  fill: var(--accent);
}

.map__scheme text {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  fill: var(--on-night-2);
}

.map__point text {
  fill: var(--on-night);
}

.house {
  stroke: var(--on-night);
  stroke-width: 0.75;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.house__wall {
  fill: #3b352e;
}

.house__wing--l .house__wall {
  fill: #28241f;
}

.house__wing--r .house__wall {
  fill: #322d27;
}

.house__wall.house__facet--l {
  fill: #221e1a;
}

.house__wall.house__facet--r {
  fill: #574e44;
}

.house__roof {
  fill: #5f8468;
}

.house__roof.house__facet--l {
  fill: #42604b;
}

.house__roof.house__facet--r {
  fill: #7da685;
}

.house__line {
  fill: none;
}

.house__win {
  fill: rgba(240, 234, 224, 0.2);
  stroke: none;
}

.house__win.is-lit {
  fill: var(--accent);
}

.house__clock {
  fill: var(--on-night);
  stroke: none;
}

.house__hands {
  fill: none;
  stroke: var(--night);
}

.house__spire {
  fill: var(--accent);
  stroke: var(--accent);
}

.house__moon {
  stroke-width: 0.3;
}

.map__text {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.map__title {
  max-width: 30ch;
  font-size: clamp(1.2rem, 2.1vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.map__note {
  font-size: clamp(0.95rem, 1.15vw, 1.1rem);
  color: var(--on-night-2);
}

/* своя карта поверх заставки */
.map__canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--night-2);
  animation: map-in 0.8s var(--ease-out) both;
}

@keyframes map-in {
  from {
    opacity: 0;
  }
}

.map__canvas .leaflet-control-zoom {
  margin: 0 16px 16px 0;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--line-night);
}

.map__canvas .leaflet-control-zoom a {
  width: 40px;
  height: 40px;
  line-height: 38px;
  border: 0;
  background: #26221e;
  color: var(--on-night);
  font: 400 20px/38px var(--f-sans);
}

.map__canvas .leaflet-control-zoom a:hover {
  background: var(--accent);
  color: #fff;
}

.map__canvas .leaflet-control-attribution {
  background: rgba(20, 18, 16, 0.7);
  color: var(--on-night-2);
  font: 10px/1.6 var(--f-mono);
}

.map__canvas .leaflet-control-attribution a {
  color: var(--on-night);
}

/* подложка OpenStreetMap светлая — переворачиваем в тёмную, тёплую, приглушённую */
.map__canvas .leaflet-tile-pane {
  filter: invert(1) hue-rotate(180deg) grayscale(0.55) sepia(0.2) brightness(0.82) contrast(0.92);
}

/* метка: оранжевая точка с расходящимся кольцом + плашка с адресом */
.pin-wrap {
  background: none;
  border: 0;
}

.map__canvas a.pin {
  position: absolute;
  left: -9px;
  top: -9px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--on-night);
  text-decoration: none;
  white-space: nowrap;
  animation: pin-drop 0.6s var(--ease-out) var(--d, 0s) both;
}

/* подпись слева от точки: точка остаётся на месте, плашка разворачивается влево */
.map__canvas a.pin--left {
  left: auto;
  right: -9px;
  flex-direction: row-reverse;
}

.map__canvas a.pin--left .pin__label {
  text-align: right;
}

/* подпись над точкой (узкая карта): точка внизу, плашка по центру над ней */
.map__canvas a.pin--top {
  left: 0;
  top: auto;
  bottom: -9px;
  flex-direction: column-reverse;
  gap: 6px;
  translate: -50% 0;
}

.map__canvas a.pin--top .pin__label {
  text-align: center;
}

@keyframes pin-drop {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
}

.pin__dot {
  position: relative;
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(231, 96, 30, 0.28), 0 4px 12px rgba(0, 0, 0, 0.5);
}

.pin__dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--accent);
  animation: pin-pulse 2.4s var(--ease-out) infinite;
}

@keyframes pin-pulse {
  from {
    transform: scale(1);
    opacity: 0.9;
  }
  to {
    transform: scale(3);
    opacity: 0;
  }
}

.pin__label {
  display: grid;
  gap: 2px;
  padding: 8px 14px;
  border-radius: 14px;
  background: rgba(24, 21, 18, 0.92);
  box-shadow: 0 0 0 1px var(--line-night), 0 10px 24px -10px rgba(0, 0, 0, 0.7);
  transition: background 0.3s, box-shadow 0.3s;
}

.pin__label b {
  font: 500 14px/1.2 var(--f-sans);
  letter-spacing: -0.02em;
}

.pin__label small {
  font: 400 10px/1.3 var(--f-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--on-night-2);
}

.pin:hover .pin__label {
  background: var(--accent);
  box-shadow: 0 10px 24px -10px rgba(231, 96, 30, 0.7);
}

.pin:hover .pin__label small {
  color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 600px) {
  .pin__label {
    padding: 6px 10px;
    border-radius: 11px;
  }

  .pin__label b {
    font-size: 12px;
  }

  .pin__label small {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pin,
  .pin__dot::after,
  .map__canvas {
    animation: none;
  }
}

/* ---------- отзывы ---------- */

.reviews {
  padding: clamp(80px, 10vw, 170px) 0 clamp(64px, 8vw, 130px);
}

.reviews__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 28px 32px;
  margin-bottom: clamp(22px, 3vw, 40px);
}

.reviews__title {
  display: grid;
  gap: 18px;
}

.reviews h2 em {
  color: var(--accent-ink);
}

/* оценки гостей: бесконечная лента плашек с кольцом-шкалой из десяти делений */
.awards {
  display: grid;
  gap: 14px;
  margin-bottom: clamp(28px, 4vw, 56px);
}

/* края ленты плавно растворяются в фоне */
.awards__marquee {
  overflow: hidden;
  /* запас под тень и подъём плашки при наведении; отрицательные поля его компенсируют */
  padding: 12px 0 36px;
  margin: -12px 0 -36px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}

.awards__track {
  display: flex;
  width: max-content;
  animation: awards-run var(--awards-speed, 70s) linear infinite;
}

/* остановка, пока курсор или палец на ленте — чтобы спокойно прочитать */
.awards__marquee:hover .awards__track,
.awards__marquee:active .awards__track {
  animation-play-state: paused;
}

@keyframes awards-run {
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

/* отступ справа у группы равен промежутку между плашками — стык двух групп не виден */
.awards__group {
  display: flex;
  gap: 12px;
  padding-right: 12px;
}

.award {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 28px 9px 9px;
  border-radius: 999px;
  background: var(--paper-3);
  box-shadow: inset 0 0 0 1px var(--line-2), 0 10px 24px -18px rgba(40, 24, 12, 0.35);
  white-space: nowrap;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}

.award:hover {
  transform: translateY(-3px);
  box-shadow: inset 0 0 0 1px var(--line-2), 0 16px 30px -18px rgba(40, 24, 12, 0.45);
}

@media (prefers-reduced-motion: reduce) {
  .awards__marquee {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .awards__track {
    animation: none;
  }
}

.award__text {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.award__source {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.award__place {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.awards__note {
  text-wrap: balance; /* если подпись не влезла в строку — две ровные строки, а не одно слово внизу */
  font-family: var(--f-mono);
  font-size: 0.66rem;
  line-height: 1.5;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.rating {
  position: relative;
  width: 66px;
  height: 66px;
  flex: none;
  display: grid;
  place-items: center;
}

.rating svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg); /* шкала начинается сверху */
}

.rating circle {
  fill: none;
  stroke-width: 5;
  stroke-dasharray: 8.4 1.6; /* десять делений: длина окружности принята за 100 */
  stroke-dashoffset: 9.2; /* сдвиг на полпросвета: шкала симметрична относительно верхней точки */
}

.rating__track {
  stroke: var(--line);
}

.rating__fill {
  stroke: var(--accent);
}

.rating circle.rating__mask {
  stroke: #fff;
  stroke-width: 9;
  stroke-dasharray: 100 100;
  stroke-dashoffset: var(--rest);
  transition: stroke-dashoffset 1.8s var(--ease-out) 0.3s;
}

/* до появления блока шкала пустая, затем заполняется */
.js [data-reveal]:not(.is-in) .rating circle.rating__mask {
  stroke-dashoffset: 100;
}

.rating b {
  position: relative;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}

.review {
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: clamp(290px, 33vw, 500px);
  min-height: clamp(320px, 29vw, 430px);
  padding: clamp(22px, 2.4vw, 36px);
  border-radius: var(--r-lg);
  background: var(--paper-3);
  box-shadow: inset 0 0 0 1px var(--line-2);
}

.review--1 {
  background: var(--night-2);
  color: var(--on-night);
  box-shadow: none;
}

.review--2 {
  background: var(--paper-2);
}

.review--3 {
  background: var(--accent);
  box-shadow: none;
}

.review__mark {
  height: 0.42em;
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 5.4rem;
  line-height: 0.75;
  color: var(--accent);
}

.review--3 .review__mark {
  color: var(--ink);
}

.review__text {
  font-size: clamp(1rem, 1.22vw, 1.18rem);
  line-height: 1.45;
  letter-spacing: -0.012em;
}

.review__who {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  line-height: 1.25;
}

.review__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.review--3 .review__avatar {
  background: var(--ink);
  color: var(--paper-3);
}

.review__who b {
  display: block;
  font-weight: 500;
}

.review__who small {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.66;
}

/* ---------- бронирование ---------- */

.booking {
  padding-bottom: clamp(64px, 8vw, 130px);
}

.booking__panel {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.78fr);
  gap: clamp(24px, 4vw, 72px);
  padding: clamp(22px, 4vw, 72px);
  border-radius: var(--r-xl);
  background: var(--accent);
  color: var(--ink);
}

.booking__main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(16px, 2vw, 28px);
}

.booking .label {
  color: rgba(23, 21, 18, 0.72);
}

.booking__title em {
  color: var(--paper-3);
}

.booking__text {
  max-width: 36ch;
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  line-height: 1.45;
  color: rgba(23, 21, 18, 0.82);
}

.booking__phone-wrap {
  margin-top: auto;
  padding-top: clamp(20px, 3vw, 48px);
}

.booking__phone {
  display: inline-block;
  padding-bottom: 0.08em;
  font-size: clamp(1.9rem, 5.3vw, 5.6rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1;
  white-space: nowrap;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  transition: background-size 0.7s var(--ease-out);
}

.booking__phone:hover {
  background-size: 100% 2px;
}

.booking__card {
  align-self: end;
  padding: clamp(18px, 2vw, 30px);
  border-radius: var(--r-lg);
  background: var(--paper-3);
  box-shadow: 0 40px 70px -40px rgba(23, 21, 18, 0.55);
}

.booking__card-title {
  margin-bottom: 16px;
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: -0.03em;
}

/* ---------- адаптив ---------- */

@media (max-width: 980px) {
  .intro__label {
    grid-column: 1 / -1;
    padding-top: 0;
  }

  .intro__text {
    grid-column: 1 / -1;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 32px;
  }

  .apts__head > div,
  .service__head > div,
  .loc__head > div {
    grid-column: 1 / -1;
  }

  .apts__hint,
  .service__text,
  .loc__text {
    grid-column: 1 / -1;
    max-width: 56ch;
    padding-bottom: 0;
  }

  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: auto;
  }

  .bento .tile {
    grid-column: auto;
    grid-row: auto;
    min-height: 190px;
  }

  .bento .tile--photo {
    grid-column: 1 / -1;
    min-height: clamp(260px, 56vw, 420px);
  }

  .loc__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(36px, 6vw, 56px);
  }

  .addr,
  .arches {
    grid-column: 1 / -1;
    padding-left: 0;
  }

  .arches {
    max-width: 520px;
    margin-inline: auto;
    width: 100%;
  }

  .booking__panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .booking__phone-wrap {
    margin-top: 0;
    padding-top: 0;
  }
}

@media (max-width: 860px) {
  .apt {
    position: relative;
    top: auto;
  }

  .apt__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    min-height: 0;
  }

  .apt__media {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  .apt__body {
    padding: 18px 10px 10px;
  }

  .apt__specs {
    margin-top: 22px;
  }
}

@media (max-width: 760px) {
  .window {
    aspect-ratio: 4 / 3;
  }

  .window__bar {
    left: 50%;
  }

  .window__bar + .window__bar {
    display: none;
  }

  .addr__go {
    width: 46px;
    padding: 0;
    justify-content: center;
    font-size: 0;
    gap: 0;
  }

  .review {
    width: min(84vw, 380px);
  }

  /* на телефоне плашки компактнее, лента едет чуть быстрее */
  .awards {
    --awards-speed: 55s;
  }

  .award {
    gap: 10px;
    padding: 7px 20px 7px 7px;
  }

  .award__place {
    font-size: 0.9rem;
  }

  .rating {
    width: 52px;
    height: 52px;
  }

  .rating b {
    font-size: 1rem;
  }

  .rail__bar {
    max-width: none;
  }
}

@media (max-width: 480px) {
  .stat__text {
    font-size: 0.86rem;
  }

  .apt__specs {
    grid-template-columns: auto auto;
  }

  .apt__specs > div:last-child {
    display: none;
  }

  .tile {
    padding: 16px;
  }

  .tile__text {
    font-size: 0.85rem;
  }
}

/* узкие телефоны (360px и меньше): цена и «Подробнее» остаются в одной строке */
@media (max-width: 380px) {
  .apt__foot {
    gap: 12px 10px;
  }

  .apt .price b {
    font-size: 2rem;
  }

  .apt .price span {
    letter-spacing: 0.02em;
  }

  .apt .more {
    gap: 9px;
    font-size: 0.88rem;
  }

  .apt .more__ico {
    width: 44px;
    height: 44px;
  }
}

/* самые узкие телефоны (меньше 345px): у оранжевого блока и формы меньше поля, форме нужна ширина */
@media (max-width: 344px) {
  .booking__panel {
    padding: 22px 12px;
  }

  .booking__card {
    padding: 16px 14px;
  }
}

/* ==========================================================================
   Страница квартиры, лайтбокс, внутренние страницы (о нас, контакты, 404)
   ========================================================================== */

.apage {
  padding-top: calc(var(--header-h) + clamp(14px, 2.2vw, 34px));
}

.ahero__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: clamp(20px, 2.8vw, 44px);
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.9rem;
  font-weight: 500;
  transition:
    background 0.3s,
    color 0.3s,
    border-color 0.3s;
}

.back .ico {
  width: 18px;
  height: 18px;
  transition: transform 0.5s var(--ease-out);
}

.back:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper-3);
}

.back:hover .ico {
  transform: translateX(-3px);
}

.ahero__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--gap);
  align-items: end;
  margin-bottom: clamp(22px, 2.8vw, 44px);
}

.ahero__titles {
  display: grid;
  gap: clamp(12px, 1.4vw, 20px);
  min-width: 0;
}

.ahero__title em {
  display: block;
  color: var(--accent-ink);
}

.ahero__meta {
  display: grid;
  gap: 16px;
  justify-items: end;
  padding-bottom: 0.6em;
}

.ahero__addr {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.ahero__addr .ico {
  color: var(--accent);
}

.price--l b {
  font-size: clamp(2.6rem, 4.6vw, 4.6rem);
}

.price--l span {
  font-size: clamp(0.95rem, 1.2vw, 1.15rem);
}

/* ---------- мозаика из пяти фото ---------- */

.mosaic {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: clamp(6px, 0.6vw, 10px);
  height: clamp(340px, 46vw, 700px);
  border-radius: var(--r-xl);
  overflow: hidden;
}

/* с видео главная плитка шире — горизонтальный ролик почти не обрезается */
.mosaic--video {
  grid-template-columns: 3fr 1fr 1fr;
  height: clamp(320px, 40vw, 610px);
}

.mosaic__item {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--paper-2);
  cursor: zoom-in;
}

.mosaic__item--main {
  grid-row: 1 / 3;
}

.mosaic__item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.4s var(--ease-out);
}

.mosaic__item:hover img {
  transform: scale(1.045);
}

.mosaic__item--video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mosaic__play {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 16px 0 14px;
  border-radius: 999px;
  background: rgba(20, 18, 16, 0.55);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.3s;
}

.mosaic__item--video:hover .mosaic__play {
  background: var(--accent);
  color: #fff;
}

.mosaic__play .ico {
  width: 14px;
  height: 14px;
  fill: currentColor;
  stroke: none;
}

.mosaic__more {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px 0 12px;
  border-radius: 999px;
  background: rgba(251, 249, 245, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 500;
}

.mosaic__more .ico {
  width: 18px;
  height: 18px;
}

/* ---------- описание + карточка бронирования ---------- */

.abody {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
  gap: clamp(28px, 6.5vw, 120px);
  align-items: start;
  padding-top: clamp(40px, 6vw, 100px);
  padding-bottom: clamp(56px, 7vw, 120px);
}

.abody__lead {
  max-width: 28ch;
  font-size: clamp(1.4rem, 2.5vw, 2.4rem);
  line-height: 1.16;
  letter-spacing: -0.035em;
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
  margin-top: clamp(28px, 4vw, 60px);
}

.facts li {
  display: grid;
  gap: 12px;
  align-content: start;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.facts .label {
  font-size: 0.85rem;
}

.facts b {
  font-size: clamp(1.5rem, 2.5vw, 2.4rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1;
  white-space: nowrap;
}

.facts small {
  font-family: var(--f-mono);
  font-size: max(0.95rem, 0.55em);
  letter-spacing: 0.06em;
  font-weight: 400;
  color: var(--ink-2);
}

.block {
  margin-top: clamp(40px, 5vw, 84px);
}

.block__title {
  margin-bottom: clamp(16px, 1.8vw, 26px);
  font-size: clamp(1.3rem, 1.9vw, 1.8rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.prose {
  display: grid;
  gap: 1em;
  max-width: 62ch;
  font-size: clamp(1rem, 1.15vw, 1.1rem);
  line-height: 1.6;
  color: var(--ink-2);
}

.beds {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}

.beds__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px 11px 11px;
  border-radius: 18px;
  background: var(--paper-3);
  box-shadow: inset 0 0 0 1px var(--line-2);
}

.beds__ico {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--paper);
}

.beds__text {
  display: grid;
  line-height: 1.25;
}

.beds__text b {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.beds__text small {
  font-size: 0.8rem;
  color: var(--ink-2);
}

.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--gap);
}

.features--wide {
  grid-template-columns: minmax(0, 1fr);
}

.features li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.98rem;
  line-height: 1.3;
}

.features .ico {
  color: var(--accent);
}

.place {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 22px 14px 14px;
  border-radius: var(--r-lg);
  background: var(--night-2);
  color: var(--on-night);
  transition: background 0.3s;
}

.place:hover {
  background: var(--night);
}

.place__ico {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
}

.place__text {
  display: grid;
  line-height: 1.3;
}

.place__text b {
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.025em;
}

.place__text small {
  font-size: 0.84rem;
  color: var(--on-night-2);
}

.place__go {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 500;
}

.place__go .ico {
  width: 18px;
  height: 18px;
  color: var(--accent-2);
}

.abody__side {
  position: sticky;
  top: calc(var(--header-h) + 12px);
}

.bcard {
  padding: clamp(18px, 1.8vw, 26px);
  border-radius: var(--r-lg);
  background: var(--paper-3);
  box-shadow:
    inset 0 0 0 1px var(--line-2),
    0 50px 80px -56px rgba(23, 21, 18, 0.45);
}

.bcard__head {
  display: flex;
  flex-wrap: wrap; /* на самых узких экранах метка уходит под цену, а не вылезает за край */
  justify-content: space-between;
  align-items: center;
  gap: 10px 12px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.bcard__tag {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-family: var(--f-mono);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------- лента всех фото ---------- */

.strip {
  padding-top: clamp(8px, 1vw, 16px);
}

.strip__head,
.others__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px 16px;
  margin-bottom: clamp(18px, 2.4vw, 34px);
}

.strip__head em,
.others__head em {
  color: var(--accent-ink);
}

.strip__head sup {
  margin-left: 0.2em;
  font-family: var(--f-mono);
  font-size: 0.3em;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  vertical-align: super;
}

.rail--photos .rail__track {
  gap: clamp(8px, 0.9vw, 14px);
}

.shot {
  height: clamp(220px, 29vw, 430px);
  aspect-ratio: 4 / 3;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--paper-2);
  cursor: zoom-in;
}

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  transition: transform 1s var(--ease-out);
}

.shot:hover img {
  transform: scale(1.04);
}

/* ---------- другие квартиры ---------- */

.others {
  padding: 0 0 clamp(64px, 8vw, 130px);
}

.others__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
}

.mini {
  display: grid;
  gap: 14px;
  align-content: start;
}

.mini__media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-lg);
  overflow: hidden;
  isolation: isolate;
  background: var(--paper-2);
}

.mini__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.4s var(--ease-out);
}

.mini:hover .mini__media img {
  transform: scale(1.06);
}

.mini__body {
  display: grid;
  gap: 7px;
}

.mini__title {
  font-size: clamp(1.1rem, 1.5vw, 1.4rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.mini__title em {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 1.12em;
  letter-spacing: -0.02em;
  color: var(--accent-ink);
}

.mini__price {
  font-size: 0.9rem;
  color: var(--ink-2);
}

/* ---------- лайтбокс ---------- */

.lb {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: rgba(14, 12, 10, 0.97);
  color: var(--on-night);
  outline: none;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.4s,
    visibility 0s 0.4s;
}

.lb.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s;
}

.lb__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px var(--pad);
}

.lb__count {
  font-family: var(--f-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.lb__close,
.lb__arrow {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid var(--line-night);
  display: grid;
  place-items: center;
  background: rgba(14, 12, 10, 0.5);
  transition:
    background 0.3s,
    color 0.3s;
}

.lb__close:hover,
.lb__arrow:hover {
  background: var(--paper-3);
  color: var(--ink);
}

.lb__stage {
  position: relative;
  min-height: 0;
  touch-action: pan-y;
}

.lb__img {
  position: absolute;
  inset: 0;
  margin: auto;
  max-width: calc(100% - clamp(24px, 14vw, 220px));
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 12px;
  transition:
    opacity 0.35s,
    transform 0.6s var(--ease-out);
}

.lb__img.is-loading {
  opacity: 0;
  transform: scale(0.97);
}

.lb__video {
  position: absolute;
  inset: 0;
  margin: auto;
  width: calc(100% - clamp(24px, 14vw, 220px));
  height: 100%;
  object-fit: contain;
}

.lb__arrow {
  position: absolute;
  top: calc(50% - 25px);
  z-index: 2;
}

.lb__arrow--prev {
  left: var(--pad);
}

.lb__arrow--next {
  right: var(--pad);
}

.lb__thumbs {
  display: flex;
  gap: 6px;
  padding: 14px var(--pad) calc(14px + env(safe-area-inset-bottom));
  overflow-x: auto;
  scrollbar-width: none;
}

.lb__thumbs::-webkit-scrollbar {
  display: none;
}

.lb__thumb {
  flex: none;
  width: 76px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  opacity: 0.38;
  transition:
    opacity 0.3s,
    box-shadow 0.3s;
}

.lb__thumb:first-child {
  margin-left: auto;
}

.lb__thumb:last-child {
  margin-right: auto;
}

.lb__thumb:hover {
  opacity: 0.8;
}

.lb__thumb.is-active {
  opacity: 1;
  box-shadow: 0 0 0 2px var(--accent);
}

/* превью видео — с треугольником «играть» */
.lb__thumb--video {
  position: relative;
}

.lb__thumb--video::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent #fff;
  filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.7));
}

.lb__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- внутренние страницы ---------- */

.phero {
  display: grid;
  gap: clamp(16px, 2vw, 30px);
  justify-items: start;
  padding-top: calc(var(--header-h) + clamp(40px, 7vw, 120px));
  padding-bottom: clamp(36px, 5vw, 84px);
}

.phero h1 em {
  color: var(--accent-ink);
}

.phero--center {
  min-height: 86vh;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.phero__text {
  font-size: 1.15rem;
  color: var(--ink-2);
}

.phero__phone {
  font-size: clamp(2rem, 6vw, 6rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1;
  white-space: nowrap;
}

.about {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
  align-items: start;
  padding-bottom: clamp(40px, 5vw, 80px);
}

.about__media {
  position: sticky;
  top: calc(var(--header-h) + 12px);
  grid-column: 1 / 6;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-xl);
  overflow: hidden;
  isolation: isolate;
  background: var(--paper-2);
}

.about__media img {
  position: absolute;
  left: 0;
  top: -10%;
  width: 100%;
  height: 120%;
  object-fit: cover;
}

.about__text {
  grid-column: 7 / 13;
  display: grid;
  gap: clamp(20px, 2.4vw, 36px);
  justify-items: start;
}

.about__text > * {
  width: 100%;
}

.about__lead {
  font-size: clamp(1.4rem, 2.5vw, 2.4rem);
  line-height: 1.16;
  letter-spacing: -0.035em;
}

.about .block__title {
  margin: clamp(8px, 1vw, 16px) 0 0;
}

.contacts {
  padding-bottom: clamp(56px, 7vw, 110px);
}

.contacts .addr {
  grid-column: auto;
}

/* ---------- адаптив ---------- */

@media (max-width: 980px) {
  .ahero__head {
    grid-template-columns: minmax(0, 1fr);
  }

  .ahero__meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    padding-bottom: 0;
  }

  .abody {
    grid-template-columns: minmax(0, 1fr);
  }

  .abody__side {
    position: static;
  }

  .others__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: clamp(24px, 4vw, 40px);
  }

  .about__media {
    position: relative;
    top: auto;
    grid-column: 1 / -1;
    aspect-ratio: 4 / 3;
  }

  .about__text {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .mosaic {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: auto;
    height: auto;
  }

  .mosaic__item {
    aspect-ratio: 1;
  }

  .mosaic__item--main {
    grid-column: 1 / -1;
    grid-row: auto;
    aspect-ratio: 4 / 3;
  }

  .mosaic__more {
    inset: 0;
    justify-content: center;
    height: auto;
    padding: 0;
    border-radius: 0;
    background: rgba(20, 18, 16, 0.55);
    color: #fff;
    font-size: 0;
  }

  .mosaic__more .ico {
    width: 24px;
    height: 24px;
  }

  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 24px;
  }

  /* на телефоне список «В квартире» — компактные метки в несколько рядов, а не длинный столбец */
  .features {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .features li {
    gap: 6px;
    padding: 7px 13px 7px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.86rem;
    line-height: 1.25;
  }

  .features .ico {
    width: 16px;
    height: 16px;
  }

  /* длинные фразы (страница «О нас») остаются списком, но строки плотнее */
  .features--wide {
    display: grid;
    gap: 0;
  }

  .features--wide li {
    gap: 10px;
    padding: 9px 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    font-size: 0.95rem;
  }

  .place {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .place__go {
    grid-column: 1 / -1;
    padding-left: 70px;
  }

  .lb__arrow {
    display: none;
  }

  .lb__img {
    max-width: 100%;
    border-radius: 0;
  }

  .lb__video {
    width: 100%;
  }

  /* ролик горизонтальный — на телефоне показываем его без обрезки */
  .mosaic__item--video {
    aspect-ratio: 16 / 9;
  }
}

/* самые узкие телефоны (меньше 345px): ссылка «Все квартиры» уходит под заголовок */
@media (max-width: 344px) {
  .others__head {
    flex-wrap: wrap;
  }
}

/* ==========================================================================
   Подвал с гигантским логотипом
   ========================================================================== */

.footer {
  padding-top: clamp(56px, 7vw, 110px);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  background: var(--night);
  color: var(--on-night);
  overflow: hidden;
}

.footer .label {
  color: var(--on-night-2);
}

.footer__top {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
}

.footer__lead {
  grid-column: 1 / 6;
  display: grid;
  gap: 28px;
  justify-items: start;
  align-content: start;
}

.footer__lead em {
  color: var(--accent-2);
}

.footer__cols {
  grid-column: 7 / 13;
  display: grid;
  grid-template-columns: 1.35fr 0.8fr;
  gap: var(--gap);
}

.footer__col {
  display: grid;
  gap: 18px;
  align-content: start;
}

.footer__col ul {
  display: grid;
  gap: 10px;
  font-size: 0.95rem;
  line-height: 1.35;
}

.footer__col li {
  color: var(--on-night-2);
}

.footer__col a {
  color: var(--on-night);
  transition: color 0.3s;
}

.footer__col a span {
  color: var(--on-night-2);
  white-space: nowrap;
}

.footer__col a:hover {
  color: var(--accent-2);
}

.footer__word {
  margin-top: clamp(40px, 6vw, 96px);
  padding-inline: var(--pad);
  font-size: 23vw;
  font-weight: 600;
  letter-spacing: -0.065em;
  line-height: 0.78;
  white-space: nowrap;
  user-select: none;
  /* курсивная «365» выступает вверх за строку и перекрывала ссылки над ней — клики пропускаем насквозь */
  pointer-events: none;
  padding-bottom: 0.17em;
}

/* inline: фон-градиент покрывает буквы целиком, включая хвост «y» */
.footer__word span {
  background: linear-gradient(180deg, var(--on-night) 20%, rgba(240, 234, 224, 0.12) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* курсивная «5» выступает за край строки — иначе фон её обрежет */
  padding-right: 0.06em;
}

.footer__word i {
  margin-left: 0.04em;
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.22em;
  line-height: 0.8;
  letter-spacing: -0.02em;
  font-variant-numeric: lining-nums;
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: clamp(18px, 2.2vw, 34px);
  padding-block: 22px calc(22px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line-night);
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-night-2);
}

.footer__bottom a {
  transition: color 0.3s;
}

.footer__bottom a:hover {
  color: var(--accent-2);
}

@media (max-width: 980px) {
  .footer__lead,
  .footer__cols {
    grid-column: 1 / -1;
  }

  .footer__cols {
    margin-top: clamp(28px, 5vw, 48px);
  }
}

@media (max-width: 760px) {
  .footer__cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 32px;
  }

  /* место под мобильную кнопку звонка */
  .footer__bottom {
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
  }
}
