/* ==========================================================================
   Шрифти лежать на сайті (папка fonts/, ліцензія SIL Open Font License),
   щоб не чекати Google Fonts і текст не перебудовувався під час завантаження
   ========================================================================== */

@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/onest-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/onest-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/onest-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/manrope-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/manrope-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/manrope-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Запасні шрифти з підігнаними розмірами: поки Manrope чи Onest вантажаться, текст займає
   рівно стільки ж місця, тож меню й заголовки не зсуваються. Окремо для кожної товщини */
@font-face {
  font-family: "Manrope Fallback";
  font-weight: 400;
  src: local("Arial"), local("ArialMT");
  size-adjust: 102.23%;
  ascent-override: 104.67%;
  descent-override: 29.35%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Manrope Fallback";
  font-weight: 500;
  src: local("Arial"), local("ArialMT");
  size-adjust: 104.03%;
  ascent-override: 102.85%;
  descent-override: 28.84%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Manrope Fallback";
  font-weight: 600;
  src: local("Arial Bold"), local("Arial-BoldMT");
  size-adjust: 100.11%;
  ascent-override: 106.88%;
  descent-override: 29.97%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Manrope Fallback";
  font-weight: 700;
  src: local("Arial Bold"), local("Arial-BoldMT");
  size-adjust: 100.94%;
  ascent-override: 106.00%;
  descent-override: 29.72%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Onest Fallback";
  font-weight: 400;
  src: local("Arial"), local("ArialMT");
  size-adjust: 105.01%;
  ascent-override: 92.37%;
  descent-override: 29.52%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Onest Fallback";
  font-weight: 500;
  src: local("Arial"), local("ArialMT");
  size-adjust: 106.27%;
  ascent-override: 91.28%;
  descent-override: 29.17%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Onest Fallback";
  font-weight: 600;
  src: local("Arial Bold"), local("Arial-BoldMT");
  size-adjust: 100.05%;
  ascent-override: 96.95%;
  descent-override: 30.98%;
  line-gap-override: 0%;
}

/* Плавний перехід між сторінками без «блимання» (Chrome, Edge, Safari 18+).
*/
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.18s;
  }
}

/* Місце під смугу прокрутки завжди зарезервоване, тож сторінка не зсувається вбік */
html {
  scrollbar-gutter: stable;
}

/* ==========================================================================
   Дизайн-система
   ========================================================================== */

:root {
  /* Кольори */
  --color-bg: #F6F3EE;            /* фон сторінки */
  --color-bg-alt: #EDE8DF;        /* фон секції кейсів */
  --color-card: #FFFFFF;          /* картки */
  --color-text: #1E1D1A;          /* основний текст */
  --color-text-muted: #55514A;    /* другорядний текст */
  --color-line: #DDD7CC;          /* лінії */
  --accent: #1F4D3A;              /* акцент: замініть тут, і він зміниться всюди */
  --accent-hover: #143427;        /* колір посилань при наведенні, темніший за акцент */
  --color-on-accent: #FFFFFF;     /* текст на акцентному фоні */
  --color-on-accent-muted: #E6EFEA;

  /* Місця для фото */
  --ph-sand: #DCD5C8;
  --ph-sand-dark: #D3CCBE;
  --ph-sage: #C9D2C8;
  --ph-rose: #D9CFC6;
  --ph-text: #4A463F;
  --ph-text-sage: #3D453F;
  --video-bg: #2B2A26;
  --video-text: #E4DFD5;

  /* Форма */
  --input-border: #8C867B;
  --input-placeholder: #6B665D;
  --color-error: #B3261E;
  --color-success: #1F4D3A;

  /* Шрифти */
  --font-serif: 'Onest', 'Onest Fallback', system-ui, sans-serif; /* шрифт заголовків (назва змінної лишилась з макета) */
  --font-sans: 'Manrope', 'Manrope Fallback', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Форма і ритм */
  --radius-pill: 999px;
  --radius-card: 16px;
  --radius-input: 10px;
  --container: 1200px;
  --gutter: 24px;
  --section-y: 96px;

  --shadow-badge: 0 12px 32px rgba(30, 29, 26, 0.10);
}

/* ==========================================================================
   База
   ========================================================================== */

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

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  font-size: 17px;
  line-height: 1.6;
}

img {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-hover);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Видимий фокус з клавіатури */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.contact :focus-visible {
  outline-color: var(--color-on-accent);
}

.contact .lead-form :focus-visible {
  outline-color: var(--accent);
}

/* ==========================================================================
   Загальні елементи
   ========================================================================== */

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(34px, 3.6vw, 52px);
  line-height: 1.1;
}

.muted {
  margin: 0;
  color: var(--color-text-muted);
}

.text-link {
  font-weight: 600;
  font-size: 15px;
  padding: 12px 0;
}

/* Кнопки-пігулки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  border-radius: var(--radius-pill);
}

.btn--sm {
  font-size: 15px;
  padding: 12px 22px;
}

.btn--md {
  font-size: 15px;
  padding: 14px 24px;
}

.btn--lg {
  font-size: 16px;
  padding: 16px 30px;
}

.btn--primary,
.btn--primary:hover {
  background: var(--accent);
  color: var(--color-on-accent);
}

.btn--outline,
.btn--outline:hover {
  color: var(--color-text);
  border: 1px solid var(--color-text);
}

.btn--light,
.btn--light:hover {
  background: var(--color-card);
  color: var(--color-text);
}

.btn--outline-light,
.btn--outline-light:hover {
  color: var(--color-on-accent);
  border: 1px solid var(--color-on-accent);
}

/* Рамка додає 1px, тому внутрішній відступ менший */
.btn--lg.btn--outline {
  padding: 15px 26px;
}

.btn--md.btn--outline-light,
.btn--md.btn--outline {
  padding: 13px 24px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Місця для фото: сірий блок із підписом, поверх нього фото з папки img */
.ph {
  position: relative;
  overflow: hidden;
}

.ph__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}

.ph__img.is-loaded {
  opacity: 1;
}

/* ==========================================================================
   Шапка
   ========================================================================== */

