/* ============================================================
   Резиденция — лендинг новостроек Москвы
   Тёмная тема, премиальный минимализм
   ============================================================ */

:root {
  --bg: #0a0a0b;
  --bg-soft: #0f0f11;
  --surface: #141416;
  --surface-2: #19191c;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f3efe8;
  --text-soft: #d6d1c9;
  --muted: #9c968e;
  --bronze: #c9a063;
  --bronze-bright: #e0bb85;
  --bronze-dim: rgba(201, 160, 99, 0.14);
  --danger: #e07a6a;
  --success: #8ac99b;

  --font-display: "Playfair Display", "Times New Roman", serif;
  --font-text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --container: 1240px;
  --radius: 3px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 600px at 85% -10%, rgba(201, 160, 99, 0.10), transparent 60%),
    radial-gradient(700px 500px at -10% 40%, rgba(201, 160, 99, 0.05), transparent 60%);
}

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

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

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

p { margin: 0; }

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

::selection { background: var(--bronze); color: #0a0a0b; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 12px 20px;
  background: var(--bronze);
  color: #0a0a0b;
}
.skip-link:focus { left: 12px; top: 12px; }

.container {
  width: min(100% - 48px, var(--container));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

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

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 22px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.section__lead {
  margin-top: 22px;
  max-width: 52ch;
  font-size: 1.0625rem;
  color: var(--muted);
}

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 28px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-text);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.35s var(--ease), color 0.35s var(--ease),
    border-color 0.35s var(--ease), transform 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
}

.btn--primary {
  background: var(--bronze);
  color: #0a0a0b;
}
.btn--primary:hover {
  background: var(--bronze-bright);
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(201, 160, 99, 0.22);
}

.btn--ghost {
  border-color: var(--line-strong);
  color: var(--text);
  background: transparent;
}
.btn--ghost:hover {
  border-color: var(--bronze);
  color: var(--bronze);
}

.btn--text {
  padding: 0;
  min-height: 0;
  color: var(--bronze);
  background: none;
}
.btn--text span { transition: transform 0.35s var(--ease); }
.btn--text:hover span { transform: translateX(5px); }

.btn--block { width: 100%; }

/* ---------- Шапка ---------- */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 0;
  transition: background 0.45s var(--ease), padding 0.45s var(--ease),
    border-color 0.45s var(--ease), backdrop-filter 0.45s var(--ease);
  border-bottom: 1px solid transparent;
}
.header.is-scrolled {
  padding: 12px 0;
  background: rgba(10, 10, 11, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 40px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(201, 160, 99, 0.55);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--bronze);
  flex: none;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__text b {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
}
.brand__text small {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 34px;
  margin-left: auto;
}
.nav a {
  position: relative;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--text-soft);
  transition: color 0.3s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1px;
  background: var(--bronze);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav a:hover { color: var(--bronze); }
.nav a:hover::after { transform: scaleX(1); }

.header__cta { min-height: 46px; padding: 0 22px; font-size: 0.8125rem; }

.burger {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.burger span {
  display: block;
  width: 18px;
  height: 1px;
  background: var(--text);
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
}
.burger[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- Первый экран ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 120px;
  isolation: isolate;
}

.hero__media { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 45%;
  transform: scale(1.06);
  animation: heroIn 2.6s var(--ease) both;
}
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #0a0a0b 0%, rgba(10, 10, 11, 0.94) 32%, rgba(10, 10, 11, 0.55) 58%, rgba(10, 10, 11, 0.72) 100%),
    linear-gradient(0deg, #0a0a0b 0%, rgba(10, 10, 11, 0.35) 34%, transparent 62%);
}

@keyframes heroIn {
  from { transform: scale(1.14); opacity: 0.4; }
  to { transform: scale(1.06); opacity: 1; }
}

.hero__inner {
  max-width: 820px;
  padding: 40px 0 56px;
}

.hero__title {
  font-size: clamp(2.4rem, 5.6vw, 4.7rem);
  line-height: 1.03;
  margin-bottom: 26px;
}
.hero__title em {
  font-style: italic;
  color: var(--bronze);
}

.hero__lead {
  max-width: 54ch;
  font-size: clamp(1rem, 1.3vw, 1.125rem);
  color: var(--text-soft);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 26px;
  margin-top: 36px;
}

.hero__note {
  margin-top: 18px;
  font-size: 0.8125rem;
  color: var(--muted);
}

.hero__stats {
  position: relative;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10, 10, 11, 0.35), rgba(10, 10, 11, 0.9));
  backdrop-filter: blur(6px);
}
.hero__stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 26px 0;
}
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat__value {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.6vw, 1.5rem);
  color: var(--text);
}
.stat__label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Секции ---------- */

