/*
  ЗИЛАРТ — квартал «Группы ЛСР» на месте завода имени Лихачёва.

  Дизайн-система взята с uglichi.com: тёмная база, тёплая бумага текста,
  красный акцент только на действии, Montserrat в заголовках и Manrope
  в тексте. Стили написаны под эту разметку, а не подогнаны из чужого
  проекта — иначе половина правил промахивается мимо элементов.
*/

:root {
  --ink: #0f1213;
  --ink-2: #161b1d;
  --ink-3: #1d2426;
  --paper: #f4f1ec;
  --paper-dim: rgba(244, 241, 236, 0.66);
  --paper-faint: rgba(244, 241, 236, 0.42);
  --red: #e44242;
  --red-deep: #c93535;
  --line: rgba(244, 241, 236, 0.14);
  --font-display: "Montserrat", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --pad: clamp(20px, 5vw, 64px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 500; letter-spacing: -0.01em; }

.h-display { font-family: var(--font-display); font-weight: 500; }

/* ---------- Шапка ---------- */
/* Фиксируем: на длинной странице кнопка заявки должна быть под рукой всегда. */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px var(--pad);
  background: rgba(15, 18, 19, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.16em;
  color: var(--paper);
  text-decoration: none;
  white-space: nowrap;
}
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a {
  color: var(--paper-dim);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--paper); }
.nav-phone {
  margin-left: auto;
  border: 0;
  border-radius: 999px;
  padding: 11px 20px;
  background: var(--red-deep);
  color: #fff;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.nav-phone:hover { background: var(--red); }
.nav-links + .nav-phone { margin-left: 0; }

/* ---------- Герой ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: 120px var(--pad) clamp(56px, 9vh, 96px);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}
/* Затемнение снизу: текст должен читаться на любом кадре, а не «когда повезёт». */
.hero-wash {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(15,18,19,0.94) 0%, rgba(15,18,19,0.72) 34%, rgba(15,18,19,0.24) 62%, rgba(15,18,19,0.42) 100%);
}
.hero-content { position: relative; max-width: 780px; }
.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(34px, 6.4vw, 68px);
  line-height: 1.06;
  margin-bottom: 22px;
}
.lead {
  font-size: clamp(16px, 2.1vw, 20px);
  line-height: 1.6;
  color: var(--paper-dim);
  max-width: 62ch;
  margin: 0 0 32px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-scrollhint {
  position: absolute;
  left: 50%; bottom: 22px;
  width: 1px; height: 42px;
  background: linear-gradient(to bottom, transparent, var(--paper-faint));
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.05em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.btn-xl { padding: 16px 30px; }
.btn-red { background: var(--red-deep); color: #fff; }
.btn-red:hover { background: var(--red); }
.btn-ghost {
  background: transparent;
  color: var(--paper);
  border: 1px solid rgba(244, 241, 236, 0.32);
}
.btn-ghost:hover { border-color: var(--paper); }

/* ---------- Секции ---------- */
.section { padding: clamp(64px, 11vh, 132px) var(--pad); }
.section-inner { max-width: 1240px; margin: 0 auto; }
.section-head { margin-bottom: 44px; }
.section-title {
  font-size: clamp(26px, 4.2vw, 46px);
  line-height: 1.14;
  max-width: 20ch;
}
.manifesto { background: var(--ink-2); }
.manifesto-text {
  font-size: clamp(18px, 2.5vw, 26px);
  line-height: 1.5;
  max-width: 60ch;
  margin: 0;
  color: var(--paper);
}

/* ---------- Бенто-сетка ---------- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.bento-card {
  position: relative;
  grid-column: span 1;
  min-height: 260px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--ink-3);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.bento-card.c2x2 { grid-column: span 2; grid-row: span 2; min-height: 540px; }
.bento-card.c2x1 { grid-column: span 2; }
.bento-card .img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s ease;
}
.bento-card:hover .img { transform: scale(1.04); }
/* Плашка под текстом, а не поверх фото целиком: снимок остаётся виден. */
.bento-card .meta {
  position: relative;
  padding: 22px;
  background: linear-gradient(to top, rgba(15,18,19,0.95) 12%, rgba(15,18,19,0.78) 62%, rgba(15,18,19,0) 100%);
  padding-top: 68px;
}
.bento-card .meta h3 {
  font-size: 19px;
  line-height: 1.25;
  margin-bottom: 8px;
}
.bento-card .meta p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--paper-dim);
}

/* ---------- Строка фактов ---------- */
.infra-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.infra-list span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 14px;
  color: var(--paper-dim);
}

