/* Чистый мир. Главная: базовые правила только внутри новой области. */
.cm-home {
  --cm-blue: #1471ff;
  --cm-ink: #1b2d52;
  --cm-muted: #5e6d84;
  --cm-line: #dde5ef;
  box-sizing: border-box;
  max-width: none;
  margin: 0 auto;
  padding: 36px max(24px, calc((100% - 1132px) / 2)) 64px;
  background: transparent;
  color: var(--cm-ink);
  font: 16px/1.6 Arial, sans-serif;
  text-align: left;
}

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

.cm-home :is(h2, h3, p, dl, ol) {
  margin: 0;
  padding: 0;
  color: inherit;
  letter-spacing: normal;
  text-transform: none;
  background: none;
  border: 0;
}

.cm-home h2 {
  margin-bottom: 18px;
  font: 700 clamp(25px, 2.5vw, 34px)/1.2 Arial, sans-serif;
}
.cm-home h3 {
  margin-bottom: 12px;
  font: 700 21px/1.28 Arial, sans-serif;
}
.cm-home p {
  margin-bottom: 16px;
}
.cm-home a {
  color: #1162d5;
  text-decoration: none;
  cursor: pointer;
  transition: color .18s, background .18s, border-color .18s;
}
.cm-home a:hover {
  color: #0647a3;
  text-decoration: underline;
}
.cm-home a:focus-visible {
  outline: 3px solid var(--cm-blue);
  outline-offset: 5px;
}
.cm-home img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0;
  border: 0;
}
.cm-home section {
  scroll-margin-top: 24px;
}
.cm-home section::before,
.cm-home section::after {
  content: none;
}
.cm-home small {
  color: var(--cm-muted);
  font-size: 13px;
  line-height: 1.5;
}

/* Общие компоненты. */
.cm-home .cm-eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
  color: #1162d5;
  font: 700 12px/1.4 Arial, sans-serif;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.cm-eyebrow::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  border: 1px solid currentColor;
  transform: rotate(45deg);
}
.cm-home .cm-section {
  position: relative;
  margin-top: 68px;
  padding: 32px;
  border: 1px solid #d6e1ef;
  border-radius: 10px;
  background: #ffffffef;
  box-shadow: 0 8px 24px #1b2d5205;
}
.cm-home .cm-section::before {
  content: "";
  display: block;
  position: absolute;
  top: -1px;
  left: 32px;
  width: 54px;
  height: 3px;
  background: var(--cm-blue);
  border-radius: 0 0 2px 2px;
}
.cm-section-heading {
  max-width: 900px;
  margin-bottom: 26px;
}
.cm-section-heading > p:last-child {
  margin-bottom: 0;
  color: var(--cm-muted);
}
.cm-home .cm-link {
  position: relative;
  z-index: 1;
  font-weight: 700;
}
.cm-home .cm-related {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin: 20px 0 0;
  font-size: 15px;
  font-weight: 700;
}
.cm-home .cm-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  min-height: 52px;
  margin-bottom: 8px;
  padding: 15px 22px;
  border-radius: 6px;
  background: var(--cm-blue);
  color: #fff;
  font-weight: 700;
}
.cm-home .cm-button:hover {
  background: #0759d4;
  color: #fff;
  text-decoration: none;
}

