/* Главная пользуется общими токенами из site.css. Собственного набора
   --home-* здесь больше нет: он дублировал те же значения под другими
   именами, и было неясно, какая переменная управляет цветом. Локально
   остаются только два оттенка фона, которые нужны исключительно главной. */
.home-page {
  --home-surface: #fbfcfa;
  background: var(--home-surface);
  color: var(--primary);
  font-size: 17px;
  line-height: 1.58;
}

.home-eyebrow {
  margin: 0 0 14px !important;
  color: var(--secondary) !important;
  font-size: .8rem !important;
  font-weight: 800;
  letter-spacing: .085em;
  line-height: 1.35;
  text-transform: uppercase;
}

.home-hero-s1 {
  border: 0;
  background:
    radial-gradient(circle at 86% 18%, rgba(151, 198, 177, .24), transparent 30%),
    linear-gradient(135deg, #f5f8f3 0%, #edf5f2 62%, #f8f3e9 100%);
}

.home-page .home-hero-grid {
  min-height: 530px;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, .78fr);
  gap: clamp(34px, 4.5vw, 58px);
  padding-block: 58px;
}

.home-page .home-hero h1 {
  max-width: 720px;
  margin: 0 0 24px;
  color: var(--primary);
  font-size: clamp(3rem, 4.2vw, 3.55rem);
  line-height: 1.02;
  letter-spacing: -.05em;
}

.hero-title-line { display: block; }

.home-hero-lead {
  max-width: 660px;
  color: #476159 !important;
  font-size: clamp(1.08rem, 1.65vw, 1.27rem) !important;
}

.home-page .home-hero .hero-actions {
  gap: 12px;
  margin-top: 30px;
}

.home-page .home-hero .button {
  min-height: 56px;
  padding-inline: 22px;
  border-radius: 999px;
}

.home-dispatcher-cta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px 9px;
  background: var(--secondary) !important;
  box-shadow: 0 12px 28px rgba(29, 115, 90, .18);
}

.home-dispatcher-cta small,
.resident-action-link small,
.home-page .is-pending small {
  width: 100%;
  font-size: .7rem;
  font-weight: 650;
  line-height: 1;
  opacity: .82;
}

.hero-contact-line {
  margin: 22px 0 0 !important;
  color: #4b625c !important;
  font-size: 1rem !important;
}

.hero-contact-line a {
  color: var(--secondary-strong);
  font-size: 1.08rem;
  font-weight: 800;
}

.home-page .hero-real-photo {
  display: block;
  position: relative;
  align-self: center;
  justify-self: end;
  width: 100%;
  margin: 0;
  overflow: hidden;
  border: 10px solid rgba(255, 255, 255, .84);
  border-radius: 28px 28px 72px 28px;
  background: #dce7e2;
  box-shadow: 0 24px 60px rgba(28, 74, 60, .17);
}

.home-page .hero-real-photo picture { display: block; }

.home-page .hero-real-photo figcaption {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(16, 55, 46, .86);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
}

.resident-actions {
  padding-block: 70px 78px;
  scroll-margin-top: 100px;
  background: #fff;
}

.resident-actions-head { margin-bottom: 30px; }
.resident-actions-head h2,
.home-section-heading h2,
.home-contact h2,
.home-trust h2 {
  max-width: 850px;
  margin: 0;
  color: var(--primary);
  font-size: clamp(2.35rem, 4vw, 3.25rem);
  line-height: 1.04;
  letter-spacing: -.045em;
}

.resident-action-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  gap: 14px;
}

.resident-action {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
  min-height: 108px;
  padding: 24px 26px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface-soft);
}

.resident-action-soon {
  align-content: start;
  min-height: 108px;
  padding: 18px 22px;
  border-style: dashed;
  background: var(--surface-soft);
}
.resident-action-soon h3 { font-size: clamp(1.12rem, 1.5vw, 1.3rem); }
.resident-action-soon p { font-size: .97rem; }
.resident-action-primary {
  grid-row: span 4;
  align-content: center;
  min-height: 474px;
  padding: clamp(28px, 4vw, 44px);
  border-color: var(--secondary);
  background: var(--secondary);
  color: #fff;
}

.resident-action-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .82);
  color: var(--secondary);
}
.resident-action-icon .ui-icon { width: 23px; height: 23px; }
/* Двойной класс, чтобы колонка под иконку не перебивалась общими
   правилами .resident-action из медиазапросов ниже. */
