/* ============================================================
   mt-realty — дизайн-система «тихая роскошь»
   ============================================================ */

:root {
  --paper: #f6f1e7;
  --paper-soft: #fffdf8;
  --sand: #e8dfcf;
  --ink: #16211b;
  --ink-soft: #2b3730;
  --muted: #6d746c;
  --line: rgba(22, 33, 27, 0.14);
  --line-soft: rgba(22, 33, 27, 0.08);
  --brass: #a87c3f;
  --brass-light: #c9a469;
  --cream-on-dark: #f3ece0;
  --container: 1280px;
  --gutter: clamp(20px, 4.4vw, 64px);
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Golos Text", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --header-h: 84px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked {
  overflow: hidden;
}

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

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

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

::selection {
  background: var(--brass);
  color: var(--paper-soft);
}

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

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

/* ---------- раскладка ---------- */

.shell {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(64px, 9vw, 132px);
}

.section--tight {
  padding-block: clamp(48px, 6vw, 84px);
}

.section--paper {
  background: var(--paper-soft);
}

.section--dark {
  background: var(--ink);
  color: var(--cream-on-dark);
}

.section-head {
  display: grid;
  gap: 18px 48px;
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: clamp(36px, 5vw, 64px);
}

@media (min-width: 900px) {
  .section-head {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: end;
  }
}

.section-head__title {
  font-size: clamp(2.1rem, 4.4vw, 3.9rem);
}

.section-head__note {
  max-width: 44ch;
  color: var(--muted);
  font-size: 0.98rem;
}

.section--dark .section-head__note {
  color: rgba(243, 236, 224, 0.68);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--brass);
}

.eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: currentColor;
}

.section--dark .eyebrow {
  color: var(--brass-light);
}

.accent {
  font-style: italic;
  color: var(--brass);
}

.section--dark .accent {
  color: var(--brass-light);
}

/* ---------- кнопки и ссылки ---------- */

.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--paper-soft);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 56px;
  padding: 0 30px;
  border: 1px solid var(--btn-bg);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.35s var(--ease), color 0.35s var(--ease),
    border-color 0.35s var(--ease);
}

.btn:hover {
  background: transparent;
  color: var(--btn-bg);
}

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

.btn--ghost {
  --btn-bg: var(--ink);
  background: transparent;
  color: var(--ink);
}

.btn--ghost:hover {
  background: var(--ink);
  color: var(--paper-soft);
}

.btn--ghost-light {
  --btn-bg: var(--paper-soft);
  background: transparent;
  color: var(--paper-soft);
  border-color: rgba(255, 253, 248, 0.4);
}

.btn--ghost-light:hover {
  background: var(--paper-soft);
  color: var(--ink);
  border-color: var(--paper-soft);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
  transition: border-color 0.3s var(--ease), gap 0.3s var(--ease);
}

.link-arrow::after {
  content: "→";
  font-size: 0.95rem;
  transition: transform 0.3s var(--ease);
}

.link-arrow:hover {
  border-color: var(--brass);
}

.link-arrow:hover::after {
  transform: translateX(4px);
}

/* ---------- шапка ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: var(--header-h);
  background: var(--paper);
  color: var(--ink);
  transition: background 0.4s var(--ease), color 0.4s var(--ease),
    border-color 0.4s var(--ease), min-height 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
  border-bottom: 1px solid var(--line-soft);
}

/* Прозрачность только над первым экраном главной — состояние ставит скрипт.
   Без JS шапка остаётся непрозрачной, и контент не просвечивает сквозь неё. */
.site-header.is-transparent {
  background: transparent;
  color: var(--paper-soft);
  border-color: transparent;
  box-shadow: none;
}

.site-header.is-transparent .btn {
  --btn-bg: var(--paper-soft);
  --btn-fg: var(--ink);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  width: 100%;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.1;
}

.brand__name {
  font-family: var(--serif);
  font-size: 1.5rem;
  letter-spacing: 0.01em;
}

.brand__role {
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.72;
}

.site-nav {
  display: none;
  align-items: center;
  gap: 30px;
}