.site-header {
  max-width: var(--container);
  margin: 0 auto;
  padding: 20px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo,
.logo:hover {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
}

.site-nav__link,
.site-nav__link:hover {
  color: var(--color-text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 12px 0;
}

.site-nav__link[aria-current="page"] {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

/* Ширина кожного пункту дорівнює ширині його жирної версії, тож меню не зсувається між сторінками */
.site-nav__link {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
}

.site-nav__link::after {
  content: attr(data-text);
  font-weight: 700;
  height: 0;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
  user-select: none;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-text);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
}

.nav-toggle__line {
  transform-origin: 11px 11px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__line--top {
  transform: translateY(5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__line--mid {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__line--bot {
  transform: translateY(-5px) rotate(-45deg);
}

/* ==========================================================================
   Перший екран
   ========================================================================== */

.hero {
  max-width: var(--container);
  margin: 0 auto;
  padding: 56px var(--gutter) var(--section-y);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 56px;
}

.hero__content {
  flex: 1 1 480px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.hero__title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(42px, 5.4vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.01em;
}

.hero__lead {
  margin: 0;
  font-size: 19px;
  color: var(--color-text-muted);
  max-width: 520px;
}

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

.hero__media {
  flex: 1 1 380px;
  min-width: 0;
  position: relative;
}

.portrait {
  background: var(--ph-sand);
  border-radius: 280px 280px 12px 12px;
  height: 600px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 32px;
}

.ph__caption {
  font-size: 14px;
  color: var(--ph-text);
  text-align: center;
}

.badge {
  position: absolute;
  left: -12px;
  bottom: 72px;
  background: var(--color-card);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: var(--shadow-badge);
  max-width: 230px;
  box-sizing: content-box; /* як у макеті: 230px без урахування внутрішніх відступів */
}

.badge__value {
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 600;
  line-height: 1;
  color: var(--accent);
}

.badge__label {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-top: 6px;
}

/* ==========================================================================
   Цифри
   ========================================================================== */

.stats {
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
}

.stats__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  gap: 32px 48px;
  justify-content: space-between;
}

.stat {
  flex: 1 1 200px;
}

.stat__value {
  font-family: var(--font-serif);
  font-size: 48px;
  font-weight: 500;
  line-height: 1;
}

.stat__label {
  font-size: 15px;
  color: var(--color-text-muted);
  margin-top: 8px;
}

/* ==========================================================================
   Секції
   ========================================================================== */

.section {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--section-y) var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.section--flush-top {
  padding-top: 0;
}

.section-band {
  background: var(--color-bg-alt);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 640px;
}

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

.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

/* Послуги */
.service-card {
  flex: 1 1 300px;
  background: var(--color-card);
  border-radius: var(--radius-card);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.service-card__icon {
  color: var(--accent);
}

.service-card__title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 28px;
  line-height: 1.15;
}

.service-card__text {
  margin: 0;
  font-size: 16px;
  color: var(--color-text-muted);
}

.service-card__link {
  margin-top: auto;
}

/* Кейси */
.case-card {
  flex: 1 1 300px;
  background: var(--color-card);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.case-card__media {
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.case-card__media--sand {
  background: var(--ph-sand-dark);
}

.case-card__media--sage {
  background: var(--ph-sage);
}

.case-card__media--sage .ph__caption {
  color: var(--ph-text-sage);
}

.case-card__media--rose {
  background: var(--ph-rose);
}

.case-card__body {
  padding: 26px 28px 30px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.case-card__meta {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.case-card__title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 26px;
  line-height: 1.2;
}

.case-card__text {
  margin: 0;
  font-size: 15px;
  color: var(--color-text-muted);
}

/* Відеоогляди */
.split {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--section-y) var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 56px;
}

.split__media {
  flex: 1 1 520px;
  min-width: 0;
}

.split__content {
  flex: 1 1 380px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.video-ph {
  background: var(--video-bg);
  border-radius: var(--radius-card);
  aspect-ratio: 16 / 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.video-ph__play {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--color-card);
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-ph__caption {
  font-size: 14px;
  color: var(--video-text);
}

/* Відгуки */
.review-card {
  flex: 1 1 420px;
  margin: 0;
  background: var(--color-card);
  border-radius: var(--radius-card);
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.review-card__quote {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 26px;
  line-height: 1.3;
  font-weight: 500;
}

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

.avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  flex: none;
}

.avatar--sand {
  background: var(--ph-sand);
}

.avatar--sage {
  background: var(--ph-sage);
}

.review-card__name {
  font-weight: 600;
  font-size: 16px;
}

.review-card__role {
  font-size: 14px;
  color: var(--color-text-muted);
}

/* ==========================================================================
   Контакти і форма
   ========================================================================== */

.contact {
  background: var(--accent);
  color: var(--color-on-accent);
}

.contact__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--section-y) var(--gutter);
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
  align-items: center;
}

.contact__intro {
  flex: 1 1 440px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact__title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(38px, 4.2vw, 60px);
  line-height: 1.06;
}

.contact__lead {
  margin: 0;
  font-size: 18px;
  color: var(--color-on-accent-muted);
  max-width: 480px;
}

.contact__links {
  margin-top: 8px;
}

.lead-form {
  flex: 1 1 380px;
  min-width: 0;
  background: var(--color-card);
  color: var(--color-text);
  border-radius: var(--radius-card);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.lead-form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lead-form__label {
  font-size: 14px;
  font-weight: 600;
}

.lead-form__input {
  font: inherit;
  font-size: 16px;
  padding: 13px 14px;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-input);
  background: var(--color-card);
  color: var(--color-text);
}

.lead-form__input::placeholder {
  color: var(--input-placeholder);
  opacity: 1;
}

.lead-form__input[aria-invalid="true"] {
  border-color: var(--color-error);
  box-shadow: 0 0 0 1px var(--color-error);
}

.lead-form__error {
  margin: 0;
  font-size: 14px;
  color: var(--color-error);
}

.lead-form__submit {
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  background: var(--color-text);
  color: var(--color-on-accent);
  border: none;
  border-radius: var(--radius-pill);
  padding: 16px 24px;
  cursor: pointer;
  margin-top: 6px;
}

.lead-form__status {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-success);
}

/* ==========================================================================
   Підвал
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--color-line);
  font-size: 15px;
}

.site-footer__grid {
  max-width: var(--container);
  margin: 0 auto;
  padding: 64px var(--gutter) 40px;
  display: grid;
  grid-template-columns: 2fr repeat(3, minmax(0, 1fr));
  gap: 40px;
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 340px;
}

.site-footer__brand p {
  margin: 0;
  color: var(--color-text-muted);
}

.site-footer__col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.site-footer__title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.site-footer__col a,
.site-footer__col a:hover {
  color: var(--color-text);
  text-decoration: none;
  padding: 10px 0;
}

.site-footer__col a:hover {
  text-decoration: underline;
}

.site-footer__col span {
  padding: 10px 0;
  color: var(--color-text-muted);
}

.site-footer__bottom {
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px var(--gutter) 32px;
  /* лінія лише на ширину контенту, без бічних полів */
  background: linear-gradient(var(--color-line), var(--color-line)) var(--gutter) 0 / calc(100% - 2 * var(--gutter)) 1px no-repeat;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  color: var(--color-text-muted);
}

/* ==========================================================================
   Блок «Чим допомогти?» (головна)
   ========================================================================== */

.help-card {
  flex: 1 1 380px;
  min-width: 0;
  background: var(--color-card);
  color: var(--color-text);
  border-radius: var(--radius-card);
  padding: 12px;
  display: flex;
  flex-direction: column;
}

.help-link,
.help-link:hover {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 20px;
  border-radius: 12px;
  color: var(--color-text);
  text-decoration: none;
}

.help-link + .help-link {
  border-top: 1px solid var(--color-line);
}

.help-link:hover {
  background: var(--color-bg);
}

.help-link__title {
  display: block;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 26px;
  line-height: 1.2;
}

.help-link__text {
  display: block;
  margin-top: 2px;
  font-size: 15px;
  color: var(--color-text-muted);
}

.help-link__arrow {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--color-on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   Заявка: продати або здати
   ========================================================================== */

.steps-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  counter-reset: step;
}

.steps-list li {
  counter-increment: step;
  background: var(--color-card);
  border-radius: var(--radius-card);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.steps-list li::before {
  content: counter(step);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--color-on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-bottom: 6px;
}

.steps-list__title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.2;
}

.steps-list__text {
  font-size: 15px;
  color: var(--color-text-muted);
}

.form-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 var(--gutter) var(--section-y);
}

.form-page__head {
  margin-bottom: 32px;
}

.big-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-card {
  margin: 0;
  border: 0;
  background: var(--color-card);
  border-radius: var(--radius-card);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.form-card__title {
  float: left;
  width: 100%;
  margin: 0;
  padding: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 30px;
  line-height: 1.15;
}

.form-card__title + * {
  clear: both;
}

.form-card__hint {
  margin: -8px 0 0;
  font-size: 15px;
  color: var(--color-text-muted);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.form-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

textarea.lead-form__input {
  min-height: 140px;
  resize: vertical;
}

select.lead-form__input {
  min-height: 52px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Перемикачі-пігулки на справжніх радіокнопках */
.pill-choice {
  position: relative;
}

.pill-choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.pill-choice span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  background: var(--color-card);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}

.pill-choice input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--color-on-accent);
}

.pill-choice input:focus-visible + span {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* Обране значення адреси згортається в рядок */
.picked {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 6px 6px 18px;
  border: 1px solid var(--color-line);
  border-radius: 12px;
  background: var(--color-bg);
}

.picked__label {
  color: var(--color-text-muted);
}

.link-btn {
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}

.suggest {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-line);
  border-radius: 12px;
  overflow: hidden;
}

.suggest button {
  font: inherit;
  font-size: 16px;
  text-align: left;
  min-height: 48px;
  padding: 0 16px;
  border: 0;
  border-top: 1px solid var(--color-line);
  background: var(--color-card);
  color: var(--color-text);
  cursor: pointer;
}

.suggest button:first-child {
  border-top: 0;
}

.suggest button:hover {
  background: var(--color-bg);
}

.note {
  margin: 0;
  font-size: 14px;
  color: var(--color-text-muted);
}

/* Завантаження фото і відео */
.dropzone {
  position: relative;
  border: 1.5px dashed var(--input-border);
  border-radius: var(--radius-card);
  background: var(--color-bg);
  padding: 36px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  cursor: pointer;
}

.dropzone.is-over {
  border-color: var(--accent);
  background: var(--color-bg-alt);
}

.dropzone__title {
  font-weight: 700;
  font-size: 17px;
}

.dropzone__text {
  font-size: 15px;
  color: var(--color-text-muted);
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dropzone:focus-within {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.previews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.preview {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--ph-sand);
}

.preview img,
.preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.preview__remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(30, 29, 26, 0.75);
  color: var(--color-on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.preview__tag {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(30, 29, 26, 0.75);
  color: var(--color-on-accent);
  font-size: 12px;
  font-weight: 600;
}

.form-alert {
  margin: 0;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--color-card);
  border: 1px solid var(--color-error);
  font-size: 15px;
  color: var(--color-error);
}

.form-success {
  margin: 0;
  padding: 20px 24px;
  border-radius: var(--radius-card);
  background: var(--accent);
  color: var(--color-on-accent);
  font-size: 17px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

/* ==========================================================================
   Контакти
   ========================================================================== */

.contact-grid {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter) var(--section-y);
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
}

.contact-list {
  flex: 1 1 380px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-item {
  background: var(--color-card);
  border-radius: var(--radius-card);
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-item__label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.contact-item__value {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 28px;
  line-height: 1.2;
}

.contact-item__value a,
.contact-item__value a:hover {
  color: var(--color-text);
  text-decoration: none;
}

.contact-form {
  flex: 1 1 460px;
}

/* ==========================================================================
   Блог
   ========================================================================== */

.blog-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 280px;
  max-width: 420px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-pill);
  background: var(--color-card);
}

.search-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 16px;
  color: var(--color-text);
}

.search-field input:focus {
  outline: none;
}

.search-field:focus-within {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

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

.post-featured,
.object-card.post-featured {
  position: relative;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  background: var(--color-card);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.post-featured__media {
  flex: 1 1 520px;
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ph-sand-dark);
}

.post-featured__body {
  flex: 1 1 380px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.post-featured__title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1.1;
}

.post-card__title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 26px;
  line-height: 1.2;
}

.post-meta {
  font-size: 14px;
  color: var(--color-text-muted);
}

/* Стаття */
.article {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px var(--gutter) var(--section-y);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.article__head {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.article__cover {
  height: 420px;
  border-radius: var(--radius-card);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ph-sand);
}

.article__body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-size: 18px;
  line-height: 1.7;
}

.article__body p {
  margin: 0;
}

.article__body h2 {
  margin: 16px 0 0;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 34px;
  line-height: 1.15;
}

.article__body figure {
  margin: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.article__body figcaption {
  font-size: 14px;
  color: var(--color-text-muted);
}

.article__photo {
  height: 360px;
  border-radius: var(--radius-card);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ph-sage);
  font-size: 14px;
  color: var(--ph-text-sage);
}

.article__cta {
  background: var(--color-bg-alt);
  border-radius: var(--radius-card);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ==========================================================================
   Внутрішні сторінки: заголовок сторінки, хлібні крихти
   ========================================================================== */

.page-head {
  max-width: var(--container);
  margin: 0 auto;
  padding: 56px var(--gutter) 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.page-title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(42px, 5vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.01em;
}

.page-lead {
  margin: 0;
  font-size: 19px;
  color: var(--color-text-muted);
  max-width: 620px;
}

.breadcrumbs {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px var(--gutter) 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  font-size: 14px;
  color: var(--color-text-muted);
}

.breadcrumbs a {
  font-weight: 600;
  padding: 12px 0;
}

/* Перемикач «Продаж / Оренда» */
.segmented {
  display: inline-flex;
  padding: 4px;
  background: var(--color-card);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  gap: 4px;
}

.segmented__btn {
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  min-height: 44px;
  padding: 0 24px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
}

.segmented__btn[aria-pressed="true"] {
  background: var(--accent);
  color: var(--color-on-accent);
}

/* Невеликі кнопки-пігулки (поділитись тощо) */
.btn--xs {
  font-size: 14px;
  padding: 10px 16px;
}

button.btn {
  font-family: inherit;
  line-height: inherit;
  background-color: transparent;
  cursor: pointer;
}

button.btn--primary {
  background: var(--accent);
  border: 0;
}

/* ==========================================================================
   Каталог
   ========================================================================== */

.catalog-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.catalog-summary {
  margin: 0;
  font-size: 15px;
  color: var(--color-text-muted);
}

.catalog-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 15px;
  color: var(--color-text-muted);
}

.catalog {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter) var(--section-y);
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.object-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.object-card {
  position: relative;
  background: var(--color-card);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.object-card__media {
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ph-sand-dark);
}

.object-card__media--sage {
  background: var(--ph-sage);
}

.object-card__media--sage .ph__caption {
  color: var(--ph-text-sage);
}

.object-card__media--rose {
  background: var(--ph-rose);
}

.video-badge {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--color-text);
  color: var(--color-on-accent);
  font-size: 13px;
  font-weight: 600;
}

.object-card__body {
  padding: 24px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.object-card__price {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 30px;
  line-height: 1.1;
}

/* Уся картка клікабельна через посилання в заголовку */
.object-card__link,
.object-card__link:hover {
  color: var(--color-text);
  text-decoration: none;
}

.object-card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.object-card__details {
  margin: 0;
  font-size: 16px;
}

.object-card__address {
  margin: 0;
  font-size: 15px;
  color: var(--color-text-muted);
}

.share-row {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  font-size: 14px;
  color: var(--color-text-muted);
}

.share-row > span {
  flex-basis: 100%;
}

.empty-note {
  background: var(--color-bg-alt);
  border-radius: var(--radius-card);
  padding: 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.empty-note__text {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 520px;
}

.empty-note__title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 30px;
  line-height: 1.15;
}

/* ==========================================================================
   Покроковий фільтр (вікно)
   ========================================================================== */

.wizard {
  width: calc(100% - 32px);
  max-width: 600px;
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: var(--radius-card);
  background: var(--color-card);
  color: var(--color-text);
  box-shadow: 0 24px 64px rgba(30, 29, 26, 0.25);
}

.wizard::backdrop {
  background: rgba(30, 29, 26, 0.55);
}

.wizard__inner {
  padding: 28px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 460px;
}

.wizard__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.icon-btn {
  width: 44px;
  height: 44px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--color-line);
  border-radius: 50%;
  background: var(--color-card);
  color: var(--color-text);
  cursor: pointer;
}

.wizard__progress {
  height: 4px;
  border-radius: 2px;
  background: var(--color-line);
  overflow: hidden;
}

.wizard__progress-bar {
  height: 100%;
  width: 0;
  background: var(--accent);
}

.wizard__summary {
  margin: 0;
  font-size: 14px;
  color: var(--color-text-muted);
}

.wizard__title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 38px;
  line-height: 1.1;
}

.wizard__hint {
  margin: -12px 0 0;
  font-size: 15px;
  color: var(--color-text-muted);
}

.wizard__options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.wizard__options--column {
  flex-direction: column;
}

.option {
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  background: var(--color-card);
  color: var(--color-text);
  cursor: pointer;
}

.wizard__options--column .option {
  min-height: 54px;
  border-radius: 12px;
  text-align: left;
}

.option[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--color-on-accent);
}

.wizard__range {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.wizard__warn {
  margin: 0;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--color-bg);
  font-size: 15px;
  color: var(--color-error);
}

.wizard__nav {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.wizard__nav .btn[disabled] {
  opacity: 0.4;
  cursor: default;
}

/* ==========================================================================
   Сторінка об'єкта
   ========================================================================== */

.object {
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px var(--gutter) var(--section-y);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 48px;
}

.object__gallery {
  flex: 1 1 560px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.object__video {
  aspect-ratio: 4 / 5;
  max-height: 720px;
  width: 100%;
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.thumb {
  height: 96px;
  border-radius: 12px;
  background: var(--ph-sand-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--ph-text);
}

.object__info {
  flex: 1 1 360px;
  min-width: 0;
  position: sticky;
  top: 24px;
  background: var(--color-card);
  border-radius: var(--radius-card);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.object__title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 34px;
  line-height: 1.1;
}

.object__price {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 44px;
  line-height: 1;
  color: var(--accent);
}

.object__price-m2 {
  margin-top: -8px;
  font-size: 15px;
  color: var(--color-text-muted);
}

.specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 8px 0;
  background: var(--color-line);
  border: 1px solid var(--color-line);
  border-radius: 12px;
  overflow: hidden;
}

.spec {
  background: var(--color-card);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.spec__label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.spec__value {
  margin: 0;
  font-weight: 600;
}

.object__info .share-row {
  margin-top: 0;
  padding-top: 0;
}

.object__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.object__actions .btn--primary {
  flex: 1 1 100%;
}

.object__actions .btn--outline {
  flex: 1 1 0;
}

.honest {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.honest-card {
  flex: 1 1 420px;
  background: var(--color-card);
  border-radius: var(--radius-card);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.honest-card__title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 28px;
  line-height: 1.15;
}

.prose {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.prose p {
  margin: 0;
  color: var(--color-text-muted);
}

.map-ph {
  height: 360px;
  border-radius: var(--radius-card);
  background: var(--ph-sage);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--ph-text-sage);
}

/* ==========================================================================
   Закріплена кнопка Telegram (лише на телефоні)
   ========================================================================== */

.sticky-cta {
  display: none;
}

/* ==========================================================================
   Легка поява блоків під час скролу
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
  .reveal-on .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }

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

  .reveal-on .reveal--instant {
    transition: none;
  }
}

/* ==========================================================================
   Телефон і вузькі екрани
   ========================================================================== */

@media (max-width: 760px) {
  body {
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }

  /* Бургер показується лише коли працює JavaScript, інакше меню видно як у макеті */
  .js .nav-toggle {
    display: inline-flex;
  }

  .js .site-nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding-top: 8px;
    border-top: 1px solid var(--color-line);
  }

  .js .site-nav.is-open {
    display: flex;
  }

  .js .site-nav .btn {
    margin-top: 12px;
  }

  .sticky-cta,
  .sticky-cta:hover {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 24px;
    border-radius: var(--radius-pill);
    background: var(--accent);
    color: var(--color-on-accent);
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(30, 29, 26, 0.22);
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }

  .sticky-cta.is-hidden {
    opacity: 0;
    visibility: hidden;
  }

  /* Фільтр на телефоні відкривається знизу, як аркуш */
  .wizard {
    width: 100%;
    max-width: none;
    margin: auto 0 0;
    max-height: 92vh;
    border-radius: var(--radius-card) var(--radius-card) 0 0;
  }

  .wizard__inner {
    padding: 20px 20px calc(24px + env(safe-area-inset-bottom, 0px));
    min-height: 70vh;
  }

  .wizard__title {
    font-size: 32px;
  }

  .empty-note,
  .honest-card {
    padding: 28px 24px;
  }

  .object__info {
    position: static;
    padding: 28px 24px;
  }

  .object__video {
    aspect-ratio: 9 / 14;
  }

  .thumb {
    height: 72px;
  }

  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-top: 48px;
    gap: 32px 24px;
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }

  .form-card,
  .contact-item,
  .article__cta,
  .post-featured__body {
    padding: 28px 22px;
  }

  .form-grid,
  .form-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .help-link {
    padding: 18px 12px;
  }

  .article__cover {
    height: 240px;
  }

  .article__photo {
    height: 240px;
  }

  .article__body {
    font-size: 17px;
  }
}

@media (max-width: 420px) {
  .form-grid,
  .form-grid--2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ==========================================================================
   Сучасний градієнт «Київ на світанку»
   Багатоколірний м'який фон зверху сторінок, на головній він повільно рухається.
   Кольори градієнта задані тут; щоб повернутися до макета, цей блок можна видалити
   ========================================================================== */

:root {
  --mesh-mint: #A8E6C1;
  --mesh-lilac: #CFC6F5;
  --mesh-peach: #F9D2BD;
  --mesh-aqua: #9FDCD3;
  --mesh-base: #EEF3EA;
  --mesh:
    radial-gradient(40% 55% at 12% 18%, var(--mesh-mint) 0%, transparent 70%),
    radial-gradient(45% 60% at 88% 12%, var(--mesh-lilac) 0%, transparent 70%),
    radial-gradient(50% 60% at 72% 88%, var(--mesh-peach) 0%, transparent 70%),
    radial-gradient(45% 55% at 22% 92%, var(--mesh-aqua) 0%, transparent 70%),
    var(--mesh-base);
}

body {
  position: relative;
}

/* Градієнт зверху кожної сторінки, плавно переходить у фон */
body::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 620px;
  z-index: -1;
  background: var(--mesh);
  background-size: 140% 140%;
  background-position: 0% 0%;
  opacity: 0.75;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
  pointer-events: none;
}

/* На головній градієнт яскравіший, вищий і живий */
body.home::before {
  height: 1000px;
  opacity: 1;
  background-size: 180% 180%;
}

@media (prefers-reduced-motion: no-preference) {
  body.home::before {
    animation: mesh-drift 22s ease-in-out infinite alternate;
  }

  .motion-paused body.home::before {
    animation-play-state: paused;
  }
}

@keyframes mesh-drift {
  0% { background-position: 0% 0%; }
  50% { background-position: 100% 40%; }
  100% { background-position: 30% 100%; }
}

/* Кнопка паузи анімації (як у Дії): для тих, кому рух заважає */
.motion-toggle {
  position: absolute;
  right: var(--gutter);
  bottom: 32px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1.5px solid var(--color-text);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  color: var(--color-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.motion-toggle .icon-play {
  display: none;
}

.motion-paused .motion-toggle .icon-play {
  display: block;
}

.motion-paused .motion-toggle .icon-pause {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .motion-toggle {
    display: none;
  }
}

/* Основні кнопки: чорні пігулки, як у Дії */
.btn--primary,
.btn--primary:hover,
button.btn--primary,
.sticky-cta,
.sticky-cta:hover {
  background: var(--color-text);
  color: var(--color-on-accent);
}

.btn--primary,
.sticky-cta,
.lead-form__submit,
.btn--outline,
.btn--light {
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn--primary:hover,
.sticky-cta:hover,
.lead-form__submit:hover {
  background: #000;
  box-shadow: 0 10px 24px rgba(30, 29, 26, 0.22);
}

.btn--outline:hover {
  background: rgba(255, 255, 255, 0.6);
}

@media (prefers-reduced-motion: no-preference) {
  .btn:hover,
  .lead-form__submit:hover {
    transform: translateY(-2px);
  }
}

/* Вибрані стани теж чорні, зелений лишається для підписів, посилань і цін */
.segmented__btn[aria-pressed="true"],
.option[aria-pressed="true"],
.pill-choice input:checked + span {
  background: var(--color-text);
  border-color: var(--color-text);
  color: var(--color-on-accent);
}

.help-link__arrow,
.steps-list li::before,
.wizard__progress-bar {
  background: var(--color-text);
}

/* Перемикач і поля на градієнті трохи прозорі */
.segmented {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(30, 29, 26, 0.12);
}

/* Блок контактів на градієнті з темним текстом */
.contact {
  position: relative;
  overflow: hidden;
  background: var(--mesh);
  color: var(--color-text);
}

.contact__lead {
  color: var(--color-text-muted);
}

.btn--outline-light,
.btn--outline-light:hover {
  color: var(--color-text);
  border-color: var(--color-text);
}

.contact :focus-visible {
  outline-color: var(--accent);
}

.form-success {
  background: var(--mesh);
  color: var(--color-text);
}

.hero {
  position: relative;
}

/* Головна: насиченіша версія того самого градієнта */
body.home::before {
  background:
    radial-gradient(55% 65% at 8% 12%, #86E3AC 0%, transparent 70%),
    radial-gradient(50% 60% at 92% 8%, #B9ACF6 0%, transparent 70%),
    radial-gradient(55% 60% at 85% 80%, #F8C3A6 0%, transparent 70%),
    radial-gradient(50% 60% at 28% 92%, #86D8CE 0%, transparent 70%),
    #E6F0E8;
  background-size: 115% 115%;
}

/* Щоб другорядний текст лишався читабельним на кольоровому фоні */
body.home .hero__lead {
  color: var(--color-text);
}

/* ==========================================================================
   Шрифт заголовків Onest: легкий сучасний гротеск.
   Гротеск виглядає крупнішим за класичну антикву, тому розміри менші, а відстань між літерами щільніша
   ========================================================================== */

.hero__title {
  font-size: clamp(38px, 4.6vw, 64px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.page-title {
  font-size: clamp(36px, 4.2vw, 58px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.section-title {
  font-size: clamp(30px, 3vw, 44px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.contact__title {
  font-size: clamp(32px, 3.6vw, 52px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.logo,
.logo:hover {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.service-card__title,
.honest-card__title,
.help-link__title,
.steps-list__title,
.empty-note__title,
.post-card__title,
.case-card__title,
.form-card__title {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.post-featured__title,
.object__title,
.wizard__title {
  font-size: clamp(26px, 2.4vw, 32px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.stat__value {
  font-size: 40px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.badge__value {
  font-size: 28px;
  letter-spacing: -0.02em;
}

.object-card__price {
  font-size: 24px;
  letter-spacing: -0.02em;
}

.object__price {
  font-size: 36px;
  letter-spacing: -0.03em;
}

.contact-item__value {
  font-size: 22px;
  letter-spacing: -0.015em;
}

.review-card__quote {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.article__body h2 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.lead-form__status--error {
  color: var(--color-error);
}

/* Поле-пастка для спам-ботів: людям не видно і не доступно з клавіатури */
.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ==========================================================================
   Живий фон: м'який шар градієнта під усім сайтом, який повільно пливе під час прокрутки.
   --scroll (0..1) виставляє js/main.js; без JavaScript чи зі зменшеним рухом шар просто стоїть
   ========================================================================== */

:root {
  --scroll: 0;
}

body::after {
  content: "";
  position: fixed;
  top: -40vmax;
  left: -40vmax;
  width: 180vmax;
  height: 180vmax;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(22% 22% at 30% 35%, var(--mesh-mint) 0%, transparent 70%),
    radial-gradient(20% 20% at 68% 30%, var(--mesh-lilac) 0%, transparent 70%),
    radial-gradient(24% 24% at 62% 68%, var(--mesh-peach) 0%, transparent 70%),
    radial-gradient(20% 20% at 34% 70%, var(--mesh-aqua) 0%, transparent 70%);
  opacity: 0.55;
  transform:
    translate3d(calc(var(--scroll) * -18vmax), calc(var(--scroll) * -26vmax), 0)
    rotate(calc(var(--scroll) * 70deg));
  will-change: transform;
}

/* Логотип (файли в img/: logo-horizontal.svg для шапки, logo.svg для підвалу) */
.logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  flex-shrink: 0;
}

.logo img {
  display: block;
  height: 40px;
  width: auto;
}

.logo--footer img {
  height: auto;
  width: 190px;
  max-width: 100%;
}

.logo--footer {
  margin-bottom: 8px;
}

@media (max-width: 760px) {
  .logo img {
    height: 30px;
  }

  .logo--footer img {
    height: auto;
    width: 180px;
  }
}

/* Позначка стану квартири («Продано», «Бронь») на фото картки: той самий бейдж, що й «Відеоогляд», угорі */
.video-badge--top {
  top: 14px;
  bottom: auto;
}

/* Сторінка квартири з бази: відео з YouTube у блоці галереї */
.object__video iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: var(--radius-card);
  display: block;
}

.object__video.ph {
  border-radius: var(--radius-card);
  background: var(--ph-sand-dark);
}

a.thumb {
  position: relative;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
}

/* Мініатюри й головне фото: кнопки, що відкривають перегляд на весь екран */
button.thumb,
.object__photo {
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 0;
  font: inherit;
  color: inherit;
  cursor: zoom-in;
}

.object__photo {
  display: block;
  border-radius: var(--radius-card);
  background: var(--ph-sand-dark);
}

button.thumb:focus-visible,
.object__photo:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.thumb__more {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--video-bg) 55%, transparent);
  color: var(--color-on-accent);
  font-size: 15px;
  font-weight: 600;
}

/* Відео з Instagram і TikTok: вертикальне вікно по центру темного блоку, висоту задає скрипт */
.object__video--social {
  aspect-ratio: auto;
  max-height: none;
  display: flex;
  justify-content: center;
  padding: 16px;
  background: var(--video-bg);
  border-radius: var(--radius-card);
}

.object__video--social iframe {
  width: 100%;
  max-width: 400px;
  height: auto;
  background: var(--color-card);
  border-radius: 12px;
}

.object__video--tiktok iframe {
  max-width: 340px;
  height: auto;
  aspect-ratio: 9 / 16;
}

/* Перегляд фото на весь екран */
html.lightbox-open {
  overflow: hidden;
  scrollbar-gutter: auto;
}

html.lightbox-open body {
  padding-right: var(--lightbox-gutter, 0px);
}

.lightbox {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--video-bg);
  color: var(--video-text);
  overflow: hidden;
}

.lightbox::backdrop {
  background: var(--video-bg);
}

.lightbox__bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  pointer-events: none;
}

.lightbox__bar > * {
  pointer-events: auto;
}

.lightbox__count {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  padding-left: 4px;
}

.lightbox__track {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior: contain;
  scrollbar-width: none;
  outline: none;
}

.lightbox__track::-webkit-scrollbar {
  display: none;
}

.lightbox__slide {
  flex: 0 0 100%;
  height: 100%;
  margin: 0;
  padding: 64px 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

.lightbox__slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox__btn {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--color-card);
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox__btn:focus-visible {
  outline: 2px solid var(--color-card);
  outline-offset: 3px;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  margin-top: -24px;
}

.lightbox__nav--prev { left: 16px; }
.lightbox__nav--next { right: 16px; }

.lightbox__nav:disabled {
  opacity: 0.35;
  cursor: default;
}

@media (max-width: 760px) {
  .lightbox__slide {
    padding: 64px 0;
  }

  .lightbox__slide img {
    border-radius: 0;
  }

  .lightbox__nav {
    top: auto;
    bottom: 16px;
    margin-top: 0;
  }

  .object__video--social {
    padding: 0;
    background: none;
  }
}

/* Запис на перегляд за вільним часом: три кроки в картці форми (js/booking.js) */
.booking {
  gap: 0;
  padding-top: 12px;
  padding-bottom: 12px;
}

.booking__step {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 0;
}

.booking__step + .booking__step {
  border-top: 1px solid var(--color-line);
}

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

.booking__badge {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
}

.booking__badge.is-current {
  background: var(--color-text);
  color: var(--color-on-accent);
}

.booking__badge.is-done {
  background: var(--accent);
  color: var(--color-on-accent);
}

.booking__head-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.booking__step-no {
  font-size: 13px;
  color: var(--color-text-muted);
}

.booking__title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
}

.booking__change {
  flex: none;
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.booking__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.booking__day,
.booking__time {
  font: inherit;
  color: var(--color-text);
  background: var(--color-card);
  border: 1px solid var(--color-line);
  cursor: pointer;
}

.booking__day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 4px;
  border-radius: var(--radius-card);
}

.booking__day-wd {
  font-size: 13px;
  font-weight: 600;
}

.booking__day-num {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.1;
}

.booking__day-free {
  font-size: 12px;
  color: var(--color-text-muted);
}

.booking__time {
  height: 44px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.booking__day:hover,
.booking__time:hover {
  border-color: var(--color-text);
}

.booking__day:focus-visible,
.booking__time:focus-visible,
.booking__change:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.booking__hint {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.booking__notice {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-error);
}

.booking__form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.booking__done {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 0;
}

.booking__done-mark {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--color-on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.booking__done-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  outline: none;
}

.booking__done-when {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.booking__done-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 760px) {
  .booking {
    padding: 8px 20px;
  }
}

/* Повідомлення на сторінці квартири: завантаження або «не знайдено» */
.object-status {
  max-width: var(--container);
  margin: 0 auto;
  padding: 8px var(--gutter) 48px;
  color: var(--color-text-muted);
}

.object-status a {
  color: var(--accent);
}

/* Особиста сторінка з графіком переглядів (series.html) */
.series {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px var(--gutter) var(--section-y);
}

.series .object-status {
  padding: 0;
}

.series__inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.series__head {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.series__title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.series__title::first-letter {
  text-transform: uppercase;
}

.series__lead {
  margin: 0;
  font-size: 16px;
}

.series__state {
  background: var(--color-card);
  border-left: 0;
  border-radius: var(--radius-card);
  padding: 16px 18px;
  font-weight: 600;
  color: var(--accent);
  outline: none;
}

.series__state.is-off {
  color: var(--color-error);
}

.series__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.series__day {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.series__item {
  background: var(--color-card);
  border-radius: var(--radius-card);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 4px 12px;
  align-items: start;
}

.series__time {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

.series__img {
  display: none;
}

.series__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.series__name {
  font-weight: 600;
}

.series__info {
  font-size: 14px;
}

.series__link {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  align-self: flex-start;
}

@media (min-width: 640px) {
  .series__item {
    grid-template-columns: 64px 96px minmax(0, 1fr);
    align-items: center;
  }

  .series__img {
    display: block;
    width: 96px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
    background: var(--ph-sand-dark);
  }
}

.series__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.series__actions[hidden],
.series__change[hidden] {
  display: none;
}

.series__change {
  background: var(--color-card);
  border-radius: var(--radius-card);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.series__note {
  margin: 0;
  font-size: 14px;
}

/* Підбірка квартир для клієнта (selection.html) */
.sel {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px var(--gutter) calc(var(--section-y) + 72px);
}

.sel .object-status {
  padding: 0;
}

.sel__inner,
.sel__list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sel-card {
  background: var(--color-card);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sel-card.is-no .sel-card__media {
  opacity: 0.55;
}

.sel-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--ph-sand-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sel-card__photo {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.sel-card__photo:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -4px;
}

.sel-card__count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: color-mix(in srgb, var(--video-bg) 75%, transparent);
  color: var(--color-on-accent);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  padding: 4px 12px;
}

.sel-card__body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sel-card__title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.25;
}

.sel-card__facts {
  margin: 0;
  font-size: 15px;
}

.sel-card__price {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  color: var(--accent);
}

.sel-card__note {
  margin: 0;
  background: var(--color-bg-alt);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  line-height: 1.5;
}

.sel-card__video-btn {
  align-self: flex-start;
}

.sel-card__video[hidden] {
  display: none;
}

.sel-card__more {
  border-top: 1px solid var(--color-line);
  padding-top: 10px;
  font-size: 15px;
  line-height: 1.6;
}

.sel-card__more summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent);
  min-height: 32px;
  display: flex;
  align-items: center;
}

.sel-card__more p {
  margin: 0 0 10px;
}

.sel-card__h {
  margin: 12px 0 4px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
}

.sel-card__link {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  align-self: flex-start;
}

.sel-card__answer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  margin-top: 6px;
}

.sel-choice {
  min-height: 48px;
  border-radius: var(--radius-pill);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  background: var(--color-card);
}

.sel-choice--yes {
  border: 1px solid var(--color-text);
  color: var(--color-text);
}

.sel-choice--no {
  border: 1px solid var(--color-line);
  color: var(--color-text-muted);
}

.sel-choice--yes[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--color-on-accent);
}

.sel-choice--no[aria-pressed="true"] {
  background: var(--color-text-muted);
  border-color: var(--color-text-muted);
  color: var(--color-on-accent);
}

.sel-choice:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sel-card__label {
  font-size: 13px;
  color: var(--color-text-muted);
}

.sel-card__comment {
  font-size: 15px;
  padding: 11px 14px;
}

.sel-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: var(--color-card);
  border-top: 1px solid var(--color-line);
  padding: 12px max(16px, calc((100% - 720px) / 2 + var(--gutter))) calc(12px + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  gap: 12px;
}

.sel-bar[hidden] {
  display: none;
}

.sel-bar__text {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  line-height: 1.35;
}

/* Сторінка квартири: «Надіслати цю квартиру» і QR-код */
.share-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--color-line);
  padding-top: 16px;
}

.share-box__title {
  font-size: 14px;
  font-weight: 600;
}

.share-box__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.share-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 64px;
  padding: 10px 4px;
  border: 1px solid var(--color-line);
  border-radius: 12px;
  background: var(--color-card);
  color: var(--color-text);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.share-btn:hover {
  border-color: var(--color-text);
}

.share-btn:focus-visible,
.share-box__qr:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.share-box__qr {
  align-self: flex-start;
  min-height: 40px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.qr-dialog {
  width: min(420px, calc(100vw - 32px));
  border: 0;
  border-radius: var(--radius-card);
  padding: 20px;
  background: var(--color-card);
  color: var(--color-text);
}

.qr-dialog[open] {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qr-dialog::backdrop {
  background: color-mix(in srgb, var(--video-bg) 60%, transparent);
}

.qr-dialog__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.qr-dialog__close {
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  font-size: 26px;
  line-height: 1;
  color: var(--color-text);
  cursor: pointer;
}

.qr-dialog__img {
  width: 100%;
  height: auto;
  border: 1px solid var(--color-line);
  border-radius: 12px;
}

.qr-dialog__hint {
  margin: 0;
  font-size: 14px;
}

/* Бот для клієнтів: «Нагадати в Telegram» і «Повідомляти про нові квартири» */
.bot-cta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--color-bg-alt);
  border-radius: 12px;
  padding: 14px;
}

.bot-cta__text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.bot-cta__btn,
.alert-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.alert-cta__note {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--color-text-muted);
}

.series .bot-cta {
  background: var(--color-card);
}

/* Відгуки з RIELTOR.UA на головній (js/reviews.js) */
.review-card__quote--text {
  overflow-wrap: anywhere;
  white-space: pre-line;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
}

.review-card__more {
  align-self: flex-start;
  min-height: 40px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.avatar--initial {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-alt);
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--accent);
}

.reviews-source {
  max-width: var(--container);
  margin: 16px auto 0;
  padding: 0 var(--gutter);
  font-size: 14px;
  color: var(--color-text-muted);
}

.reviews-source a {
  color: var(--accent);
}

[data-reviews] .review-card {
  flex: 1 1 min(420px, 100%);
  min-width: 0;
}

@media (max-width: 760px) {
  [data-reviews] .review-card {
    padding: 28px 24px;
  }
}

/* Портрет Юлі на головній: обличчя завжди в кадрі */
.portrait__img {
  object-position: 50% 20%;
}

.reviews-more {
  display: flex;
  margin: 24px auto 0;
}

[data-reviews] .review-card[hidden] {
  display: none;
}

/* ==========================================================================
   Розташування і калькулятор на сторінці квартири
   ========================================================================== */

.place__wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: stretch;
}

.place__map {
  flex: 2 1 420px;
  min-width: 0;
  height: 380px;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--ph-sand);
  z-index: 0;
}

.place__info {
  flex: 1 1 260px;
  min-width: 0;
  background: var(--color-card);
  border-radius: var(--radius-card);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.place__addr {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.25;
}

.place__metro {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.place__m {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-text);
  color: var(--color-on-accent);
  font-size: 13px;
  font-weight: 700;
}

.place__note {
  margin: 0;
  font-size: 14px;
  color: var(--color-text-muted);
}

.place__pin span {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  border: 4px solid var(--color-card);
  box-shadow: 0 4px 12px rgba(30, 29, 26, 0.35);
}

.calc__card {
  background: var(--color-card);
  border-radius: var(--radius-card);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 760px;
}

.calc__tabs,
.calc__presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.calc__tab,
.calc__preset {
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  background: var(--color-card);
  color: var(--color-text);
  cursor: pointer;
}

.calc__tab[aria-pressed="true"],
.calc__preset[aria-pressed="true"] {
  background: var(--color-text);
  border-color: var(--color-text);
  color: var(--color-on-accent);
}

.calc__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.calc__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.calc__label {
  font-size: 14px;
  font-weight: 600;
}

.calc__input {
  width: 100%;
}

.calc__out {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 24px;
  border-radius: var(--radius-card);
  background: var(--color-bg-alt);
}

.calc__cap {
  font-size: 14px;
  color: var(--color-text-muted);
}

.calc__sum {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 600;
  line-height: 1.1;
  color: var(--accent);
}

.calc__line,
.calc__note {
  margin: 0;
  font-size: 14px;
  color: var(--color-text-muted);
}

/* ==========================================================================
   Обране і порівняння
   ========================================================================== */

.fav-btn {
  flex: none;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--color-line);
  border-radius: 50%;
  background: var(--color-card);
  color: var(--color-text);
  cursor: pointer;
}

.fav-btn[hidden] {
  display: none;
}

.fav-btn.is-on {
  color: var(--accent);
  border-color: var(--accent);
}

.fav-btn.is-on svg path {
  fill: currentColor;
}

.fav-btn--card {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  border: 0;
  box-shadow: 0 4px 12px rgba(30, 29, 26, 0.18);
}

.object__title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.object__title-row .object__title {
  min-width: 0;
}

.fav-bar {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  max-width: calc(100% - 32px);
  padding: 0 24px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-text);
  color: var(--color-on-accent);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  box-shadow: var(--shadow-badge);
  cursor: pointer;
}

.fav-bar svg path {
  fill: currentColor;
}

.fav-bar[hidden] {
  display: none;
}

body.has-fav-bar {
  padding-bottom: 96px;
}

.fav-dialog {
  width: calc(100% - 32px);
  max-width: 960px;
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: var(--radius-card);
  background: var(--color-card);
  color: var(--color-text);
  box-shadow: 0 24px 64px rgba(30, 29, 26, 0.25);
}

.fav-dialog::backdrop {
  background: rgba(30, 29, 26, 0.55);
}

.fav-dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 28px 0;
}

.fav-dialog__title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 500;
}

.fav-dialog__close {
  width: 44px;
  height: 44px;
  flex: none;
  border: 1px solid var(--color-line);
  border-radius: 50%;
  background: var(--color-card);
  color: var(--color-text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.fav-dialog__body {
  padding: 20px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.fav-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-input);
}

.fav-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.fav-table th,
.fav-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--color-line);
  min-width: 150px;
}

.fav-table tbody tr:last-child th,
.fav-table tbody tr:last-child td {
  border-bottom: 0;
}

.fav-table tbody th {
  min-width: 110px;
  font-weight: 600;
  color: var(--color-text-muted);
  position: sticky;
  left: 0;
  background: var(--color-card);
}

.fav-table thead th a {
  display: block;
  color: var(--color-text);
  font-weight: 600;
}

.fav-table__rm {
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-text-muted);
  font: inherit;
  font-size: 14px;
  text-decoration: underline;
  cursor: pointer;
  min-height: 32px;
}

.fav-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 480px;
}

.fav-form__title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
}

.fav-form .muted {
  margin: 0;
}

/* ==========================================================================
   Каталог: карта з цінами
   ========================================================================== */

.segmented--sm .segmented__btn {
  min-height: 40px;
  padding: 0 18px;
  font-size: 14px;
}

.segmented[hidden],
.catalog-map[hidden],
.catalog-map-note[hidden] {
  display: none;
}

.catalog-map-note {
  margin: -16px 0 0;
  font-size: 14px;
}

.catalog-map__canvas {
  height: min(70vh, 640px);
  min-height: 380px;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--ph-sand);
  z-index: 0;
}

.map-price {
  background: none;
  border: 0;
}

.map-price span {
  display: inline-block;
  transform: translate(-50%, -100%);
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  background: var(--color-text);
  color: var(--color-on-accent);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(30, 29, 26, 0.3);
}

.map-popup .leaflet-popup-content-wrapper {
  padding: 0;
  border-radius: var(--radius-card);
  overflow: hidden;
}

.map-popup .leaflet-popup-content {
  margin: 0;
  width: 260px !important;
  font-family: var(--font-sans);
}

.object-card--mini .object-card__media {
  height: 140px;
}

.object-card--mini .object-card__body {
  padding: 14px 16px 16px;
  gap: 4px;
}

.object-card--mini .object-card__price {
  font-size: 20px;
  margin: 0;
}

.object-card--mini p {
  margin: 0;
}

@media (max-width: 760px) {
  .fav-bar {
    left: 16px;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }

  body.has-fav-bar .sticky-cta {
    display: none;
  }

  body.has-fav-bar {
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }

  .place__map {
    height: 300px;
  }

  .place__info,
  .calc__card {
    padding: 24px 20px;
  }

  .calc__sum {
    font-size: 30px;
  }

  .fav-dialog {
    width: 100%;
    max-width: none;
    margin: auto 0 0;
    max-height: 92vh;
    border-radius: var(--radius-card) var(--radius-card) 0 0;
  }

  .fav-dialog__head {
    padding: 20px 20px 0;
  }

  .fav-dialog__body {
    padding: 16px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  }
}
