/* =============================================================================
   BBT Books — общие стили
   Брейкпоинты повторяют исходный сайт: 1200 / 980 / 960 / 640 / 480
   ========================================================================== */

@font-face {
  font-family: 'InterExtraBold';
  src: url('/assets/fonts/Inter-ExtraBold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --font: 'Inter', Arial, sans-serif;
  --bg: #000;
  --text: #e3e8ed;
  --muted: #9aa0a8;
  --line: #343a41;
  --accent: #0096ff;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg);
}

.page {
  display: block;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  background-color: var(--bg);
}

:where(.page) a {
  color: var(--accent);
  text-decoration: none;
}

:where(.page) a,
:where(.page) button {
  outline: none;
}

:where(.page) a:focus-visible,
:where(.page) button:focus-visible,
:where(.page) summary:focus-visible {
  outline: auto #2015ff;
  outline-offset: 4px;
}

:where(.page) ul,
:where(.page) ol {
  margin-top: 0;
  margin-bottom: 10px;
}

:where(.page) b,
:where(.page) strong {
  font-weight: 700;
}

/* якоря: шапка фиксированная, оставляем отступ как в оригинале */
[id] {
  scroll-margin-top: 60px;
}

@media screen and (max-width: 980px) {
  .only-desktop {
    display: none !important;
  }
}

@media screen and (min-width: 981px) {
  .only-mobile {
    display: none !important;
  }
}

/* =============================================================================
   Zero-блоки: абсолютное позиционирование элементов внутри секции.
   Координаты каждого элемента — в assets/css/pages/<page>.css
   ========================================================================== */

.zb {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  -webkit-text-size-adjust: 100%;
}

.zb__carrier,
.zb__filter {
  position: absolute;
  inset: 0;
}

.zb__carrier {
  z-index: 0;
}

.zb__filter {
  z-index: 1;
}

.el {
  position: absolute;
  box-sizing: border-box;
  display: table;
}

.at {
  display: table-cell;
  vertical-align: middle;
  width: 100%;
}

.at ul,
.at ol {
  margin-bottom: 0;
}

a.at {
  text-decoration: none;
}

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

.el.btn {
  display: block;
}

.btn > .at {
  position: relative;
  display: flex;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.btn .bc {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.btn .bt {
  flex: 1 1 0;
  text-overflow: ellipsis;
}

.btn .bi {
  position: relative;
  flex: 0 0 auto;
}

.btn .bi::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--icon, none) center / contain no-repeat;
}

.btn .bb {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  pointer-events: none;
}

/* =============================================================================
   Мобильное меню (бургер + выезжающая панель), видно на ширине ≤ 980px
   ========================================================================== */

.burger {
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 99998;
}

.burger__btn {
  position: relative;
  display: block;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.burger__btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 100px;
  background-color: #111;
  opacity: .5;
}

.burger__btn span {
  position: absolute;
  left: 13px;
  width: 22px;
  height: 2px;
  background-color: #fff;
  transition: transform .25s ease-in-out;
}

.burger__btn span:nth-child(1) { top: 17px; }
.burger__btn span:nth-child(2),
.burger__btn span:nth-child(3) { top: 23px; }
.burger__btn span:nth-child(4) { top: 29px; }

@media (hover: hover) {
  .burger__btn:hover span:nth-child(1) { transform: translateY(1px); }
  .burger__btn:hover span:nth-child(4) { transform: translateY(-1px); }
}

.mnav__overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background-color: rgba(0, 0, 0, .6);
  opacity: 0;
  transition: opacity .3s ease-in-out;
}

.mnav__overlay.is-open {
  opacity: 1;
}

.mnav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 999999;
  width: 100%;
  max-width: 260px;
  overflow-y: auto;
  background-color: #111;
  transform: translateX(100%);
  transition: transform .3s ease-in-out;
  visibility: hidden;
}

.mnav.is-open {
  transform: none;
  visibility: visible;
}

.mnav__close {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 1;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background-color: #111;
  color: var(--muted);
  cursor: pointer;
}

.mnav__close span {
  position: absolute;
  top: 19px;
  left: 8px;
  width: 24px;
  height: 2px;
  background-color: currentColor;
}

.mnav__close span:nth-child(1),
.mnav__close span:nth-child(4) { width: 0; left: 20px; }
.mnav__close span:nth-child(2) { transform: rotate(45deg); }
.mnav__close span:nth-child(3) { transform: rotate(-45deg); }