.section { padding: clamp(88px, 9vw, 150px) 0; }
.section--tight { padding: clamp(64px, 6vw, 100px) 0; }
.section--bordered {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}
.section--flush { padding-top: 0; }

.section__head { max-width: 760px; margin-bottom: clamp(44px, 5vw, 72px); }
.section__head--row {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: end;
  max-width: none;
}
.section__head--row .section__lead { margin-top: 0; }

.section h2 {
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.06;
}

/* ---------- Бенто ---------- */

.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.bento__item {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  min-height: 190px;
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.45s var(--ease), background 0.45s var(--ease),
    transform 0.45s var(--ease);
}
.bento__item:hover {
  border-color: rgba(201, 160, 99, 0.4);
  background: var(--surface-2);
  transform: translateY(-2px);
}
.bento__item h3 {
  font-size: 1.25rem;
  line-height: 1.25;
}
.bento__item p {
  font-size: 0.9375rem;
  color: var(--muted);
}
.bento__item--wide { grid-column: span 3; }
.bento__item:nth-child(1) { grid-column: span 3; grid-row: span 2; min-height: 0; }
.bento__item:nth-child(4) { grid-column: span 2; }
.bento__item:nth-child(5) { grid-column: span 4; }

.bento__num {
  margin-bottom: auto;
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 5vw, 4.6rem);
  line-height: 1;
  color: var(--bronze);
}

.bento__item--accent {
  background: linear-gradient(160deg, rgba(201, 160, 99, 0.16), rgba(201, 160, 99, 0.03));
  border-color: rgba(201, 160, 99, 0.3);
}
.bento__item--accent p { color: var(--text-soft); }

/* ---------- Проекты ---------- */

.projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project { display: flex; flex-direction: column; }

.project__media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
}
.project__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(10, 10, 11, 0.55), transparent 55%);
  opacity: 0.9;
  transition: opacity 0.6s var(--ease);
}
.project__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease);
}
.project:hover .project__media img { transform: scale(1.05); }
.project:hover .project__media::after { opacity: 0.5; }

.project__badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  padding: 6px 10px;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bronze);
  background: rgba(10, 10, 11, 0.86);
  border: 1px solid rgba(201, 160, 99, 0.45);
  border-radius: 2px;
  backdrop-filter: blur(6px);
}

.project__body { padding-top: 20px; }
.project__class {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.project__name {
  margin: 8px 0 6px;
  font-size: 1.5rem;
}
.project__meta { font-size: 0.8125rem; color: var(--muted); }
.project__price {
  margin-top: 14px;
  font-size: 1.0625rem;
  color: var(--bronze);
}
.project__terms {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--muted);
}

.projects__more {
  margin-top: 44px;
  font-size: 0.9375rem;
  color: var(--muted);
}
.projects__more a {
  color: var(--bronze);
  border-bottom: 1px solid rgba(201, 160, 99, 0.4);
  transition: border-color 0.3s var(--ease);
}
.projects__more a:hover { border-color: var(--bronze); }

/* ---------- Рассрочка ---------- */

.installment__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 40px 0 0;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.fact dt {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.fact dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.4rem;
}

.installment__example {
  margin-top: 24px;
  font-size: 0.875rem;
  color: var(--muted);
}

.installment__media { margin: 0; }
.installment__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
}
.installment__media figcaption {
  margin-top: 14px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Районы ---------- */

.districts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 40px;
}
.districts li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  transition: border-color 0.4s var(--ease), padding-left 0.4s var(--ease);
}
.districts li:hover {
  border-top-color: var(--bronze);
  padding-left: 8px;
}
.districts span { font-size: 1.0625rem; }
.districts small { font-size: 0.75rem; color: var(--muted); white-space: nowrap; }

