/* nikitskaya16.com — черновик сайта клубного дома «16 Большая Никитская».
   Визуальный язык — от щита застройщика на площадке (assets/site-sign-night.jpeg):
   холодная сине-серая подложка, светлая антиква для чисел, прописной гротеск
   для лейблов и навигации. Золото и тёплые тона исключены намеренно —
   у соседнего проекта (Леонтьевский 2) тёплая бумажная палитра, здесь нужен
   контраст. Главный мотив — редкость: всего четыре квартиры в доме. */

:root {
  --paper: #eff2f6;
  --paper-deep: #e2e7ee;
  --ink: #1c2531;
  --ink-soft: #4f5a68;
  --ink-faint: #5c6773;
  --line: #d2dae3;
  --line-soft: #e0e6ed;
  --accent: #3e5875;
  --accent-soft: #6c88a2;
  --glow: #8fc7e8;
  --dark: #131922;
  --dark-2: #19212c;
  --on-dark: #edf1f6;
  --on-dark-soft: #a3b0bf;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max: 1120px;
  --head-h: 76px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 28px; }
:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 2px; }
.skip-link {
  position: absolute; left: 12px; top: -60px;
  background: var(--ink); color: var(--paper);
  padding: 10px 16px; z-index: 100; border-radius: 2px;
  text-decoration: none; font-size: 13px;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

/* ---------- Типографика ---------- */
h1, h2, h3, .serif { font-family: var(--serif); font-weight: 500; letter-spacing: 0; }
h1 { font-size: clamp(34px, 5.4vw, 58px); line-height: 1.1; font-weight: 500; }
h2 { font-size: clamp(25px, 3.4vw, 36px); line-height: 1.18; font-weight: 500; }
h3 { font-size: clamp(19px, 2.2vw, 23px); line-height: 1.3; font-weight: 600; font-family: var(--sans); letter-spacing: 0.01em; }
p { margin: 0 0 1em; color: var(--ink-soft); }
.lede { font-size: clamp(17px, 1.9vw, 20px); color: var(--ink); line-height: 1.58; }

.eyebrow {
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  display: inline-block;
  margin-bottom: 14px;
}

.on-dark h1, .on-dark h2, .on-dark h3 { color: var(--on-dark); }
.on-dark p { color: var(--on-dark-soft); }
.on-dark .eyebrow { color: var(--glow); }

/* ---------- Шапка ---------- */
header.site {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--head-h);
  display: flex;
  align-items: center;
  background: rgba(239, 242, 246, 0.88);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}