@media (min-width: 1020px) {
  .site-nav {
    display: flex;
  }
}

.site-nav a {
  position: relative;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding-block: 6px;
  opacity: 0.82;
  transition: opacity 0.25s var(--ease);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transition: right 0.35s var(--ease);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  opacity: 1;
}

.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
  right: 0;
}

.site-header__aside {
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-header__phone {
  display: none;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

@media (min-width: 1180px) {
  .site-header__phone {
    display: inline;
  }
}

.site-header__cta {
  display: none;
  min-height: 46px;
  padding-inline: 22px;
  font-size: 0.7rem;
}

@media (min-width: 900px) {
  .site-header__cta {
    display: inline-flex;
  }
}

.site-header.is-solid,
.site-header.is-scrolled {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--line-soft);
  box-shadow: 0 1px 24px rgba(22, 33, 27, 0.08);
  min-height: 70px;
}

.site-header.is-solid .btn,
.site-header.is-scrolled .btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--paper-soft);
}

/* бургер */

.burger {
  position: relative;
  z-index: 80;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 46px;
  height: 46px;
  padding: 0 10px;
  border: 1px solid currentColor;
  border-radius: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

@media (min-width: 1020px) {
  .burger {
    display: none;
  }
}

.burger span {
  display: block;
  height: 1px;
  background: currentColor;
  transition: transform 0.35s var(--ease), opacity 0.2s linear;
}

.burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(3.5px) rotate(45deg);
}

.burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-3.5px) rotate(-45deg);
}

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 96px var(--gutter) 48px;
  background: var(--ink);
  color: var(--cream-on-dark);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease),
    visibility 0.4s;
}

.mobile-nav.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.mobile-nav a {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 8vw, 2.8rem);
  line-height: 1.24;
  padding-block: 8px;
  border-bottom: 1px solid rgba(243, 236, 224, 0.14);
}

.mobile-nav a[aria-current="page"] {
  color: var(--brass-light);
}

.mobile-nav__foot {
  margin-top: 32px;
  font-size: 0.95rem;
  color: rgba(243, 236, 224, 0.7);
}

.mobile-nav__foot a {
  font-family: var(--sans);
  font-size: 1rem;
  border: 0;
  padding: 0;
  color: var(--cream-on-dark);
}

/* ---------- главный экран ---------- */

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: min(92vh, 900px);
  padding: calc(var(--header-h) + 48px) 0 clamp(40px, 5vw, 64px);
  overflow: hidden;
  color: var(--paper-soft);
}

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

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  animation: heroDrift 22s var(--ease) forwards;
}

@keyframes heroDrift {
  to {
    transform: scale(1);
  }
}

.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
      100deg,
      rgba(15, 22, 18, 0.88) 0%,
      rgba(15, 22, 18, 0.62) 42%,
      rgba(15, 22, 18, 0.18) 78%,
      rgba(15, 22, 18, 0.42) 100%
    ),
    linear-gradient(to top, rgba(15, 22, 18, 0.72), transparent 45%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(32px, 5vw, 60px);
  width: 100%;
}

.hero__title {
  max-width: 16ch;
  font-size: clamp(2.7rem, 6.4vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.hero__title em {
  display: block;
  font-style: italic;
  color: var(--brass-light);
}

.hero__lead {
  max-width: 46ch;
  margin-top: 26px;
  font-size: clamp(1rem, 1.25vw, 1.14rem);
  font-weight: 300;
  color: rgba(255, 253, 248, 0.86);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.hero__actions .btn {
  min-width: 210px;
}

.hero__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 32px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 253, 248, 0.24);
}

@media (min-width: 760px) {
  .hero__facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
  }
}

.fact__value {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 2.4vw, 2.3rem);
  line-height: 1.05;
}

.fact__label {
  margin-top: 6px;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 253, 248, 0.62);
}

.hero__scroll {
  display: none;
  align-items: center;
  gap: 12px;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 253, 248, 0.6);
}

