/* Баннер на главной: три слайда-плашки, преимущества и вкладки.
   Карта и каталог нарисованы вёрсткой, поэтому чёткие на любом экране. Разметка — index.html, логика — initHero в site.js.
   1rem = 10px на макетах 1440/768/384, между ними масштабируется (см. --base-font-size). */

.ms-hero { padding: 1.6rem 0 6.4rem; }
.ms-hero__slides { display: grid; }

.ms-hero__slide {
  --hero-fg: #121212;
  --hero-muted: #494949;
  --hero-line: rgba(18, 18, 18, 0.14);
  --hero-btn-bg: #f00;
  --hero-btn-fg: #fff;
  --hero-btn-hover: #c00;
  grid-area: 1 / 1;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template: "head art" 1fr "actions art" auto "facts facts" auto / 52rem minmax(0, 1fr);
  min-height: 52rem;
  overflow: hidden;
  border-radius: 3.2rem;
  color: var(--hero-fg);
  opacity: 0;
  visibility: hidden;
  transition: opacity 700ms ease, visibility 0s 700ms;
}
.ms-hero__slide.is-active { opacity: 1; visibility: visible; transition: opacity 700ms ease, visibility 0s; z-index: 1; }

.ms-hero__slide--sistema { background: #f3f3f3; }
.ms-hero__slide--multicard {
  --hero-fg: #fff;
  --hero-muted: rgba(255, 255, 255, 0.86);
  --hero-line: rgba(255, 255, 255, 0.24);
  --hero-btn-bg: #fff;
  --hero-btn-fg: #121212;
  --hero-btn-hover: #e8e8e8;
  background: radial-gradient(60rem 46rem at 76% 34%, #0a86e8 0%, rgba(10, 134, 232, 0) 70%), #1440c8;
}
.ms-hero__slide--vitrina {
  --hero-muted: #2e2005;
  --hero-line: rgba(18, 18, 18, 0.34);
  --hero-btn-bg: #121212;
  --hero-btn-hover: #3a3a3a;
  background: #e89d2a url("../img/source/478120526da9c9e4d43202b0b4a86260158092dd.png") center / cover;
}

/* Текст */
.ms-hero__head { grid-area: head; padding: 5.6rem 0 2.4rem 4.8rem; position: relative; z-index: 2; }
.ms-hero__title {
  margin: 0;
  font-family: var(--ff-tt-firs-text, system-ui), system-ui;
  font-weight: 500;
  font-size: 6.4rem;
  line-height: 1;
  letter-spacing: -0.02em;
}
.ms-hero__lead { margin: 2rem 0 0; max-width: 42rem; font-size: 2.4rem; line-height: 1.3; text-wrap: balance; }

.ms-hero__actions { grid-area: actions; display: flex; align-items: center; gap: 1.2rem; padding: 0 0 4rem 4.8rem; position: relative; z-index: 2; }
.ms-hero__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 5.6rem;
  padding: 1rem 2.4rem;
  border-radius: 1.6rem;
  font-family: var(--ff-tt-firs-text, system-ui), system-ui;
  font-weight: 500;
  font-size: 1.6rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  color: var(--hero-btn-fg);
  background: var(--hero-btn-bg);
  transition: background-color 250ms ease;
}
.ms-hero__btn:hover { background: var(--hero-btn-hover); }
.ms-hero__btn--ghost { color: var(--hero-fg); background: none; box-shadow: inset 0 0 0 1.5px var(--hero-line); }
.ms-hero__btn--ghost:hover { background: var(--hero-line); }

/* Преимущества: видны все сразу */
.ms-hero__facts {
  grid-area: facts;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 4.8rem;
  padding: 2.4rem 0 3.2rem;
  gap: 0 3.2rem;
  list-style: none;
  border-top: 1px solid var(--hero-line);
}
.ms-hero__facts b { display: block; font-family: var(--ff-tt-firs-text, system-ui), system-ui; font-weight: 500; font-size: 1.8rem; line-height: 1.25; }
.ms-hero__facts span { display: block; margin-top: 0.6rem; font-size: 1.4rem; line-height: 1.4; color: var(--hero-muted); }

/* Графика */
.ms-hero__art { grid-area: art; position: relative; min-width: 0; }

.ms-hero__city { position: absolute; right: 0; top: 0; bottom: 0; width: 84rem; overflow: hidden; }
.ms-hero__city img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: right 40%; mix-blend-mode: multiply; }