/* ---------- Шаги ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 4vw, 56px);
}
.step {
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.step__num {
  display: block;
  margin-bottom: 18px;
  font-family: var(--font-display);
  font-size: 2.4rem;
  line-height: 1;
  color: rgba(201, 160, 99, 0.55);
}
.step h3 { font-size: 1.3rem; margin-bottom: 10px; }
.step p { font-size: 0.9375rem; color: var(--muted); }

/* ---------- Причины ---------- */

.reasons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 4vw, 56px);
}
.reason {
  padding-top: 26px;
  border-top: 1px solid rgba(201, 160, 99, 0.35);
}
.reason h3 { font-size: 1.5rem; margin-bottom: 12px; }
.reason p { color: var(--muted); font-size: 0.9375rem; }

/* ---------- Сопровождение ---------- */

.support {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: start;
}
.support__text { position: sticky; top: 120px; }
.support__text .btn--text { margin-top: 28px; }

.support__list { border-top: 1px solid var(--line); }
.support__list li {
  display: flex;
  align-items: baseline;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.0625rem;
  transition: color 0.35s var(--ease), padding-left 0.35s var(--ease);
}
.support__list li:hover {
  color: var(--bronze);
  padding-left: 8px;
}
.support__list span {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

/* ---------- Манифест ---------- */

.quote {
  padding: clamp(90px, 11vw, 170px) 0;
  text-align: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(700px 400px at 50% 0%, rgba(201, 160, 99, 0.08), transparent 70%),
    var(--bg-soft);
}
.quote blockquote { margin: 0; }
.quote blockquote p {
  max-width: 20ch;
  margin: 0 auto;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.4vw, 2.9rem);
  line-height: 1.32;
}
.quote blockquote footer {
  margin-top: 30px;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- FAQ ---------- */

.faq {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: start;
}
.faq__head { position: sticky; top: 120px; }

.faq__list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  font-size: 1.0625rem;
  cursor: pointer;
  list-style: none;
  transition: color 0.3s var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--font-text);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--bronze);
  transition: transform 0.35s var(--ease);
  flex: none;
}
.faq details[open] summary { color: var(--bronze); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p {
  padding: 0 0 24px;
  max-width: 62ch;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* ---------- Форма ---------- */

.cta {
  background:
    radial-gradient(800px 500px at 80% 20%, rgba(201, 160, 99, 0.10), transparent 60%),
    var(--bg);
}
.cta__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: start;
}
.cta__list {
  margin-top: 34px;
  display: grid;
  gap: 12px;
}
.cta__list li {
  position: relative;
  padding-left: 24px;
  font-size: 0.9375rem;
  color: var(--text-soft);
}
.cta__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 10px;
  height: 1px;
  background: var(--bronze);
}