@media (min-width: 1020px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 1fr auto;
    align-items: end;
  }
  .hero__facts {
    grid-column: 1 / -1;
    margin-top: clamp(16px, 3vw, 36px);
  }
  .hero__scroll {
    display: flex;
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    writing-mode: vertical-rl;
  }
  .hero__scroll::after {
    content: "";
    width: 1px;
    height: 72px;
    background: rgba(255, 253, 248, 0.34);
  }
}

/* ---------- внутренние страницы: заголовок ---------- */

.page-hero {
  position: relative;
  padding: calc(var(--header-h) + clamp(48px, 7vw, 96px)) 0 clamp(34px, 5vw, 64px);
  background: var(--ink);
  color: var(--cream-on-dark);
  overflow: hidden;
}

.page-hero::after {
  content: "";
  position: absolute;
  right: -12%;
  top: -40%;
  width: 60vw;
  height: 60vw;
  border: 1px solid rgba(201, 164, 105, 0.22);
  border-radius: 50%;
  pointer-events: none;
}

.page-hero__title {
  max-width: 20ch;
  font-size: clamp(2.5rem, 6vw, 4.6rem);
  line-height: 1;
}

.page-hero__lead {
  max-width: 56ch;
  margin-top: 22px;
  font-weight: 300;
  color: rgba(243, 236, 224, 0.74);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(243, 236, 224, 0.55);
}

.breadcrumbs a:hover {
  color: var(--brass-light);
}

/* ---------- услуги ---------- */

.service-list {
  border-top: 1px solid var(--line);
}

.service {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px 22px;
  padding: clamp(22px, 3vw, 34px) clamp(10px, 1.6vw, 22px);
  border-bottom: 1px solid var(--line);
  transition: background 0.45s var(--ease), color 0.45s var(--ease),
    padding-left 0.45s var(--ease);
}

@media (min-width: 900px) {
  .service {
    grid-template-columns: 76px minmax(0, 0.9fr) minmax(0, 1.1fr) auto;
    align-items: baseline;
    gap: 32px;
  }
}

.service:hover {
  background: var(--ink);
  color: var(--cream-on-dark);
  padding-left: clamp(18px, 2.4vw, 32px);
}

.service__num {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--brass);
  letter-spacing: 0.08em;
}

.service:hover .service__num {
  color: var(--brass-light);
}

.service__title {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  line-height: 1.15;
}

.service__text {
  font-size: 0.94rem;
  color: var(--muted);
  transition: color 0.4s var(--ease);
}

.service:hover .service__text {
  color: rgba(243, 236, 224, 0.72);
}

.service__arrow {
  display: none;
  font-size: 1.1rem;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

@media (min-width: 900px) {
  .service__arrow {
    display: block;
  }
}

.service:hover .service__arrow {
  opacity: 1;
  transform: none;
}

/* ---------- объекты ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: clamp(26px, 3vw, 40px);
}

.filter-btn {
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease),
    border-color 0.3s var(--ease);
}

.filter-btn:hover {
  border-color: var(--ink);
}

.filter-btn.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper-soft);
}

.object-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: clamp(24px, 3.4vw, 44px) clamp(18px, 2.4vw, 30px);
}

.object-card {
  display: flex;
  flex-direction: column;
  animation: cardIn 0.6s var(--ease) both;
}

.object-card.is-hidden {
  display: none;
}

.cta-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  min-height: 100%;
  padding: clamp(24px, 3vw, 38px);
  border: 1px solid var(--line);
  background: var(--paper-soft);
}

.cta-card__title {
  margin: 6px 0 12px;
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  line-height: 1.15;
}

.cta-card__text {
  max-width: 40ch;
  color: var(--muted);
  font-size: 0.94rem;
}

.cta-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 26px;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

.object-card__media {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--sand);
  aspect-ratio: 4 / 3;
}

.object-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease), filter 0.6s var(--ease);
}

.object-card:hover .object-card__media img {
  transform: scale(1.045);
}

.tag {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 7px 12px 6px;
  background: rgba(255, 253, 248, 0.92);
  color: var(--ink);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tag--demo {
  background: rgba(168, 124, 63, 0.94);
  color: var(--paper-soft);
}

.tag--sold {
  left: auto;
  right: 14px;
  background: var(--ink);
  color: var(--cream-on-dark);
}

.object-card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 18px;
}

.object-card__price {
  font-family: var(--serif);
  font-size: 1.55rem;
  line-height: 1.1;
}

.object-card__title {
  font-family: var(--serif);
  font-size: 1.18rem;
  line-height: 1.24;
}

.object-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 0.8rem;
  color: var(--muted);
}

.object-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.object-card__meta span + span::before {
  content: "";
  width: 3px;
  height: 3px;
  background: var(--brass);
  border-radius: 50%;
}

.object-card__desc {
  font-size: 0.9rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.object-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.object-card__link {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}

.object-card__link:hover {
  border-color: var(--brass);
}

.empty-state {
  padding: clamp(36px, 6vw, 72px);
  border: 1px solid var(--line);
  text-align: center;
}

.empty-state h3 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  margin-bottom: 12px;
}

.empty-state p {
  max-width: 44ch;
  margin: 0 auto 22px;
  color: var(--muted);
}

/* ---------- проданные объекты ---------- */

.sold-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: clamp(18px, 2.6vw, 30px);
}

