/* BatumiPlay — homepage styles (built from the Figma layouts: mobile 390, tablet 768, desktop 1440) */

:root {
  --bg: #0b0f1a;
  --bg-hero: #0e1322;
  --bg-footer: #080b14;
  --card: #151b2b;
  --card-2: #1b2235;
  --line: #232c42;
  --line-soft: #232b3e;
  --text: #ffffff;
  --text-2: #e6ecf5;
  --muted: #a2afc6;
  --muted-2: #8290a9;
  --muted-3: #6f7e99;
  --accent: #5399ff;
  --green: #71e59e;
  --gold: #ffc94d;
  --tg: #229ed9;
  --wa: #25d366;
  --radius: 18px;
  --radius-s: 12px;
  --pad: 20px;
  --cover: 111px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text-2);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
p { margin: 0; }
button { font: inherit; }

.container { width: min(1200px, 100% - 2 * var(--pad)); margin: 0 auto; }
.section { padding: 32px 0; }
.section__title { font-size: 24px; line-height: 1.2; margin-bottom: 8px; }
.section__sub { color: var(--muted-2); font-size: 14px; margin-bottom: 20px; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 55px; padding: 0 22px; border-radius: 14px; border: 0;
  font-weight: 600; font-size: 17px; color: #fff; cursor: pointer;
  transition: transform .12s ease, filter .2s ease;
  text-decoration: none !important;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn--tg { background: var(--tg); }
.btn--wa { background: var(--wa); }
.btn--soft { background: var(--card-2); color: var(--accent); font-size: 14px; min-height: 45px; padding: 0 18px; border-radius: var(--radius-s); }
.btn--block { width: 100%; }
.btn svg { width: 22px; height: 22px; flex: none; }

/* ---------- Header (desktop only) ---------- */
.header { display: none; }

/* ---------- Hero ---------- */
.hero { padding: 28px 0 32px; background: var(--bg-hero); }
.hero__badge {
  display: inline-block; padding: 6px 12px; border-radius: 14px;
  background: #1d2842; color: #9ab5e0; font-size: 13px; font-weight: 500; margin-bottom: 18px;
}
.hero__title { font-size: 32px; line-height: 1.15; margin-bottom: 14px; }
.hero__sub { color: var(--muted); font-size: 15px; margin-bottom: 22px; }
.hero__photo { border-radius: var(--radius); overflow: hidden; aspect-ratio: 5 / 3; background: var(--card); margin-bottom: 20px; }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.hero__cta { display: grid; gap: 14px; }
.hero__trust { margin-top: 14px; font-size: 13px; color: var(--muted-2); }
/* on phones the sticky bar already carries Telegram/WhatsApp — no need to repeat them here */
@media (max-width: 767px) {
  .hero__cta { display: none; }
  .hero__trust { margin-top: 0; }
}

/* ---------- Pricing cards ---------- */
.cards { display: grid; gap: 16px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.card__cover { aspect-ratio: 4 / 3; background: var(--card-2); }
/* Кадр 16:9 режет четверть высоты у исходников 4:3, поэтому центр смещаем:
   у приставки — чтобы она влезала целиком, у телевизора — чтобы над ним был воздух */
.card__cover img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
.card--tv .card__cover img { object-position: 50% 10%; }
.card__body { padding: 18px 16px 22px; display: grid; gap: 12px; }
.card__title { font-size: 20px; }
.card__sub { color: var(--muted); font-size: 14px; }
.card__note { color: var(--muted); font-size: 14px; }
.card__benefit { color: var(--green); font-size: 14px; font-weight: 500; }

.price-table { width: 100%; border-collapse: collapse; }
.price-table th, .price-table td { text-align: left; padding: 12px 14px; }
.price-table th { color: var(--muted-2); font-size: 13px; font-weight: 500; padding-top: 6px; padding-bottom: 8px; white-space: nowrap; }
/* narrow phones: shrink the header so "с 2 геймпадами" still fits on one line */
@media (max-width: 430px) {
  .price-table th { font-size: 11.5px; }
  .price-table th, .price-table td { padding-left: 10px; padding-right: 10px; }
  .price-table td.price { font-size: 16px; }
}
.price-table td { border-top: 1px solid var(--line-soft); font-size: 15px; font-weight: 500; }
.price-table td.price { font-size: 17px; font-weight: 700; color: var(--text); white-space: nowrap; }
.price-table tr.deposit td { color: var(--muted-2); }
.price-table tr.deposit td.price { color: var(--muted); font-weight: 700; }
.pricing__note { margin-top: 18px; color: var(--muted); font-size: 14px; }

/* ---------- Includes ---------- */
.includes { display: grid; gap: 14px; }
.include { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.include__icon {
  width: 40px; height: 40px; border-radius: 10px; background: #1d2842; color: var(--accent);
  display: grid; place-items: center;
}
.include__icon svg { width: 22px; height: 22px; }
.include__text { color: var(--muted); font-size: 14px; padding-top: 4px; }
.include__text strong { color: var(--text-2); font-weight: 600; }

/* ---------- Games carousels ---------- */
.games__title { font-size: 24px; margin-bottom: 20px; }
.games__subtitle { font-size: 17px; font-weight: 600; margin: 8px 0 14px; color: var(--text); }
.games__hint { color: var(--muted); font-size: 14px; margin: 14px 0 6px; }

.carousel {
  display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, auto);
  /* fixed column width: otherwise auto tracks stretch to fill the row and the
     gaps differ between carousels with 10, 7 and 5 columns */
  grid-auto-columns: var(--cover); justify-content: start; align-items: start;
  gap: 14px 20px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 6px; scrollbar-width: none;
  /* aligned with the heading on the left, bleeding past the screen on the right
     so the next column peeks in and the row reads as scrollable */
  margin-inline: 0 calc(-1 * var(--pad));
  padding-inline: 0 var(--pad);
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 46px), rgba(0, 0, 0, .12));
  mask-image: linear-gradient(to right, #000 calc(100% - 46px), rgba(0, 0, 0, .12));
}
/* nothing left to scroll to — no reason to fade the edge */
.carousel.is-end {
  -webkit-mask-image: none;
  mask-image: none;
}
.carousel::-webkit-scrollbar { display: none; }
.game { width: var(--cover); scroll-snap-align: start; cursor: pointer; background: none; border: 0; padding: 0; text-align: left; color: inherit; }
.game__cover { width: var(--cover); height: var(--cover); border-radius: 10px; object-fit: cover; background: var(--card-2); }
/* two lines always, so both rows of the grid start at the same height */
.game__name { margin-top: 8px; font-size: 12px; line-height: 1.2; min-height: 29px; color: #c7d4ea; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Phones: size the cards so the next column always peeks in past the screen edge,
   and fade that edge — otherwise three covers fill the width exactly and the
   carousel reads as a plain grid. */
@media (max-width: 767px) {
  :root { --cover: 96px; }
  .carousel { gap: 12px; }
}

/* ---------- EA Play: раскрывающийся список второй подписки ---------- */
.ea + .ea { margin-top: 10px; }
.ea { margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--card); }
.ea > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; cursor: pointer; list-style: none;
  font-size: 15px; font-weight: 600; color: var(--text);
}
.ea > summary::-webkit-details-marker { display: none; }
.ea > summary::after {
  content: ""; flex: none; width: 9px; height: 9px; margin-left: auto;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s;
}
.ea[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.ea > summary em { font-style: normal; font-weight: 500; color: var(--muted); font-size: 14px; }
.ea > summary:hover { color: var(--accent); }
.ea__note { padding: 0 16px; color: var(--muted); font-size: 14px; }
.ea__note + .ea__note { margin-top: 8px; }
.ea__note--last { margin-bottom: 14px; }
.ea__link { margin: 0 16px 16px; }
.ea__grid { list-style: none; margin: 12px 0 0; padding: 0 16px 16px; display: grid; gap: 12px; }
.ea__item {
  display: grid; grid-template-columns: 76px 1fr; gap: 12px; align-items: start;
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.ea__item:last-child { border-bottom: 0; padding-bottom: 0; }
.ea__cover { width: 76px; height: 76px; border-radius: 8px; object-fit: cover; background: var(--card-2); }
.ea__text { display: grid; gap: 3px; min-width: 0; }
.ea__item b { font-size: 14px; font-weight: 600; color: var(--text); }
.ea__item b a { color: var(--text); }
.ea__item b a span { color: var(--accent); font-size: 12px; }
.ea__item b a:hover { color: var(--accent); text-decoration: none; }
.ea__about { font-size: 13px; color: var(--muted); line-height: 1.4; }
.ea__langs { display: grid; gap: 1px; margin-top: 3px; font-size: 12.5px; color: var(--muted-3); }
.ea__langs em { font-style: normal; color: var(--muted); }
.ea__langs em.is-ru { color: var(--green); }
/* подсказка про PS4-версию — как в попапе основного каталога */
.ea__ps4 { margin-top: 3px; font-size: 12.5px; color: var(--green); line-height: 1.35; }
.ea__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; }
.ea__tags i {
  font-style: normal; font-size: 12px; padding: 2px 9px; border-radius: 999px;
  background: var(--card-2); color: var(--muted-3);
}
.ea__tags i.is-duo { color: var(--accent); }
.ea__tags i.is-ru { color: var(--green); }
.ea__tags i.is-ps4 { color: var(--muted-3); border: 1px solid var(--line); background: none; }

.dots { display: flex; gap: 6px; margin: 10px 0 0; }
.dots i { display: block; height: 4px; width: 10px; border-radius: 2px; background: #3c475d; transition: width .2s, background .2s; }
.dots i.is-active { width: 22px; background: var(--accent); }

/* ---------- Game sheet / popover ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(4,6,12,.6); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 40; }
.sheet-backdrop.is-open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41;
  background: var(--card-2); border-radius: 20px 20px 0 0; padding: 10px 20px 28px;
  transform: translateY(105%); transition: transform .25s ease;
  display: grid; gap: 12px;
}
.sheet.is-open { transform: none; }
.sheet__handle { width: 40px; height: 4px; border-radius: 2px; background: #4a5671; margin: 0 auto 4px; }
.sheet__head { display: grid; grid-template-columns: 72px 1fr; gap: 14px; align-items: start; }
.sheet__cover { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; }
.sheet__title { font-size: 17px; font-weight: 600; margin-top: 6px; }
.sheet__rating { color: var(--gold); font-weight: 600; font-size: 14px; margin-top: 4px; }
/* строка «что это за игра» — между шапкой и режимом игры */
.sheet__about { color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.sheet__players { color: #9dadc6; font-size: 14px; font-weight: 500; }
.sheet__players small { display: block; color: var(--muted-2); font-weight: 400; font-size: 13px; margin-top: 2px; }
.sheet__langs { color: var(--muted); font-size: 14px; line-height: 1.5; }
.sheet__note { color: var(--green); font-size: 13px; font-weight: 500; }
.sheet__link { font-size: 14px; font-weight: 500; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; }
.faq__item { background: var(--card); border-radius: var(--radius-s); overflow: hidden; }
.faq__q {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 18px 16px; background: none; border: 0; color: var(--text-2); font-size: 15px; font-weight: 500; text-align: left; cursor: pointer;
}
.faq__q span { color: var(--muted-3); font-size: 20px; line-height: 1; transition: transform .2s; }
.faq__item.is-open .faq__q span { transform: rotate(45deg); }
.faq__a { display: none; padding: 0 16px 18px; color: var(--muted); font-size: 14px; }
.faq__item.is-open .faq__a { display: block; }

/* ---------- Blog ---------- */
.posts { display: grid; gap: 12px; }
.post { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; background: var(--card); border-radius: var(--radius-s); padding: 10px; color: var(--text-2); }
.post:hover { text-decoration: none; background: var(--card-2); }
.post__cover { width: 96px; aspect-ratio: 16 / 9; border-radius: 8px; object-fit: cover; background: var(--card-2); }
.post__title { font-size: 14px; font-weight: 500; line-height: 1.3; }
.blog__link { display: inline-block; margin-top: 14px; font-weight: 500; }

/* ---------- Final CTA ---------- */
.cta { padding: 40px 0 44px; }
.cta__title { font-size: 26px; margin-bottom: 12px; }
.cta__text { color: var(--muted); font-size: 15px; margin-bottom: 22px; }
.cta__buttons { display: grid; gap: 14px; }

/* ---------- Footer ---------- */
.footer { background: var(--bg-footer); padding: 36px 0 32px; }
.footer__cols { display: grid; gap: 24px; }
.footer__logo { font-size: 18px; font-weight: 700; color: var(--text); }
.footer__tag { color: var(--muted-2); font-size: 14px; margin-top: 8px; }
.footer__h { color: var(--muted-2); font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 15px; font-weight: 500; }
.footer__list a { color: var(--text-2); }
.footer__list a.is-accent { color: var(--accent); }
.footer__divider { height: 1px; background: var(--line); margin: 28px 0 20px; }
.footer__legal { color: #677387; font-size: 12px; line-height: 1.5; }

/* ---------- Sticky bar (mobile only) ---------- */
.sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: rgba(8,11,20,.94); backdrop-filter: blur(10px);
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.sticky .btn { min-height: 49px; font-size: 16px; border-radius: 12px; }
body.has-sticky { padding-bottom: 88px; }

/* ================= Tablet ≥ 768 ================= */
@media (min-width: 768px) {
  :root { --pad: 40px; }
  .section { padding: 40px 0; }
  .hero { padding: 40px 0; }
  .hero__title { font-size: 40px; }
  .hero__photo { aspect-ratio: 2 / 1; }
  .hero__cta { grid-template-columns: 1fr 1fr; max-width: 600px; }
  .cards { grid-template-columns: 1fr 1fr; align-items: start; }
  .card__cover { aspect-ratio: 7 / 5; }
  .includes { grid-template-columns: 1fr 1fr; gap: 18px 24px; }
  .cta__buttons { grid-template-columns: repeat(2, minmax(0, 280px)); }
  .posts { grid-template-columns: repeat(3, 1fr); }
  .post { grid-template-columns: 128px 1fr; padding: 12px; }
  .post__cover { width: 128px; }
  .footer__cols { grid-template-columns: 1.2fr 1fr 1fr; gap: 40px; }
  .ea__grid { grid-template-columns: 1fr 1fr; gap: 12px 24px; }
  .sticky { display: none; }
  body.has-sticky { padding-bottom: 0; }
}

/* ================= Desktop ≥ 1100 ================= */
@media (min-width: 1100px) {
  :root { --pad: 120px; }
  body { font-size: 16px; }
  .header { display: block; padding: 18px 0; }
  .header__wrap { display: flex; align-items: center; justify-content: space-between; }
  .header__logo { font-weight: 800; letter-spacing: .04em; color: var(--text); font-size: 16px; }
  .header__nav { display: flex; gap: 26px; font-size: 14px; color: var(--muted); }
  .header__nav a { color: var(--muted); }
  .header__nav a:hover { color: var(--text); text-decoration: none; }

  .hero { padding: 56px 0 72px; }
  /* text column on the left, photo spans both rows on the right */
  .hero__wrap { display: grid; grid-template-columns: 1.05fr .95fr; grid-template-rows: auto auto; column-gap: 48px; align-items: center; }
  .hero__top { grid-column: 1; grid-row: 1; align-self: end; }
  .hero__actions { grid-column: 1; grid-row: 2; align-self: start; }
  .hero__photo { grid-column: 2; grid-row: 1 / span 2; margin: 0; aspect-ratio: 7 / 5; }
  .hero__title { font-size: 32px; line-height: 1.21; }
  .hero__cta .btn { min-width: 284px; }
  .hero__cta { grid-template-columns: auto auto; justify-content: start; max-width: none; }

  .cards { gap: 24px; }
  .card__cover { aspect-ratio: 16 / 9; }
  .card__body { padding: 20px 20px 24px; }
  .price-table td { padding: 14px 16px; }

  .includes { grid-template-columns: 1fr 1fr; gap: 18px 24px; }

  /* on desktop everything fits: no scrolling, static grid */
  .carousel { overflow: visible; margin-inline: 0; padding-inline: 0; gap: 14px 8px;
    -webkit-mask-image: none; mask-image: none; }
  .ea__grid { grid-template-columns: repeat(3, 1fr); gap: 14px 28px; }
    .dots { display: none; }

  .faq { max-width: 820px; }
  .cta { padding: 56px 0 64px; }
  .footer { padding: 48px 0 40px; }
  .footer__cols { grid-template-columns: 1.4fr 1fr 1fr; gap: 80px; }

  /* desktop popover instead of the bottom sheet */
  .sheet {
    left: auto; right: auto; bottom: auto; width: 296px; border-radius: 14px; padding: 16px;
    border: 1px solid #333e56; transform: none; opacity: 0; pointer-events: none; transition: opacity .15s; gap: 10px;
  }
  .sheet.is-open { opacity: 1; pointer-events: auto; }
  .sheet__handle, .sheet__cover { display: none; }
  .sheet__head { grid-template-columns: 1fr; }
  .sheet__title { font-size: 16px; margin-top: 0; }
  .sheet-backdrop { display: none; }
}