/* Каталог и повторяющиеся карточки. */
.cm-catalog {
  margin-top: 0;
}
.cm-catalog__heading {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid #cbd8e9;
}
.cm-catalog__heading::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 88px;
  height: 3px;
  background: linear-gradient(90deg, #1471ff, #6da8ff);
}
.cm-catalog__heading h2 {
  margin-bottom: 0;
}
.cm-catalog__heading > a {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  border: 1px solid #cadcf5;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 3px 10px #1b2d5206;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.cm-catalog__heading > a:hover {
  background: #edf4ff;
  text-decoration: none;
}
.cm-catalog__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 25px 0 34px;
}
.cm-catalog__nav a {
  display: block;
  padding: 9px 16px;
  border: 1px solid var(--cm-line);
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 2px 6px #1b2d5205;
  font-size: 14px;
  font-weight: 700;
}
.cm-catalog__nav a:first-child {
  background: #eaf2ff;
  border-color: #a8caff;
}
.cm-catalog__nav a:hover {
  background: #eaf2ff;
  border-color: #9bc2ff;
  text-decoration: none;
}
.cm-catalog__group {
  margin-top: 34px;
}
.cm-home .cm-catalog__group-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cm-catalog__group-title::before {
  content: "";
  flex: none;
  width: 5px;
  height: 23px;
  border-radius: 2px;
  background: var(--cm-blue);
  box-shadow: 5px 0 0 #1471ff15;
}
.cm-catalog__group-title::after {
  content: "";
  flex: 1;
  height: 1px;
  margin-left: 12px;
  background: linear-gradient(90deg, #c4d5ec, transparent);
}
.cm-home .cm-catalog__description {
  max-width: 800px;
  margin-bottom: 20px;
  color: var(--cm-muted);
}
.cm-products {
  display: grid;
  gap: 16px;
}
.cm-products--ventilation {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.cm-products--special {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.cm-products--components {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.cm-home .cm-product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d4deed;
  border-radius: 9px;
  background: #fff;
  color: var(--cm-ink);
  box-shadow: 0 4px 16px #1b2d5207;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.cm-product-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 42px;
  height: 3px;
  opacity: .8;
  background: linear-gradient(90deg, #1471ff, #83b4ff);
  pointer-events: none;
}
.cm-home .cm-product-card:hover {
  transform: translateY(-2px);
  border-color: #8bb7f9;
  box-shadow: 0 10px 28px #1471ff16;
  text-decoration: none;
}
.cm-product-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 188px;
  padding: 10px 12px;
  border-bottom: 1px solid #e6edf6;
  background: #fff;
}
.cm-home .cm-product-card__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.cm-product-card__body {
  display: flex;
  flex: 1;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
  padding: 18px;
  background: linear-gradient(100deg, #fff, #f6f9ff);
  font: 700 18px/1.3 Arial, sans-serif;
}
.cm-product-card__title {
  flex: 1;
  min-width: 0;
  font: inherit;
  overflow-wrap: anywhere;
}
.cm-product-card__arrow {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid #d5e5fc;
  border-radius: 50%;
  background: #f2f7ff;
  color: #1162d5;
  font-size: 17px;
  font-weight: 400;
  line-height: 1;
}
.cm-products--special .cm-product-card__media,
.cm-products--components .cm-product-card__media {
  height: 154px;
}
.cm-products--special .cm-product-card__body,
.cm-products--components .cm-product-card__body {
  padding: 18px 13px;
  font-size: 16px;
}

/* Подбор и совместимость. */
.cm-selection__grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 22px;
}
.cm-selection__conditions {
  padding: 25px;
  border: 1px solid var(--cm-line);
  border-radius: 10px;
  background: linear-gradient(140deg, #fff, #fbfcff);
}
.cm-specs__row {
  display: grid;
  grid-template-columns: 155px 1fr;
  gap: 18px;
  padding: 16px 0;
  border-top: 1px solid var(--cm-line);
}
.cm-specs__row:last-child {
  padding-bottom: 0;
}
.cm-specs__term {
  font-weight: 700;
  line-height: 1.4;
}
.cm-specs__description {
  margin: 0;
  color: var(--cm-muted);
  font-size: 15px;
  line-height: 1.6;
}
.cm-replacement {
  padding: 24px;
  border: 1px solid #cddff8;
  border-radius: 9px;
  background: linear-gradient(135deg, #edf4ff, #f7faff);
}
.cm-replacement h3 {
  margin-bottom: 10px;
  font-size: 23px;
}
.cm-replacement > p {
  color: #566982;
  font-size: 14px;
  line-height: 1.55;
}
.cm-home .cm-replacement-card {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  align-items: center;
  margin: 12px 0;
  overflow: hidden;
  border: 1px solid #dce6f3;
  border-radius: 7px;
  background: #fff;
  color: var(--cm-ink);
}
.cm-home .cm-replacement-card:hover {
  border-color: #8bb7f9;
  box-shadow: 0 5px 16px #1471ff0d;
  text-decoration: none;
}
.cm-replacement-card__media {
  padding: 5px;
  background: #fff;
}
.cm-home .cm-replacement-card__image {
  width: 100%;
  height: 92px;
  object-fit: contain;
}
.cm-replacement-card__body {
  min-width: 0;
  padding: 13px 12px 13px 2px;
}
.cm-replacement-card__title {
  display: block;
  margin-bottom: 5px;
  font: 700 15px/1.3 Arial, sans-serif;
}
.cm-home .cm-replacement-card__text {
  display: block;
  margin-bottom: 7px;
  color: #66758a;
  font-size: 12px;
  line-height: 1.4;
}
.cm-replacement-card__link {
  display: block;
  color: #1162d5;
  font: 700 12px/1.4 Arial, sans-serif;
}
.cm-home .cm-replacement__note {
  margin: 17px 0 0;
}
.cm-replacement__note > a {
  font-size: 14px;
  font-weight: 700;
}
.cm-replacement__note small {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.5;
}
.cm-housing {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  margin-top: 24px;
  padding: 22px 25px;
  border: 1px solid #dbe5f3;
  border-radius: 9px;
  background: #f6f9ff;
}
.cm-housing__media {
  margin: 0;
  text-align: center;
}
.cm-housing__media img {
  width: 100%;
  height: 140px;
  object-fit: contain;
  border-radius: 7px;
  background: #fff;
}
.cm-housing__media figcaption {
  margin-top: 8px;
  color: #63758e;
  font: 700 12px/1.4 Arial, sans-serif;
}
.cm-housing__body > p {
  margin-bottom: 14px;
  color: var(--cm-muted);
  font-size: 15px;
  line-height: 1.6;
}
.cm-home .cm-specs--housing {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 17px;
}
.cm-specs--housing .cm-specs__row {
  display: block;
  padding: 0 0 0 12px;
  border-top: 0;
  border-left: 2px solid #a9cbff;
}
.cm-specs--housing .cm-specs__term {
  margin-bottom: 5px;
  font-size: 14px;
}
.cm-specs--housing .cm-specs__description {
  font-size: 13px;
  line-height: 1.55;
}
.cm-housing .cm-link {
  font-size: 14px;
}

/* Заказ. */
.cm-home .cm-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  list-style: none;
}
.cm-steps__item {
  margin: 0;
  padding: 24px 0 0;
  border-top: 2px solid #a9ccff;
  background: none;
}
.cm-steps__item::before {
  content: none;
}
.cm-steps__number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  border: 1px solid #ccdef7;
  border-radius: 50%;
  background: linear-gradient(140deg, #fff, #edf4ff);
  color: var(--cm-blue);
  font: 400 23px/1 Arial, sans-serif;
}
.cm-steps__item p {
  margin-bottom: 0;
  color: var(--cm-muted);
  font-size: 15px;
}
.cm-request {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 24px;
  padding: 28px;
  border: 1px solid #dde7f4;
  border-radius: 10px;
  background: #f4f7fb;
}
.cm-request__example {
  padding-left: 28px;
  border-left: 1px solid #d7e0ed;
}
.cm-request p:last-child {
  margin-bottom: 0;
}

/* Кадры производства и ссылка на существующее видео. */
.cm-production__heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
  margin-bottom: 12px;
}
.cm-production__heading h2 {
  margin-bottom: 0;
}
.cm-production__heading .cm-eyebrow {
  font-size: 11px;
  letter-spacing: 1px;
}
.cm-home .cm-video-link {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid #cee1fc;
  border-radius: 6px;
  background: #edf4ff;
  font-size: 14px;
  font-weight: 700;
}
.cm-home .cm-video-link:hover {
  background: #dfeeff;
  text-decoration: none;
}
.cm-video-link > span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 22px;
  line-height: 1;
}
.cm-home .cm-production__intro {
  max-width: 850px;
  margin: 0 0 24px;
  color: var(--cm-muted);
  font-size: 15px;
}
.cm-production__gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.cm-production-card {
  margin: 0;
  overflow: hidden;
  border: 1px solid #dbe5f2;
  border-radius: 8px;
  background: #fff;
}
.cm-production-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: contain;
}
.cm-production-card figcaption {
  padding: 17px 16px 19px;
}
.cm-production-card h3 {
  margin-bottom: 7px;
  font-size: 18px;
  line-height: 1.25;
}
.cm-production-card p {
  margin-bottom: 0;
  color: var(--cm-muted);
  font-size: 14px;
  line-height: 1.5;
}
#cm-hero-title {
  margin: 0;
  color: #fff;
  font-family: inherit;
  font-size: 32px;
  font-weight: 400;
  line-height: 40px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: normal;
  scroll-margin-top: 220px;
}