.sold-card {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  color: var(--paper-soft);
}

.sold-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.72);
  transition: transform 0.9s var(--ease), filter 0.6s var(--ease);
}

.sold-card:hover img {
  transform: scale(1.045);
  filter: saturate(1);
}

.sold-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 22, 18, 0.85), rgba(15, 22, 18, 0.05) 58%);
}

.sold-card__body {
  position: absolute;
  z-index: 2;
  inset: auto 0 0;
  display: grid;
  gap: 6px;
  padding: 24px;
}

.sold-card__kind {
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass-light);
}

.sold-card__title {
  font-family: var(--serif);
  font-size: 1.4rem;
  line-height: 1.2;
}

.sold-card__meta {
  font-size: 0.82rem;
  color: rgba(255, 253, 248, 0.72);
}

/* ---------- сплит-блоки ---------- */

.split {
  display: grid;
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  }
  .split--reverse .split__media {
    order: 2;
  }
}

.split__media {
  position: relative;
}

.split__media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.split__media figcaption {
  margin-top: 12px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.split__body h2 {
  font-size: clamp(2rem, 4vw, 3.3rem);
  margin-bottom: 22px;
}

.split__body p {
  max-width: 52ch;
  color: var(--ink-soft);
}

.split__body p + p {
  margin-top: 14px;
}

.signature {
  margin-top: 30px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.7rem;
  color: var(--brass);
}

.plain-list {
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.plain-list li {
  position: relative;
  padding-left: 26px;
  font-size: 0.96rem;
  color: var(--ink-soft);
}

.plain-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 12px;
  height: 1px;
  background: var(--brass);
}

/* ---------- этапы работы ---------- */

.steps {
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(243, 236, 224, 0.18);
}

@media (min-width: 900px) {
  .steps {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border-bottom: 1px solid rgba(243, 236, 224, 0.18);
  }
}

.step {
  padding: 26px 0;
  border-bottom: 1px solid rgba(243, 236, 224, 0.18);
}

@media (min-width: 900px) {
  .step {
    padding: 34px 24px 40px 0;
    border-bottom: 0;
    border-right: 1px solid rgba(243, 236, 224, 0.18);
  }
  .step:last-child {
    border-right: 0;
    padding-right: 0;
  }
  .step:not(:first-child) {
    padding-left: 24px;
  }
}

.step__num {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--brass-light);
  margin-bottom: 42px;
}

.step__title {
  font-family: var(--serif);
  font-size: 1.32rem;
  line-height: 1.2;
  margin-bottom: 10px;
}

.step__text {
  font-size: 0.88rem;
  color: rgba(243, 236, 224, 0.64);
}

.steps--light {
  border-color: var(--line);
}

.steps--light .step {
  border-color: var(--line);
}

