/* ============================================================
   ООО «Сфера» — макет сайта строительной компании (ИЖС)
   Стиль: фото-хиро, светлые карточки, тёплая палитра, оранжевый акцент
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-cream: #f4f0e8;
  --text: #23211c;
  --text-secondary: #6d6a60;
  --text-tertiary: #8b887e;
  --line: #ddd8cd;
  --accent: #f07f2c;
  --accent-hover: #dd6c17;
  --accent-soft: rgba(240, 127, 44, .12);
  --dark: #26241e;
  --dark-2: #33302a;
  --cream-on-dark: #f6f2ea;
  --card: #ffffff;
  --ph-bg: #e9e4d8;
  --ph-border: #cfc9ba;
  --ph-text: #8b8677;
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow-card: 0 6px 28px rgba(46, 40, 28, .08);
  --shadow-soft: 0 10px 36px rgba(46, 40, 28, .12);
  --shadow-lift: 0 18px 44px rgba(46, 40, 28, .14);
  --shadow-pop: 0 24px 80px rgba(20, 16, 8, .3);
  --glass-bg: rgba(255, 255, 255, .12);
  --glass-border: rgba(255, 255, 255, .28);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
/* iOS Safari не наследует цвет/стиль для button — задаём явно */
button {
  font-family: inherit;
  color: inherit;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
input { font-family: inherit; }

.container {
  width: min(1200px, 100% - 48px);
  margin-inline: auto;
}

/* ================= Заглушки вместо фото ================= */
.ph {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--ph-bg);
  border: 2px dashed var(--ph-border);
  border-radius: var(--radius-md);
  color: var(--ph-text);
  font-size: 14px;
  font-weight: 500;
  padding: 12px;
}

.ph--logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 8px;
  line-height: 1.15;
  padding: 2px;
  background: rgba(255, 255, 255, .9);
  border-color: #bbb;
}

.ph--fill {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 0;
  background: #e7e2d4;
  font-size: 13px;
}

.about__media {
  position: sticky;
  top: 104px;
}

.about__img {
  width: 100%;
  min-height: 520px;
  max-height: 640px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

/* ================= Кнопки ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 980px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .01em;
  padding: 14px 28px;
  transition: transform .25s ease, background .25s ease, box-shadow .25s ease, color .25s ease, border-color .25s ease;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px) scale(1.01); }
.btn:active { transform: scale(.98); }

.btn--sm { padding: 9px 20px; font-size: 14px; }
.btn--lg { padding: 17px 34px; font-size: 16px; }
.btn--full { width: 100%; }

.btn--dark { background: var(--dark); color: var(--cream-on-dark); }
.btn--dark:hover { background: #3a372f; }

.btn--accent { background: var(--accent); color: #fff; box-shadow: 0 10px 26px rgba(240, 127, 44, .38); }
.btn--accent:hover { background: var(--accent-hover); box-shadow: 0 14px 30px rgba(240, 127, 44, .45); }

.btn--white { background: #fff; color: var(--text); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.btn--white:hover { background: #f6f2ea; }

.btn--outline { background: transparent; color: var(--text); border: 1.5px solid var(--line); }
.btn--outline:hover { border-color: var(--text); background: rgba(29, 29, 31, .04); }

.btn--caps { text-transform: uppercase; letter-spacing: .08em; font-size: 14px; }

/* ================= Шапка ================= */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(30, 27, 21, .38);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  transition: background .35s ease;
}

.header.is-scrolled { background: rgba(30, 27, 21, .82); }

.header__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 68px;
}

.logo { display: inline-flex; align-items: center; gap: 12px; }

.logo__img {
  height: 46px;
  width: auto;
  display: block;
}

.nav { margin-inline: auto; }
.nav__list { display: flex; gap: 28px; }

.nav__link {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, .78);
  transition: color .2s ease;
}
.nav__link:hover { color: #fff; }

.header__actions { display: flex; align-items: center; gap: 14px; }

.header__phone {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  color: #fff;
  transition: color .2s ease;
}
.header__phone:hover { color: var(--accent); }

.header__socials { display: flex; gap: 4px; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, .78);
  font-size: 11px;
  font-weight: 700;
  transition: background .2s ease, color .2s ease;
}
.icon-btn:hover { background: rgba(255, 255, 255, .16); color: #fff; }

/* кнопка звонка — только в мобильной шапке */
.header__call { display: none; }

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  padding: 8px;
}
.burger span {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: #fff;
  transition: transform .3s ease, opacity .3s ease;
}
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ================= ЭКРАН 1: Хиро ================= */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh; /* мобильные: без прыжка из-за адресной строки */
  display: flex;
  flex-direction: column;
  color: #fff;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-image: url("../images/house-1.jpg");
  background-size: cover;
  background-position: center 62%;
  transform: scale(1.04);
  animation: heroZoom 14s ease-out forwards;
}