header.site.solid { border-bottom-color: var(--line); }
header.site .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
}
.brand {
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand b { font-weight: 600; }
.brand small {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
  margin-top: 3px;
}
nav.main {
  display: flex;
  align-items: center;
  gap: 26px;
}
nav.main a {
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
nav.main a:hover, nav.main a.on { color: var(--ink); border-color: var(--accent); }
.burger {
  display: none;
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  background: transparent;
  align-items: center; justify-content: center;
  border-radius: 2px;
}
.burger span, .burger span::before, .burger span::after {
  content: ''; display: block; width: 16px; height: 1px; background: var(--ink);
  position: relative;
}
.burger span::before { position: absolute; top: -5px; }
.burger span::after { position: absolute; top: 5px; }

/* ---------- Мобильное меню ---------- */
#mnav {
  position: fixed;
  top: var(--head-h); left: 0; right: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 6px 0 18px;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 39;
}
#mnav.open { opacity: 1; transform: none; pointer-events: auto; }
#mnav a {
  display: block;
  padding: 14px 0;
  margin: 0 28px;
  border-top: 1px solid var(--line-soft);
  text-decoration: none;
  color: var(--ink);
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
#mnav a:first-child { border-top: none; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 14px 28px;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-ink { background: var(--accent); color: #fff; }
.btn-ink:hover { background: var(--dark); }
.btn-line { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-line:hover { border-color: var(--accent); color: var(--accent); }
.btn-on-dark { background: var(--on-dark); color: var(--dark); }
.btn-on-dark:hover { background: #fff; }
.btn-ghost-dark { background: transparent; color: var(--on-dark); border-color: rgba(237,241,246,0.32); }
.btn-ghost-dark:hover { border-color: var(--on-dark); }
.btn-sm { padding: 10px 18px; font-size: 11.5px; }

/* ---------- Секции ---------- */
section { padding: clamp(64px, 9vh, 104px) 0; }
section.tight { padding: clamp(48px, 6vh, 68px) 0; }
.deep { background: var(--paper-deep); }
.on-dark { background: var(--dark); }
.on-dark.grad { background: linear-gradient(180deg, var(--dark-2), var(--dark)); }
hr.hair { border: none; border-top: 1px solid var(--line); margin: 0; }

/* ---------- Hero (сплит: текст + портретное фото щита) ---------- */
.hero {
  position: relative;
  background: var(--dark);
  color: var(--on-dark);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: 88vh;
  align-items: stretch;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--head-h) + 40px) 48px 56px clamp(28px, 5vw, 64px);
}
.hero-copy .rare {
  font-family: var(--serif);
  font-size: clamp(15px, 1.6vw, 18px);
  color: var(--on-dark-soft);
  font-style: italic;
  margin-bottom: 18px;
}
.hero-copy h1 { color: #fbfcfe; max-width: 14ch; margin: 0 0 20px; }
.hero-copy .addr {
  font-size: 14px;
  letter-spacing: 0.03em;
  color: var(--on-dark-soft);
  margin: 0 0 32px;
  max-width: 42ch;
}
.hero-copy .cta-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero-photo {
  position: relative;
  min-height: 320px;
}
.hero-photo img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.hero-photo::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(19,25,34,0.55) 0%, rgba(19,25,34,0.02) 22%);
}
.hero-photo .cap {
  position: absolute; left: 24px; bottom: 22px; z-index: 2;
  font-size: 11.5px; letter-spacing: 0.08em; color: rgba(237,241,246,0.72);
  max-width: 70%;
}

/* ---------- Breadcrumb / заголовок внутренней страницы ---------- */
.crumbs {
  padding: 140px 0 30px;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}
.crumbs a { text-decoration: none; color: var(--ink-faint); border-bottom: 1px solid transparent; }
.crumbs a:hover { color: var(--accent); border-color: var(--accent); }
.page-head { padding-bottom: 8px; }
.page-head h1 { max-width: 20ch; }
.page-head .lede { max-width: 62ch; }

/* ---------- Grid / layout ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }

/* ---------- Число-мотив: «всего четыре квартиры» ---------- */
.rarity {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 30px;
  align-items: center;
  padding: 30px 0;
}
.rarity .num {
  font-family: var(--serif);
  font-size: clamp(96px, 15vw, 200px);
  line-height: 0.82;
  font-weight: 500;
  color: var(--ink);
}
.on-dark .rarity .num { color: var(--glow); }
.rarity .cap { max-width: 30ch; }
.rarity .cap p:last-child { margin-bottom: 0; }