@media (min-width: 900px) {
  .steps--light {
    border-bottom-color: var(--line);
  }
  .steps--light .step {
    border-bottom: 0;
    border-right-color: var(--line);
  }
  .steps--light .step:last-child {
    border-right: 0;
  }
}

.steps--light .step__num {
  color: var(--brass);
}

.steps--light .step__text {
  color: var(--muted);
}

/* ---------- контактный блок ---------- */

.contact-band {
  display: grid;
  gap: clamp(30px, 4vw, 60px);
  align-items: start;
}

@media (min-width: 980px) {
  .contact-band {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  }
}

.contact-info {
  display: grid;
  gap: 26px;
  margin-top: 30px;
}

.contact-info__label {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
}

.section--dark .contact-info__label {
  color: var(--brass-light);
}

.contact-info__value {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  line-height: 1.2;
}

.contact-info__value a:hover {
  color: var(--brass);
}

.form {
  display: grid;
  gap: 20px;
  padding: clamp(24px, 3.4vw, 44px);
  background: var(--paper-soft);
  color: var(--ink);
  border: 1px solid var(--line-soft);
}

.form .form__title {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
}

.form__row {
  display: grid;
  gap: 20px;
}

@media (min-width: 640px) {
  .form__row {
    grid-template-columns: 1fr 1fr;
  }
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field textarea {
  width: 100%;
  padding: 14px 2px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  font-size: 1rem;
  transition: border-color 0.3s var(--ease);
  border-radius: 0;
}

.field textarea {
  min-height: 104px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brass);
}

.field.is-invalid input,
.field.is-invalid textarea {
  border-color: #a8422f;
}

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

.form__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: 4px;
}

.form__note {
  max-width: 34ch;
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--muted);
}

.form__status {
  font-size: 0.9rem;
  min-height: 22px;
}

.form__status.is-error {
  color: #a8422f;
}

.form__status.is-success {
  color: #2f6b4a;
}

.form .btn {
  min-width: 190px;
}

.form .btn[disabled] {
  opacity: 0.6;
  cursor: default;
}

/* ---------- футер ---------- */

.site-footer {
  background: var(--ink);
  color: var(--cream-on-dark);
  padding-top: clamp(48px, 6vw, 80px);
}

.site-footer__top {
  display: grid;
  gap: 40px;
  padding-bottom: clamp(36px, 5vw, 60px);
  border-bottom: 1px solid rgba(243, 236, 224, 0.16);
}

@media (min-width: 900px) {
  .site-footer__top {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr) minmax(0, 0.8fr);
  }
}

.site-footer__brand {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.1;
}

.site-footer__brand span {
  display: block;
  margin-top: 8px;
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(243, 236, 224, 0.55);
}

.site-footer__col h3 {
  margin-bottom: 16px;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass-light);
}

.site-footer__col ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  font-size: 0.94rem;
  color: rgba(243, 236, 224, 0.78);
}

.site-footer__col a:hover {
  color: var(--paper-soft);
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px 30px;
  padding-block: 24px 32px;
  font-size: 0.76rem;
  line-height: 1.6;
  color: rgba(243, 236, 224, 0.5);
}

.site-footer__bottom p {
  max-width: 70ch;
}

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

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal[data-delay="1"] {
  transition-delay: 0.08s;
}
.reveal[data-delay="2"] {
  transition-delay: 0.16s;
}
.reveal[data-delay="3"] {
  transition-delay: 0.24s;
}

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

/* ---------- мелкие утилиты ---------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.mt-32 {
  margin-top: 32px;
}

.note-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 18px;
  font-size: 0.78rem;
  color: var(--muted);
}

.note-line::before {
  content: "i";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1px solid var(--brass);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 0.72rem;
  color: var(--brass);
  flex: none;
}

.prices-note {
  margin-top: 26px;
  font-size: 0.78rem;
  color: var(--muted);
}

/* ---------- страница объекта ---------- */

.page-hero--object {
  padding-bottom: clamp(30px, 4vw, 52px);
}