/* Клиенты, публикации, контакты. */
.cm-clients__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  gap: 20px;
  padding: 20px 0 5px;
}
.cm-clients img {
  width: 100%;
  max-width: 250px;
  height: 80px;
  margin: auto;
  object-fit: contain;
}
.cm-publications__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.cm-publication {
  padding-top: 20px;
  border-top: 1px solid #d4e0f0;
}
.cm-publication time {
  display: block;
  margin-bottom: 10px;
  color: var(--cm-muted);
  font-size: 13px;
}
.cm-publication h3 {
  max-width: 460px;
  font-size: 20px;
}
.cm-contact {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  align-items: center;
  gap: 45px;
  margin-top: 68px;
  padding: 36px;
  border: 1px solid #d8e8ff;
  border-radius: 12px;
  background: radial-gradient(circle at 95% 10%, #dfeaff 0, transparent 35%), linear-gradient(120deg, #edf4ff, #f7faff);
  box-shadow: inset 4px 0 #1471ff, 0 8px 24px #1b2d5208;
}
.cm-contact p:last-child {
  margin-bottom: 0;
  color: #4b5f7e;
}
.cm-contact__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

/* Адаптив: изменения в порядке уменьшения ширины. */
@media (min-width: 1440px) {
  .cm-home {
    padding-right: max(24px, calc((100% - 1192px) / 2));
    padding-left: max(24px, calc((100% - 1192px) / 2));
  }
}
@media (max-width: 1000px) {
  .cm-selection__grid {
    grid-template-columns: 1fr 1fr;
  }
  .cm-selection__conditions .cm-specs__row {
    display: block;
  }
  .cm-selection .cm-specs__term {
    margin-bottom: 6px;
  }
  .cm-replacement {
    padding: 22px;
  }
  .cm-housing {
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 20px;
  }
  .cm-production__heading {
    align-items: flex-start;
  }
  .cm-production__heading h2 {
    font-size: 29px;
  }
  .cm-production-card h3 {
    font-size: 17px;
  }
}
@media (max-width: 900px) {
  .cm-home .cm-section {
    padding: 26px;
  }
  .cm-products--special {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .cm-products--components {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cm-product-card__arrow {
    width: 22px;
    height: 22px;
    font-size: 15px;
  }
  .cm-home .cm-steps {
    gap: 20px;
  }
  .cm-contact {
    gap: 25px;
    padding: 28px;
  }
}
@media (max-width: 768px) {
  #cm-hero-title {
    font-size: 20px;
  }
}
@media (max-width: 700px) {
  .cm-selection__grid {
    grid-template-columns: 1fr;
  }
  .cm-replacement h3 {
    font-size: 22px;
  }
  .cm-housing {
    grid-template-columns: 140px minmax(0, 1fr);
    padding: 20px;
  }
  .cm-home .cm-specs--housing {
    grid-template-columns: 1fr;
    gap: 13px;
  }
  .cm-production__heading {
    display: block;
  }
  .cm-production__heading h2 {
    font-size: 26px;
  }
  .cm-home .cm-video-link {
    margin-top: 17px;
  }
  .cm-production__gallery {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .cm-production-card {
    display: grid;
    grid-template-columns: 45% minmax(0, 1fr);
    align-items: center;
  }
  .cm-production-card figcaption {
    padding: 15px;
  }
  .cm-production-card h3 {
    font-size: 18px;
  }
  .cm-production-card p {
    font-size: 13px;
  }
  #cm-hero-title {
    scroll-margin-top: 120px;
  }
}
@media (max-width: 600px) {
  .cm-home {
    padding: 26px 16px 42px;
  }
  .cm-home h2 {
    font-size: 26px;
  }
  .cm-home .cm-section {
    margin-top: 44px;
    padding: 22px 18px;
  }
  .cm-home .cm-section::before {
    left: 18px;
  }
  .cm-catalog__heading {
    display: block;
    padding-bottom: 18px;
  }
  .cm-catalog__heading > a {
    margin-top: 14px;
    padding: 8px 12px;
  }
  .cm-catalog__nav {
    gap: 7px;
    margin: 20px 0 26px;
  }
  .cm-catalog__nav a {
    padding: 8px 12px;
    font-size: 12px;
  }
  .cm-products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .cm-home .cm-product-card__media {
    height: 124px;
    padding: 7px;
  }
  .cm-products .cm-product-card__body {
    gap: 5px;
    padding: 12px 10px;
    font-size: 14px;
    overflow-wrap: break-word;
  }
  .cm-product-card__arrow {
    display: none;
  }
  .cm-selection__conditions {
    padding: 0;
    border: 0;
    background: none;
  }
  .cm-home .cm-steps {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .cm-steps__item {
    display: grid;
    grid-template-columns: 42px 1fr;
    column-gap: 15px;
    padding-top: 18px;
  }
  .cm-steps__number {
    grid-row: 1/3;
    width: 38px;
    height: 38px;
    font-size: 18px;
  }
  .cm-steps__item h3 {
    font-size: 20px;
  }
  .cm-request {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 22px;
  }
  .cm-request__example {
    padding: 20px 0 0;
    border-left: 0;
    border-top: 1px solid #d7e0ed;
  }
  .cm-clients__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
  .cm-clients img {
    height: 65px;
  }
  .cm-publications__grid {
    grid-template-columns: 1fr;
  }
  .cm-contact {
    grid-template-columns: 1fr;
    gap: 22px;
    margin-top: 44px;
    padding: 26px;
  }
  .cm-home .cm-related {
    gap: 12px 20px;
  }
  .cm-home .cm-button {
    width: 100%;
  }
}
@media (max-width: 420px) {
  .cm-products {
    grid-template-columns: 1fr;
  }
  .cm-home .cm-product-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
  }
  .cm-home .cm-product-card__media {
    height: 112px;
    padding: 6px;
    border-right: 1px solid #e6edf6;
    border-bottom: 0;
  }
  .cm-products .cm-product-card__body {
    align-items: center;
    padding: 14px;
    font-size: 16px;
  }
  .cm-replacement {
    padding: 19px 16px;
  }
  .cm-replacement h3 {
    font-size: 21px;
  }
  .cm-home .cm-replacement-card {
    grid-template-columns: 80px minmax(0, 1fr);
  }
  .cm-home .cm-replacement-card__image {
    height: 80px;
  }
  .cm-replacement-card__title {
    font-size: 14px;
  }
  .cm-replacement-card__body {
    padding: 12px 10px 12px 0;
  }
  .cm-housing {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 19px 16px;
  }
  .cm-housing__media {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
  }
  .cm-housing__media img {
    width: 110px;
    height: 85px;
  }
  .cm-housing__media figcaption {
    margin: 0;
  }
  .cm-housing h3 {
    font-size: 21px;
  }
  .cm-production-card {
    display: block;
  }
  .cm-production-card figcaption {
    padding: 16px;
  }
  .cm-production__heading .cm-eyebrow {
    font-size: 10px;
    letter-spacing: .6px;
  }
}
@media (max-width: 360px) {
  .cm-products .cm-product-card__body {
    font-size: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cm-home a {
    transition: none;
  }
  .cm-home .cm-product-card:hover {
    transform: none;
  }
}
