@font-face {
  font-family: 'TildaSans';
  font-style: normal;
  font-weight: 250 1000;
  font-display: swap;
  src: url('https://static.tildacdn.com/fonts/tildasans/TildaSans-VF.woff2') format('woff2-variations'),
       url('https://static.tildacdn.com/fonts/tildasans/TildaSans-VF.woff') format('woff-variations');
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'TildaSans', Arial, sans-serif;
  background: #f2f3f2;
  color: #222524;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ---------- Hero: один экран ---------- */

.hero {
  /* Общий боковой отступ — по нему выровнены заголовок, кнопка и логотип */
  --pad-x: clamp(16px, 5vw, 96px);
  --pad-y: clamp(16px, 5vh, 72px);
  /* Ширина заголовка: от ширины экрана, но не выше, чем позволяет высота */
  --title-w: min(40vw, 78vh, 820px);

  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  min-height: 100vh;
  min-height: 100svh;
  padding: var(--pad-y) var(--pad-x);
  background: #f2f3f2 url('../images/bg-desktop.png') 65% center / cover no-repeat;
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero__title {
  width: var(--title-w);
  margin: 0;
}

.hero__title img {
  width: 100%;
  /* у первой буквы в SVG ~0.3% поля слева — компенсируем, чтобы край совпал с кнопкой */
  margin-left: -0.3%;
}

.hero__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* размеры кнопки привязаны к ширине заголовка */
  width: calc(var(--title-w) * 0.42);
  min-width: 180px;
  height: clamp(48px, calc(var(--title-w) * 0.105), 72px);
  margin-top: clamp(28px, calc(var(--title-w) * 0.08), 64px);
  padding: 0 24px;
  border-radius: clamp(8px, calc(var(--title-w) * 0.016), 12px);
  background: #222524;
  color: #fff;
  font-size: clamp(16px, calc(var(--title-w) * 0.034), 22px);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(34, 37, 36, .18);
  transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.hero__btn:hover {
  background: #000;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(34, 37, 36, .26);
}

.hero__btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(34, 37, 36, .2);
}

.hero__btn:focus-visible {
  outline: 2px solid #2015ff;
  outline-offset: 4px;
}

.hero__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hero__logo {
  width: calc(var(--title-w) * 0.62);
  min-width: 120px;
}

.hero__stores {
  width: clamp(71px, 6vw, 115px);
}

/* ---------- Портретные экраны (телефоны, планшеты) ---------- */

@media (max-width: 1199px) and (orientation: portrait) {
  .hero {
    --title-w: min(68vw, 460px);
    background-image: url('../images/bg-mobile.png');
    background-position: right bottom;
  }
}

/* Планшеты в портрете: фон по высоте, прижат вправо */
@media (min-width: 640px) and (max-width: 1199px) and (orientation: portrait) {
  .hero {
    background-size: auto 100%;
  }
}

/* Телефоны */
@media (max-width: 639px) {
  .hero {
    --pad-x: 12px;
    --pad-y: 12px;
  }

  .hero {
    position: relative;
    min-height: max(100svh, 560px);
  }

  /* На телефоне кнопка по центру экрана — на свободном месте слева от игрока */
  .hero__btn {
    position: absolute;
    top: calc(50% - 30px);
    left: var(--pad-x);
    margin-top: 0;
  }

  .hero__logo {
    width: 120px;
  }

  .hero__stores {
    width: 71px;
  }
}