/* ---------- Карточки квартир ---------- */
.units {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.unit {
  background: var(--paper);
  padding: 30px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.unit .no {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--accent);
  margin-bottom: 6px;
}
.unit .area {
  font-family: var(--serif);
  font-size: clamp(28px, 3vw, 36px);
  color: var(--ink);
  line-height: 1;
}
.unit .area sup { font-family: var(--sans); font-size: 13px; margin-left: 3px; color: var(--ink-faint); }
.unit .rooms { font-size: 12.5px; letter-spacing: 0.04em; color: var(--ink-faint); margin-top: 4px; }

/* ---------- Факты (сетка характеристик) ---------- */
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.facts li {
  padding: 18px 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 14.5px;
}
.facts li span.k { color: var(--ink-faint); }
.facts li span.v { color: var(--ink); text-align: right; max-width: 60%; }

/* ---------- Карточки-навигация («узнать больше») ---------- */
.explore { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.explore.cols-3 { grid-template-columns: repeat(3, 1fr); }
.explore-card {
  position: relative;
  display: block;
  text-decoration: none;
  color: var(--on-dark);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 3px;
}
.explore-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s cubic-bezier(.2,.7,.2,1);
}
.explore-card:hover img { transform: scale(1.045); }
.explore-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,18,23,0.05) 38%, rgba(11,14,19,0.86) 100%);
}
.explore-card .cap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 24px 24px 22px;
}
.explore-card .cap .eyebrow { color: var(--glow); margin-bottom: 8px; }
.explore-card .cap h3 { color: #fbfcfe; margin: 0 0 8px; font-family: var(--serif); font-size: 21px; font-weight: 500; }
.explore-card .cap span.go {
  font-size: 12px; letter-spacing: 0.05em; color: var(--on-dark-soft);
  display: inline-flex; align-items: center; gap: 6px;
}
.explore-card .cap span.go::after { content: '→'; transition: transform 0.2s; }
.explore-card:hover .cap span.go::after { transform: translateX(4px); }

/* ---------- Таймлайн (история) ---------- */
.timeline { position: relative; padding-left: 34px; border-left: 1px solid var(--line); }
.tl-item { position: relative; padding-bottom: 40px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: '';
  position: absolute; left: -39.5px; top: 4px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--accent);
}
.tl-year {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--accent);
  margin-bottom: 6px;
  display: block;
}
.tl-item p { margin-bottom: 0; }

/* ---------- Фото-блоки ---------- */
figure.photo { margin: 0; }
figure.photo img { width: 100%; border-radius: 3px; }
figure.photo figcaption {
  margin-top: 12px;
  font-size: 12px;
  color: var(--ink-faint);
  line-height: 1.5;
}
.photo-inset { max-width: 400px; }
.photo-wide { width: 100%; }

/* ---------- Статус-блок ---------- */
.status-box {
  border: 1px solid var(--line);
  background: #fff;
  padding: 26px 28px;
  border-radius: 3px;
}
.status-box .dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); margin-right: 9px; vertical-align: 1px;
}
.status-box strong { font-weight: 600; }
.status-box p:last-child { margin-bottom: 0; }
.status-box .legal {
  margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-soft);
  font-size: 12.5px; color: var(--ink-faint); line-height: 1.6;
}