.mnav__inner {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 48px 40px 38px;
}

.mnav__logo {
  display: block;
  margin-bottom: 25px;
}

.mnav__logo img {
  display: block;
  width: 100%;
  max-width: 40px;
  height: auto;
}

.mnav__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mnav__list li {
  display: block;
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
}

.mnav__list a {
  display: inline-block;
  margin-bottom: 15px;
  color: var(--muted);
  transition: color .3s ease-in-out, opacity .3s ease-in-out;
}

.mnav__list li:last-child a {
  margin-bottom: 0;
}

.mnav__social {
  display: flex;
  gap: 4px;
  margin-top: auto;
  padding-top: 24px;
}

.mnav__social a,
.mnav__social svg {
  display: block;
  width: 30px;
  height: 30px;
}

html.menu-open,
html.menu-open body {
  overflow: hidden;
}

/* =============================================================================
   Карусель карточек
   ========================================================================== */

.cards {
  padding-bottom: 60px;
}

.cards__head {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  max-width: 1160px;
  margin: 0 auto 50px;
}

.cards__ctrl {
  box-sizing: border-box;
  width: 50px;
  height: 50px;
  padding: 0;
  border: 2px solid var(--muted);
  border-radius: 32px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: border-color .2s ease-in-out, color .2s ease-in-out;
}

.cards__ctrl svg {
  display: block;
  width: 100%;
  height: 100%;
}

.cards__ctrl--next {
  transform: rotate(.5turn);
}

.cards__ctrl:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.cards__track {
  --gap: 40px;
  --container: min(calc(100% - 40px), 1160px);
  --pad: calc((100% - var(--container)) / 2);
  position: relative;
  box-sizing: border-box;
  display: flex;
  align-items: stretch;
  gap: var(--gap);
  width: 100%;
  padding: 0 var(--pad);
  overflow: auto hidden;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--pad);
  scrollbar-width: none;
  cursor: grab;
}

.cards__track::-webkit-scrollbar {
  display: none;
}

.cards__track.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.cards__track.is-dragging .card {
  pointer-events: none;
}

.card {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  width: 400px;
  min-height: calc(400px * 16 / 9);
  overflow: hidden;
  border-radius: 32px;
  background-color: #000;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.card__bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.card__body {
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  width: 100%;
  padding: 40px 30px;
}

.card__title {
  margin: 0;
  padding-bottom: 14px;
  font-family: var(--font);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}

.card__descr {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--muted);
}

@media screen and (max-width: 1200px) {
  .cards__head { max-width: 920px; }
  .cards__track { --container: min(calc(100% - 40px), 940px); }
}

@media screen and (max-width: 960px) {
  /* в оригинале здесь невидимая подсказка свайпа высотой 52px */
  .cards__head { display: block; height: 52px; margin: 0; }
  .cards__ctrl { display: none; }
  .cards__track { --container: min(calc(100% - 40px), 600px); }
  .card { max-width: 295px; }
}

@media screen and (max-width: 640px) {
  .card__descr { line-height: 1.45; }
}

@media screen and (max-width: 480px) {
  .cards__track { --gap: 10px; }
  .card {
    width: 280px;
    max-width: 100%;
    min-height: calc(280px * 16 / 9);
  }
  .card__body { padding: 30px 20px; }
  .card__title { font-size: 18px; }
  .card__descr { font-size: 14px; }
}

/* =============================================================================
   Преимущества: три колонки «иконка + текст»
   ========================================================================== */

.perks {
  padding: 60px 0 90px;
}

.perks__list {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.perks__item {
  width: 360px;
  margin: 0 20px;
}

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

.perks__text {
  margin: 24px 0 0; /* 20px + 4px зазора под строчной иконкой в оригинале */
  font-family: var(--font);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--muted);
}

@media screen and (max-width: 1200px) {
  .perks__list { max-width: 960px; }
  .perks__item { width: 300px; margin: 0 10px; }
}

@media screen and (max-width: 960px) {
  .perks__list { display: block; max-width: 640px; }
  .perks__item { width: auto; margin: 40px 0 0; padding: 0 20px; }
  .perks__item:first-child { margin-top: 0; }
}

@media screen and (max-width: 640px) {
  .perks__text { line-height: 1.45; }
}

@media screen and (max-width: 480px) {
  .perks { padding-top: 30px; }
  .perks__text { font-size: 16px; }
}

/* =============================================================================
   FAQ
   ========================================================================== */