.form {
  padding: clamp(24px, 3vw, 40px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.field { position: relative; margin-bottom: 20px; }
.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input[type="text"] {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  background: #0c0c0e;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 1rem;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.field input[type="text"]::placeholder { color: #6b665f; }
.field input[type="text"]:focus {
  outline: none;
  border-color: rgba(201, 160, 99, 0.6);
  box-shadow: 0 0 0 3px rgba(201, 160, 99, 0.12);
}

.field--check {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 12px;
  align-items: start;
  margin-top: 4px;
}
.field--check input {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: #0c0c0e;
  cursor: pointer;
  position: relative;
  flex: none;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.field--check input:checked {
  background: var(--bronze);
  border-color: var(--bronze);
}
.field--check input:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid #0a0a0b;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(42deg);
}
.field--check label {
  margin: 0;
  font-size: 0.8125rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  line-height: 1.55;
}
.field--check label a {
  color: var(--text-soft);
  border-bottom: 1px solid var(--line-strong);
}
.field--check label a:hover { color: var(--bronze); border-color: var(--bronze); }

.field__error {
  min-height: 0;
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--danger);
}

.field--invalid input[type="text"],
.field--invalid input[type="checkbox"] { border-color: var(--danger); }

.field--trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__note {
  margin-top: 14px;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
}

.form__status {
  margin-top: 14px;
  font-size: 0.875rem;
  color: var(--success);
  text-align: center;
  min-height: 1.4em;
}

/* ---------- Подвал ---------- */

.footer {
  padding: clamp(56px, 6vw, 80px) 0 28px;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 40px;
}
.footer__brand p {
  margin-top: 18px;
  max-width: 34ch;
  font-size: 0.875rem;
  color: var(--muted);
}
.footer__col { display: flex; flex-direction: column; gap: 10px; }
.footer__title {
  margin-bottom: 6px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer__col a {
  font-size: 0.9375rem;
  color: var(--text-soft);
  transition: color 0.3s var(--ease);
}
.footer__col a:hover { color: var(--bronze); }

.footer__bottom {
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 32px;
  font-size: 0.75rem;
  color: var(--muted);
}
.footer__legal { max-width: 66ch; }
.footer__legal a { border-bottom: 1px solid var(--line-strong); }
.footer__legal a:hover { color: var(--bronze); }

/* ---------- Мобильная панель ---------- */

.mobile-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  gap: 10px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(10, 10, 11, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.mobile-bar .btn { flex: 1; min-height: 48px; font-size: 0.8125rem; }

/* ---------- Появление при прокрутке ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Страницы документов ---------- */

.doc-page { background: var(--bg); }
.doc { padding: clamp(110px, 12vw, 150px) 0 clamp(70px, 8vw, 100px); }
.doc .container { max-width: 860px; }
.doc h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
}
.doc__updated {
  margin: 12px 0 40px;
  font-size: 0.8125rem;
  color: var(--muted);
}
.doc h2 {
  margin: 38px 0 12px;
  font-size: 1.375rem;
  line-height: 1.3;
}
.doc p, .doc li {
  font-size: 0.9375rem;
  color: var(--text-soft);
}
.doc p + p { margin-top: 12px; }
.doc ul { margin: 10px 0 14px; }
.doc ul li {
  position: relative;
  margin-bottom: 8px;
  padding-left: 20px;
}
.doc ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.8em;
  width: 8px;
  height: 1px;
  background: var(--bronze);
}
.doc a {
  color: var(--bronze);
  border-bottom: 1px solid rgba(201, 160, 99, 0.35);
}

section[id] { scroll-margin-top: 92px; }

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

@media (max-width: 1100px) {
  .nav { gap: 24px; }
  .header__cta { display: none; }
}

@media (max-width: 960px) {
  .projects { grid-template-columns: repeat(2, 1fr); }
  .section__head--row { grid-template-columns: 1fr; gap: 22px; align-items: start; }
  .installment__grid,
  .support,
  .faq,
  .cta__grid { grid-template-columns: 1fr; gap: 48px; }
  .support__text,
  .faq__head { position: static; }
  .bento__item:nth-child(n) { grid-column: span 3; grid-row: auto; min-height: 190px; }
  .districts { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .container { width: min(100% - 32px, var(--container)); }

  .burger { display: inline-flex; }

  .nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 8px 16px 20px;
    background: rgba(10, 10, 11, 0.97);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
  }
  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .nav a {
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.9375rem;
  }
  .nav a::after { display: none; }

  .hero { min-height: auto; padding-top: 132px; }
  .hero__media img { object-position: 70% 40%; }
  .hero__media::after {
    background:
      linear-gradient(180deg, rgba(10, 10, 11, 0.78) 0%, rgba(10, 10, 11, 0.94) 38%, #0a0a0b 100%);
  }
  .hero__inner { padding: 24px 0 40px; }
  .hero__actions { gap: 18px; }
  .hero__actions .btn { width: 100%; }
  .hero__actions .btn--text { width: auto; }
  .hero__stats-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; padding: 22px 0; }

  .section { padding: 72px 0; }
  .section--tight { padding: 56px 0; }
  .section--flush { padding-top: 0; }

  .bento { grid-template-columns: 1fr; }
  .bento__item:nth-child(n) { grid-column: auto; grid-row: auto; }

  .projects { grid-template-columns: 1fr; gap: 36px; }

  .steps,
  .reasons { grid-template-columns: 1fr; gap: 28px; }

  .districts { grid-template-columns: 1fr; }

  .facts { grid-template-columns: 1fr 1fr; row-gap: 20px; }

  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .footer__bottom { margin-top: 36px; }

  .mobile-bar { display: flex; }
  body { padding-bottom: 72px; }
}

@media (max-width: 480px) {
  .hero__title { font-size: 2.15rem; }
  .brand__text small { display: none; }
  .facts { grid-template-columns: 1fr; }
  .quote blockquote p { font-size: 1.45rem; }
}

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