.ms-card-stage { position: absolute; inset: 0; display: grid; place-items: center; font-size: 4.6rem; }
.ms-card, .ms-card-stage::before, .ms-card-stage::after { grid-area: 1 / 1; width: 10em; height: 6.2em; border-radius: 0.5em; }
.ms-card-stage::before, .ms-card-stage::after { content: ""; background: linear-gradient(120deg, #ff3fa8, #7a3cf0); }
.ms-card-stage::before { transform: rotate(-16deg); opacity: 0.32; }
.ms-card-stage::after { transform: rotate(-9deg); opacity: 0.55; }
.ms-card {
  position: relative;
  z-index: 1;
  transform: rotate(-3deg);
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(52% 78% at 84% 14%, #18b4f2 0%, rgba(24, 180, 242, 0) 100%),
    radial-gradient(62% 96% at 30% 62%, #ff0a86 0%, #ff2f9b 42%, rgba(255, 63, 168, 0) 100%),
    linear-gradient(135deg, #ff6cc4 0%, #8a3df0 52%, #4a17c4 100%);
  box-shadow: 0 0.5em 1.2em rgba(6, 18, 84, 0.38);
  font-family: var(--ff-tt-firs-text, system-ui), system-ui;
  font-weight: 500;
}
.ms-card svg { position: absolute; left: 0.6em; top: 0.55em; width: 0.8em; height: 0.8em; }
.ms-card__brand { position: absolute; top: 1.5em; right: 1.3em; font-size: 0.46em; line-height: 1; }
.ms-card__name { position: absolute; left: 0.28em; bottom: 0.4em; font-size: 2.02em; line-height: 0.82; letter-spacing: -0.045em; }
.ms-card__name i { display: block; font-style: normal; padding-left: 0.62em; }

.ms-tile { position: absolute; z-index: 2; display: grid; place-items: center; width: 7.6rem; height: 7.6rem; border-radius: 2rem; background: #fff; box-shadow: 0 1rem 2.4rem rgba(6, 18, 84, 0.28); }
.ms-tile img { display: block; max-width: 5.4rem; max-height: 4.6rem; width: auto; height: auto; }
.ms-tile:nth-child(2) { left: 5%; top: 11%; }
.ms-tile:nth-child(3) { right: 8%; top: 7%; }
.ms-tile:nth-child(4) { left: 14%; bottom: 5%; }
.ms-tile:nth-child(5) { right: 5%; bottom: 13%; }

.ms-hero__slide--vitrina .ms-hero__art { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; justify-items: end; padding: 2.4rem 4.8rem 2.4rem 2.4rem; }
.ms-catalog { box-sizing: border-box; width: 69.2rem; max-width: 100%; padding: 2.4rem; border-radius: 2.4rem; background: #fff; color: #121212; box-shadow: 0 1.2rem 3.2rem rgba(84, 46, 0, 0.26); }
.ms-catalog__bar { display: flex; align-items: center; gap: 2.4rem; margin-bottom: 2rem; }
.ms-catalog__title { font-family: var(--ff-tt-firs-text, system-ui), system-ui; font-weight: 500; font-size: 2.2rem; line-height: 1.2; white-space: nowrap; }
.ms-catalog__search { display: flex; align-items: center; gap: 0.8rem; flex: 0 1 24rem; min-width: 0; margin-left: auto; padding: 0.9rem 1.4rem; border-radius: 1.2rem; background: #f3f3f3; color: #5f5f5f; font-size: 1.4rem; line-height: 1.3; }
.ms-catalog__search svg { width: 1.6rem; height: 1.6rem; flex: none; }
.ms-catalog__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.2rem; }
.ms-catalog__item { padding: 1.2rem; border-radius: 1.6rem; box-shadow: inset 0 0 0 1px #e8e8e8; }
.ms-catalog__logo { display: grid; place-items: center; height: 7.2rem; }
.ms-catalog__logo img { display: block; max-width: 9rem; max-height: 5rem; width: auto; height: auto; }
.ms-catalog__pick { padding: 0.8rem; border-radius: 1rem; background: #f3f3f3; font-size: 1.3rem; line-height: 1.2; text-align: center; }
.ms-catalog__item.is-picked { box-shadow: inset 0 0 0 2px #e89d2a; }
.ms-catalog__item.is-picked .ms-catalog__pick { background: #121212; color: #fff; }

/* Вкладки с полосой времени */
.ms-hero__tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6rem; margin-top: 1.2rem; }
.ms-hero__tab {
  all: unset;
  box-sizing: border-box;
  position: relative;
  min-height: 4.8rem;
  padding: 1.6rem 0 0.8rem;
  cursor: pointer;
  font-family: var(--ff-tt-firs-text, system-ui), system-ui;
  font-weight: 500;
  font-size: 1.6rem;
  line-height: 1.25;
  color: #5f5f5f;
  transition: color 250ms ease;
}
.ms-hero__tab:hover, .ms-hero__tab.is-active { color: #121212; }
.ms-hero__tab::before, .ms-hero__tab i { content: ""; position: absolute; left: 0; right: 0; top: 0.4rem; height: 0.4rem; border-radius: 0.2rem; background: #e8e8e8; }
.ms-hero__tab i { background: #f00; transform: scaleX(0); transform-origin: left; }
.ms-hero__tab.is-active i { transform: none; }

@media (min-width: 700.1px) and (max-width: 1100px) {
  .ms-hero { padding-bottom: 4.8rem; }
  .ms-hero__slide { grid-template-columns: 33rem minmax(0, 1fr); min-height: 56rem; }
  .ms-hero__head { padding: 4rem 0 2.4rem 3.2rem; }
  .ms-hero__title { font-size: 4.4rem; }
  .ms-hero__lead { font-size: 2rem; }
  .ms-hero__actions { flex-direction: column; align-items: flex-start; padding: 0 0 3.2rem 3.2rem; }
  .ms-hero__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 3.2rem; gap: 2rem 3.2rem; }
  .ms-hero__city { width: 42rem; }
  .ms-hero__city img { object-position: 78% center; }
  .ms-card-stage { font-size: 3rem; }
  .ms-tile { width: 5.6rem; height: 5.6rem; border-radius: 1.5rem; }
  .ms-tile img { max-width: 4rem; max-height: 3.4rem; }
  .ms-hero__slide--vitrina .ms-hero__art { padding: 2.4rem 2.4rem 2.4rem 1.6rem; }
  .ms-catalog { padding: 1.6rem; }
  .ms-catalog__bar { gap: 1.2rem; margin-bottom: 1.6rem; }
  .ms-catalog__title { font-size: 1.8rem; }
  .ms-catalog__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ms-catalog__item:nth-child(n + 5) { display: none; }
  .ms-hero__tabs { gap: 1.2rem; }
}

@media (max-width: 700px) {
  .ms-hero { padding: 0.8rem 0 4rem; }
  .ms-hero__slide { grid-template: "head" auto "art" minmax(23rem, 1fr) "actions" auto "facts" auto / minmax(0, 1fr); min-height: 0; border-radius: 2.4rem; }
  .ms-hero__head { padding: 2.4rem 2rem 1.6rem; }
  .ms-hero__title { font-size: 3.6rem; }
  .ms-hero__lead { margin-top: 1rem; font-size: 1.8rem; }
  .ms-hero__actions { gap: 0.8rem; padding: 1.6rem 2rem 2rem; }
  .ms-hero__btn { flex: 1 1 auto; min-height: 5.2rem; padding: 0.8rem 1.4rem; font-size: 1.5rem; }
  .ms-hero__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 2rem; padding: 1.6rem 0 2rem; gap: 1.2rem 1.6rem; }
  .ms-hero__facts b { font-size: 1.5rem; }
  .ms-hero__facts span { display: none; }
  .ms-hero__city { left: 0; width: auto; }
  .ms-hero__city img { object-position: 80% 45%; }
  .ms-card-stage { font-size: 2.4rem; }
  .ms-tile { width: 5rem; height: 5rem; border-radius: 1.4rem; }
  .ms-tile img { max-width: 3.6rem; max-height: 3rem; }
  .ms-hero__slide--vitrina .ms-hero__art { justify-items: stretch; padding: 0 2rem; }
  .ms-catalog { width: auto; padding: 1.2rem; border-radius: 1.8rem; }
  .ms-catalog__bar { gap: 1.2rem; margin-bottom: 1.2rem; }
  .ms-catalog__title { font-size: 1.7rem; }
  .ms-catalog__search { flex-basis: 13rem; padding: 0.6rem 1.2rem; }
  .ms-catalog__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; }
  .ms-catalog__item { padding: 0.8rem; }
  .ms-catalog__item:nth-child(n + 7) { display: none; }
  .ms-catalog__pick { padding: 0.6rem 0.2rem; font-size: 1.2rem; }
  .ms-catalog__logo { height: 5rem; }
  .ms-catalog__logo img { max-width: 7rem; max-height: 3.6rem; }
  .ms-hero__tabs { gap: 0.8rem; }
  .ms-hero__tab { font-size: 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ms-hero__slide, .ms-hero__slide.is-active { transition: none; }
}
