@font-face {
  font-family: "BS Roboto";
  src: url("fonts/roboto.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --bg: #050b16;
  --card: #0b1422;
  --line: rgba(160, 185, 220, .22);
  --text: #fff;
  --muted: #c3cbd8;
  --accent: #ffc928;
  --ink: #0a0f18;
  --header: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.4 "BS Roboto", Roboto, "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
em { font-style: normal; color: var(--accent); }
button { font: inherit; color: inherit; -webkit-appearance: none; -moz-appearance: none; appearance: none; cursor: pointer; }
[hidden] { display: none !important; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; z-index: 100; padding: 8px 12px; background: var(--accent); color: var(--ink); }
.container { width: 100%; max-width: 1172px; margin: 0 auto; padding: 0 28px; }
.icon { width: 20px; height: 20px; flex: none; }
.icon--chevron { width: 12px; height: 12px; }
.icon--big { width: 36px; height: 36px; }

/* Шапка */
.header { position: -webkit-sticky; position: sticky; top: 0; z-index: 20; background: #050b16; border-bottom: 1px solid var(--line); }
.header__inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header); }
.logo { display: inline-flex; align-items: center; font-size: 31px; font-weight: 700; letter-spacing: -.5px; line-height: 1; text-decoration: none; white-space: nowrap; }
.logo img { margin-right: 8px; }
.logo b { color: var(--accent); }
.nav { display: flex; flex: 1; align-items: center; justify-content: flex-end; font-size: 15px; font-weight: 600; }
.nav a { text-decoration: none; margin-left: 34px; transition: color .2s, border-color .2s; }
.nav a:hover { color: var(--accent); }
.nav .header__tg { display: inline-flex; align-items: center; margin-left: auto; padding: 11px 22px; border: 1px solid rgba(255,255,255,.45); border-radius: 40px; }
.nav .header__tg:hover { border-color: var(--accent); }
.header__tg .icon { margin-right: 10px; }
.nav a:nth-child(1) { margin-left: auto; }
.burger { display: none; }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 24px;
  border: 0; border-radius: 40px;
  background: #ffc928; background-image: linear-gradient(180deg, #ffd844, #fbbd17);
  color: var(--ink); font-weight: 700; line-height: 1.2; text-decoration: none;
  transition: box-shadow .2s, transform .2s;
}
.btn:hover { box-shadow: 0 0 24px rgba(255, 201, 40, .55); transform: translateY(-1px); }
.btn .icon--chevron { margin-left: 10px; }
.btn--small { min-height: 40px; padding: 8px 18px; font-size: 15px; white-space: nowrap; }
.btn--hero { min-height: 86px; min-width: 346px; padding: 14px 30px; border-radius: 50px; font-size: 20px; text-align: left; justify-content: space-between; }
.btn--hero span { margin: 0 20px; margin-right: auto; }
.btn--wide { min-height: 54px; font-size: 17px; }
.btn--wide .icon:first-child { margin-right: 14px; }

