:root {
  --color-bg: #ffffff;
  --color-text: #2c2c2c;
  --color-header-bg: rgba(240, 240, 240, 0.57);
  --color-header-border: #f2f2f2;
  --page-width: 440rem;
  --page-pad: 22rem;
  --header-h: 62rem;
  --header-w: 396rem;
  --header-radius: 30rem;
  --header-blur: 7.5rem;
  --font-main: "Montserrat", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  /* 1rem = 1px макета mobile (440) */
  font-size: calc(100vw / 440);
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: var(--font-main);
  background-color: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: default;
}

.page-shell {
  position: relative;
  width: 100%;
  max-width: var(--page-width);
  min-height: 100vh;
  margin: 0 auto;
  background-color: var(--color-bg);
}

.header {
  position: fixed;
  top: var(--page-pad);
  left: 50%;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: var(--header-w);
  height: var(--header-h);
  max-width: calc(100% - (var(--page-pad) * 2));
  padding: 0 32rem 0 var(--page-pad);
  border: 1rem solid var(--color-header-border);
  border-radius: var(--header-radius);
  background-color: var(--color-header-bg);
  box-shadow: 0 0 2rem rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(var(--header-blur));
  -webkit-backdrop-filter: blur(var(--header-blur));
  transform: translateX(-50%);
  cursor: pointer;
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    backdrop-filter 0.25s ease;
}

.header__logo {
  font-size: 22rem;
  font-weight: 500;
  line-height: normal;
  color: var(--color-text);
}

.header__icon {
  display: block;
  width: 22rem;
  height: 22rem;
  flex-shrink: 0;
  object-fit: contain;
  pointer-events: none;
  transition: transform 0.3s ease;
}

body.is-menu-open {
  overflow: hidden;
}

body.is-menu-open .header {
  background-color: transparent;
  border-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.is-menu-open .header__icon {
  transform: rotate(90deg);
}

.menu {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  height: 100dvh;
  padding: 116rem 0 30rem;
  background-color: #f7f7f7;
}

.menu[hidden] {
  display: none;
}

.menu__inner {
  display: flex;
  flex-direction: column;
  width: var(--header-w);
  max-width: calc(100% - (var(--page-pad) * 2));
  height: 100%;
}

.menu__nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 19rem;
}

.menu__item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 13rem;
  font-size: 22rem;
  font-weight: 600;
  line-height: 1;
  color: var(--color-text);
  text-decoration: none;
  text-align: left;
}

a.menu__item {
  cursor: pointer;
}

.menu__arrow {
  display: block;
  width: 20rem;
  height: 20rem;
  flex-shrink: 0;
  object-fit: contain;
  filter: brightness(0);
}

.menu__bottom {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: auto;
}

.menu__legal {
  max-width: 100%;
  font: inherit;
  font-size: 22rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text);
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3rem;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.menu__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12rem;
  width: 100%;
  height: 62rem;
  margin-top: 57rem;
  border-radius: 60rem;
  background-color: #36bc72;
  font-size: 22rem;
  font-weight: 500;
  line-height: 1;
  color: #ffffff;
  text-decoration: none;
  cursor: pointer;
}

.menu__cta img {
  display: block;
  width: 22rem;
  height: 22rem;
  flex-shrink: 0;
}

.legal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 95;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  height: 100dvh;
  padding: 116rem 0 30rem;
  overflow-y: auto;
  background-color: #f7f7f7;
}

.legal[hidden] {
  display: none;
}

.legal__inner {
  display: flex;
  flex-direction: column;
  width: var(--header-w);
  max-width: calc(100% - (var(--page-pad) * 2));
}

.legal__back {
  align-self: flex-start;
  margin-bottom: 24rem;
  font: inherit;
  font-size: 18rem;
  font-weight: 600;
  line-height: 1;
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 3rem;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.legal__content {
  padding-bottom: 40rem;
}

.legal__title {
  margin: 0 0 20rem;
  font-size: 22rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-text);
}

.legal__heading {
  margin: 24rem 0 12rem;
  font-size: 18rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text);
}

.legal__content p {
  margin: 0 0 12rem;
  font-size: 16rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--color-text);
}

.page {
  min-height: 100vh;
  /* Figma: title top 116px (header 22+62, gap 32) */
  padding-top: 116rem;
  padding-right: var(--page-pad);
  padding-left: var(--page-pad);
}