.faq {
  padding: 60px 0;
}

.faq__title {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px 50px;
  font-family: 'InterExtraBold', Arial, sans-serif;
  font-size: 50px;
  font-weight: 700;
  line-height: 1.23;
  text-align: center;
  color: var(--muted);
  overflow-wrap: break-word;
}

.faq__list {
  max-width: 960px;
  margin: 0 auto;
}

.faq__item {
  border-top: 1px solid var(--line);
}

.faq__item:last-child {
  border-bottom: 1px solid var(--line);
}

.faq__item summary {
  position: relative;
  display: block;
  padding: 27px 50px 27px 0;
  list-style: none;
  cursor: pointer;
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__q {
  display: inline-block;
  font-family: var(--font);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text);
}

.faq__icon {
  position: absolute;
  top: 50%;
  right: 0;
  width: 40px;
  height: 40px;
  fill: transparent;
  stroke: var(--muted);
  transform: translateY(-50%);
  transition: stroke .2s ease-in-out;
}

.faq__lines {
  transform-origin: center;
  transition: transform .3s ease-in-out;
}

.faq__item[open] .faq__lines {
  transform: rotate(-45deg);
}

@media (hover: hover) {
  .faq__item summary:hover .faq__icon { stroke: var(--accent); }
}

.faq__item summary:focus-visible .faq__icon {
  stroke: var(--accent);
}

.faq__a {
  padding-bottom: 40px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--muted);
}

@media screen and (max-width: 1200px) {
  .faq__list { max-width: 780px; }
}

@media screen and (max-width: 960px) {
  .faq__list { max-width: 640px; padding: 0 20px; box-sizing: border-box; }
}

@media screen and (max-width: 900px) {
  .faq__title { font-size: 36px; }
}

@media screen and (max-width: 650px) {
  .faq__item summary { padding-top: 15px; padding-bottom: 14px; }
  .faq__a { padding-bottom: 25px; }
}

@media screen and (max-width: 640px) {
  .faq__a { line-height: 1.45; }
}

@media screen and (max-width: 480px) {
  .faq__q { font-size: 18px; }
}

/* =============================================================================
   Cookie-баннер
   ========================================================================== */

.cookie {
  position: fixed;
  right: 34px;
  bottom: 34px;
  z-index: 100001;
  box-sizing: border-box;
  font-family: var(--font);
  color: #000;
}

.cookie[hidden],
.cookie [hidden] {
  display: none !important;
}

.cookie__banner,
.cookie__settings {
  box-sizing: border-box;
  max-height: calc(100vh - 68px);
  overflow: hidden;
  border-radius: 24px;
  background-color: #fff;
  box-shadow: 0 0 15px rgba(0, 0, 0, .1);
}

.cookie__banner {
  max-width: 600px;
  padding: 17px 24px 20px 19px;
}

.cookie__title {
  margin-bottom: 5px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
}

.cookie__text {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
}

.cookie__buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-top: 20px;
}

.cookie__buttons-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cookie__btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 35px;
  padding: 0 15px;
  border: 0;
  border-radius: 20px;
  background: transparent;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  color: #000;
  cursor: pointer;
  transition: background-color .2s ease-in-out, color .2s ease-in-out, border-color .2s ease-in-out;
}

.cookie__btn--accept {
  background-color: #000;
  color: #fff;
}

.cookie__btn--reject {
  border: 1px solid #000;
}

.cookie__btn--link {
  margin-left: 30px;
  border-radius: 0;
}

.cookie__settings {
  display: flex;
  flex-direction: column;
  width: 400px;
  max-width: 100%;
}

.cookie__back {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 17px 21px;
  border: 0;
  background: #fff;
  box-shadow: 0 4px 5px rgba(0, 0, 0, .04);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.35;
  text-align: left;
  color: rgba(0, 0, 0, .5);
  cursor: pointer;
}

.cookie__settings-body {
  flex-shrink: 1;
  padding: 0 20px;
  overflow: auto;
}

.cookie__settings-title {
  margin: 29px 0 16px;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.35;
}

.cookie__settings-text {
  margin-bottom: 30px;
  font-size: 16px;
  line-height: 1.55;
}

.cookie__cats {
  display: grid;
  grid-template-columns: 1fr auto;
  margin-bottom: 31px;
  border-top: 1px solid rgba(157, 153, 153, .4);
}

.cookie__cat,
.cookie__toggle {
  padding: 14px 0 16px;
  border-bottom: 1px solid rgba(157, 153, 153, .4);
}