.resident-action.resident-action-primary { grid-template-columns: 54px minmax(0, 1fr); }
.resident-action-primary .resident-action-icon { width: 54px; height: 54px; border-radius: 17px; }
.resident-action-primary .resident-action-icon .ui-icon { width: 27px; height: 27px; }
.resident-action-primary .resident-action-link .ui-icon,
.home-dispatcher-cta .ui-icon { color: currentColor; }

.resident-action h3 {
  margin: 2px 0 7px;
  color: var(--primary);
  font-size: clamp(1.28rem, 2vw, 1.65rem);
  line-height: 1.1;
  letter-spacing: -.025em;
}

.resident-action-primary h3 { color: #fff; font-size: clamp(1.8rem, 3vw, 2.5rem); }
.resident-action p { margin: 0; color: #50655f; }
.resident-action-primary p { color: #e5f1ec; font-size: 1.08rem; }
.resident-action-status {
  margin-bottom: 5px !important;
  color: var(--secondary) !important;
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.resident-action-link {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  min-height: 48px;
  margin-top: 22px;
  color: #fff;
  font-weight: 800;
}
.resident-action-link:hover { color: #fff; }

.home-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 28px;
}
.home-section-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  color: inherit;
  font-weight: 800;
}

.home-news {
  padding-block: 62px 48px;
  border-block: 1px solid var(--border);
  background: #f3f7f4;
  color: var(--primary);
}
.home-news .site-content-status { margin: 0 0 16px; }
.home-news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.home-news .site-content-card,
.home-news-empty {
  min-height: 0;
  padding: 26px 28px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  color: var(--primary);
  box-shadow: 0 8px 24px rgba(28, 74, 60, .05);
}
.home-news .site-content-card h3,
.home-news-empty h3 {
  max-width: 820px;
  margin: 0;
  color: var(--primary);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.35;
  letter-spacing: -.02em;
}
/* Пустое состояние уже само по себе карточка — вторую рамку вокруг него
   не рисуем. */
.home-news-empty { grid-column: 1 / -1; padding: 0; border: 0; background: none; box-shadow: none; }
.home-news-empty .empty-state { border-color: var(--border); background: #fff; }
.home-news .site-content-card p { color: #52675f; }
.home-news .site-content-type { background: #dcefe7; color: var(--secondary-strong); }
.home-news .site-content-card--city { padding: 0; border-color: #d4dfe2; background: #fff; }
.home-news .site-content-card--city .site-content-type { background: #e8eef0; color: #294f59; }

.home-houses {
  padding-block: 76px 82px;
  background: var(--surface-muted);
}
.home-houses .house-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 18px;
  max-width: 1040px;
}
.home-houses .house-card {
  position: relative;
  border: 1px solid rgba(29, 115, 90, .12);
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(28, 74, 60, .09);
}
.home-houses .house-card-body { padding: 24px 26px; }
.home-houses .house-card h3 {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  line-height: 1.1;
}
.home-houses .house-card p { color: #536760; }
.home-houses .house-card .text-link { color: var(--secondary-strong); }
.home-houses .house-card--text {
  padding: 28px 26px;
  background: linear-gradient(145deg, #fff, #f6faf7);
}
.home-houses .house-card--text .house-card-body { padding: 0; }

.home-contact {
  padding-block: 80px;
  background: #f8faf7;
}
.home-contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(350px, .92fr);
  gap: clamp(36px, 7vw, 90px);
  align-items: start;
}
.home-contact-main > p:not(.home-eyebrow) {
  max-width: 720px;
  margin: 20px 0 0;
  color: #52675f;
  font-size: 1.08rem;
}
.home-emergency-phones {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 26px;
}
.home-emergency-phones a {
  display: grid;
  gap: 7px;
  min-width: 0;
  min-height: 102px;
  padding: 19px;
  border: 1px solid #ebc6bf;
  border-radius: 18px;
  background: #fff5f2;
  color: #7f2928;
  text-decoration: none;
}
.home-emergency-phones span { font-size: .78rem; font-weight: 750; text-transform: uppercase; }
.home-emergency-phones strong { font-size: clamp(1.2rem, 2vw, 1.52rem); line-height: 1.15; }
.home-contact-main .home-emergency-note { margin-top: 14px !important; font-size: .95rem !important; }
.home-contact-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.home-contact-actions .button { min-height: 50px; border-radius: 999px; padding-inline: 20px; }
.home-contact-actions .button.primary { background: var(--secondary); }
.home-hours { display: grid; gap: 12px; }
.home-hours > div {
  padding: 25px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #fff;
}
.home-hours-label { margin: 0 0 7px; color: var(--secondary); font-size: .78rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.home-hours-phone { display: inline-flex; margin-bottom: 13px; color: var(--primary); font-size: 1.35rem; font-weight: 820; }
.home-hours > div > p:not(.home-hours-label) { margin: 0 0 14px; color: #596d66; }
.home-hours dl { margin: 0; border-top: 1px solid var(--border); }
.home-hours dl div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.home-hours dt { color: #536760; }
.home-hours dd { margin: 0; color: var(--primary); font-weight: 750; text-align: right; }
.home-hours dd small { display: block; color: #6b7e77; font-weight: 500; }

.home-trust {
  padding-block: 62px;
  background: var(--surface-warm);
}
.home-trust-layout {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}
.home-trust-copy > p:not(.home-eyebrow) { max-width: 660px; margin: 18px 0 0; color: #5f665e; font-size: 1.06rem; }
.home-license-fact { display: grid; gap: 3px; padding: 18px 20px; border-left: 4px solid var(--secondary); background: rgba(255, 255, 255, .72); }
.home-license-fact span { color: var(--secondary); font-size: .76rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.home-license-fact strong { color: var(--primary); font-size: 1.18rem; }
.home-license-fact small { color: #626d66; }
.home-trust-details .home-contact-actions { margin-top: 16px; }
.home-page .site-footer { background: var(--primary); }

@media (max-width: 1100px) {
  .home-page .home-hero-grid { grid-template-columns: minmax(0, 1fr) minmax(330px, .8fr); }
  .home-news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-contact-layout { grid-template-columns: 1fr; }
  .home-hours { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .home-page .home-hero-grid { display: block; min-height: 0; padding-block: 40px 42px; }
  .home-page .home-hero h1 { font-size: clamp(2.35rem, 10.5vw, 3.15rem); }
  /* В колонку кнопки укладываются по содержимому. Общий site.css задаёт
     .hero-actions .button { flex: 1 1 150px } для строки, и в колонке эти
     150px становились минимальной ВЫСОТОЙ: кнопки раздувались в овалы. */
  .home-page .home-hero .hero-actions { align-items: stretch; flex-direction: column; flex-wrap: nowrap; }
  .home-page .home-hero .hero-actions .button { flex: 0 0 auto; width: 100%; }
  .home-page .hero-real-photo { margin-top: 28px; border-width: 7px; border-radius: 22px 22px 48px 22px; }
  .resident-actions { padding-block: 56px 62px; }
  .resident-action-grid { grid-template-columns: 1fr; }
  .resident-action-primary { grid-row: auto; min-height: 250px; }
  .home-section-heading { display: block; }
  .home-section-heading .home-section-link { margin-top: 14px; }
  .home-news,
  .home-houses,
  .home-contact,
  .home-trust { padding-block: 56px 62px; }
  .home-news { padding-bottom: 46px; }
  .home-news-grid { grid-template-columns: 1fr; }
  .home-news-empty { grid-column: auto; }
  .home-houses .house-grid.compact { grid-template-columns: 1fr; }
  .home-houses .house-card--text { padding: 22px 18px; }
  .home-emergency-phones { grid-template-columns: 1fr; }
  .home-hours { grid-template-columns: 1fr; }
  .home-trust-layout { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  .home-page .home-hero h1 { font-size: 2.35rem; }
  .resident-action { grid-template-columns: 42px minmax(0, 1fr); gap: 13px; padding: 21px 18px; border-radius: 17px; }
  .resident-action-icon { width: 42px; height: 42px; border-radius: 13px; }
  .resident-action-primary { min-height: 230px; }
  .resident-actions-head h2,
  .home-section-heading h2,
  .home-contact h2,
  .home-trust h2 { font-size: 2.15rem; }
  .home-emergency-phones strong { font-size: 1.22rem; }
  .home-contact-actions { display: grid; }
  .home-hours > div { padding: 21px 18px; }
  .home-hours dl div { grid-template-columns: 1fr; gap: 2px; }
  .home-hours dd { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .home-page * { scroll-behavior: auto; transition: none !important; }
}

/* Личный кабинет — первый работающий сервис в этом ряду. Оформление то же,
   что у соседей, но без пунктира и метки «Скоро»: раздел открывается. */
.resident-action-ready {
  align-content: start;
  min-height: 108px;
  padding: 18px 22px;
  background: var(--surface-soft);
}
.resident-action-ready h3 { font-size: clamp(1.12rem, 1.5vw, 1.3rem); }
.resident-action-ready p { font-size: .97rem; }
.resident-action-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 6px;
  color: var(--secondary-strong);
  font-weight: 800;
}
