/* Approved homepage recomposition, 2026-10-03.
   Permanent SEO positioning and the commercial slider have separate roles. */

.hm-seo-intro {
  background: #fff;
  border-bottom: 1px solid #d9dcdf;
}

.hm-seo-intro-inner {
  display: grid;
  grid-template-columns: minmax(18rem, 0.9fr) minmax(24rem, 1.1fr);
  align-items: start;
  gap: clamp(2rem, 4vw, 5rem);
  padding-top: clamp(1.125rem, 2vw, 1.75rem);
  padding-bottom: clamp(1.125rem, 2vw, 1.75rem);
}

.hm-seo-intro .hm-home-h1 {
  max-width: 35rem;
  margin: 0;
  font-size: clamp(1.375rem, 1.8vw, 1.875rem);
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -0.02em;
}

.hm-seo-intro .hm-hero-business {
  max-width: 42rem;
  margin: 0;
  color: #697078;
  font-size: clamp(0.875rem, 1vw, 0.9375rem);
  line-height: 1.5;
}

.hm-hero .hm-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-self: stretch;
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}

.hm-hero .hm-hero-inner {
  min-height: 0;
}

/* Утверждённый макет: фото слева, текст и переключатель справа. */
@media (min-width: 768px) {
  .hm-hero .hm-hero-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  }

  .hm-hero .hm-hero-copy {
    grid-column: 2;
    grid-row: 1;
    padding-right: var(--hm-pad);
    padding-left: clamp(28px, 3.125vw, 45px);
  }

  .hm-hero .hm-hero-figure {
    grid-column: 1;
    grid-row: 1;
    padding-right: 28px;
    padding-left: var(--hm-pad);
  }
}

.hm-hero .hm-hero-task {
  margin-top: 0;
}

.hm-hero .hm-hero-figure {
  align-self: stretch;
}

.hm-hero .hm-photo-frame {
  flex: 0 0 auto;
  width: 100%;
  min-height: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.hm-hero .hm-hero-switch {
  margin-top: 0.75rem;
}

/* The photograph fills the approved 16:9 frame at every breakpoint. */
.hm-hero .hm-hero-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover !important;
  object-position: center;
}

.hm-hero picture,
.hm-hero [data-hero-media],
.cv-commerce main section:has(h1) picture,
.cv-commerce main section:has(h1) [data-hero-media] {
  overflow: hidden;
}

@media (max-width: 767px) {
  .hm-seo-intro-inner {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .hm-seo-intro .hm-home-h1 {
    max-width: none;
    font-size: 1.25rem;
  }

  .hm-seo-intro .hm-hero-business {
    font-size: 0.875rem;
    line-height: 1.45;
  }

  .hm-hero .hm-hero-copy {
    padding-top: 1.5rem;
    padding-bottom: 1.25rem;
  }

  .hm-hero .hm-hero-figure {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-top: 0;
  }

  .hm-hero .hm-photo-frame {
    width: 100%;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .hm-hero .hm-hero-switch {
    margin-top: 0.75rem;
  }

  .hm-hero picture,
  .hm-hero [data-hero-media],
  .cv-commerce main section:has(h1) picture,
  .cv-commerce main section:has(h1) [data-hero-media] {
    aspect-ratio: 4 / 3;
  }
}

/* Approved homepage review 26.10.2026: source is home-type-scale-review-20261026. */

/* Isolated candidate: live approved page and source styles are otherwise intact. */
.hm-hero .hm-hero-actions .hm-button { white-space: nowrap; }
/* The supplied product photo has no decorative frame at either width. */
.hm-hero .hm-photo-frame { border: 0; background: transparent; }
.hm-hero .hm-photo-frame::before,
.hm-hero .hm-photo-frame::after { display: none; }
/* Wide review: the photograph is the media half of the Hero, without a frame. */
@media (min-width: 768px) {
  .hm-hero .hm-hero-figure { padding: 0; overflow: hidden; }
  .hm-hero .hm-photo-frame { flex: 1 1 auto; height: 100%; aspect-ratio: auto; }
  .hm-hero .hm-hero-switch { margin-top: auto; padding-top: 20px; }
}
@media (max-width: 767px) {
  .hm-hero .hm-hero-inner { display: flex; flex-direction: column; }
  .hm-hero .hm-hero-figure { display: contents; }
  .hm-hero .hm-photo-frame { order: 0; width: 100%; aspect-ratio: 16 / 9; }
  .hm-hero .hm-hero-copy { order: 1; }
  .hm-hero .hm-hero-switch { margin-top: 20px; }
  .hm-seo-continuation { background: #fff; border-bottom: 1px solid #d9dcdf; }
  .hm-seo-continuation .hm-container { padding-top: 16px; padding-bottom: 16px; }
  .hm-seo-continuation .hm-hero-business { max-width: 820px; margin: 0; color: #697078; font-size: 14px; line-height: 1.5; }
}

/* Утверждённая шкала главной по ролям каталога: 12 / 14 / 16 / 19 / 21 / 28. */
.hm-seo-intro .hm-home-h1 {
  font-family: var(--font-head, 'Montserrat', sans-serif);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--c-text, #17171A);
  hyphens: none;
  overflow-wrap: normal;
  word-break: normal;
}

.mm-candidate .hm-hero-task-title {
  font-size: 40px;
}

.hm .hm-section-heading h2,
.hm .hm-service h2,
.hm .hm-contact h2 {
  font-size: 28px;
  line-height: 1.2;
}

.hm .hm-kicker {
  font-size: 12px;
}

.hm-codex .hm-specializations .hm-spec-main h3 {
  font-size: 19px;
  line-height: 1.35;
}

.hm .hm-format h3,
.hm-cs .hm-cs-article-grid .ex-article-card h3 {
  font-size: 21px;
}

.mm-candidate .hm-service .hm-service-routes .pr-link-row--inverse strong {
  font-size: 16px;
  font-weight: 500;
}

.hm .hm-section-heading p,
.hm .hm-own-brand-copy,
.hm .ex-article-card p,
.hm .hm-format li {
  font-size: 16px;
}

.mm-candidate .hm-hero-lead {
  font-size: 16px !important; /* existing homepage rule already uses !important */
}

.hm .hm-link,
.hm .hm-button {
  font-size: 16px;
}

.hm .hm-hero-switch button,
.hm .hm-service-routes small {
  font-size: 14px;
}

@media (max-width: 767px) {
  .hm-seo-intro .hm-home-h1 { font-size: 20px; }
  .mm-candidate .hm-hero-task-title { font-size: 30px; }
  .hm .hm-section-heading h2 { font-size: 28px; }
  .hm .hm-hero-actions .hm-button,
  .hm .hm-hero-actions .hm-link { font-size: 16px; }
}
