/* ============================================================
   Скин «Стекло и сталь» — mosfilm-center.ru
   Слой 2 из трёх: канон (main.css) → скин (токены) → семья (family-dossier.css).
   Family-agnostic: только палитра, шрифты, радиусы и перекрытия хардкодов канона.

   Палитра выведена из материала объекта: стеклянный фасад с синим тонированием,
   алюминий, светлый камень (класс A, 2008).
   Контраст (WCAG AA, посчитан contrast.mjs):
     16212C : F2F5F8 = 14.90     FFFFFF : 2B5177 =  8.25
     55677A : FFFFFF =  5.82     A9B8C7 : 16212C =  8.05
     FFFFFF : 16212C = 16.30     2B5177 : FFFFFF =  8.25
   z-index скина: 1 — скрим hero, 2 — контент hero. Выше не поднимаемся,
   шапка и оверлеи живут на шкале канона.
   ============================================================ */

/* ---------- Шрифты (self-hosted, кириллица + латиница) ---------- */

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/Manrope/manrope-cyrillic-600-normal.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/Manrope/manrope-latin-600-normal.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: 'Manrope';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/assets/fonts/Manrope/manrope-cyrillic-800-normal.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/assets/fonts/Manrope/manrope-latin-800-normal.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: 'Golos Text';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/GolosText/golos-text-cyrillic-400-normal.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/GolosText/golos-text-latin-400-normal.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: 'Golos Text';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/GolosText/golos-text-cyrillic-500-normal.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/GolosText/golos-text-latin-500-normal.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: 'Golos Text';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/GolosText/golos-text-cyrillic-700-normal.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/GolosText/golos-text-latin-700-normal.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;
}

/* ---------- Токены ---------- */

:root {
  /* Переопределение канона */
  --color-primary-text: #16212C;
  --color-secondary-text: #55677A;
  --color-secondary: #2B5177;
  --color-grey: #DDE3EA;
  --color-light: #F2F5F8;
  --color-grey-bg: #F2F5F8;
  --shadow-color: rgb(22 33 44 / 10%);
  --border-radius: 6px;
  --border-radius-min: 4px;
  --border-radius-arrow: 4px;
  --font-family: 'Golos Text', 'Segoe UI', Arial, sans-serif;

  /* Собственные токены скина */
  --sk-ink: #16212C;
  --sk-ink-soft: #1F2E3D;
  --sk-steel: #2B5177;
  --sk-steel-deep: #1F3E5C;
  --sk-slate: #55677A;
  --sk-mist: #F2F5F8;
  --sk-line: #DDE3EA;
  --sk-line-dark: rgb(255 255 255 / 14%);
  --sk-on-dark: #A9B8C7;
  --sk-white: #FFFFFF;

  --sk-font-display: 'Manrope', 'Segoe UI', Arial, sans-serif;

  /* Наложения и тонировки (алфа-значения — токенами, чтобы семья не держала hex) */
  --sk-scrim-strong: rgb(22 33 44 / 95%);
  --sk-scrim-soft: rgb(22 33 44 / 45%);
  --sk-scrim-mobile: rgb(22 33 44 / 88%);
  --sk-tint: rgb(43 81 119 / 9%);
  --sk-hairline-dark: rgb(255 255 255 / 16%);
  --sk-ghost-border: rgb(255 255 255 / 45%);
  --sk-ghost-hover: rgb(255 255 255 / 10%);

  --sk-step: 8px;
  --sk-section-y: 48px;
}

@media (min-width: 768px) {
  :root { --sk-section-y: 60px; }
}

/* ---------- База ---------- */

body {
  font-family: var(--font-family);
  color: var(--sk-ink);
  background: var(--sk-white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .title-color, .title-large {
  font-family: var(--sk-font-display);
  text-wrap: balance;
}

p, li, dd, dt, label, input, textarea, td, th {
  line-height: 1.55;
}

a { color: var(--sk-steel); }

/* Фокус: канон гасит обводку, возвращаем видимый фокус только с клавиатуры */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--sk-steel);
  outline-offset: 2px;
}

/* ---------- Перекрытия хардкодов канона ---------- */

/* Табы «Аренда / Продажа»: канон красит их в бирюзовый #7c9796 мимо токенов */
.js-office-btn { color: var(--sk-steel); }
.js-office-btn.is-active { color: var(--color-primary-text); }
.js-office-btn.disabled { color: var(--sk-slate); }
.office-deal-nav__sep { color: var(--sk-slate); }

/* Гистограмма ставок: столбцы канона — тот же хардкод */
.histogram .stand { background: var(--sk-steel); }
.histogram .count_label {
  border-color: var(--sk-line);
  border-radius: var(--border-radius-min);
  color: var(--sk-ink);
}

/* Слайдер лотов: карточка-ссылка не должна выглядеть ссылкой */
.office-card-link { color: inherit; text-decoration: none; }

#offices-table {
  margin-bottom: 42px;
}

/* Согласие на обработку ПД */
.form-consent {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.form .form-consent__input {
  flex: 0 0 auto;
  width: 1.125rem;
  height: 1.125rem;
  min-width: 1.125rem;
  min-height: 1.125rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  accent-color: var(--sk-steel);
  cursor: pointer;
  -webkit-appearance: checkbox;
  appearance: checkbox;
}

.form-consent__label {
  margin: 0;
  line-height: 1.45;
  flex: 1;
  text-align: left;
  display: block;
}

.form-consent .form-consent__label.form-policy {
  margin-top: 0;
  text-align: left;
}

.form-consent .form-consent__label a {
  display: inline;
  white-space: nowrap;
}

.form-consent.input-error .form-consent__label {
  color: #c0392b;
}

@media (max-width: 767.98px) {
  .form-consent .form-consent__label.form-policy {
    text-align: left;
  }
}

@media (min-width: 768px) {
  .form .form-consent__input {
    width: 1.125rem;
    height: 1.125rem;
    min-width: 1.125rem;
    min-height: 1.125rem;
    padding: 0;
  }
}

@media (min-width: 991px) {
  .form .form-consent__input {
    width: 1.125rem;
    height: 1.125rem;
    min-width: 1.125rem;
    min-height: 1.125rem;
    padding: 0;
  }
}

/* Слайдер фото: канон ставит contain — фото уезжает в letterbox */
.office-slider img {
  -o-object-fit: cover;
  object-fit: cover;
}

/* Радиус-система: 6px карточки и кнопки, 4px мелочь. Канон местами хардкодит 16px */
.card, .office-card, .contact-card, .form input, .form textarea, .btn {
  border-radius: var(--border-radius);
}

/* Шапка канона: белая блюр-плашка при скролле — приводим к тону скина */
header.fixed, header.static {
  background: rgb(255 255 255 / 92%);
  box-shadow: 0 1px 0 var(--sk-line);
}

header.fixed li > a.active,
header.static li > a.active { color: var(--sk-steel); }

/* Футер: нейтральный графит, не заливка акцентом */
footer { background: var(--sk-ink); }

/* ---------- Иконки набора Ardera ---------- */

.ard-ico {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  color: currentColor;
  vertical-align: middle;
}

.ard-ico--xs { width: 14px; height: 14px; }
.ard-ico--sm { width: 18px; height: 18px; }
.ard-ico--lg { width: 28px; height: 28px; }

/* ---------- Анимация ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
