/* Первый экран главной использует ширину родительского .sec-wide.
   На телефонах композиция перестраивается в колонку. */
.gl-home-hero__tagline,
.gl-home-hero__portrait { display: contents; }

@media (max-width: 900px) {
  .hero .gl-home-hero__tagline .hand { grid-column: 1 / -1; }
}

@media (min-width: 901px) {
  :root { --gl-hero-pt: 12px; }
  .hero { padding-top: var(--gl-hero-pt); padding-bottom: 40px; }
  /* главная на шаблоне: общий каркас (gl-templates.css) задаёт .gl-first отступ 44 px с !important, первому экрану главной нужен свой, меньший */
  main.gl-main--home > .hero.gl-first { padding-top: var(--gl-hero-pt) !important; }
  .hero .stage {
    max-width: none;
  }
  .hero .gl-home-hero__tagline > * { position: absolute; }
  .hero .plans .gl-home-plans-title { top: 1.7cqw; }
  .hero .plans .rule { top: 5cqw; }
  .hero .plans ul { top: 7.3cqw; gap: .8cqw; }
  .hero .ya { top: 51.3cqw; }
}

/* Собственный srcset главной загружает фото сразу, без ожидания CSS. */
.gl-main--home .hero img.pudel { background: none; object-fit: contain; }

/* На телефоне шпиц занимает примерно половину карточки; исходник нужен на Retina 3×. */
@media (max-width: 500px) {
  .gl-main--home .hero .plans::after {
    background-image: image-set(
      url("/assets/img/hero-shpic-224.webp") 1x,
      url("/assets/img/hero-shpic-432.webp") 2x,
      url("/assets/img/hero-shpic.webp") 3x
    );
  }
}

/* Два салона на главной: две отдельные строки «карта + подпись» в шахматном порядке (заказчик 27.10.2026):
   Ростов - карта слева, подпись справа; Аксай - подпись слева, карта справа. */