@keyframes heroZoom {
  from { transform: scale(1.12); }
  to   { transform: scale(1.04); }
}

/* затемнение: лёгкое общее напыление + усиление слева и снизу */
.hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(77deg, rgba(18, 15, 9, .85) 0%, rgba(18, 15, 9, .55) 42%, rgba(18, 15, 9, .22) 75%),
    linear-gradient(to top, rgba(18, 15, 9, .88) 0%, rgba(18, 15, 9, .3) 38%, rgba(18, 15, 9, .18) 100%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 150px;
  padding-bottom: 36px;
  gap: 44px;
}

.hero__content { max-width: 720px; }

.hero__title {
  font-size: clamp(36px, 4.6vw, 60px);
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: -0.022em;
  margin-bottom: 26px;
  text-wrap: balance;
  color: #fff;
}

.hero__title span {
  display: block;
  font-size: .55em;
  font-weight: 600;
  color: #fff;
  opacity: .85;
  margin-top: 10px;
  letter-spacing: -0.01em;
}

.hero__cta { margin-bottom: 26px; }

.hero__subtitle {
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.55;
  color: #fff;
  opacity: .85;
  max-width: 540px;
}

.hero__badges {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.badge {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  font-size: 13.5px;
  line-height: 1.35;
  color: #fff;
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 10px 34px rgba(10, 8, 4, .18);
  transition: transform .3s ease, background .3s ease;
}

.badge:hover { transform: translateY(-3px); background: rgba(255, 255, 255, .18); }

.badge strong { color: #fff; }

.badge__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 17px;
  box-shadow: 0 6px 18px rgba(240, 127, 44, .5);
}

.hero__subline {
  position: relative;
  z-index: 1;
  background: rgba(20, 17, 11, .66);
  border-top: 1px solid rgba(255, 255, 255, .14);
  padding: 15px 0;
}

.hero__subline-inner {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  font-size: 14px;
  color: rgba(255, 255, 255, .78);
}

.hero__subline-inner span { display: inline-flex; align-items: center; gap: 10px; }

.hero__subline-inner i {
  font-style: normal;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 50%;
  background: rgba(240, 127, 44, .25);
  color: #ffb377;
  font-size: 13px;
}

/* ================= Секции: общее ================= */
.section { padding: 68px 0; }
.section--cream { background: var(--bg-cream); }

.section__head {
  max-width: 760px;
  margin-bottom: 28px;
}

.section__head--flat { margin-bottom: 0; }

.section__eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.section__eyebrow::before { content: "{ "; }
.section__eyebrow::after { content: " }"; }

.section__eyebrow--light { color: #ffb377; }

.section__title {
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section__subtitle {
  font-size: clamp(16px, 1.5vw, 18px);
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ================= ЭКРАН 2: Каталог — карточки с каруселью ================= */
.houses {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.house {
  background: var(--card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform .3s ease, box-shadow .3s ease;
}

.house:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }

.house__slider {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.house__track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.house__track::-webkit-scrollbar { display: none; }

.house__slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

/* финальный слайд — схема планировки: целиком на белом фоне */
.house__slide--plan {
  object-fit: contain;
  background: #fff;
}

.house__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, .92);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(20, 15, 6, .22);
  transition: background .2s ease, color .2s ease, transform .2s ease;
  z-index: 2;
}
.house__arrow:hover { background: var(--accent); color: #fff; }

.house__arrow--prev { left: 12px; }
.house__arrow--next { right: 12px; }

.house__dots {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 2;
}

.house__dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .55);
  transition: background .25s ease, transform .25s ease;
}

.house__dots span.is-active { background: var(--accent); transform: scale(1.25); }

/* плашка-кнопка: наведение — фирменный оранжевый */
.house__pill {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: none;
  background: var(--card);
  color: var(--text);
  padding: 16px 20px;
  text-align: left;
  transition: background .25s ease, color .25s ease;
}

.house__pill b {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: inherit;
}

.house__pill span { font-size: 14px; color: var(--text-secondary); transition: color .25s ease; }

.house__pill:hover { background: var(--accent); color: #fff; }
.house__pill:hover span { color: rgba(255, 255, 255, .85); }

/* ================= ЭКРАН 3: Баннер экскурсии ================= */
.tour {
  position: relative;
  margin-top: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  background: var(--dark);
  color: var(--cream-on-dark);
  border-radius: var(--radius-lg);
  padding: 38px 44px;
  overflow: hidden;
}

.tour__glow {
  position: absolute;
  top: -120px;
  right: -80px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 127, 44, .5), transparent 70%);
  filter: blur(46px);
  pointer-events: none;
}

.tour__text { position: relative; }

.tour h3 {
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 10px;
}

.tour p {
  color: rgba(246, 242, 234, .65);
  font-size: 16px;
  max-width: 560px;
}

.tour .btn { position: relative; }

/* ================= ЭКРАН 4: Преимущества 3×2 ================= */
.adv-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* специфичность выше .reveal, чтобы transition подсветки не перебивался */
.adv-list .adv {
  display: flex;
  gap: 18px;
  padding: 26px 22px;
  border-radius: var(--radius-md);
  /* стартовые прозрачные фон и тень — чтобы подсветка была плавной */
  background: rgba(255, 255, 255, 0);
  box-shadow: 0 10px 36px rgba(46, 40, 28, 0);
  transition: background .45s ease, box-shadow .45s ease, transform .45s ease, opacity .7s ease;
}

/* при наведении — белый фон с мягкой размытой тенью */
.adv-list .adv:hover {
  background: var(--card);
  box-shadow: var(--shadow-soft);
  transform: translateY(-3px);
}

.adv__num {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  min-width: 34px;
  padding-top: 3px;
}

.adv__body h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.adv__body p { font-size: 14.5px; color: var(--text-secondary); line-height: 1.55; }

/* ================= ЭКРАН 5: Ипотека ================= */
.ipoteka__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 44px;
}

.ipoteka__head .section__head { margin-bottom: 0; }

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

.ip-card {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 34px 30px;
  box-shadow: var(--shadow-soft);
  transition: transform .3s ease, box-shadow .3s ease;
}

.ip-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }

