/* Home page. Figma "Вариант B" (158:6208) + Mobile 390 (191:236) */

/* ---------- Hero (158:6210) ---------- */
.hero { background: var(--sky); padding: var(--hero-top) 0 0; overflow-x: clip; }
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 580px) minmax(0, 660px);
  grid-template-rows: auto auto auto 1fr;
  grid-template-areas: "title illo" "text illo" "ctas illo" ". illo";
  column-gap: 30px;
  row-gap: 26px;
}
.hero__title {
  grid-area: title;
  font-weight: 700; font-size: 60px; line-height: 66px;
  color: var(--ink);
}
.hero__text {
  grid-area: text;
  max-width: 560px;
  font-size: 20px; line-height: 28px; color: var(--text);
}
.hero__ctas { grid-area: ctas; display: flex; gap: 16px; width: max-content; }
.hero__illo { grid-area: illo; aspect-ratio: 660 / 600; } /* same footprint as the Figma composition */
.hero__img { display: block; width: 88%; height: auto; margin: 1.5% 0 0 12%; }


/* ---------- USPs (158:6521) ---------- */
.usps { background: var(--sky); padding: 0 0 69px; }
.usps__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.usp {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 22px 22px 24px;
  background: #fff;
  border-radius: 26px;
}
.usp__icon {
  flex: none;
  display: flex;
  padding: 8px;
  border-radius: 20px;
  background: var(--tint);
}
.usp__icon > img { width: 44px; height: 44px; }
.usp__title { font-weight: 800; font-size: 20px; line-height: 28px; color: var(--ink); }
.usp__text { margin-top: 4px; font-size: 16px; line-height: 24px; letter-spacing: .03em; color: var(--text); }



/* ---------- Categories (158:6594) ---------- */
.cats { padding: 80px 0 100px; }
.cats__sub { max-width: 760px; }
.cats__rows { display: flex; flex-direction: column; gap: 20px; margin-top: 60px; }
.cat {
  display: flex;
  overflow: hidden;
  background: #fff;
  border-radius: 30px;
  box-shadow: var(--shadow-soft);
}
.cat__info {
  flex: 0 0 380px;
  display: flex; flex-direction: column; gap: 14px;
  padding: 28px;
  background: var(--tint);
}
.cat__top { display: flex; align-items: center; gap: 16px; }
.cat__icon { flex: none; padding: 8px; border-radius: 18px; background: #fff; }
.cat__icon img { width: 40px; height: 40px; }
.cat__title { font-weight: 700; font-size: 24px; line-height: 31px; color: var(--ink); }
.cat__text { font-size: 16px; line-height: 24px; letter-spacing: .03em; color: var(--text); }
.cat__apps {
  flex: 1 1 auto; min-width: 0;
  display: flex; align-items: center; gap: 6px;
  padding: 24px;
}
.cat__list { display: flex; flex-wrap: wrap; gap: 6px; margin-right: auto; }
.app {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  min-width: 96px;
  font-weight: 600; font-size: 14px; line-height: 20px; letter-spacing: .03em;
  text-align: center; white-space: nowrap; color: var(--ink);
}
.app img {
  width: 96px; height: 96px;
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  object-fit: cover;
}
.see-all { flex: none; transition: transform .15s; }
.see-all:hover { transform: translateX(3px); }
.see-all img { width: 42px; height: 40px; }

/* ---------- Gameplay (158:6802) ---------- */
.gameplay { background: var(--green-10); padding: 50px 0 100px; }
.gameplay .section-sub { margin-top: 22px; }
.gameplay__sub { max-width: 720px; }
.gameplay__body { display: flex; gap: 28px; margin-top: 60px; }
.player {
  position: relative;
  flex: 0 0 800px;
  aspect-ratio: 16 / 9;
  max-width: 100%;
  border: 8px solid #fff;
  border-radius: 32px;
  overflow: hidden;
  background: #fff;
}
.player__shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.player::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .3); }
.player__play {
  position: absolute; z-index: 1; left: 50%; top: 50%;
  width: 103px; height: 73px; translate: -50% -50%;
}
.player__play img { width: 100%; height: 100%; }
.player__play { transition: scale .15s ease; }
.player:hover .player__play { scale: 1.06; }
.player__now {
  position: absolute; z-index: 1; left: 16px; bottom: 16px;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px 8px 14px;
  border-radius: 999px; background: #fff;
  font-size: 14px; line-height: 20px; letter-spacing: .03em; white-space: nowrap;
}
.player__now img { width: 26px; height: 26px; border-radius: 7px; }
.player__now b { font-weight: 700; color: var(--ink); }
.player__now span { font-weight: 600; color: var(--muted); }
.player__now span:empty { display: none; }