/* Первый экран */
.hero { background: #050b16; overflow: hidden; }
.hero__inner { position: relative; display: flex; align-items: center; min-height: 462px; padding-top: 40px; padding-bottom: 40px; }
.hero__media { position: absolute; top: 0; right: 0; bottom: 0; width: 56%; }
.hero__media img { width: 100%; height: 100%; -o-object-fit: cover; object-fit: cover; -o-object-position: 60% 50%; object-position: 60% 50%; }
.hero__media::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: linear-gradient(90deg, #050b16 0, rgba(5,11,22,0) 35%, rgba(5,11,22,0) 86%, #050b16 100%); }
.hero__content { position: relative; z-index: 1; }
.hero h1 { font-size: 50px; font-size: clamp(32px, 4.6vw, 52px); line-height: 1.1; letter-spacing: -.5px; }
.hero p { margin: 24px 0 34px; font-size: 21px; line-height: 1.3; color: #eef2f8; }

/* Каталог */
.catalog { padding: 24px 0 32px; background-image: linear-gradient(180deg, #08111f, var(--bg)); }
.catalog__title { display: flex; align-items: center; justify-content: center; margin-bottom: 24px; font-size: 34px; font-size: clamp(25px, 3.4vw, 36px); text-align: center; line-height: 1.2; }
.catalog__title::before, .catalog__title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.catalog__title::before { margin-right: 26px; }
.catalog__title::after { margin-left: 26px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-gap: 22px; gap: 22px; margin: 0; padding: 0; list-style: none; }
.card { display: flex; min-height: 276px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--card); background-image: linear-gradient(135deg, #111d30, #070e1a); transition: transform .25s, border-color .25s, box-shadow .25s; }
.card:hover { transform: translateY(-3px); border-color: rgba(255,201,40,.6); box-shadow: 0 8px 30px rgba(20, 90, 180, .3); }
.card__img { width: 51%; height: auto; flex: none; -o-object-fit: cover; object-fit: cover; align-self: stretch; }
.card__body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; min-width: 0; padding: 30px 14px 18px; }
.card__title { font-size: 21px; line-height: 1.18; }
.card__genre { margin: 16px 0; font-size: 15px; color: var(--muted); }
.card__body .btn { margin-top: auto; align-self: stretch; }
.empty { padding: 80px 20px; border: 1px dashed var(--line); border-radius: 12px; text-align: center; }
.empty p { margin-bottom: 22px; font-size: 19px; color: var(--muted); }

.pager { display: flex; flex-wrap: wrap; justify-content: center; margin-top: 18px; }
.pager button { min-width: 44px; height: 44px; margin: 5px; padding: 0 18px; border: 1px solid var(--line); border-radius: 10px; background: #111b2b; font-weight: 600; }
.pager button[data-page] { padding: 0; }
.pager button:hover:not(:disabled) { border-color: var(--accent); }
.pager button[aria-current] { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.pager button:disabled { opacity: .5; cursor: default; }

/* Блок заказа */
.cta { padding-bottom: 34px; }
.cta__box { position: relative; display: flex; align-items: center; min-height: 340px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #0a1426; }
.cta__media { position: absolute; top: 0; right: 0; bottom: 0; width: 62%; }
.cta__media img { width: 100%; height: 100%; -o-object-fit: cover; object-fit: cover; }
.cta__media::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: linear-gradient(90deg, #0a1426 0, rgba(10,20,38,0) 35%); }
.cta__content { position: relative; z-index: 1; width: 48%; padding: 28px 0 28px 38px; }
.cta h2 { font-size: 42px; font-size: clamp(28px, 3.8vw, 44px); line-height: 1.05; }
.cta p { max-width: 410px; margin: 18px 0 24px; font-size: 18px; line-height: 1.35; }

/* Подвал */
.footer { padding: 28px 0; padding-bottom: calc(28px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #081120; }
.footer__inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; grid-gap: 24px; gap: 24px; }
.footer strong { display: block; font-size: 17px; }
.footer__author a, .footer__tg div a { color: #3ea6ff; overflow-wrap: anywhere; }
.footer__tg { display: flex; align-items: center; justify-self: end; }
.footer__badge { display: flex; flex: none; align-items: center; justify-content: center; width: 48px; height: 48px; margin-right: 16px; border-radius: 50%; background: #229ed9; }
.footer__badge .icon { width: 26px; height: 26px; }

/* Планшет и небольшой ноутбук */
@media (max-width: 1099px) {
  .logo { font-size: 26px; }
  .burger { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: none; }
  .burger span { width: 20px; height: 2px; margin: 2px 0; background: #fff; transition: transform .2s, opacity .2s; }
  .burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .nav { position: absolute; top: 100%; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; max-height: calc(100vh - var(--header)); overflow-y: auto; padding: 8px 28px 20px; background: #050b16; border-bottom: 1px solid var(--line); font-size: 17px; }
  .nav.is-open { display: flex; }
  .nav a, .nav a:nth-child(1) { margin: 0; padding: 13px 0; }
  .nav .header__tg { justify-content: center; margin: 10px 0 0; padding: 12px; }
  /* без JavaScript меню остаётся видимым */
  html:not(.js) .burger { display: none; }
  html:not(.js) .header { position: static; }
  html:not(.js) .header__inner { flex-wrap: wrap; }
  html:not(.js) .nav { position: static; display: flex; flex-basis: 100%; padding: 0 0 12px; }
}
@media (max-width: 999px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta__content { width: 58%; }
  .footer strong { font-size: 15px; }
  .footer__inner { gap: 14px; grid-gap: 14px; }
  .footer .logo { font-size: 22px; }
}

/* Телефоны и узкие планшеты */
@media (max-width: 719px) {
  :root { --header: 64px; }
  .container { padding: 0 16px; }
  .nav { padding-left: 16px; padding-right: 16px; }
  .hero__inner { display: block; min-height: 0; padding-top: 0; padding-bottom: 32px; }
  .hero__media { position: relative; width: auto; margin: 0 -16px; height: 66vw; max-height: 420px; }
  .hero__media::after { background: linear-gradient(0deg, #050b16 0, rgba(5,11,22,0) 40%); }
  .hero__content { margin-top: -12px; }
  .hero h1 { font-size: clamp(28px, 8.4vw, 46px); }
  .hero p { margin: 16px 0 24px; font-size: 18px; }
  .hero p br { display: none; }
  .btn--hero { width: 100%; min-width: 0; max-width: 420px; min-height: 72px; padding: 12px 22px; font-size: 18px; }
  .cta__box { display: block; }
  .cta__media { position: relative; width: auto; aspect-ratio: 514 / 246; }
  .cta__media img { height: auto; }
  .cta__media::after { background: linear-gradient(0deg, #0a1426 0, rgba(10,20,38,0) 35%); }
  .cta__content { width: auto; padding: 8px 20px 24px; }
  .btn--wide { width: 100%; }
  .footer__inner { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .footer__logo { grid-row: 1; }
  .footer__tg { justify-self: center; text-align: left; }
}
@media (max-width: 579px) {
  .grid { grid-template-columns: minmax(0, 1fr); gap: 14px; grid-gap: 14px; max-width: 420px; margin: 0 auto; }
  .card { min-height: 240px; }
  .card__img { width: 48%; }
  .catalog__title::before, .catalog__title::after { display: none; }
  .pager button[data-step] { order: 1; flex: 1; max-width: 160px; }
  .pager::after { content: ""; order: 0; flex-basis: 100%; }
}
@media (max-width: 359px) {
  .logo { font-size: 22px; }
  .card__title { font-size: 18px; }
  .card__body { padding: 20px 10px 12px; }
  .btn--small { padding: 8px 10px; font-size: 14px; }
  .icon--big { display: none; }
  .btn--hero span { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
