:root {
  --purple: #4b2aa5;
  --purple-dark: #321675;
  --purple-soft: #f2efff;
  --text: #17151d;
  --muted: #68636f;
  --border: #e6e3eb;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--text);
  background: #fff;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;
}

a {
  color: inherit;
}

.page {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
}

.topbar {
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--purple);
  text-decoration: none;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.lang-buttons {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lang-button {
  min-width: 52px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--purple);
  border-radius: 12px;
  background: #fff;
  color: var(--purple);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.lang-button:hover {
  background: var(--purple-soft);
}

.lang-button.is-active {
  background: var(--purple);
  color: #fff;
}

.hero {
  min-height: 525px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: 75px;
  padding: 48px 55px 75px;
}

.hero-logo-wrap {
  display: grid;
  place-items: center;
}

.hero-logo {
  width: min(350px, 90%);
  height: auto;
  filter: none;
}

.hero-copy {
  display: grid;
  grid-template-rows: auto minmax(4.08em, auto) minmax(3.2em, auto) auto auto;
  align-content: center;
  min-width: 0;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--purple);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

h1 {
  max-width: 760px;
  min-height: 2.04em;
  margin: 0;
  font-size: clamp(40px, 4.8vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.lead {
  max-width: 650px;
  min-height: 3.2em;
  margin: 26px 0 28px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.6;
}

.download-button {
  width: fit-content;
  height: 58px;
  align-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  padding: 0 20px;
  border-radius: 15px;
  background: var(--purple);
  color: #fff;
  text-decoration: none;
  font-size: 20px;
  font-weight: 750;
  box-shadow: 0 12px 25px rgba(75, 42, 165, 0.16);
  transition:
    transform 0.15s ease,
    background 0.15s ease;
}

.download-button:hover {
  background: var(--purple-dark);
  transform: translateY(-1px);
}

.android-icon {
  width: 27px;
  height: 27px;
  display: inline-flex;
}

.android-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.version {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 14px;
}

.download-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.stores {
  padding: 0 0 48px;
  border-top: 1px solid var(--border);
}

.store-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
  padding-top: 36px;
}

.store-card {
  height: 220px;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 170px;
  align-items: center;
  gap: 25px;
  padding: 25px 30px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: #fff;
}

.store-brand {
  width: 88px;
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.store-brand img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.store-info h2 {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.store-info p {
  min-height: 3.1em;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.store-link {
  color: var(--purple);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.store-link:hover {
  text-decoration: underline;
}

.qr {
  width: 170px;
  height: 170px;
  padding: 7px;
  justify-self: end;
}

.qr img {
  display: block;
  width: 100%;
  height: 100%;
}

footer {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}

footer a {
  color: var(--purple);
  text-decoration: none;
}

@media (max-width: 1200px) {
  .page {
    width: min(100% - 36px, 1120px);
  }

  .hero {
    grid-template-columns: 0.8fr 1.2fr;
    gap: 42px;
    padding: 40px 20px 64px;
  }

  .hero-logo {
    width: min(300px, 90%);
  }

  h1 {
    font-size: clamp(42px, 5vw, 58px);
  }

  .lead {
    margin: 22px 0 28px;
  }
}

@media (max-width: 900px) {
  /* Mobile layout: QR codes are hidden and the APK CTA is centered. */
  .hero-copy {
    justify-items: center;
  }

  .download-button {
    justify-self: center;
  }

  .download-note {
    text-align: center;
  }

  .qr {
    display: none;
  }

  .store-card {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .page {
    width: min(100% - 32px, 680px);
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 30px 0 56px;
    text-align: center;
  }

  .hero-logo-wrap {
    order: 0;
  }

  .hero-copy {
    order: 1;
    grid-template-rows: auto minmax(3.06em, auto) minmax(3em, auto) auto auto;
  }

  .hero-logo {
    width: min(240px, 58vw);
  }

  .eyebrow {
    margin: 0 0 14px;
  }

  h1 {
    width: 100%;
    max-width: 680px;
    min-height: 3.06em;
    margin: 0;
    font-size: clamp(36px, 7vw, 54px);
    line-height: 1.02;
  }

  .lead {
    width: 100%;
    max-width: 600px;
    min-height: 3em;
    margin: 20px 0 26px;
    font-size: 17px;
    line-height: 1.5;
  }

  .download-button {
    display: inline-flex;
  }

  .download-note {
    margin-left: 0;
    margin-right: 0;
  }

  .store-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .topbar {
    height: 76px;
  }

  .brand {
    font-size: 18px;
  }

  .brand-logo {
    width: 40px;
    height: 40px;
  }

  .hero {
    padding-top: 20px;
  }

  .hero-logo {
    width: 190px;
  }

  h1 {
    min-height: 3.06em;
    font-size: 39px;
  }

  .lead {
    font-size: 17px;
  }

  .store-card {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 14px;
    padding: 20px 16px;
  }

  .store-brand {
    width: 64px;
    height: 115px;
  }

  .store-brand img {
    width: 58px;
    height: 58px;
  }

  .qr {
    width: 115px;
    height: 115px;
  }

  .store-info h2 {
    font-size: 20px;
  }

  .store-info p {
    font-size: 14px;
  }

  .store-link {
    font-size: 13px;
  }

  footer {
    min-height: 110px;
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

@media (max-width: 400px) {
  .page {
    width: min(100% - 24px, 380px);
  }

  .lang-button {
    min-width: 46px;
    height: 38px;
    padding: 0 10px;
  }

  .hero-logo {
    width: 165px;
  }

  h1 {
    min-height: 3.06em;
    font-size: 34px;
  }

  .download-button {
    width: 100%;
  }

  .store-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .store-brand {
    width: 100%;
    height: 72px;
  }

  .store-card .store-info {
    text-align: center;
  }

  .qr {
    grid-column: 1;
    grid-row: auto;
    margin: 8px auto 0;
  }
}

@media (max-width: 768px) {
  .store-card {
    height: auto; /* Сбрасываем фиксированную высоту */
    grid-template-columns: 1fr; /* Перестраиваем всё в одну колонку */
    gap: 15px;
    padding: 20px;
    text-align: center; /* Центрируем контент для мобильных */
  }

  .store-brand {
    width: 100%;
    height: auto; /* Сбрасываем высоту контейнера логотипа */
    margin-bottom: 5px;
  }

  .store-info p {
    min-height: auto; /* На мобильных не нужно резервировать место под строки */
  }

  /* ДОБАВЛЯЕМ ОТСТУП ПОСЛЕ ССЫЛКИ ДЛЯ МОБИЛЬНЫХ */
  .store-link {
    display: inline-block; /* Чтобы margin-bottom начал работать */
    margin-bottom: 20px;
  }

  .qr {
    justify-self: center; /* Центрируем QR-код на мобильном */
    width: 140px; /* Можно немного уменьшить QR-код на телефонах */
    height: 140px;
  }
}
