/* =========================================================
   Дом Мечты — one-screen лендинг
   ========================================================= */

:root{
  --brand: #025EA5;
  --brand-dark: #01477D;
  --brand-tint: #EAF3FB;
  --brand-tint-bd: #CCE2F3;
  --brand-deep: #1F4E78;

  --ink: #1C1917;
  --ink-2: #44403C;
  --ink-3: #57534E;
  --muted: #8B857E;
  --muted-2: #A8A29E;

  --bg: #ffffff;
  --bg-right: #FAF8F5;
  --bg-input: #F7F5F2;
  --border: #ECE8E3;
  --border-2: #E7E3DD;
  --line: #F0ECE7;

  --ok: #1F7A4D;
  --ok-bg: #F1F7F3;
  --ok-bd: #CDE7D7;

  --radius: 13px;
  --radius-card: 18px;
  --shadow-card: 0 2px 10px rgba(28,25,23,.05);
  --shadow-card-hover: 0 12px 28px rgba(28,25,23,.12);

  --font: 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

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

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
button { font-family: inherit; }

/* =========================================================
   Каркас: один экран, без вертикального скролла
   ========================================================= */
.landing {
  display: flex;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
}

/* ============================ ЛЕВАЯ ЧАСТЬ ================================ */
.left { 
  max-width: 100%;
  height: 100%;
  padding: 46px 32px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #EFECE8;
  background: var(--bg);
  flex: 0 0 490px;
}


.logo {
  max-width: 170px;
  display: inline-flex; align-items: center; justify-content: center;
}
.brand { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }

.left__center {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 19px;
}

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--brand);
}

.h1 {
  margin: 0;
  font-size: 33px;
  line-height: 1.16;
  font-weight: 700;
  letter-spacing: -.02em;
  text-wrap: balance;
}

.sub {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-3);
  max-width: 380px;
}

/* ============================ ФОРМА ================================ */
.form {
  display: flex;
  flex-direction: column;
  gap: 11px;
  max-width: 380px;
}
.form[hidden] { display: none; }

.input {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
  background: var(--bg-input);
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius);
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.input::placeholder { color: #B4ADA4; }
.input:focus {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(2, 94, 165, .14);
}
.input[aria-invalid="true"] {
  border-color: #C2410C;
  box-shadow: 0 0 0 3px rgba(194, 65, 12, .14);
}

.btn {
  width: 100%;
  height: 52px;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: #fff;
  background: var(--brand);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .15s, transform .05s;
}
.btn:hover { background: var(--brand-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: progress; }

.note {
  margin: 4px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

/* Чекбокс согласия */
.consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  cursor: pointer;
  user-select: none;
}
.consent__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.consent__check {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 1.5px solid var(--border-2);
  border-radius: 5px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .15s, background .15s;
}
.consent__input:checked + .consent__check {
  background: var(--brand);
  border-color: var(--brand);
}
.consent__input:checked + .consent__check::after {
  content: "";
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-1px);
}
.consent__input:focus-visible + .consent__check {
  box-shadow: 0 0 0 3px rgba(2, 94, 165, .2);
}
.consent__text {
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-3);
}
.consent__link {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.consent__link:hover {
  color: var(--brand-dark);
}

.success {
  max-width: 380px;
  background: var(--ok-bg);
  border: 1px solid var(--ok-bd);
  border-radius: 14px;
  padding: 18px 20px;
}
.success__title {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 700; color: var(--ok);
}
.success__title span { font-size: 17px; }
.success__text {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-3);
}

/* ============================ ПРАВАЯ ЧАСТЬ ================================ */
.right {
  /* width: 57%; */
  height: 100%;
  background: var(--bg-right);
  display: flex;
  flex-direction: column;
  padding: 34px 0 30px 34px;
  gap: 16px;
  min-width: 0;
  justify-content: center;
}

.right__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-right: 34px;
}
.right__title { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.right__sub { font-size: 13px; color: var(--muted); margin-top: 2px; }

.nav { display: flex; gap: 8px; }
.nav__btn {
  width: 40px; height: 40px;
  border-radius: 11px;
  border: 1.5px solid var(--border-2);
  background: #fff;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink);
  transition: border-color .15s, color .15s;
}
.nav__btn:hover { border-color: var(--brand); color: var(--brand); }
.nav__btn:disabled { opacity: .4; cursor: default; }

/* ============================ КАРУСЕЛЬ ================================ */
.track {
  /* flex: 1; */
  min-height: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 4px 34px 4px 0;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.track::-webkit-scrollbar { display: none; }

/* ============================ КАРТОЧКА ================================ */
.card {
  flex: 0 0 370px;
  scroll-snap-align: start;
  cursor: pointer;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  box-shadow: var(--shadow-card);
  transition: box-shadow .18s, transform .18s;
}
.card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
}

.card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  border-radius: 12px;
  background: #eceae7;
}
.card__photo {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transition: opacity .25s;
}
.card__photo--placeholder {
  display: flex; align-items: center; justify-content: center;
}
.card__photo--placeholder svg { opacity: .28; }
.card__media::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(28,25,23,.16));
  pointer-events: none;
}