.ip-card__name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 14px;
}

.ip-card__rate {
  font-size: clamp(46px, 4.6vw, 62px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 14px;
}

.ip-card__note { font-size: 14px; color: var(--text-tertiary); line-height: 1.5; }

/* ================= ЭКРАН 6: Галерея — рамки + лайтбокс ================= */
.gallery {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.gframe {
  margin: 0;
  aspect-ratio: 1 / 1;
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 10px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
}

.gframe:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }

.gframe img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  cursor: zoom-in;
  transition: transform .6s ease;
}

.gframe:hover img { transform: scale(1.04); }

.gframe .ph--fill { border-radius: 10px; height: 100%; }

.gallery__more {
  margin-top: 36px;
  text-align: center;
}

/* лайтбокс: фото на весь экран */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(16, 13, 8, .92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  opacity: 0;
  transition: opacity .3s ease;
  cursor: zoom-out;
}

.lightbox[hidden] { display: none; }

.lightbox.is-open { opacity: 1; }

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-pop);
}

.lightbox__close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 16px;
  transition: background .2s ease;
}
.lightbox__close:hover { background: rgba(255, 255, 255, .28); }

/* ================= ЭКРАН 7: О компании ================= */
.about {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 48px;
  align-items: start;
}

.about__text > p {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 16px;
  max-width: 560px;
}

.about__list { margin-top: 36px; display: grid; gap: 24px; }

.about__list li { display: flex; gap: 20px; align-items: flex-start; }

.about__num {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  border: 1.5px solid rgba(240, 127, 44, .45);
  background: var(--accent-soft);
  border-radius: 14px;
  width: 46px;
  height: 46px;
  min-width: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.about__list p { font-size: 14.5px; color: var(--text-secondary); line-height: 1.55; }

/* ================= ЭКРАН 8: Этапы — компактные квадраты со смещением ================= */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 340px);
  justify-content: center;
  gap: 20px;
}

.step {
  aspect-ratio: 1 / 1;
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-soft);
  transition: transform .3s ease, box-shadow .3s ease;
}

.step:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }

.step--offset { margin-top: 44px; }

.step--dark { background: var(--dark); color: var(--cream-on-dark); }
.step--dark p { color: rgba(246, 242, 234, .7); }

.step__num {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
  letter-spacing: .1em;
}