.cookie__cat summary {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 16px;
  line-height: 1.35;
  list-style: none;
  cursor: pointer;
}

.cookie__cat summary::-webkit-details-marker {
  display: none;
}

.cookie__plus {
  position: relative;
  flex-shrink: 0;
  width: 11px;
  height: 11px;
}

.cookie__plus::before,
.cookie__plus::after {
  content: '';
  position: absolute;
  background-color: #000;
  transition: transform .3s ease, opacity .3s ease;
}

.cookie__plus::before { left: 5px; width: 1px; height: 100%; }
.cookie__plus::after { top: 5px; width: 100%; height: 1px; }
.cookie__cat[open] .cookie__plus::before { transform: rotate(90deg); }
.cookie__cat[open] .cookie__plus::after { transform: rotate(180deg); opacity: 0; }

.cookie__cat-body {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(0, 0, 0, .6);
}

.cookie__toggle {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding-left: 14px;
}

.cookie__always {
  font-size: 11px;
  line-height: 1.4;
  color: #1f5bff;
}

.cookie__switch {
  position: relative;
  display: block;
  width: 48px;
  height: 24px;
  overflow: hidden;
  border-radius: 100px;
  cursor: pointer;
}

.cookie__switch input {
  position: absolute;
  opacity: 0;
}

.cookie__switch span {
  position: absolute;
  inset: 0;
  background-color: #c6c5c5;
  transition: background-color .3s ease;
}

.cookie__switch span::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #f1f1f1;
  box-shadow: 0 0 2px rgba(0, 0, 0, .12), 0 2px 2px rgba(0, 0, 0, .24);
  transition: transform .3s ease;
}

.cookie__switch input:checked + span {
  background-color: rgba(31, 91, 255, .3);
}

.cookie__switch input:checked + span::after {
  background-color: #1f5bff;
  transform: translateX(24px);
}

.cookie__switch input:focus-visible + span {
  outline: auto #2015ff;
}

.cookie__settings-footer {
  padding: 16px 21px;
  background: #fff;
  box-shadow: 0 -4px 5px rgba(0, 0, 0, .04);
}

@media screen and (max-width: 1200px) {
  .cookie__title { font-size: 14px; }
  .cookie__text { font-size: 12px; }
  .cookie__banner { overflow-y: auto; }
}

@media screen and (max-width: 640px) {
  .cookie {
    right: 0;
    bottom: 0;
    left: 0;
  }
  .cookie__banner { max-width: none; max-height: calc(100vh - 20px); }
  .cookie__settings { width: auto; height: 100vh; max-height: calc(100vh - 20px); }
  .cookie__title { font-size: 12px; }
}

@media screen and (max-width: 480px) {
  .cookie__buttons-wrap { display: block; width: 100%; }
  .cookie__btn { width: 100%; height: 40px; }
  .cookie__btn + .cookie__btn,
  .cookie__btn--link { margin: 10px 0 0; }
}

/* =============================================================================
   Страницы-документы (/legal/*, /contacts): заголовок + текстовая колонка.
   Колонка сдвинута на одну колонку сетки, как в исходной вёрстке.
   ========================================================================== */

.doc {
  --w: 960px;
  box-sizing: border-box;
  width: min(var(--w), 100%);
  margin: 0 0 0 calc(50% - 600px + 120px);
}

.doc--6 { --w: 560px; }
.doc--8 { --w: 760px; }
.doc--10 { --w: 960px; }

.doc-head {
  padding: 135px 0 30px;
}

.doc-head__title {
  font-family: var(--font);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.17;
  color: var(--text);
}

.doc-body {
  padding: 8px 0 96px;
}

.doc-body__text {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--muted);
}

@media screen and (max-width: 1200px) {
  .doc { margin-left: calc(50% - 480px + 90px); }
  .doc--6 { --w: 460px; }
  .doc--8 { --w: 620px; }
  .doc--10 { --w: 780px; }
}

@media screen and (max-width: 960px) {
  .doc {
    width: min(600px, 100% - 40px);
    margin-left: calc(max(50% - 320px, 0px) + 20px);
  }
}

@media screen and (max-width: 900px) {
  .doc-head__title { font-size: 24px; }
}

@media screen and (max-width: 640px) {
  .doc-body__text { line-height: 1.45; }
}

@media screen and (max-width: 480px) {
  .doc-head { padding-top: 90px; }
}