.tag-style {
  position: absolute; top: 9px; left: 9px;
  background: rgba(255,255,255,.93);
  color: var(--ink);
  font-size: 10.5px; font-weight: 600;
  padding: 4px 9px; border-radius: 999px;
  z-index: 2;
}
.tag-photo {
  position: absolute; bottom: 9px; right: 9px;
  background: rgba(28,25,23,.58); color: #fff;
  font-size: 10px; font-weight: 600;
  padding: 4px 8px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 4px;
  z-index: 2;
}

.thumbs {
  position: absolute; left: 8px; right: 8px; bottom: 8px;
  display: flex; gap: 6px;
  z-index: 3;
}
.thumbs[hidden] { display: none; }
.thumb {
  flex: 1 1 0;
  height: 68px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  box-shadow: 0 0 0 2px rgba(255,255,255,.92), 0 2px 6px rgba(0,0,0,.2);
  background-size: cover;
  background-position: center;
  border: none;
  padding: 0;
}
.thumb--active::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 8px;
  box-shadow: inset 0 0 0 2px var(--brand);
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 2px 4px 4px;
}

.card__row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.card__title { font-size: 15.5px; font-weight: 700; white-space: nowrap; }
.card__region {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; color: var(--muted-2);
  white-space: nowrap;
}
.card__region svg { color: var(--muted-2); }

.card__price {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
}
.spec {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--ink-2); font-weight: 600;
}
.spec svg { color: var(--brand); flex: 0 0 auto; }

.mortgage {
  display: flex; align-items: center; gap: 8px;
  background: var(--brand-tint);
  border: 1px solid var(--brand-tint-bd);
  border-radius: 10px;
  padding: 8px 11px;
  color: var(--brand-deep);
  font-size: 12.5px;
}
.mortgage svg { color: var(--brand); flex: 0 0 auto; }
.mortgage b { color: var(--ink); font-weight: 700; }

/* =========================================================
   Адаптив: ниже 780px → стек, форма сверху, карусель снизу
   ========================================================= */
@media (max-width: 780px) {
  #leadForm{
    position: absolute;
    bottom: 0;
    background: #fff;
    left: 0;
    padding: 8px 14px;
    width: 100%;
  }
	.logo {
		max-width: 96px;
	}
  .thumb {
    height: 38px;
  }
  .card {
    flex: 0 0 290px;
  }
  .landing {
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
  }
  .left {
    width: 100%;
    height: auto;
    flex: 0 0 auto;
    padding: 20px 18px 14px;
    border-right: none;
    border-bottom: 1px solid rgba(28,25,23,.08);
  }
  .left__center {
    flex: 0 0 auto;
    justify-content: flex-start;
    gap: 12px;
  }
  
  .eyebrow { font-size: 10px; }
  .h1 { font-size: 21px; line-height: 1.16; }
  .sub { font-size: 11.5px; }
  .wordmark { margin-bottom: 6px; }
  .form, .success { max-width: 100%; }

  .right {
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    padding: 6px 0 158px 14px;
    gap: 10px;
  }
  .right__head { display: none; } 
  .track { padding-right: 18px; }
  .note{
	  font-size: 11.5px;
	  text-align: center;
  }
}

@media (max-width: 420px) {
  .left { padding: 18px 16px 12px; }
  .h1 { font-size: 18px; }
  .input,.btn{
	height: 38px;
	font-size: 14.5px;
	font-weight: 500;
  }
  .card__body{
	  gap:4px;
	  padding: 0;
  }
  .card__media {
	aspect-ratio: 16 / 11;
  }
  .card {
    flex: 0 0 260px;
	gap: 4px;
  }
}

/* ============================ COOKIE-БАННЕР ================================ */
.cookie-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(28, 25, 23, .94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 14px 24px;
}
.cookie-bar[hidden] { display: none; }

.cookie-bar__inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.cookie-bar__text {
  flex: 1;
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255,255,255,.82);
}

.cookie-bar__link {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cookie-bar__link:hover {
  color: rgba(255,255,255,.72);
}

.cookie-bar__btn {
  flex: 0 0 auto;
  height: 40px;
  padding: 0 22px;
  font-size: 13.5px;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  background: var(--brand);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}
.cookie-bar__btn:hover {
  background: var(--brand-dark);
}

@media (max-width: 600px) {
  .cookie-bar { padding: 12px 16px 16px; }
  .cookie-bar__inner {
    flex-direction: column;
    gap: 12px;
  }
  .cookie-bar__text { font-size: 12px; text-align: center; }
  .cookie-bar__btn { width: 100%; }
}