.step h3 {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.step p { font-size: 15px; color: var(--text-secondary); line-height: 1.55; margin-top: auto; }

/* ================= ЭКРАН 9: Партнёры — бегущая строка ================= */
.marquee {
  overflow: hidden;
  position: relative;
  /* вертикальные отступы дают тени плашек место, чтобы не обрезалась */
  padding: 38px 0 34px;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 90s linear infinite;
}

.marquee:hover .marquee__track { animation-play-state: paused; }

.marquee__group {
  display: flex;
  align-items: center;
  gap: 40px;
  padding-right: 40px;
}

/* белые плашки с мягкой тенью, внутри — логотип партнёра;
   тёмный вариант — под светлые логотипы (Бетон, Гектор) */
.marquee__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 104px;
  padding: 0 32px;
  border-radius: var(--radius-md);
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.marquee__logo--dark { background: var(--dark); }

.marquee__logo img {
  max-height: 64px;
  max-width: 190px;
  width: auto;
  height: auto;
  object-fit: contain;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ================= ЭКРАН 10: Финальная форма ================= */
.signup {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
  padding: 120px 0 80px;
}

.signup__bg {
  position: absolute;
  inset: 0;
  background-image: url("../images/house-1.jpg");
  background-size: cover;
  background-position: center 40%;
}

.signup__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(80deg, rgba(18, 15, 9, .88) 0%, rgba(18, 15, 9, .68) 45%, rgba(18, 15, 9, .38) 100%);
}

.signup__inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.signup__head { margin-bottom: 40px; }

.signup__head h2 {
  font-size: clamp(30px, 3.6vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin-bottom: 14px;
}

.signup__head p {
  font-size: clamp(15px, 1.4vw, 18px);
  color: rgba(255, 255, 255, .78);
  max-width: 560px;
  line-height: 1.55;
}

.form--dark { max-width: 560px; display: grid; gap: 22px; }

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

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

/* специфичность выше общих .field span / .field input из блока попапов */
.form--dark .field span {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, .68);
}

.form--dark .field input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1.5px solid rgba(255, 255, 255, .35);
  border-radius: 0;
  padding: 10px 2px;
  font-size: 17px;
  color: #fff;
  outline: none;
  box-shadow: none;
  transition: border-color .25s ease;
}

.form--dark .field input::placeholder { color: rgba(255, 255, 255, .4); }

.form--dark .field input:focus {
  border-bottom-color: var(--accent);
  box-shadow: none;
}

/* специфичность выше .check из блока попапов */
.form--dark .check { color: #fff; }

.form--dark .btn { justify-self: start; }

.form__success--dark {
  color: #7fd6a0;
  background: rgba(74, 168, 110, .18);
}

/* ================= Футер ================= */
.footer {
  background: #141310;
  color: rgba(246, 242, 234, .68);
  padding: 56px 0 36px;
  font-size: 14px;
}

.footer__top {
  display: grid;
  grid-template-columns: 1.4fr .8fr 1fr 1.2fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.footer__phone {
  display: block;
  font-size: clamp(24px, 2.4vw, 30px);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
  transition: color .2s ease;
}
.footer__phone:hover { color: var(--accent); }

.footer__brand .logo { margin-bottom: 18px; }

.footer__socials { display: flex; gap: 6px; margin-bottom: 20px; }

.footer__hours { color: rgba(246, 242, 234, .45); }

.footer__col h4 {
  color: #fff;
  font-size: 14px;
  font-weight: 650;
  margin-bottom: 18px;
  letter-spacing: .01em;
}

.footer__col ul { display: grid; gap: 12px; }
.footer__col a { transition: color .2s ease; }
.footer__col a:hover { color: #fff; }
.footer__col li { line-height: 1.55; max-width: 280px; }

.footer__contacts a { font-weight: 600; color: #fff; }

.footer__req {
  padding: 32px 0;
  display: grid;
  gap: 6px;
  font-size: 12.5px;
  color: rgba(246, 242, 234, .42);
  line-height: 1.6;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 28px;
  font-size: 12.5px;
  color: rgba(246, 242, 234, .42);
}

/* ================= Попапы ================= */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(22, 18, 10, .62);
  opacity: 0;
  transition: opacity .3s ease;
}
.overlay.is-visible { opacity: 1; }

.popup {
  position: fixed;
  z-index: 201;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -46%) scale(.96);
  width: min(440px, calc(100vw - 40px));
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 40px 36px 36px;
  box-shadow: var(--shadow-pop);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
}

.popup.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.popup__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--bg-cream);
  color: var(--text-secondary);
  font-size: 14px;
  transition: background .2s ease, color .2s ease;
}
.popup__close:hover { background: #ece7db; color: var(--text); }

.popup h3 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}

.popup__note {
  font-size: 14.5px;
  color: var(--text-secondary);
  margin-bottom: 26px;
  line-height: 1.5;
}

