/* Финальный слой: адаптивность, читаемость и новые контентные блоки. */
:root {
  --refine-paper: #e9e4da;
  --refine-ink: #111513;
  --refine-green: #20372e;
  --refine-green-soft: #314b40;
  --refine-gold: #b89461;
  --refine-line: rgba(17, 21, 19, 0.18);
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 24px;
}

body {
  min-width: 0;
}

img,
svg {
  max-width: 100%;
}

img {
  display: block;
}

:where(h1, h2, h3, p, li, dt, dd, a, button, label, span) {
  min-width: 0;
}

:where(h1, h2, h3) {
  text-wrap: balance;
  hyphens: none;
  word-break: normal;
  overflow-wrap: normal;
}

:where(p, li, dd) {
  text-wrap: pretty;
}

:where(section[id], main[id]) {
  scroll-margin-top: 24px;
}

:where(a, button, input, select, textarea) {
  -webkit-tap-highlight-color: transparent;
}

:where(button, input, select, textarea) {
  font: inherit;
}

:where(a, button):focus-visible {
  outline-offset: 5px;
}

/* Формы: устойчивое выравнивание, читаемые поля и компактные чекбоксы. */
.contact__layout {
  align-items: start;
  min-height: 0;
}

.contact__heading {
  align-self: start;
  max-width: 820px;
}

.contact-form {
  width: 100%;
  max-width: 640px;
  min-width: 0;
  justify-self: end;
}

.contact-form label,
.contact-form :is(input, select, textarea, button) {
  min-width: 0;
}

.contact-form label > span {
  color: rgba(244, 243, 239, 0.68);
}

.contact-form :is(input:not([type="checkbox"]), select, textarea) {
  width: 100%;
  color: #f4f3ef;
  font-size: clamp(16px, 1.05vw, 18px);
  line-height: 1.4;
}

.contact-form :is(input, textarea)::placeholder {
  color: rgba(244, 243, 239, 0.48);
  opacity: 1;
}

.contact-form textarea {
  min-height: 118px;
  padding: 12px 0 15px;
  border: 0;
  border-bottom: 1px solid rgba(212, 177, 132, 0.34);
  border-radius: 0;
  background: transparent;
  outline: none;
  transition: border-color 0.25s ease;
}

.contact-form textarea:focus {
  border-bottom-color: #d4b184;
}

.contact-form button[type="submit"] {
  order: 0;
  width: 100%;
}

.contact-form__checkbox,
.contact-form__consent {
  width: 100%;
  min-width: 0;
}

.contact-form .contact-form__checkbox input[type="checkbox"],
.contact-form .contact-form__consent input[type="checkbox"] {
  flex: 0 0 16px;
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 1px 0 0;
  padding: 0;
  accent-color: #b89461;
}

.contact-form__checkbox > span,
.contact-form__consent > span {
  overflow-wrap: anywhere;
}

@media (min-width: 1181px) {
  .contact__layout {
    grid-template-columns: minmax(0, 1fr) minmax(400px, 520px);
    gap: clamp(56px, 6vw, 108px);
  }
}

@media (max-width: 1180px) {
  .contact-form {
    justify-self: start;
  }
}

/* Галерея не сплющивается на невысоких экранах MacBook и в Safari. */
@media (min-width: 769px) {
  body[data-page="home"] .gallery-card__image {
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 10;
  }
}

/* Official amoCRM form embedded in the three contact sections. */
.amo-form-embed {
  width: 100%;
  min-width: 0;
}

.amo-form-embed.is-loaded {
  min-height: 540px;
}

.amo-form-embed iframe {
  display: block;
  width: 100% !important;
  min-height: 540px;
  border: 0;
}

.amo-form-legal {
  max-width: 620px;
  margin: 14px 0 0;
  color: rgb(255 255 255 / 58%);
  font-size: 11px;
  line-height: 1.55;
}

.amo-form-loading {
  margin: 0 0 18px;
  color: rgb(255 255 255 / 76%);
  font-size: 13px;
  line-height: 1.55;
}

.amo-form-embed.is-loaded .amo-form-loading {
  display: none;
}

.amo-form-loading a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.amo-form-legal a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

body[data-page="home"] .gallery-card__image img,
body[data-page="home"] .process-slider__media img {
  object-fit: cover;
  object-position: center;
}

/* После упрощения этапов карточки остаются одинаковой высоты. */
body[data-page="home"] .process-slider__track {
  align-items: stretch;
}