.cg-rows { display: flex; flex-direction: column; gap: 32px; }
.cg-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
.cg-row .salon-box { margin: 0; display: flex; flex-direction: column; justify-content: center; border-radius: 28px; background: #fff; }
.cg-row .cg-map--live { margin: 0; min-height: 360px; border-radius: 28px; overflow: hidden; }
.cg-row .cg-map--live .ymap, .cg-row .cg-map--live iframe { width: 100% !important; height: 100% !important; min-height: 360px; border: 0; display: block; }
.cg-row--map-left .cg-map--live { order: 1; }
.cg-row--map-left .salon-box { order: 2; }
.cg-row--map-right .salon-box { order: 1; }
.cg-row--map-right .cg-map--live { order: 2; }
@media (max-width: 900px) {
  .cg-row { grid-template-columns: 1fr; gap: 16px; }
  .cg-row .salon-box, .cg-row--map-left .salon-box, .cg-row--map-right .salon-box { order: 1; }
  .cg-row .cg-map--live, .cg-row--map-left .cg-map--live, .cg-row--map-right .cg-map--live { order: 2; min-height: 280px; }
  .cg-row .cg-map--live .ymap, .cg-row .cg-map--live iframe { min-height: 280px; }
}

/* Один салон = одна карточка (описание и карта внутри общей рамки); отступ от заголовка раздела до первой карточки */
.cg-rows { margin-top: 28px; }
.cg-row { background: #fff; border: 1px solid rgba(22,37,60,.1); border-radius: 28px; padding: 16px; gap: 16px; }
.cg-row .salon-box { background: transparent; box-shadow: none; border: 0; border-radius: 0; padding: 16px 24px; }
.cg-row .cg-map--live { border-radius: 18px; }
@media (max-width: 900px) { .cg-row { padding: 12px; border-radius: 22px; } .cg-row .salon-box { padding: 12px 10px; } }

/* Контейнер иллюстрации следует за карточкой, включая широкие экраны. */
.gl-main--home :is(.bento, .bento-row2) .scard {
  --gl-card-art-width: 57%;
  --gl-card-art-height: 90%;
  --gl-card-art-gap: 16px;
}
.gl-main--home .scard.scard--ozone { --gl-card-art-width: 96%; }
.gl-main--home .scard.scard--shpic { --gl-card-art-width: 82%; }
.gl-main--home .scard.scard--trim { --gl-card-art-width: 78%; --gl-card-art-height: 64%; }
.gl-main--home .scard.scard--catwhite { --gl-card-art-width: 76%; --gl-card-art-height: 81%; }
.gl-main--home .scard.scard--catwide {
  --gl-card-art-width: 48%;
  --gl-card-art-height: 83%;
  --gl-card-art-gap: 0px;
  --gl-card-art-bottom: 0px;
}
.gl-main--home .scard.scard--catcut { --gl-card-art-width: 72%; --gl-card-art-height: 78%; }
.gl-main--home .scard.scard--catspa { --gl-card-art-width: 74%; --gl-card-art-height: 74%; }

html:not(#_) .gl-main--home :is(.bento, .bento-row2) .scard img {
  inset: auto var(--gl-card-art-gap) var(--gl-card-art-bottom, 5px) auto !important;
  width: auto !important;
  height: var(--gl-card-art-size, auto) !important;
  max-width: var(--gl-card-art-width) !important;
  max-height: var(--gl-card-art-height) !important;
  object-fit: contain !important;
  object-position: right bottom !important;
  clip-path: none !important;
  transform: none !important;
  scale: none !important;
  translate: none !important;
}

@media (max-width: 700px) {
  .gl-main--home :is(.bento, .bento-row2) .scard {
    --gl-card-art-width: 50%;
    --gl-card-art-height: 89%;
    --gl-card-art-gap: 10px;
  }
  .gl-main--home .scard.scard--ozone { --gl-card-art-width: 60%; }
  .gl-main--home .scard.scard--shpic { --gl-card-art-width: 55%; }
  .gl-main--home .scard.scard--trim { --gl-card-art-width: 60%; }
  .gl-main--home .scard.scard--catwide { --gl-card-art-width: 43%; --gl-card-art-gap: 22px; }
  .gl-main--home .scard.scard--catspa { --gl-card-art-width: 55%; }
}

@media (min-width: 981px) {
  .gl-main--home .sec-team .slt__head { align-items: center; }
  .gl-main--home .sec-team .slt__head > .slt__sub { margin-bottom: 0; }
}

/* Первый экран главной: карточка «Мои планы» (4 пункта) - шрифты крупнее, шаг между чекбоксами больше, пустота над меткой «Хорошее место» меньше (заказчик 27.10.2026) */
@media (min-width: 901px) {
  .hero .plans .gl-home-plans-title { font-size: 2.85cqw; top: 1.6cqw; }
  .hero .plans .rule { top: 5.3cqw; }
  .hero .plans ul { top: 7.9cqw; gap: 1.5cqw; }
  .hero .plans li { font-size: 1.62cqw; line-height: 1.25; padding-left: 4cqw; }
  .hero .plans li::before { width: 2.9cqw; height: 2.9cqw; top: -.55cqw; }
  .hero .plans li::after { width: 3.5cqw; height: 3.5cqw; top: -.95cqw; }
}

@media (width > 1440px) {
  .gl-main--home .hero .stage {
    display: grid;
    grid-template:
      "topic portrait" auto
      "brand portrait" auto
      "tagline portrait" auto
      "catalog portrait" auto
      "plans portrait" minmax(296px, 1fr)
      / minmax(0, 1.24fr) minmax(0, 1fr);
    align-items: start;
    gap: 14px clamp(28px, 2.4vw, 64px);
    min-height: clamp(600px, calc(100svh - 145px), 760px);
    aspect-ratio: auto;
  }
  .gl-main--home .hero .stage > * { position: relative; inset: auto; min-width: 0; }
  .gl-main--home .hero .eyebrow { grid-area: topic; font-size: clamp(15px, 1vw, 19px); white-space: normal; }
  .gl-main--home .hero .gl-home-brand { grid-area: brand; font-size: clamp(80px, 6.1vw, 124px); }

  .gl-main--home .hero .gl-home-hero__tagline {
    grid-area: tagline;
    display: flex;
    align-items: baseline;
    gap: 12px;
  }
  .gl-main--home .hero .gl-home-hero__tagline > * { position: static; }
  .gl-main--home .hero .hand { font-size: clamp(30px, 3vw, 54px); }
  .gl-main--home .hero .heart { width: 24px; height: 24px; flex: none; align-self: flex-start; }

  .gl-main--home .hero .btn-cat {
    grid-area: catalog;
    width: max-content;
    min-height: 52px;
    height: auto;
    padding: 12px 28px;
    border-radius: 100px;
    font-size: clamp(17px, 1.1vw, 22px);
  }

  .gl-main--home .hero .plans {
    grid-area: plans;
    align-self: stretch;
    width: auto;
    height: auto;
    padding: 22px 42% 76px clamp(22px, 2vw, 40px);
    border-radius: 28px;
  }
  .gl-main--home .hero .plans :is(.gl-home-plans-title, .rule, ul) { position: static; }
  .gl-main--home .hero .plans .gl-home-plans-title { font-size: clamp(27px, 2vw, 39px); line-height: 1.2; }
  .gl-main--home .hero .plans .rule { width: min(100%, 180px); height: 3px; margin: 7px 0 16px; }
  .gl-main--home .hero .plans ul { gap: 10px; }
  .gl-main--home .hero .plans li { gap: 10px; font-size: clamp(17px, 1.1vw, 23px); }
  .gl-main--home .hero .plans li::before {
    flex: 0 0 27px;
    width: 27px !important;
    height: 30px !important;
    margin: -5px 0 !important;
    transform: translateY(-2px) !important;
  }
  .gl-main--home .hero .ya {
    grid-area: plans;
    align-self: end;
    justify-self: start;
    width: min(46%, 275px);
    height: auto;
    margin: 0 0 16px clamp(22px, 2vw, 40px);
    z-index: 2;
  }
  .gl-main--home .hero .ya img { display: block; height: auto; }
  .gl-main--home .hero .shpic {
    grid-area: plans;
    align-self: end;
    justify-self: end;
    width: min(46%, 470px);
    height: calc(100% + 26px);
    background-size: contain;
    background-position: right bottom;
    border-radius: 0 0 28px 0;
    pointer-events: none;
  }

  .gl-main--home .hero .board {
    grid-area: portrait;
    align-self: stretch;
    width: auto;
    height: auto;
    border-radius: 28px;
  }
  .gl-main--home .hero .gl-home-hero__portrait {
    display: block;
    position: absolute;
    inset-block: 0;
    left: 50%;
    height: 100%;
    max-width: 100%;
    aspect-ratio: 717 / 1119;
    transform: translateX(-50%);
  }
  .gl-main--home .hero img.pudel {
    inset: 0;
    width: 100%;
    height: 100%;
    object-position: center bottom;
    transform: none;
  }
  .gl-main--home .hero .hot__ic { width: 46px; height: 46px; }
  .gl-main--home .hero .hot__tip {
    font-size: 16px;
    width: max-content;
    max-width: 26ch;
    padding: 10px 14px;
    white-space: normal;
  }
}

/* Homepage topic heading and matching non-heading subtitle. */
.gl-main--home .gl-home-intro__heading,
.gl-main--home .gl-home-intro__subtitle {
  margin: 0 !important;
  font-family: inherit;
  font-size: clamp(24px, 2.7vw, 34px) !important;
  font-weight: 500;
  line-height: 1.25 !important;
  color: #243c32;
  letter-spacing: -.015em;
  text-wrap: balance;
}
.gl-main--home .gl-home-intro__text { margin: 16px 0 0; font-size: 16px; line-height: 1.65; }

@media (width > 1440px) {
  .gl-main--home :is(.gl-home-intro__heading, .gl-home-intro__subtitle) { font-size: calc(34px + var(--gl-wide-heading) * 0.65) !important; }
  .gl-main--home .gl-home-intro__text { max-width: 90ch; font-size: calc(16px + var(--gl-wide-text)); }
  .gl-main--home .bento { grid-template-columns: minmax(0, 500fr) minmax(0, 640fr); }
  .gl-main--home .bento-row2:not(.bento--cats) { grid-template-columns: minmax(0, 500fr) minmax(0, 333fr) minmax(0, 287fr); }
  .gl-main--home .bento-row2.bento--cats { grid-template-columns: minmax(0, 500fr) minmax(0, 313fr) minmax(0, 307fr); }
  .gl-main--home .scard h3 { font-size: calc(28px + var(--gl-wide-text)); }
  .gl-main--home .bento > .scard { min-height: calc(397px + var(--gl-wide-heading) * 3); }
  .gl-main--home .bento-row2 > .scard { min-height: calc(396px + var(--gl-wide-heading) * 3); }
}

@media (min-width: 1600px) {
  .gl-main--home .adv-grid .dcard {
    justify-content: center;
    padding: clamp(24px, 1.8vw, 40px);
  }
  .gl-main--home .adv-grid .dcard p { max-width: 46ch; }

  .gl-main--home .edu-block {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
    gap: clamp(28px, 2.5vw, 64px);
  }
  .gl-main--home .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    align-items: center;
    gap: clamp(28px, 2.4vw, 56px);
    max-width: 1840px;
    margin-inline: auto;
  }
  .gl-main--home .interior {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(24px, 2vw, 48px);
  }
  .gl-main--home :is(.split-photos, .interior .pair) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(16px, 1vw, 28px);
  }
  .gl-main--home :is(.split-photos, .interior .pair) img {
    display: block;
    width: 100% !important;
    object-position: center 38%;
  }
  .gl-main--home .split-photos img {
    height: auto;
    max-height: 620px;
    object-fit: contain;
    object-position: center;
  }
  .gl-main--home .interior .pair img {
    height: auto;
    max-height: clamp(220px, 16vw, 400px);
    object-fit: contain;
    object-position: center;
  }
  .gl-main--home .interior > div:first-child > img {
    object-fit: contain !important;
    object-position: left bottom;
  }
  .gl-main--home :is(.split, .edu-txt, .interior) .gl-text {
    max-width: 66ch;
    font-size: clamp(16px, .85vw, 20px);
  }
  .gl-main--home .edu-pic { display: block; }
  .gl-main--home .edu-photo {
    height: clamp(310px, 19vw, 500px);
    object-fit: contain;
    object-position: left bottom;
  }
  .gl-main--home .edu-txt { margin-top: 24px; }

  .gl-main--home :is(.bento, .bento-row2) .scard { overflow: hidden; }
  .gl-main--home :is(.bento, .bento-row2) .scard h3 {
    max-width: 18ch !important;
    white-space: normal;
  }
  .gl-main--home :is(.bento, .bento-row2) .scard { --gl-card-art-size: clamp(260px, 15vw, 410px); }
  .gl-main--home .scard.scard--shpic { --gl-card-art-size: clamp(230px, 13vw, 360px); }
  .gl-main--home .bento-row2 .srv-col .scard { --gl-card-art-size: clamp(160px, 10vw, 260px); }
}