.note {
  max-width: 62ch;
  margin: 28px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--paper-dim);
}

/* ---------- Вопросы ---------- */
.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.faq-item summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: " +"; color: var(--red); }
.faq-item[open] summary::after { content: " −"; }
.faq-item p { margin: 12px 0 0; color: var(--paper-dim); max-width: 68ch; }

/* ---------- Подвал ---------- */
.footer {
  padding: 48px var(--pad) 64px;
  border-top: 1px solid var(--line);
  background: var(--ink-2);
}
.footer p { margin: 0; font-size: 14px; color: var(--paper-dim); }
.footer-legal { margin-top: 14px !important; font-size: 12px; color: var(--paper-faint); }

/* ---------- Окно заявки ---------- */
.lead-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lead-modal.open { display: flex; }
.lead-overlay { position: absolute; inset: 0; background: rgba(8, 10, 11, 0.78); }
.lead-dialog {
  position: relative;
  width: min(460px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px 26px 26px;
}
.lead-close {
  position: absolute;
  top: 12px; right: 14px;
  border: 0;
  background: transparent;
  color: var(--paper-dim);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.lead-dialog h3 { font-size: 23px; margin-bottom: 8px; }
.lead-sub { margin: 0 0 22px; font-size: 15px; color: var(--paper-dim); }
.lead-field { display: block; margin-bottom: 16px; }
.lead-field span {
  display: block;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper-faint);
  margin-bottom: 7px;
}
.lead-field input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(244, 241, 236, 0.28);
  background: transparent;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 17px;
  padding: 10px 0;
}
.lead-field input:focus { outline: none; border-bottom-color: var(--red); }
.lead-submit { width: 100%; margin-top: 8px; }
.lead-hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.lead-error { display: none; margin: 12px 0 0; color: var(--red); font-size: 14px; }
.lead-modal.error .lead-error { display: block; }
.lead-consent {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--paper-faint);
}
.lead-consent input { margin-top: 2px; }
.lead-success { display: none; text-align: center; padding: 18px 0; }
.lead-modal.success .lead-form-wrap { display: none; }
.lead-modal.success .lead-success { display: block; }
.lead-check { width: 54px; height: 54px; margin: 0 auto 16px; }
.lead-success p { color: var(--paper-dim); }

/* ---------- Появление при прокрутке ---------- */
/* Без скриптов контент обязан быть виден: если библиотека не загрузится,
   страница не должна остаться пустой. */
.reveal { opacity: 1; }
.js-reveal .reveal { opacity: 0; transform: translateY(18px); }

/* ---------- Телефон ---------- */
@media (max-width: 900px) {
  .bento-grid { grid-template-columns: repeat(2, 1fr); }
  .bento-card.c2x2 { grid-column: span 2; grid-row: span 1; min-height: 320px; }
  .bento-card.c2x1 { grid-column: span 2; }
  .nav-links { display: none; }
  .nav-phone { margin-left: auto; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .bento-grid { grid-template-columns: 1fr; }
  .bento-card, .bento-card.c2x2, .bento-card.c2x1 {
    grid-column: span 1;
    min-height: 260px;
  }
  .hero { min-height: 92svh; padding-top: 96px; }
  .hero-cta .btn { width: 100%; }
  .section-title { max-width: none; }
}