body[data-page="home"] .process-slider__card {
  grid-template-rows: auto 1fr;
}

body[data-page="home"] .process-slider__body {
  align-content: start;
}

body[data-page="home"] .process-slider__index,
body[data-page="home"] .process-slider__deliverable {
  display: none;
}

/* Галерея рендеров временно не показывается, но остаётся в разметке и сценариях. */
body[data-page="home"] .gallery.is-temporarily-hidden {
  display: none !important;
}

/* Декоративная нумерация разделов и изображений КОСМИ-СИТИ убрана. */
body[data-page="kosmi-city"] .section-kicker > span,
body[data-page="kosmi-city"] .city-architecture__index,
body[data-page="kosmi-city"] .city-timeline__media > span,
body[data-page="kosmi-city"] .city-purchase__card-number {
  display: none !important;
}

/* Подписи архитектурной галереи не прижимаются к следующему разделу. */
body[data-page="kosmi-city"] .city-architecture {
  padding-bottom: clamp(72px, 7vw, 116px);
}

@media (max-width: 768px) {
  body[data-page="kosmi-city"] .city-architecture {
    padding-bottom: 56px;
  }
}

.mobile-nav[aria-hidden="true"] {
  visibility: hidden;
  pointer-events: none;
}

.mobile-nav[aria-hidden="false"] {
  visibility: visible;
}

@media (max-width: 1359px) {
  body.menu-open {
    overflow: hidden;
  }

  body.menu-open .hero__header,
  body.menu-open .site-header {
    z-index: 16;
    position: relative;
  }

  .mobile-nav {
    z-index: 15;
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: max(118px, calc(env(safe-area-inset-top) + 102px)) clamp(28px, 6vw, 96px) max(32px, calc(env(safe-area-inset-bottom) + 24px));
    color: #f4f3ef;
    background:
      radial-gradient(circle at 82% 18%, rgba(184, 148, 97, 0.13), transparent 31%),
      linear-gradient(135deg, rgba(8, 13, 10, 0.99), rgba(14, 23, 18, 0.97));
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
  }

  .mobile-nav.is-open,
  .mobile-nav[aria-hidden="false"] {
    display: flex !important;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-nav nav {
    display: grid;
    width: min(100%, 820px);
    margin: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
  }

  .mobile-nav nav a {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: baseline;
    min-height: clamp(70px, 8vh, 96px);
    padding: clamp(16px, 2vh, 24px) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    font-size: clamp(30px, 4.2vw, 58px);
    line-height: 1;
    letter-spacing: -0.045em;
  }

  .mobile-nav nav a span {
    display: none !important;
  }

  .mobile-nav__phone {
    align-self: center;
    margin-top: 24px;
    font-size: clamp(21px, 3vw, 32px);
    line-height: 1.2;
  }
}

body[data-page="home"] .city-showcase__fact {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 1vw, 18px);
  min-height: clamp(176px, 13vw, 236px);
  padding: clamp(28px, 3vw, 48px) clamp(14px, 1.5vw, 28px) !important;
  text-align: center;
}

body[data-page="home"] .city-showcase__fact-value {
  place-items: center;
  font-size: clamp(38px, 4vw, 72px);
}

body[data-page="home"] .city-showcase__fact-current,
body[data-page="home"] .city-showcase__fact-label {
  width: 100%;
  text-align: center;
}

body[data-page="home"] .city-showcase__fact-label {
  line-height: 1.35;
}

.hero__title,
.city-hero__title,
.city-teaser__content h1,
.display-title,
.city-heading--l2,
.city-heading--l3,
.ui-accordion__title,
.articles-index__content > h1,
.article-hero h1 {
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

.city-showcase__heading .display-title > span {
  display: block;
}

.city-showcase__letter-k {
  margin-right: 0 !important;
  font: inherit !important;
}

.answer-hub {
  color: var(--refine-ink);
  background: #d9d2c6;
  padding-top: clamp(84px, 9vw, 150px);
  padding-bottom: clamp(88px, 9vw, 150px);
}

.answer-hub__heading {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.55fr);
  align-items: end;
  gap: clamp(32px, 6vw, 100px);
}

.answer-hub__heading h2 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(48px, 6.1vw, 112px);
  font-weight: 420;
  letter-spacing: -0.067em;
  line-height: 0.92;
}

.answer-hub__heading > p {
  max-width: 43ch;
  margin: 0;
  color: rgba(17, 21, 19, 0.68);
  font-size: clamp(15px, 1.05vw, 19px);
  line-height: 1.62;
}