/* Контраст главной на светлом фоне и на бронзовых кнопках. */
.gl-main--home .hero .eyebrow .gl-home-topic { color: #65625f; }

html:not(#_):not(#_) .gl-main--home .gl-h2--why .hand,
html:not(#_):not(#_) .gl-main--home .interior .gl-h2 .nb { color: #967046 !important; }

html:not(#_):not(#_) .gl-main--home .edu-tags > span,
html:not(#_):not(#_) .gl-main--home .gl-seo-text__k,
html:not(#_):not(#_) .gl-main--home .slt__c > figcaption > span { color: #795634 !important; }

.gl-main--home .hero .btn-cat,
.gl-main--home .gl-btn--bronze,
body[data-pg="/"] > .fab,
body[data-pg="/"] > .gl-dock .gl-dock__i--cta { color: #101823; }

/* Системный шрифт сохраняет высоту баннера, пока загружаются шрифты сайта. */
body > #gl-cc { font-family: system-ui, sans-serif; }

.gl-lazy-embed { position: relative; width: 100%; background: #f3eee8; }
.gl-lazy-embed iframe { border: 0; }
.gl-lazy-embed__open {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 10px 14px;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid #16253c;
  border-radius: 12px;
  background: #fff;
  color: #16253c;
  cursor: pointer;
  font: 600 14px/1.3 system-ui, sans-serif;
  text-align: center;
}
.gl-lazy-embed__open[hidden] { display: none; }

/* Первый экран доступен сразу, включая заголовок и главное изображение. */
.gl-main--home .hero .stage.hero-anim > * {
  opacity: 1;
  transform: none;
  transition: none;
}