.obj-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 40px;
}

.obj-head .page-hero__title {
  max-width: 22ch;
}

.obj-badge {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass-light);
}

.obj-address {
  margin-top: 14px;
  color: rgba(243, 236, 224, 0.7);
}

.obj-price {
  display: grid;
  gap: 4px;
}

.obj-price__label {
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(243, 236, 224, 0.5);
}

.obj-price__value {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 2.8vw, 2.3rem);
  line-height: 1.1;
  white-space: nowrap;
}

.obj-layout {
  display: grid;
  gap: clamp(32px, 4vw, 56px);
}

.obj-layout > * {
  min-width: 0;
}

.obj-main,
.gallery,
.gallery__main,
.map-box {
  max-width: 100%;
}

@media (min-width: 1024px) {
  .obj-layout {
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
  }
  .obj-side {
    position: sticky;
    top: calc(var(--header-h) + 20px);
  }
}

.obj-facts {
  padding: clamp(20px, 2.4vw, 30px);
  border: 1px solid var(--line);
  background: var(--paper-soft);
}

.obj-facts__title {
  margin-bottom: 16px;
  font-size: 1.5rem;
}

.spec-list {
  margin: 0;
  display: grid;
}

.spec-list > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}

.spec-list > div:last-child {
  border-bottom: 0;
}

.spec-list dt {
  font-size: 0.84rem;
  color: var(--muted);
}

.spec-list dd {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 500;
  text-align: right;
}

.obj-actions {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.obj-actions .btn {
  min-height: 50px;
  font-size: 0.7rem;
}

.obj-agent {
  margin-top: 18px;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--muted);
}

.obj-facts .note-line {
  font-size: 0.72rem;
}

/* галерея */

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

.gallery__main {
  position: relative;
  padding: 0;
  border: 0;
  background: var(--sand);
  cursor: zoom-in;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  width: 100%;
}

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

.gallery__main:hover img {
  transform: scale(1.02);
}

.gallery__count {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 6px 11px;
  background: rgba(15, 22, 18, 0.66);
  color: var(--paper-soft);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
}

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

.gallery__thumb {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  opacity: 0.68;
  transition: opacity 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

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

.gallery__thumb:hover,
.gallery__thumb.is-active {
  opacity: 1;
  box-shadow: inset 0 0 0 2px var(--brass);
}

/* текстовые блоки объекта */

.obj-section {
  margin-top: clamp(32px, 4vw, 52px);
}

.obj-section h2,
.obj-map h2 {
  margin-bottom: 16px;
  font-size: clamp(1.55rem, 2.6vw, 2.15rem);
}

.obj-section p {
  max-width: 64ch;
  color: var(--ink-soft);
}

.obj-section .plain-list {
  margin-top: 18px;
}

.obj-map {
  margin-top: clamp(32px, 4vw, 52px);
}

.map-box {
  border: 1px solid var(--line);
  background: var(--sand);
  aspect-ratio: 16 / 7;
  min-height: 260px;
}

.map-box iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.map-actions {
  margin-top: 16px;
}

.object-grid--two {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
}

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

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: clamp(16px, 3vw, 40px);
  background: rgba(12, 18, 15, 0.95);
}

.lightbox[hidden] {
  display: none;
}

.lightbox__image {
  max-width: 100%;
  max-height: 86vh;
  margin: 0 auto;
  object-fit: contain;
}

.lightbox__close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 253, 248, 0.3);
  background: transparent;
  color: var(--paper-soft);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox__prev,
.lightbox__next {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 253, 248, 0.3);
  background: transparent;
  color: var(--paper-soft);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.3s var(--ease);
}

.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover {
  border-color: var(--brass-light);
}

@media (max-width: 720px) {
  .obj-price {
    justify-items: start;
  }
  .lightbox {
    grid-template-columns: 1fr;
  }
  .lightbox__prev,
  .lightbox__next {
    position: absolute;
    bottom: 20px;
  }
  .lightbox__prev {
    left: 20px;
  }
  .lightbox__next {
    right: 20px;
  }
}