.form { display: grid; gap: 18px; }

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

.field span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.field input {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: 15px;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(240, 127, 44, .16);
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-tertiary);
  line-height: 1.45;
  cursor: pointer;
}

.check input {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.form__success {
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #1d8a4a;
  background: rgba(29, 138, 74, .1);
  border-radius: var(--radius-sm);
  padding: 12px;
}

/* ================= Анимации появления ================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}

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

/* ================= Адаптив ================= */
@media (max-width: 1080px) {
  .nav__list { gap: 18px; }
  .header__phone { display: none; }
  .hero__badges { grid-template-columns: repeat(2, 1fr); }
  /* увеличенная зона касания для ссылок меню на планшетах */
  .nav__link { padding: 10px 0; }
}

@media (max-width: 980px) {
  .houses { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
  .adv-list { grid-template-columns: repeat(2, 1fr); }
  .ip-cards { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .hero__inner { padding-top: 120px; }
  .about { grid-template-columns: 1fr; gap: 40px; }
  .about__media { position: static; }
  .about__img { min-height: 320px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer__top { grid-template-columns: 1fr 1fr; gap: 36px; }
  .tour { flex-direction: column; align-items: flex-start; }
  .form__row { grid-template-columns: 1fr; gap: 18px; }
  .ipoteka__head { flex-direction: column; align-items: flex-start; gap: 24px; }
}

@media (max-width: 640px) {
  html { scroll-padding-top: 76px; }
  .container { width: calc(100% - 32px); }

  .nav {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: rgba(30, 27, 21, .97);
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    box-shadow: 0 18px 30px rgba(12, 9, 4, .35);
    padding: 12px 24px 20px;
    display: none;
  }
  .nav.is-open { display: block; }
  .nav__list { flex-direction: column; gap: 4px; }
  .nav__link { display: block; padding: 12px 0; font-size: 17px; }

  .burger { display: flex; width: 44px; height: 44px; }
  .header__socials { display: none; }
  .header .btn--sm { display: none; }
  /* на мобильном вместо номера — кнопка звонка */
  .header__call { display: inline-flex; }

  /* хиро компактнее: бейджи 2×2 вместо столбика */
  .hero__inner { gap: 26px; padding-top: 104px; padding-bottom: 26px; }
  .hero__badges { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .badge { padding: 12px; gap: 10px; font-size: 12.5px; }
  .badge__icon { width: 34px; height: 34px; min-width: 34px; font-size: 15px; }
  .hero__subline-inner { gap: 10px 16px; font-size: 13px; }

  .adv-list { grid-template-columns: 1fr; }

  /* этапы: карточки по содержимому, без растяжения текста к низу */
  .steps { grid-template-columns: 1fr; gap: 14px; }
  .step { aspect-ratio: auto; min-height: 0; padding: 22px 20px; }
  .step p { margin-top: 10px; }
  .step--offset { margin-top: 0; }

  /* крупные тап-зоны */
  .icon-btn { width: 40px; height: 40px; }
  .footer__phone { display: inline-block; padding: 4px 0; }
  .footer__top { grid-template-columns: 1fr; gap: 36px; }
  .footer__col ul { gap: 14px; }
  .lightbox__close { top: 14px; right: 14px; width: 42px; height: 42px; }

  /* попап: без зума полей на iOS и с запасом по высоте */
  .popup { width: min(440px, calc(100vw - 28px)); padding: 30px 22px 28px; max-height: calc(100svh - 48px); overflow-y: auto; }
  .popup h3 { font-size: 21px; }
  .field input { font-size: 16px; }

  .section { padding: 56px 0; }
  .tour { padding: 30px 26px; }
  .signup { padding: 104px 0 64px; }
  .signup__head { margin-bottom: 30px; }
  .form--dark .btn { justify-self: stretch; }
  .marquee__logo { height: 80px; padding: 0 22px; }
  .marquee__logo img { max-height: 46px; max-width: 130px; }
  .lightbox { padding: 20px; }
}

@media (max-width: 380px) {
  .hero__title { font-size: 32px; }
}

/* отклик на касание там, где нет наведения */
@media (hover: none) {
  .house__pill:active { background: var(--accent); color: #fff; }
  .house__pill:active span { color: rgba(255, 255, 255, .85); }
  .gframe:active { transform: translateY(-4px); }
}

/* Уважение к настройкам доступности */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__bg, .marquee__track { animation: none; }
  .btn, .house, .step, .ip-card, .adv, .gframe { transition: none; }
}
