:root {
  --paper: #f2eee5;
  --paper-2: #e7e0d1;
  --card: #fbf9f4;
  --ink: #1c231d;
  --muted: #5d6459;
  --line: rgb(28 35 29 / .14);
  --line-2: rgb(28 35 29 / .28);
  --green: #26392b;
  --green-2: #1b281e;
  --pale: #e9e6dc;
  --font: 'Golos Text', system-ui, sans-serif;
  --pad: clamp(20px, 4vw, 56px);
  --head: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--head); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.6 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, p, dl, dd, figure { margin: 0; }
h1, h2 { font-weight: 600; letter-spacing: -.035em; line-height: 1.04; text-wrap: balance; }
h2 { max-width: 18ch; font-size: clamp(2rem, 1.35rem + 2.5vw, 3.5rem); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 16px; border-radius: 4px; background: var(--ink); color: var(--paper); text-decoration: none; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.wrap { max-width: 1320px; margin-inline: auto; padding-inline: var(--pad); }

/* ---------- Кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 28px; border: 0; border-radius: 4px; background: var(--green); color: var(--paper); font-weight: 500; font-size: 1.0625rem; text-decoration: none; cursor: pointer; transition: background-color .2s ease, transform .15s ease; }
.btn:hover { background: var(--green-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: default; }
.btn--wide { width: 100%; }
.btn--line { background: transparent; color: var(--ink); border: 1px solid var(--line-2); }
.btn--line:hover { background: transparent; border-color: var(--ink); }

/* ---------- Шапка ---------- */
.header { position: fixed; inset: 0 0 auto; z-index: 20; display: flex; align-items: center; gap: 32px; height: var(--head); padding-inline: var(--pad); color: #fff; transition: background-color .3s ease, color .3s ease, box-shadow .3s ease; }
.header.is-solid, .header.is-open { background: rgb(242 238 229 / .96); color: var(--ink); box-shadow: 0 1px 0 var(--line); }
@supports (backdrop-filter: blur(1px)) { .header.is-solid { background: rgb(242 238 229 / .86); backdrop-filter: blur(14px); } }
.logo { display: grid; line-height: 1.1; text-decoration: none; white-space: nowrap; }
.logo__name { font-weight: 600; font-size: .9375rem; letter-spacing: .16em; text-transform: uppercase; }
.logo__sub { font-size: .8125rem; opacity: .7; }
.nav { display: flex; align-items: center; gap: 30px; margin-left: auto; font-size: .9375rem; }
.nav a { text-decoration: none; }
.nav a:not(.nav__cta):hover { text-decoration: underline; text-underline-offset: 6px; }
.nav__cta { display: inline-flex; align-items: center; height: 44px; padding: 0 18px; border-radius: 4px; background: #fff; color: var(--ink); font-weight: 500; transition: background-color .3s ease, color .3s ease; }
.is-solid .nav__cta { background: var(--green); color: var(--paper); }
.burger { display: none; width: 44px; height: 44px; margin: 0 -10px 0 auto; padding: 0; border: 0; background: none; cursor: pointer; }
.burger span, .burger span::before { display: block; width: 22px; height: 1.5px; margin: 0 auto; background: currentColor; transition: transform .3s ease; }
.burger span { position: relative; transform: translateY(-3.5px); }
.burger span::before { content: ''; position: absolute; left: 0; top: 7px; }
.is-open .burger span { transform: translateY(0) rotate(45deg); }
.is-open .burger span::before { top: 0; transform: rotate(-90deg); }
@media (max-width: 899px) {
  .burger { display: block; }
  .nav { position: absolute; top: var(--head); left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--pad) 24px; background: var(--paper); box-shadow: 0 1px 0 var(--line), 0 24px 40px -20px rgb(0 0 0 / .25); font-size: 1.125rem; }
  .is-open .nav { display: flex; }
  .nav a:not(.nav__cta) { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav__cta, .is-solid .nav__cta { justify-content: center; height: 54px; margin-top: 18px; background: var(--green); color: var(--paper); }
}

/* ---------- Перший екран ---------- */
.hero { position: relative; isolation: isolate; display: grid; align-items: end; min-height: max(640px, 100svh); color: #fff; }
.hero__bg { position: absolute; inset: 0; z-index: -2; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 44% 60%; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(10 16 12 / .38) 0, rgb(10 16 12 / 0) 22%, rgb(10 16 12 / 0) 40%, rgb(12 18 13 / .78) 100%); }
.hero__body { width: 100%; max-width: 1320px; margin-inline: auto; padding: 0 var(--pad) clamp(40px, 8vh, 96px); }
.hero h1 { max-width: 15ch; font-size: clamp(2.5rem, 1.5rem + 4.2vw, 5.25rem); }
.hero__lead { max-width: 540px; margin-top: 22px; font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); color: rgb(255 255 255 / .9); }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 34px; }
.hero .btn { background: #fff; color: var(--ink); }
.hero .btn:hover { background: var(--paper); }
.hero__price { color: rgb(255 255 255 / .85); }
@media (max-width: 699px) {
  .hero { min-height: 100svh; }
  .hero__bg img { object-position: 64% 50%; }
  .hero::before { background: linear-gradient(180deg, rgb(10 16 12 / .42) 0, rgb(10 16 12 / 0) 20%, rgb(10 16 12 / .1) 38%, rgb(12 18 13 / .84) 78%); }
  .hero .btn { width: 100%; }
  .hero__cta { gap: 12px; }
  .hero__price { width: 100%; text-align: center; font-size: .9375rem; }
}

/* ---------- Будиночки ---------- */
.houses { padding-block: clamp(72px, 9vw, 136px); }
.tabs { display: flex; gap: clamp(28px, 5vw, 80px); border-bottom: 1px solid var(--line-2); }
.tab { position: relative; padding: 0 0 20px; border: 0; background: none; text-align: left; cursor: pointer; color: rgb(28 35 29 / .38); transition: color .25s ease; }
.tab:hover { color: rgb(28 35 29 / .7); }
.tab[aria-selected="true"] { color: var(--ink); }
.tab::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .35s ease; }
.tab[aria-selected="true"]::after { transform: none; }
.tab__name { display: block; font-size: clamp(1.75rem, 1.1rem + 2.6vw, 3.5rem); font-weight: 600; letter-spacing: -.035em; line-height: 1.05; }
.tab__meta { display: block; margin-top: 8px; font-size: .9375rem; color: var(--muted); }

.house { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 4.5vw, 80px); margin-top: clamp(32px, 4vw, 56px); }
.house.is-in { animation: rise .45s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.house__pics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-content: start; }
.pic { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: 3px; background: var(--paper-2); }
.pic--main { grid-column: 1 / -1; aspect-ratio: 3 / 2; }
.pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease; }
.pic:hover img { transform: scale(1.03); }
.pic.is-extra { display: none; }
.pic__more { position: absolute; inset: 0; display: grid; place-items: center; background: rgb(20 28 22 / .55); color: #fff; font-weight: 500; font-size: .9375rem; }
.house__text { align-self: start; }
.house__lead { font-size: clamp(1.25rem, 1.1rem + .6vw, 1.625rem); font-weight: 500; letter-spacing: -.015em; line-height: 1.3; }
.house__text > p:not([class]) { margin-top: 18px; color: var(--muted); }
.specs { margin-top: 28px; border-bottom: 1px solid var(--line); }
.specs div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.specs dt { color: var(--muted); }
.house__price { margin: 28px 0 20px; color: var(--muted); }
.house__price b { display: block; color: var(--ink); font-size: 2rem; font-weight: 600; letter-spacing: -.03em; line-height: 1.2; }
.houses__more { max-width: 720px; margin-top: clamp(40px, 5vw, 64px); color: var(--muted); }
.houses__more b { color: var(--ink); font-weight: 500; }
@media (max-width: 999px) {
  .house { grid-template-columns: 1fr; }
}
@media (max-width: 699px) {
  .tabs { gap: 24px; }
  .tab { padding-bottom: 16px; }
  .tab__meta { font-size: .875rem; margin-top: 4px; }
  .house__pics { gap: 6px; }
  .pic--main { margin-inline: calc(var(--pad) * -1); border-radius: 0; aspect-ratio: 4 / 3; }
  .specs div { grid-template-columns: 96px minmax(0, 1fr); }
  .house__text .btn { width: 100%; }
}

/* ---------- Чан ---------- */
.chan { padding-block: clamp(72px, 9vw, 136px); background: var(--green); color: var(--pale); }
.chan__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
.chan h2 { color: #fff; }
.chan__text p:not([class]) { max-width: 440px; margin-top: 22px; color: rgb(233 230 220 / .78); }
.chan__price { margin-top: 28px; color: rgb(233 230 220 / .78); }
.chan__price b { display: block; color: #fff; font-size: 2rem; font-weight: 600; letter-spacing: -.03em; line-height: 1.2; }
.chan__pic { overflow: hidden; border-radius: 3px; }
.chan__pic img { width: 100%; height: 100%; object-fit: cover; }
.chan__pic--a { aspect-ratio: 3 / 4; }
.chan__pic--b { aspect-ratio: 4 / 5; margin-top: 40%; }
@media (max-width: 999px) {
  .chan__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .chan__text { grid-column: 1 / -1; margin-bottom: 16px; }
  .chan__pic--b { margin-top: 24%; }
}

/* ---------- Ранчо ---------- */
.ranch { padding-bottom: clamp(72px, 9vw, 136px); }
.ranch__wide { height: clamp(320px, 52vw, 720px); overflow: hidden; }
.ranch__wide img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.ranch__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(28px, 3vw, 48px) clamp(16px, 2vw, 32px); margin-top: clamp(48px, 6vw, 88px); }
.ranch__text { grid-column: 1 / 6; }
.ranch__text p { max-width: 460px; margin-top: 22px; color: var(--muted); }
.facts { grid-column: 7 / 13; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; align-self: start; }
.facts div { padding: 14px 0 16px; border-top: 1px solid var(--line); }
.facts dt { font-weight: 500; }
.facts dd { color: var(--muted); }
.ranch__strip { grid-column: 1 / -1; display: flex; gap: clamp(10px, 1.4vw, 20px); height: clamp(280px, 32vw, 480px); margin-top: clamp(8px, 2vw, 24px); }
.ranch__pic { min-width: 0; overflow: hidden; border-radius: 3px; }
.ranch__pic img { width: 100%; height: 100%; object-fit: cover; }
.ranch__pic--a { flex: 1.33; }
.ranch__pic--b { flex: .72; }
.ranch__pic--b img { object-position: 50% 20%; }
.ranch__pic--c { flex: 1.5; }
@media (max-width: 999px) {
  .ranch__text, .facts { grid-column: 1 / -1; }
}
@media (max-width: 699px) {
  .ranch__wide { height: auto; aspect-ratio: 1; }
  .ranch__wide img { object-position: 12% 50%; }
  .facts { grid-template-columns: 1fr; }
  .facts div { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 12px; padding: 12px 0; }
  .ranch__strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); height: auto; gap: 6px; }
  .ranch__pic--a { grid-column: 1 / -1; aspect-ratio: 4 / 3; }
  .ranch__pic--b, .ranch__pic--c { aspect-ratio: 3 / 4; }
}