.playlist { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.clip {
  display: flex; align-items: center; gap: 14px;
  width: 100%;
  padding: 12px 16px 12px 12px;
  text-align: left;
  border-radius: 22px;
  background: #fff;
  transition: box-shadow .15s;
}
.clip:hover { box-shadow: var(--shadow-soft); }
.clip.is-active {
  border: 3px solid transparent;
  background: linear-gradient(#fff, #fff) padding-box, var(--grad) border-box;
}
.clip__thumb { position: relative; flex: none; width: 150px; height: 88px; border-radius: 14px; overflow: hidden; }
.clip__thumb > img:first-child { width: 100%; height: 100%; object-fit: cover; }
.clip__play { position: absolute; left: 50%; top: 50%; width: 30px; height: 21.3px; translate: -50% -50%; }
.clip__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.clip__text b { font-weight: 800; font-size: 16px; line-height: 24px; color: var(--ink); }
.clip__app {
  display: flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: 14px; line-height: 20px; letter-spacing: .03em; color: var(--muted);
  white-space: nowrap;
}
.clip__app img { width: 18px; height: 18px; border-radius: 5px; }


/* ---------- Download (158:6865) ---------- */
.download { padding: 40px 0; }
.download__card {
  display: grid;
  grid-template-columns: minmax(0, 620px) 360px;
  grid-template-rows: auto auto 1fr;
  grid-template-areas: "title illo" "text illo" "stores illo";
  justify-content: space-between;
  column-gap: 108px; /* 40px gap + room for the cart that overhangs the illustration box */
  row-gap: 20px;
  align-items: start;
  padding: 56px 48px 56px 64px;
  border-radius: 40px;
  background:
    radial-gradient(circle 420px at 82% 50%, rgba(255, 255, 255, .6), rgba(255, 255, 255, 0)),
    linear-gradient(136.31deg, #EEFCFF 8.33%, #D8EEF3 50%, #EEFCFF 91.67%);
}
.download__title { grid-area: title; max-width: 620px; font-weight: 700; font-size: 40px; line-height: 44px; color: var(--ink); }
.download__text {
  grid-area: text; max-width: 620px;
  font-weight: 600; font-size: 20px; line-height: 28px; color: rgba(49, 50, 53, .85);
}
.download__illo { grid-area: illo; align-self: center; width: 360px; }
/* the cart reaches ~18% past the left edge of the column, as in the Figma composition */
.download__img { display: block; width: 110%; max-width: none; height: auto; margin-left: -18%; }

/* ================= Responsive ================= */
@media (min-width: 1340px) {
  /* tablet illustration overhangs the content edge like in the 1440 mockup */
  .hero__illo { margin-right: -70px; }
}

@media (max-width: 1240px) {
  .cat__info { flex-basis: 320px; }
  .player { flex-basis: 60%; }
}


@media (max-width: 1100px) {
  .hero__title { font-size: 48px; line-height: 54px; }
  .usps__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .download__card { grid-template-columns: minmax(0, 620px) 280px; column-gap: 92px; padding: 48px 40px; }
  .download__illo { width: 280px; }
}

/* Mobile layout — Figma "Вариант B · Mobile 390" */
@media (max-width: 899px) {
  .hero { padding: var(--hero-top) 0 36px; }
  .hero__inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-template-areas: "title" "illo" "text" "ctas";
    row-gap: 18px;
    max-width: 560px;
  }
  .hero__title { font-size: 36px; line-height: 1.1; text-align: center; }
  .hero__text { font-size: 16px; line-height: 24px; text-align: center; max-width: none; }
  .hero__ctas { flex-direction: column; gap: 12px; width: auto; }
  .hero__ctas .btn { width: 100%; }
  .hero__illo { margin: 0; overflow: visible; }
  .hero__illo { aspect-ratio: auto; }
  .hero__img { width: 88%; margin: 0 auto; }

  .usps { padding-bottom: 24px; }
  .usps__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 560px; }
  .usp {
    flex-direction: column; align-items: center; gap: 10px;
    min-height: 190px;
    padding: 16px 16px 18px;
    text-align: center;
  }
  .usp__icon { padding: 5.867px; border-radius: 14.667px; }
  .usp__icon > img { width: 32.267px; height: 32.267px; }
  .usp__title { font-size: 16px; line-height: 22px; }
  .usp__text { font-size: 13px; line-height: 19px; }

  .section-title { font-size: 28px; line-height: 1.1; }
  .section-sub { margin-top: 14px; font-size: 16px; line-height: 24px; }

  .cats { padding: 40px 0 48px; }
  .cats .container, .gameplay .container, .download .container { max-width: 600px; }
  .cats__rows { gap: 16px; margin-top: 34px; }
  .cat { flex-direction: column; padding-bottom: 20px; }
  .cat__info {
    flex-basis: auto;
    align-items: center; gap: 10px;
    padding: 24px 20px 20px;
    text-align: center;
  }
  .cat__top { justify-content: center; text-align: left; }
  .cat__title { font-size: 20px; line-height: 26px; }
  .cat__text { font-size: 14px; line-height: 20px; }
  .cat__apps { flex-direction: column; gap: 0; padding: 20px 0 0; }
  /* apps of a category: a swipeable row (carousel) instead of a wrapping grid */
  .cat__list {
    flex-wrap: nowrap; gap: 10px;
    align-self: stretch;
    margin: 0 0 12px;
    padding: 4px 16px 10px; /* room for the icon shadows */
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 16px;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .cat__list::-webkit-scrollbar { display: none; }
  /* ~3⅓ items per view on any phone width, so the next app always peeks in */
  .cat__list > li { flex: 0 0 calc((100% - 30px) / 3.35); scroll-snap-align: start; }
  .cat__list .app { width: 100%; }
  .cat__list .app img { width: min(84px, 100%); height: auto; aspect-ratio: 1; }
  /* centre the row when it isn't wider than the card (e.g. 2 apps) */
  .cat__list > li:first-child { margin-left: auto; }
  .cat__list > li:last-child { margin-right: auto; }
  .app { width: 96px; min-width: 0; gap: 6px; font-size: 13px; line-height: 17px; white-space: normal; }
  .app img { width: 84px; height: 84px; border-radius: 21px; }

  .gameplay { padding: 32px 0 40px; }
  .gameplay .section-sub { margin-top: 14px; }
  .gameplay__body { flex-direction: column; gap: 12px; margin-top: 44px; }
  .player { flex-basis: auto; width: 100%; border-width: 4px; border-radius: 20px; }
  .player__play { width: 72px; height: 51px; }
  .player__now {
    left: 6px; bottom: 6px; gap: 7px;
    padding: 5.6px 11.2px 5.6px 9.8px;
    font-size: 9.8px; line-height: 14px;
  }
  .player__now img { width: 18.2px; height: 18.2px; border-radius: 4.9px; }
  .playlist { gap: 10px; }
  .clip { padding: 8px 12px 8px 8px; }

  .download { padding: 24px 0; }
  .download__card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-template-areas: "title" "illo" "text" "stores";
    row-gap: 14px;
    padding: 28px 22px 32px;
    border-radius: 30px;
    text-align: center;
  }
  .download__title { font-size: 26px; line-height: 32px; }
  .download__text { font-size: 15px; line-height: 22px; }
  .download__illo { justify-self: center; width: min(240px, 100%); }
  .download__img { width: 100%; margin-left: 0; }
  .stores { justify-content: center; padding-top: 10px; }
}

a.app { transition: color .15s; }
a.app img { transition: transform .15s ease; }
a.app:hover { color: var(--blue); }
a.app:hover img { transform: translateY(-2px); }

/* Tablet — bimiboo.com/apps at 768: centred hero, buttons in a row, 2-column grids */
@media (min-width: 601px) and (max-width: 899px) {
  .hero__inner { max-width: 720px; row-gap: 22px; }
  .hero__title { font-size: 40px; line-height: 1.1; }
  .hero__text { justify-self: center; max-width: 640px; font-size: 18px; line-height: 28px; }
  .hero__img { width: 76%; }
  .hero__ctas { flex-direction: row; justify-content: center; gap: 16px; }
  .hero__ctas .btn { width: auto; }

  .usps__grid { max-width: 720px; gap: 16px; }
  .usp { min-height: 0; padding: 24px 20px; }
  .usp__title { font-size: 18px; line-height: 26px; }
  .usp__text { font-size: 14px; line-height: 21px; }

  .cats .container, .gameplay .container, .download .container { max-width: none; }
  .cat__info { padding: 28px 40px 20px; }
  .cat__text { max-width: 560px; font-size: 15px; line-height: 22px; }
  /* fixed-width items: most categories fit in one centred row, longer ones still swipe */
  .cat__list > li { flex: 0 0 96px; }
  .cat__list .app img { width: 84px; }

  .playlist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  /* an odd last clip (e.g. the 3rd of 3) sits centred under the pair */
  .playlist > li:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc((100% - 12px) / 2); }

  .download__card { padding: 40px 48px 44px; }
  .download__title { font-size: 32px; line-height: 38px; }
  .download__text { max-width: 560px; justify-self: center; font-size: 17px; line-height: 26px; }
  .download__illo { width: 260px; }
}