.hero-title {
  margin: 0;
  width: 280rem;
  font-size: 52rem;
  font-weight: 700;
  line-height: 1;
  color: var(--color-text);
  word-break: break-word;
}

.card {
  display: block;
  position: relative;
  text-decoration: none;
  color: inherit;
}

.card--wms {
  width: 396rem;
  height: 185rem;
  margin-top: 32rem;
  overflow: hidden;
  border: 1rem solid #f3f3f3;
  border-radius: 25rem;
  background-color: #ffffff;
  box-shadow: 0 0 4rem rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.card__content {
  position: relative;
  z-index: 2;
  padding: 22rem;
}

.card__title {
  margin: 0;
  font-size: 26rem;
  font-weight: 600;
  line-height: 1;
  color: var(--color-text);
  white-space: nowrap;
}

.card__subtitle {
  margin: 10rem 0 0;
  font-size: 18rem;
  font-weight: 500;
  line-height: 1;
  color: rgba(44, 44, 44, 0.8);
  white-space: nowrap;
}

.card__mp {
  position: absolute;
  top: 126rem;
  left: 22rem;
  z-index: 2;
  display: flex;
  gap: 8.06rem;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none;
}

.card__mp li {
  width: 37rem;
  height: 37rem;
  overflow: hidden;
  border-radius: 9.487rem;
  box-shadow: 0 0 0.949rem rgba(0, 0, 0, 0.15);
}

.card__mp img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__mac {
  position: absolute;
  top: 16rem;
  left: 261rem;
  z-index: 1;
  width: 246rem;
  height: 199rem;
  object-fit: cover;
  object-position: 48% 8%;
  pointer-events: none;
}

.card__action {
  position: absolute;
  top: 121rem;
  left: 332rem;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52rem;
  height: 52rem;
  border-radius: 30rem;
  background-color: #2c2c2c;
  box-shadow: 0 0 4rem rgba(0, 0, 0, 0.1);
  pointer-events: none;
}

.card__action img {
  display: block;
  width: 20rem;
  height: 20rem;
}

.card--comics {
  width: 396rem;
  height: 185rem;
  margin-top: 12rem;
  overflow: hidden;
  border: 1rem solid #dadada;
  border-radius: 25rem;
  background: linear-gradient(to bottom, #031015, #000000);
  box-shadow: 0 0 4rem rgba(0, 0, 0, 0.1);
  cursor: default;
}

.card--comics .card__title {
  color: #ffffff;
}

.card--comics .card__subtitle {
  color: rgba(255, 255, 255, 0.8);
}

.card__humans {
  position: absolute;
  top: -19rem;
  left: 193rem;
  z-index: 1;
  width: 237rem;
  height: 240rem;
  object-fit: cover;
  object-position: center top;
  pointer-events: none;
}

.card__stores {
  position: absolute;
  top: 121rem;
  left: 22rem;
  z-index: 2;
  display: flex;
  gap: 12rem;
  pointer-events: none;
}

.card__stores img {
  display: block;
  width: 52rem;
  height: 52rem;
  border-radius: 30rem;
  object-fit: cover;
  box-shadow: 0 0 4rem rgba(0, 0, 0, 0.1);
}

.card__badge {
  position: absolute;
  top: 121rem;
  left: 267rem;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 117rem;
  height: 52rem;
  border-radius: 30rem;
  background-color: #f7f7f7;
  box-shadow: 0 0 4rem rgba(0, 0, 0, 0.1);
  font-size: 18rem;
  font-weight: 600;
  line-height: 1;
  color: var(--color-text);
  pointer-events: none;
}

.card--ims {
  width: 396rem;
  height: 185rem;
  margin-top: 12rem;
  overflow: hidden;
  border: 1rem solid #dadada;
  border-radius: 25rem;
  box-shadow: 0 0 4rem rgba(0, 0, 0, 0.1);
  cursor: default;
}

.card__warehouse {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  pointer-events: none;
}

.card__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-color: rgba(0, 0, 0, 0.39);
  pointer-events: none;
}

.card--ims .card__content {
  z-index: 2;
}

.card--ims .card__title {
  color: #ffffff;
}

.card--ims .card__subtitle {
  color: rgba(255, 255, 255, 0.8);
}

.card--coop {
  width: 396rem;
  height: 332rem;
  margin-top: 12rem;
  overflow: hidden;
  border: 1rem solid #dadada;
  border-radius: 25rem;
  background-color: #ffffff;
  box-shadow: 0 0 4rem rgba(0, 0, 0, 0.1);
  cursor: default;
}

.card--coop .card__subtitle {
  width: 311rem;
  color: rgba(44, 44, 44, 0.6);
  white-space: normal;
}

.card__services {
  position: absolute;
  top: 134rem;
  left: 22rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 12rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card__services li {
  display: flex;
  align-items: center;
  gap: 15rem;
}

.card__services img {
  display: block;
  flex-shrink: 0;
  width: 16rem;
  height: 16rem;
}

.card__services p {
  margin: 0;
  font-size: 18rem;
  font-weight: 500;
  line-height: 1;
  color: var(--color-text);
  white-space: nowrap;
}

.card__services strong {
  font-weight: 600;
}

.card__actions {
  position: absolute;
  top: 258rem;
  left: 20rem;
  z-index: 2;
  display: flex;
  gap: 14rem;
}

.card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52rem;
  border: 1rem solid #e8e8e8;
  border-radius: 30rem;
  box-shadow: 0 0 4rem rgba(0, 0, 0, 0.1);
  font-size: 18rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.card__btn--secondary {
  width: 153rem;
  background-color: #f7f7f7;
  color: #000000;
}

.card__btn--primary {
  gap: 10rem;
  width: 197rem;
  background-color: #2c2c2c;
  color: #ffffff;
}

.card__btn--primary img {
  display: block;
  width: 14rem;
  height: 14rem;
  flex-shrink: 0;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 396rem;
  height: 95rem;
  margin: 42rem var(--page-pad) 22rem;
  padding: 0 22rem;
  border: 1rem solid #fbfbfb;
  border-radius: 25rem;
  background-color: #f6f6f6;
  box-shadow: 0 0 4rem rgba(0, 0, 0, 0.1);
}

.footer__info {
  display: flex;
  flex-direction: column;
  gap: 9rem;
}

.footer__title {
  margin: 0;
  font-size: 22rem;
  font-weight: 600;
  line-height: 1;
  color: var(--color-text);
}

.footer__inn {
  margin: 0;
  font-size: 16rem;
  font-weight: 500;
  line-height: 1;
  color: rgba(44, 44, 44, 0.6);
}

.footer__telegram {
  display: block;
  flex-shrink: 0;
  width: 52rem;
  height: 52rem;
  overflow: hidden;
  border-radius: 30rem;
  box-shadow: 0 0 4rem rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.footer__telegram img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ——— Desktop layout (≥1025): до 1200 режем поля, ниже — scale ——— */
@media (min-width: 1025px) {
  html {
    /* ≥1200: 1rem = 1px; ≤1200: пропорционально от 1200 */
    font-size: min(1px, 100vw / 1200);
  }

  :root {
    --page-width: 1083rem;
    --page-pad: 0;
    --header-w: 1083rem;
  }

  .page-shell {
    max-width: 1083rem;
  }

  .header {
    top: 42rem;
    width: 1083rem;
    max-width: 1083rem;
    padding: 0 42rem;
  }

  .page {
    min-height: 0;
    padding-top: 166rem;
    padding-right: 0;
    padding-left: 0;
  }

  .hero-title {
    width: 706rem;
    font-size: 72rem;
  }

  .cards {
    display: grid;
    grid-template-columns: 531rem 531rem;
    grid-template-areas:
      "wms ims"
      "comics coop";
    gap: 24rem 27rem;
    margin-top: 76rem;
  }

  .card--wms,
  .card--comics,
  .card--ims,
  .card--coop {
    width: 531rem;
    height: 185rem;
    margin-top: 0;
  }

  .card--wms {
    grid-area: wms;
    border-color: #dadada;
  }

  .card--ims {
    grid-area: ims;
  }

  .card--comics {
    grid-area: comics;
  }

  .card--coop {
    grid-area: coop;
  }

  .card--wms .card__mp {
    top: 128rem;
  }

  .card--wms .card__mac {
    left: 269rem;
    width: 246rem;
  }

  .card--wms .card__action {
    left: 467rem;
  }

  .card--comics .card__humans {
    left: 310rem;
    width: 250rem;
  }

  .card--comics .card__badge,
  .card--ims .card__badge {
    left: 399rem;
  }

  .card--coop .card__content {
    display: none;
  }

  .card--coop .card__services {
    top: 22rem;
    left: 24rem;
  }

  .card--coop .card__actions {
    top: 121rem;
    left: 22rem;
  }

  .footer {
    width: 1083rem;
    margin: 48rem 0 22px;
    padding: 0 42rem;
  }
}