/* ---------- Бронювання ---------- */
.book { padding-block: clamp(72px, 9vw, 136px); background: var(--paper-2); }
.book__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(40px, 6vw, 112px); }
.book__info > p:not([class]) { max-width: 460px; margin-top: 22px; color: var(--muted); }
.prices { margin-top: 36px; border-bottom: 1px solid var(--line-2); }
.prices div { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 16px 0; border-top: 1px solid var(--line-2); }
.prices dt { font-weight: 500; }
.prices dt span { display: block; color: var(--muted); font-weight: 400; font-size: .9375rem; }
.prices dd { font-size: 1.375rem; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; }
.book__note { margin-top: 18px; color: var(--muted); font-size: .9375rem; }
.book__phone { margin-top: 28px; }
.book__phone a { font-weight: 500; text-underline-offset: 4px; white-space: nowrap; }
.book__form { align-self: start; padding: clamp(24px, 3vw, 40px); border-radius: 6px; background: var(--card); box-shadow: 0 1px 0 var(--line), 0 30px 60px -40px rgb(28 35 29 / .35); }
.form { display: grid; gap: 20px; }
.form__title { font-size: 1.5rem; font-weight: 600; letter-spacing: -.02em; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { min-width: 0; margin: 0; padding: 0; border: 0; }
.field label, .field legend { display: block; margin-bottom: 8px; padding: 0; color: var(--muted); font-size: .9375rem; }
.field input:not([type="radio"]) { width: 100%; height: 54px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 4px; background: #fff; transition: border-color .2s ease; }
.field input:hover { border-color: rgb(28 35 29 / .45); }
.field input:focus { outline: none; border-color: var(--ink); }
.field input[aria-invalid="true"] { border-color: #b3412b; }
.err { margin-top: 6px; color: #a63a25; font-size: .875rem; }
.err:empty { display: none; }
.pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pick label { margin: 0; color: var(--muted); font-size: .875rem; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick span { display: block; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 4px; background: #fff; line-height: 1.35; cursor: pointer; transition: border-color .2s ease, box-shadow .2s ease; }
.pick b { display: block; color: var(--ink); font-weight: 500; font-size: 1rem; }
.pick span:hover { border-color: rgb(28 35 29 / .45); }
.pick input:checked + span { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.pick input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.check { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--green); }
.estimate { padding: 14px 16px; border-radius: 4px; background: var(--pale); color: var(--muted); font-size: .9375rem; }
.estimate b { color: var(--ink); font-weight: 600; font-size: 1.125rem; }
.stepper { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; height: 54px; border: 1px solid var(--line-2); border-radius: 4px; background: #fff; overflow: hidden; }
.stepper button { border: 0; background: transparent; font-size: 1.375rem; cursor: pointer; transition: background-color .2s ease; }
.stepper button:hover { background: var(--pale); }
.field .stepper input { height: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; text-align: center; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.done { display: grid; justify-items: start; gap: 12px; }
.done:focus { outline: none; }
.done p:not(.form__title) { color: var(--muted); }
.done .btn { margin-top: 10px; }
@media (max-width: 999px) {
  .book__grid { grid-template-columns: 1fr; }
}
@media (max-width: 699px) {
  .row2 { grid-template-columns: 1fr; }
  .book__form { margin-inline: calc(var(--pad) * -1); padding: 28px var(--pad); border-radius: 0; }
}

/* ---------- Підвал ---------- */
.footer { padding-block: 56px 96px; background: var(--green-2); color: var(--pale); font-size: .9375rem; }
.footer__grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 28px; align-items: start; }
.footer p { color: rgb(233 230 220 / .75); line-height: 1.8; }
.footer p a { color: var(--pale); text-underline-offset: 3px; }
.footer__demo { justify-self: end; max-width: 260px; }
@media (max-width: 899px) {
  .footer__grid { grid-template-columns: 1fr; }
  .footer__demo { justify-self: start; }
}

/* ---------- Кнопка знизу на телефоні ---------- */
.sticky { position: fixed; left: 14px; right: 14px; bottom: 14px; z-index: 15; display: none; align-items: center; justify-content: center; height: 54px; border-radius: 4px; background: var(--green); color: var(--paper); font-weight: 500; text-decoration: none; box-shadow: 0 12px 32px -10px rgb(0 0 0 / .5); transform: translateY(90px); transition: transform .35s ease; }
.sticky.is-shown { transform: none; }
@media (max-width: 899px) { .sticky { display: flex; } }

/* ---------- Перегляд фото ---------- */
.viewer { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: rgb(14 18 15 / .97); color: #fff; }
.viewer::backdrop { background: rgb(14 18 15 / .7); }
.viewer[open] { display: grid; place-items: center; }
.viewer img { max-width: min(92vw, 1400px); max-height: 82dvh; width: auto; border-radius: 3px; }
.viewer__count { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); color: rgb(255 255 255 / .65); font-size: .9375rem; }
.viewer button { position: absolute; display: grid; place-items: center; width: 52px; height: 52px; border: 1px solid rgb(255 255 255 / .2); border-radius: 4px; background: rgb(14 18 15 / .6); font-size: 1.5rem; cursor: pointer; }
.viewer__close { top: 18px; right: 18px; }
.viewer__prev { left: 18px; top: 50%; transform: translateY(-50%); }
.viewer__next { right: 18px; top: 50%; transform: translateY(-50%); }
@media (max-width: 699px) {
  .viewer__prev, .viewer__next { top: auto; bottom: 10px; transform: none; }
}

/* ---------- 404 ---------- */
.lost { display: grid; place-content: center; justify-items: start; gap: 18px; min-height: 100svh; padding: var(--pad); }
.lost h1 { font-size: clamp(2.5rem, 2rem + 3vw, 4.5rem); }
.lost p { max-width: 460px; color: var(--muted); }