/* ---------- Список ориентиров ---------- */
.landmarks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 32px; }
.landmarks li {
  padding: 16px 0;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.landmarks li span.tag { color: var(--ink-faint); font-size: 12px; letter-spacing: 0.02em; text-align: right; }

.metro-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.metro-chip {
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 12.5px;
  color: var(--ink-soft);
  display: inline-flex; align-items: center; gap: 8px;
}
.metro-chip::before { content: 'M'; font-weight: 700; color: var(--accent); font-size: 12px; }

/* ---------- Форма заявки ---------- */
.lead-panel { color: var(--on-dark); }
.lead-panel .split { align-items: center; }
.lead-copy p { max-width: 46ch; }
.lead-form-inline {
  background: rgba(237,241,246,0.05);
  border: 1px solid rgba(237,241,246,0.18);
  padding: 32px;
  border-radius: 3px;
}
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-dark-soft);
  margin-bottom: 8px;
}
.field input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(237,241,246,0.3);
  color: var(--on-dark);
  font-family: var(--sans);
  font-size: 16px;
  padding: 10px 2px;
  outline: none;
  transition: border-color 0.2s;
}
.field input::placeholder { color: rgba(163,176,191,0.55); }
.field input:focus { border-color: var(--glow); }
.field input.invalid { border-color: #d98b7f; }
.field.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent { font-size: 12px; color: var(--on-dark-soft); line-height: 1.5; margin: 16px 0 20px; }
.form-error { display: none; font-size: 13px; color: #e0a89c; margin-bottom: 14px; }
.form-error.show { display: block; }
.form-success { display: none; text-align: center; padding: 20px 0; }
.form-success .ok-mark {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--glow);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  color: var(--glow);
  font-size: 20px;
}
.lead-form.sent .form-fields { display: none; }
.lead-form.sent .form-success { display: block; }

/* ---------- Light вариант формы (на светлом фоне, страница «Заявка») ---------- */
.on-light .lead-form-inline { background: #fff; border-color: var(--line); }
.on-light .field label { color: var(--ink-faint); }
.on-light .field input { color: var(--ink); border-bottom-color: var(--line); }
.on-light .field input::placeholder { color: var(--ink-faint); }
.on-light .field input:focus { border-color: var(--accent); }
.on-light .consent { color: var(--ink-faint); }
.on-light .form-success .ok-mark { color: var(--accent); border-color: var(--accent); }

/* ---------- Нижний бар заявки (мобайл) ---------- */
.lead-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: var(--dark);
  color: var(--on-dark);
  display: none;
  align-items: center; justify-content: center;
  height: 58px;
  border-top: 1px solid rgba(237,241,246,0.14);
}
.lead-bar button {
  width: 100%; height: 100%;
  background: transparent; border: none; color: inherit;
  font-family: var(--sans); font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 500;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.lead-bar button::before {
  content: '';
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--glow);
  flex: none;
  animation: leadPulse 2.2s ease-out infinite;
}
@keyframes leadPulse {
  0% { box-shadow: 0 0 0 0 rgba(143, 199, 232, 0.55); }
  70% { box-shadow: 0 0 0 11px rgba(143, 199, 232, 0); }
  100% { box-shadow: 0 0 0 0 rgba(143, 199, 232, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .lead-bar button::before { animation: none; }
}
body.hide-bar .lead-bar { transform: translateY(100%); }
.lead-bar { transition: transform 0.3s ease; }

/* ---------- Футер ---------- */
footer.site {
  background: var(--dark);
  color: var(--on-dark-soft);
  padding: 56px 0 90px;
  font-size: 13.5px;
}
footer.site .foot-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 30px; flex-wrap: wrap;
  padding-bottom: 30px; margin-bottom: 24px;
  border-bottom: 1px solid rgba(237,241,246,0.14);
}
footer.site .brand { color: var(--on-dark); }
footer.site .brand small { color: var(--on-dark-soft); }
footer.site nav.main a { color: var(--on-dark-soft); }
footer.site nav.main a:hover { color: var(--on-dark); }
footer.site p { color: var(--on-dark-soft); max-width: 62ch; }
footer.site .legal { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 11.5px; color: var(--on-dark-soft); }

/* ---------- Появление блоков ----------
   По умолчанию контент виден всегда. Прячем и анимируем ТОЛЬКО если класс
   js-anim реально появился на <html> — так осечка JS или отключённый скрипт
   никогда не оставит блок пустым. */
.rv { opacity: 1; transform: none; }
html.js-anim .rv { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
html.js-anim .rv.on { opacity: 1; transform: none; }

/* ---------- Утилиты ---------- */
.mt-0 { margin-top: 0; }
.center { text-align: center; }
.small { font-size: 13px; color: var(--ink-faint); }

/* ---------- Адаптив ---------- */
@media (max-width: 900px) {
  .grid-2, .split { grid-template-columns: 1fr; gap: 40px; }
  .explore, .explore.cols-3 { grid-template-columns: 1fr; }
  .landmarks { grid-template-columns: 1fr; }
  .units { grid-template-columns: 1fr 1fr; }
  .hero-grid { grid-template-columns: 1fr; min-height: auto; }
  .hero-photo { min-height: 46vh; }
  .hero-copy { padding: 32px clamp(20px,5vw,48px) 48px; }
  section { padding: clamp(48px, 7vh, 72px) 0; }
}

@media (max-width: 820px) {
  nav.main { display: none; }
  .burger { display: flex; }
  .lead-bar { display: flex; }
  footer.site { padding-bottom: 96px; }
}

@media (max-width: 560px) {
  .units { grid-template-columns: 1fr; }
  .rarity { grid-template-columns: 1fr; gap: 14px; }
}

@media (max-width: 480px) {
  .container { padding: 0 20px; }
  .lead-form-inline { padding: 24px 20px; }
  .crumbs { padding: 118px 0 26px; }
}