.answer-hub__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: clamp(48px, 6vw, 90px) 0 0;
  border-top: 1px solid var(--refine-line);
}

.answer-hub__item {
  padding: clamp(28px, 3vw, 48px);
  border-right: 1px solid var(--refine-line);
}

.answer-hub__item:first-child {
  padding-left: 0;
}

.answer-hub__item:last-child {
  padding-right: 0;
  border-right: 0;
}

.answer-hub__item dt {
  min-height: 2.4em;
  color: var(--refine-green);
  font-size: clamp(20px, 1.55vw, 29px);
  font-weight: 520;
  letter-spacing: -0.035em;
  line-height: 1.18;
}

.answer-hub__item dd {
  max-width: 38ch;
  margin: 22px 0 0;
  color: rgba(17, 21, 19, 0.65);
  font-size: clamp(14px, 0.92vw, 17px);
  line-height: 1.65;
}

.articles-index__grid article {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.articles-index__grid article > a {
  width: max-content;
  margin-top: auto;
  padding-top: 20px;
}

.articles-index__image img,
.project-card__image img {
  transition: transform 750ms cubic-bezier(0.22, 1, 0.36, 1), filter 400ms ease;
}

.articles-index__grid article:hover .articles-index__image img,
.project-card:hover .project-card__image img {
  transform: scale(1.025);
}

.article-page {
  min-height: 100vh;
  color: var(--refine-ink);
  background: var(--refine-paper);
}

.article-hero {
  padding-top: clamp(70px, 7vw, 120px);
  padding-bottom: clamp(54px, 6vw, 96px);
}

.article-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  color: rgba(17, 21, 19, 0.56);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.article-hero h1 {
  max-width: 14ch;
  margin: clamp(28px, 4vw, 58px) 0 0;
  font-size: clamp(48px, 7vw, 126px);
  font-weight: 410;
  letter-spacing: -0.065em;
  line-height: 0.94;
}

.article-hero__lead {
  max-width: 690px;
  margin: clamp(28px, 3vw, 44px) 0 0;
  color: rgba(17, 21, 19, 0.68);
  font-size: clamp(18px, 1.45vw, 26px);
  line-height: 1.5;
}

.article-cover {
  aspect-ratio: 16 / 8.7;
  margin-bottom: clamp(70px, 8vw, 130px);
  overflow: hidden;
}

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

.article-layout {
  display: grid;
  grid-template-columns: minmax(190px, 0.32fr) minmax(0, 0.9fr);
  gap: clamp(40px, 7vw, 120px);
  padding-bottom: clamp(100px, 11vw, 180px);
}

.article-aside {
  align-self: start;
  position: sticky;
  top: 28px;
}

.article-aside p {
  margin: 0 0 14px;
  color: rgba(17, 21, 19, 0.52);
  font-size: 10px;
  font-weight: 680;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.article-aside a {
  display: block;
  width: max-content;
  max-width: 100%;
  padding: 9px 0;
  border-bottom: 1px solid var(--refine-line);
  color: rgba(17, 21, 19, 0.72);
  font-size: 13px;
  line-height: 1.35;
}

.article-body {
  max-width: 790px;
}

.article-body > :first-child {
  margin-top: 0;
}

.article-body h2 {
  margin: clamp(58px, 7vw, 92px) 0 22px;
  font-size: clamp(32px, 3.6vw, 58px);
  font-weight: 440;
  letter-spacing: -0.05em;
  line-height: 1.02;
}

.article-body h3 {
  margin: 38px 0 14px;
  font-size: clamp(21px, 1.7vw, 29px);
  font-weight: 540;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.article-body p,
.article-body li {
  color: rgba(17, 21, 19, 0.74);
  font-size: clamp(16px, 1.08vw, 19px);
  line-height: 1.72;
}

.article-body ul,
.article-body ol {
  display: grid;
  gap: 12px;
  padding-left: 1.25em;
}

.article-answer {
  margin: 0 0 clamp(46px, 6vw, 80px);
  padding: clamp(26px, 3vw, 42px);
  border-left: 3px solid var(--refine-gold);
  background: rgba(255, 255, 255, 0.42);
}

.article-answer strong {
  display: block;
  margin-bottom: 10px;
  color: var(--refine-green);
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.article-answer p {
  margin: 0;
  color: var(--refine-ink);
  font-size: clamp(18px, 1.5vw, 25px);
  font-weight: 500;
  line-height: 1.48;
}

.article-checklist {
  margin: 42px 0;
  padding: clamp(26px, 3vw, 42px);
  color: #f4f1ea;
  background: var(--refine-green);
}

.article-checklist h3 {
  margin-top: 0;
  color: #fff;
}

.article-checklist li {
  color: rgba(255, 255, 255, 0.78);
}

.article-cta {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 28px;
  margin-top: clamp(64px, 8vw, 110px);
  padding-top: 30px;
  border-top: 1px solid var(--refine-line);
}

.article-cta p {
  max-width: 48ch;
  margin: 0;
}

.article-cta .project-button {
  white-space: nowrap;
}

@media (max-width: 900px) {
  .answer-hub__heading,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .answer-hub__grid {
    grid-template-columns: 1fr;
  }

  .answer-hub__item,
  .answer-hub__item:first-child,
  .answer-hub__item:last-child {
    padding: 28px 0;
    border-right: 0;
    border-bottom: 1px solid var(--refine-line);
  }

  .answer-hub__item:last-child {
    border-bottom: 0;
  }

  .answer-hub__item dt {
    min-height: 0;
  }

  .article-aside {
    display: none;
  }
}

@media (max-width: 768px) {
  html {
    scroll-padding-top: 12px;
  }

  .hero__title {
    font-size: clamp(35px, 10.5vw, 46px);
    letter-spacing: -0.055em;
    line-height: 0.98;
  }

  .about-page .display-title {
    font-size: clamp(32px, 9.8vw, 46px);
    letter-spacing: -0.045em;
  }

  .city-teaser__content h1 {
    max-width: 12ch;
    font-size: clamp(44px, 13.2vw, 64px);
    line-height: 0.96;
  }

  .mobile-nav {
    padding-top: max(112px, calc(env(safe-area-inset-top) + 92px));
    padding-bottom: max(28px, calc(env(safe-area-inset-bottom) + 20px));
  }

  .mobile-nav nav a {
    grid-template-columns: minmax(0, 1fr);
    min-height: 62px;
    font-size: clamp(27px, 8.5vw, 40px);
  }

  body[data-page="home"] .city-showcase__fact {
    min-height: 132px;
    padding: 24px 12px !important;
  }

  .mobile-nav nav a,
  .hero__cta,
  .project-button,
  .contact-form button[type="submit"] {
    min-height: 48px;
  }

  .pill-filters {
    flex-wrap: nowrap;
    width: calc(100% + 20px);
    padding: 2px 20px 8px 0;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .pill-filters button {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .projects-grid {
    margin-top: 28px;
  }

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

  .contact-form__consent,
  .contact-form__checkbox {
    line-height: 1.45;
  }

  .answer-hub__heading h2 {
    font-size: clamp(44px, 13vw, 62px);
  }

  .article-cover {
    aspect-ratio: 4 / 3;
  }

  .article-hero h1 {
    font-size: clamp(34px, 11vw, 62px);
  }

  .article-cta {
    grid-template-columns: 1fr;
  }

  .article-cta .project-button {
    width: 100%;
    justify-content: center;
  }

  .page-header {
    display: grid;
    grid-template-columns: minmax(138px, 1fr) auto;
    gap: 14px;
    min-height: 84px;
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .page-header__brand img {
    width: min(45vw, 164px);
    height: auto;
  }

  .page-header__nav {
    display: flex;
    grid-column: 1 / -1;
    gap: 18px;
    width: 100%;
    padding-top: 12px;
    border-top: 1px solid var(--refine-line);
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .page-header__nav a {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .page-header__cta {
    padding: 10px 0;
    font-size: 9px;
    text-align: right;
  }
}

/* Интерактивная карта Яндекса остаётся полноценной частью страницы. */
.city-location__map {
  position: relative;
  min-height: clamp(430px, 54vw, 720px);
  overflow: hidden;
  background: #1a1d1c;
}

.yandex-map {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  border: 0;
  background: #1a1d1c;
}

.yandex-map__external {
  z-index: 3;
  position: absolute;
  left: clamp(14px, 2vw, 24px);
  bottom: clamp(14px, 2vw, 24px);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 11px 15px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 4px;
  color: #fff;
  background: rgba(14, 19, 16, 0.84);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(12px);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.yandex-map__external:hover,
.yandex-map__external:focus-visible {
  background: rgba(145, 103, 63, 0.94);
}

/* Ровное перетаскивание мышью без конкуренции с обязательной привязкой карточек. */
:is(.gallery__viewport, .process-slider__viewport, .city-about__slider, .city-architecture__stage) {
  cursor: grab;
  overscroll-behavior-inline: contain;
  -webkit-user-drag: none;
}

:is(.gallery__viewport, .process-slider__viewport, .city-about__slider, .city-architecture__stage).is-dragging {
  cursor: grabbing;
  scroll-behavior: auto !important;
  scroll-snap-type: none !important;
  user-select: none;
}

:is(.gallery__viewport, .process-slider__viewport, .city-about__slider, .city-architecture__stage).is-dragging img {
  pointer-events: none;
}

@media (max-width: 768px) {
  .city-location__map {
    min-height: 0;
  }

  .yandex-map {
    height: 460px;
    min-height: 460px;
  }

  .yandex-map__external {
    position: relative;
    left: auto;
    bottom: auto;
    justify-content: center;
    width: 100%;
    max-width: none;
    border-radius: 0;
  }

}

@media (max-width: 390px) {
  .hero__header,
  .site-header {
    grid-template-columns: minmax(112px, 1fr) auto 42px;
  }

  .hero__brand,
  .site-header__brand,
  .hero__brand-logo,
  .site-header__brand img {
    width: 124px;
  }

  .hero__phone,
  .site-header__phone {
    padding-inline: 5px;
    font-size: 11.5px;
  }

  .insights .display-title {
    font-size: clamp(38px, 12vw, 48px);
  }

  .legal-page h1 {
    font-size: clamp(34px, 11vw, 42px);
  }
}

@media (max-width: 350px) {
  .hero__header,
  .site-header {
    grid-template-columns: minmax(112px, 1fr) 42px;
  }

  .hero__phone,
  .hero__meta,
  .site-header__phone,
  .site-header__meta {
    display: none;
  }
}

/* Исправления по тестированию на iPhone: первый экран остаётся в обычном потоке. */
body[data-page="home"] .hero__stat-index {
  display: none !important;
}

body[data-page="home"] .hero__stat {
  grid-template-columns: minmax(0, 1fr);
}

body[data-page="home"] .hero__stat p {
  grid-column: 1;
}

.process__grid {
  border-left: 1px solid rgba(0, 0, 0, 0.22);
}

.city-house__popup-close {
  z-index: 2;
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(17, 21, 19, 0.2);
  border-radius: 50%;
  color: var(--c-ink-900);
  background: rgba(244, 241, 234, 0.9);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 768px) {
  body[data-page="home"] .hero {
    display: flex;
    flex-direction: column;
    min-height: 900px;
    height: auto;
    padding: 0 20px 26px;
    overflow: clip;
  }

  body[data-page="home"] .hero__header {
    flex: 0 0 auto;
    grid-template-columns: minmax(116px, 1fr) auto 44px;
    column-gap: 8px;
    min-height: 84px;
    padding: 22px 0 18px;
  }

  body[data-page="home"] .hero__brand,
  body[data-page="home"] .hero__brand-logo {
    width: clamp(122px, 35vw, 150px) !important;
  }

  body[data-page="home"] .hero__meta {
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  body[data-page="home"] .hero__phone {
    white-space: nowrap;
    padding: 0;
    font-size: clamp(12px, 3.55vw, 15px);
  }

  body[data-page="home"] .hero__worktime,
  body[data-page="home"] .hero__audit {
    display: none;
  }

  body[data-page="home"] .hero__intro {
    flex: 0 0 auto;
    align-self: stretch;
    margin: clamp(190px, 32svh, 270px) 0 0;
    padding: 0;
    position: relative;
  }

  body[data-page="home"] .hero__intro::before,
  body[data-page="home"] .hero__side-copy {
    display: none !important;
  }

  body[data-page="home"] .hero__project {
    margin-top: 22px;
    line-height: 1.42;
  }

  body[data-page="home"] .hero__bottom {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 22px;
    margin-top: 24px;
    padding-top: 0;
    border-top: 0;
    position: relative;
  }

  body[data-page="home"] .hero__cta {
    order: 1;
    width: 100%;
    max-width: none;
    min-height: 70px;
  }

  body[data-page="home"] .hero__stats {
    order: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.32);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  }

  body[data-page="home"] .hero__stat,
  body[data-page="home"] .hero__stat:first-child {
    display: block;
    min-width: 0;
    min-height: 84px;
    padding: 14px 12px 16px 0;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  }

  body[data-page="home"] .hero__stat:nth-child(even) {
    padding-right: 0;
    padding-left: 16px;
    border-left: 1px solid rgba(255, 255, 255, 0.24);
  }

  body[data-page="home"] .hero__stat:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  body[data-page="home"] .hero__stat p {
    margin: 0;
  }

  body[data-page="home"] .hero__stat p > span {
    display: block;
    margin-top: 3px;
  }

  body[data-page="home"] .storyline__timeline {
    display: grid;
    gap: 28px;
    padding-left: 0;
  }

  body[data-page="home"] .storyline__straight-line,
  body[data-page="home"] .storyline-step__point,
  body[data-page="home"] .storyline-step__media > span {
    display: none !important;
  }

  body[data-page="home"] .storyline-step,
  body[data-page="home"] .storyline-step:nth-of-type(2n) {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-height: 0 !important;
    margin: 0 !important;
  }

  body[data-page="home"] .storyline-step__media,
  body[data-page="home"] .storyline-step:nth-of-type(2n) .storyline-step__media {
    order: 1;
    width: 100%;
    height: auto !important;
    aspect-ratio: 4 / 3;
  }

  body[data-page="home"] .storyline-step__copy,
  body[data-page="home"] .storyline-step:nth-of-type(2n) .storyline-step__copy {
    order: 2;
    grid-area: auto;
    max-width: none;
    padding: 26px 28px 32px;
    border: 1px solid var(--refine-line);
    border-top: 0;
    background: rgba(244, 241, 234, 0.56);
  }

  .answer-hub__heading h2 {
    max-width: 9ch;
    font-size: clamp(46px, 13.5vw, 58px);
    line-height: 0.96;
  }

  body[data-page="kosmi-city"] .city-house__popup {
    z-index: 80;
    position: fixed;
    left: 20px !important;
    right: 20px;
    top: auto !important;
    bottom: max(20px, env(safe-area-inset-bottom));
    width: auto;
    max-height: min(240px, 42svh);
    transform: translateY(12px);
    border: 1px solid rgba(17, 21, 19, 0.18);
    box-shadow: 0 20px 56px rgba(0, 0, 0, 0.3);
  }

  body[data-page="kosmi-city"] .city-house__popup.is-visible {
    transform: translateY(0);
  }

  body[data-page="kosmi-city"] .city-house__popup-media {
    display: none;
  }

  body[data-page="kosmi-city"] .city-house__popup-body {
    padding: 24px 52px 24px 24px;
  }

  body[data-page="kosmi-city"] .city-house__popup-row {
    padding-right: 4px;
  }

  body[data-page="kosmi-city"] .city-house__popup-body p {
    margin: 12px 0 0;
    line-height: 1.45;
  }

  body[data-page="kosmi-city"] .city-architecture__stage {
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 20px;
  }

  body[data-page="kosmi-city"] .city-architecture__track {
    gap: 20px;
  }

  body[data-page="kosmi-city"] .city-architecture__slide {
    flex: 0 0 calc((100vw - 60px) / 2);
    width: calc((100vw - 60px) / 2) !important;
    min-width: 0;
    scroll-snap-align: start;
  }

  body[data-page="kosmi-city"] .city-architecture__media {
    width: 100%;
    height: auto !important;
    aspect-ratio: 4 / 5;
  }

  body[data-page="kosmi-city"] .city-architecture__media img {
    object-fit: cover;
  }

  body[data-page="kosmi-city"] .city-architecture__caption {
    display: grid;
    align-content: start;
    gap: 8px;
    min-height: 112px;
  }

  body[data-page="kosmi-city"] .city-architecture__caption p {
    white-space: normal;
    text-align: left;
    line-height: 1.35;
  }
}

@media (prefers-reduced-motion: reduce) {
  .articles-index__image img,
  .project-card__image img {
    transition: none;
  }
}

/* Final visual refinements: complete the reasons grid and improve text contrast. */
.process__grid {
  border-bottom: 1px solid rgba(0, 0, 0, 0.22);
}

@media (min-width: 769px) {
  .lifestyle__shade {
    background:
      radial-gradient(
        ellipse 46% 42% at 82% 67%,
        rgba(0, 0, 0, 0.5) 0%,
        rgba(0, 0, 0, 0.28) 44%,
        rgba(0, 0, 0, 0) 78%
      ),
      linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.2) 62%),
      linear-gradient(rgba(0, 0, 0, 0) 48%, rgba(0, 0, 0, 0.62));
  }
}
