/* ==========================================================================
   «Поколение» А.Сарк — оформление сайта
   Тёмная, тихая типографика: почти чёрный фон, тонкие линии, крупный
   антиквенный заголовочный шрифт и один акцент — окисленная кровь.
   ========================================================================== */

/* ------------------------------------------------------------------ шрифты */
@font-face {
  font-family: 'Cormorant';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/assets/fonts/cormorant-300-normal-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Cormorant';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/assets/fonts/cormorant-300-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cormorant';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/cormorant-400-normal-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Cormorant';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/cormorant-400-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cormorant';
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url('/assets/fonts/cormorant-500-normal-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Cormorant';
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url('/assets/fonts/cormorant-500-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cormorant';
  font-style: italic;
  font-weight: 300 400;
  font-display: swap;
  src: url('/assets/fonts/cormorant-300-italic-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Cormorant';
  font-style: italic;
  font-weight: 300 400;
  font-display: swap;
  src: url('/assets/fonts/cormorant-300-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ------------------------------------------------------------- переменные */
:root {
  --ink: #08080a;
  --ink-2: #0d0d11;
  --ink-3: #13131a;
  --line: rgba(233, 226, 217, 0.12);
  --line-soft: rgba(233, 226, 217, 0.07);
  --paper: #ece7e0;
  --paper-dim: #a9a49d;
  --paper-faint: #767169;
  --blood: #8e2331;
  --blood-bright: #b8323f;
  --ash: #c9c4bc;

  --serif: 'Cormorant', 'Times New Roman', Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;

  --gutter: clamp(20px, 5vw, 68px);
  --measure: 68ch;
  --radius: 2px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------------------------------------------------------------- сброс */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: 0.005em;
  overflow-x: hidden;
}
body::before {
  /* очень слабая зернистость: убирает «пластиковость» плоского чёрного */
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { max-width: 100%; height: auto; display: block; }

/* Картинки нельзя скачать через меню браузера. Изображения прозрачны для мыши,
   поэтому правый клик по ним попадает в родителя (ссылку, карточку, кнопку),
   и браузер не предлагает «Сохранить картинку как…», «Найти похожие» и
   «Распознать текст». Перетаскивание, выделение и меню по долгому нажатию на
   телефоне тоже выключены. Подменю «открыть в новой вкладке» у ссылок, внутри
   которых лежит картинка, при этом сохраняется. */
img {
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p { margin: 0 0 1.1em; }
button { font: inherit; color: inherit; }
::selection { background: var(--blood); color: #fff; }

/* появление секций: класс js-reveal ставит скрипт, --in снимает анимацию.
   Если скрипт не выполнится, через 2.2 с браузер сам покажет содержимое. */
.js-reveal { opacity: 0; transform: translateY(14px); }
.js-reveal.is-in { opacity: 1; transform: none; transition: opacity 0.75s var(--ease), transform 0.75s var(--ease); }
html.reveal-ready .js-reveal { animation: reveal-failsafe 0.6s var(--ease) 2.2s forwards; }
@keyframes reveal-failsafe { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .js-reveal { opacity: 1; transform: none; }
  html.reveal-ready .js-reveal { animation: none; }
}
html.anim-off .js-reveal { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--blood); color: #fff; padding: 10px 16px;
}
.skip:focus { left: 12px; top: 12px; }

:focus-visible { outline: 1px solid var(--blood-bright); outline-offset: 3px; }

/* ------------------------------------------------------------- типографика */
.display,
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: 0.005em;
}
.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--paper-faint);
  margin: 0 0 20px;
}
.eyebrow--blood { color: var(--blood-bright); }
.lead {
  font-family: var(--serif);
  font-size: clamp(19px, 2.1vw, 25px);
  line-height: 1.5;
  color: var(--ash);
}
.muted { color: var(--paper-dim); }
.small { font-size: 14px; }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------------------------------------------------------------- кнопки */
.btn {
  --btn-fg: var(--paper);
  --btn-bd: rgba(236, 231, 224, 0.34);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 30px;
  border: 1px solid var(--btn-bd);
  border-radius: 100px;
  background: transparent;
  color: var(--btn-fg);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
}
.btn:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.btn--blood { --btn-fg: #fff; background: var(--blood); border-color: var(--blood); min-width: 168px; }
.btn--blood:hover { background: var(--blood-bright); border-color: var(--blood-bright); color: #fff; }
.btn--outline { --btn-bd: rgba(236, 231, 224, 0.55); background: transparent; min-width: 168px; }
.btn--outline:hover { background: transparent; border-color: var(--paper); color: #fff; }
.btn--ghost { --btn-bd: transparent; padding: 14px 4px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.btn--ghost:hover { background: transparent; color: #fff; border-bottom-color: var(--paper); }
.btn--small { padding: 10px 20px; font-size: 11px; letter-spacing: 0.18em; }
.btn--full { width: 100%; }

.link-underline {
  border-bottom: 1px solid var(--line);
  padding-bottom: 3px;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.link-underline:hover { border-color: var(--paper); color: #fff; }

/* ------------------------------------------------------------- служебное */
.wrap { width: min(1240px, 100% - var(--gutter) * 2); margin-inline: auto; }
.wrap--narrow { width: min(820px, 100% - var(--gutter) * 2); margin-inline: auto; }
.section { padding: clamp(64px, 9vw, 132px) 0; position: relative; }
.section--tight { padding: clamp(44px, 6vw, 80px) 0; }
.section + .section { border-top: 1px solid var(--line-soft); }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: clamp(28px, 4vw, 56px); }
.section__head h2 { font-size: clamp(28px, 4.4vw, 52px); }
.section__note { color: var(--paper-faint); font-size: 13px; letter-spacing: 0.04em; }

/* --------------------------------------------------------------- верхняя панель */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.topbar::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(6, 6, 8, 0.72), rgba(6, 6, 8, 0));
  opacity: 1;
  transition: opacity 0.5s var(--ease);
  pointer-events: none;
  z-index: -1;
}
.page-home .topbar.is-stuck::before { opacity: 0; }
.topbar.is-stuck {
  background: rgba(8, 8, 10, 0.96);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line-soft);
}
.topbar__inner {
  position: relative;
  z-index: 1;
  width: min(1400px, 100% - var(--gutter) * 2);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 74px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand__mark { color: var(--blood-bright); display: inline-flex; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__text b { font-family: var(--serif); font-size: 19px; font-weight: 500; letter-spacing: 0.06em; }
.brand__text i { font-style: normal; font-size: 9.5px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--paper-faint); }

.nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 34px); }
.nav a {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ash);
  position: relative;
  padding: 6px 0;
  transition: color 0.3s var(--ease);
}
.nav a::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--blood-bright);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.nav a:hover { color: var(--paper); }
.nav a:hover::after { transform: scaleX(1); }
/* активный раздел: подсвечен, пока страница на нём */
.nav a.is-active { color: #fff; }
.nav a.is-active::after { transform: scaleX(1); }

.burger { display: none; background: none; border: 0; width: 40px; height: 40px; position: relative; cursor: pointer; }
.burger span { position: absolute; left: 9px; right: 9px; height: 1px; background: var(--paper); transition: transform 0.35s var(--ease), opacity 0.3s; }
.burger span:first-child { top: 16px; }
.burger span:last-child { top: 23px; }
.burger[aria-expanded='true'] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.burger[aria-expanded='true'] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ==========================================================================
   Главная страница повторяет порядок блоков прежнего сайта:
   кадр с книгами → заголовок с тизером → строка частей → «О цикле» →
   цитаты → новости → магазины. Фоны — те же кадры, что были на asark.ru.
   ========================================================================== */

/* --------------------------------------------------- кадр с веером книг */
.cover {
  position: relative;
  height: clamp(260px, 50vh, 470px);
  overflow: hidden;
  background: #000;
}
.cover__bg { position: absolute; inset: 0; }
.cover__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 42%;
  filter: saturate(1.02) contrast(1.04) brightness(0.94);
}
.cover::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(8, 8, 10, 0.5), rgba(8, 8, 10, 0) 24%, rgba(8, 8, 10, 0) 55%, var(--ink) 100%);
  pointer-events: none;
}

/* --------------------------------------- заголовок и тизер */
.hero {
  position: relative;
  padding: clamp(46px, 7vw, 92px) 0 clamp(40px, 6vw, 80px);
  overflow: hidden;
  isolation: isolate;
}
/* Кадр с героями — фоном под текстом (прежний вариант): текст читается
   за счёт затемнения, а сам кадр крупно и без затемнения показан внизу
   страницы, в полосе .heroesband. */
.hero__bg { position: absolute; inset: 0; z-index: -2; }
.hero__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
  filter: grayscale(0.3) brightness(0.42) contrast(1.05);
}
.hero::after {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 85% at 50% 0%, rgba(117, 30, 43, 0.5), rgba(8, 8, 10, 0) 62%),
    linear-gradient(to bottom, rgba(8, 8, 10, 0.82), rgba(8, 8, 10, 0.6) 42%, var(--ink) 100%);
}
.hero__inner { text-align: center; }
.hero__kicker {
  font-size: 10.5px; letter-spacing: 0.36em; text-transform: uppercase;
  color: #cdc6bc; margin: 0 0 22px;
}
.hero h1 {
  font-size: clamp(38px, min(6.4vw, 9.4vh), 82px);
  line-height: 1.02;
  margin: 0 auto 20px;
  max-width: 22ch;
}
.hero h1 em { font-style: italic; color: #e3ddd4; }
.hero__tagline {
  font-family: var(--serif);
  font-size: clamp(17px, min(1.9vw, 3vh), 24px);
  line-height: 1.44;
  color: var(--paper);
  max-width: 40ch;
  margin: 0 auto 12px;
}
.hero__sub {
  font-size: clamp(14px, 1.1vw, 16px);
  line-height: 1.62;
  color: var(--ash);
  max-width: 62ch;
  margin: 0 auto 30px;
}
.hero__actions {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 14px;
  margin-bottom: clamp(34px, 5vw, 58px);
}

/* ---------------------------------------------------------------- тизер */
/* Кадр квадратный (1080×1080), поэтому держим его компактной карточкой      */
/* по центру героя, а не во всю ширину колонки текста.                      */
.trailer { margin: 0; width: min(560px, 100%); margin-inline: auto; }
.trailer__video {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #000;
  border: 1px solid var(--line-soft);
  box-shadow: 0 40px 90px -50px rgba(0, 0, 0, 0.95);
}
.trailer__caption {
  margin-top: 14px;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--paper-faint);
}

/* -------------------------------------------- строка частей и «Герои» */
.partbar {
  position: sticky;
  top: 74px;
  z-index: 40;
  background: rgba(8, 8, 10, 0.92);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.partbar__scroll {
  display: flex;
  justify-content: center;
  gap: clamp(10px, 1.4vw, 24px);
  overflow-x: auto;
  padding: 15px var(--gutter);
  scrollbar-width: none;
}
.partbar__scroll::-webkit-scrollbar { display: none; }
.partbar a {
  position: relative;
  font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--paper-faint);
  white-space: nowrap;
  padding: 2px 0;
  transition: color 0.3s var(--ease);
}
.partbar a::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: var(--blood-bright);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.partbar a:hover { color: var(--paper); }
.partbar a:hover::after { transform: scaleX(1); }
/* на странице части её номер подсвечен */
.partbar a.is-active { color: var(--paper); }
.partbar a.is-active::after { transform: scaleX(1); }
.partbar__heroes { color: var(--blood-bright) !important; }

/* -------------------------------------------------------------- о цикле */
.about {
  position: relative;
  padding: clamp(56px, 8vw, 116px) 0 clamp(56px, 8vw, 110px);
  overflow: hidden;
  background: #000;
}
.about__bg { position: absolute; inset: 0; }
.about__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center right;
  opacity: 0.5;
  filter: contrast(1.05);
}
.about::after {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 50% 50%, rgba(142, 35, 49, 0.22), rgba(0, 0, 0, 0.86) 72%),
    linear-gradient(to bottom, rgba(8, 8, 10, 0.9), rgba(8, 8, 10, 0.55) 30%, rgba(8, 8, 10, 0.92));
  pointer-events: none;
}
.about__inner { position: relative; z-index: 1; }
.about__body { max-width: 78ch; margin-inline: auto; }
.about__body p {
  color: #cbc6be;
  font-size: 16.5px;
  line-height: 1.82;
  margin-bottom: 1.1em;
  /* ровный правый край: выключка по обоим краям с переносами, иначе между
     словами появляются широкие пробелы */
  text-align: justify;
  -webkit-hyphens: auto;
  hyphens: auto;
}
.about__body p:first-child {
  font-family: var(--serif);
  font-size: clamp(19px, 2.1vw, 25px);
  line-height: 1.5;
  color: #f2eee7;
  margin-bottom: 1.25em;
  /* вводная фраза стоит по центру, как заголовок */
  text-align: center;
}
/* «во Вселенную Сарк» — отдельной строкой по центру */
.about__accent { display: block; text-align: center; }

/* -------------------------------------------------------------- цитаты */
.quotes { padding: clamp(46px, 6vw, 88px) 0; background: var(--ink); }
.quotes__row { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(20px, 3.4vw, 46px); }
.quotecard {
  position: relative;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(236, 231, 224, 0.045), rgba(236, 231, 224, 0.012));
  border: 1px solid var(--line-soft);
  padding: clamp(28px, 3.4vw, 48px) clamp(24px, 3vw, 44px) clamp(24px, 3vw, 38px);
  overflow: hidden;
}
/* красная линия слева — тот же акцент, что и в остальных блоках */
.quotecard::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--blood-bright), rgba(142, 35, 49, 0.12));
}
.quotecard::after {
  content: '';
  position: absolute;
  right: -60px; top: -60px;
  width: 200px; height: 200px;
  background: radial-gradient(closest-side, rgba(142, 35, 49, 0.2), transparent 72%);
  pointer-events: none;
}
.quotecard__text {
  position: relative;
  font-family: var(--serif);
  font-size: clamp(19px, 2vw, 26px);
  font-style: italic;
  line-height: 1.44;
  color: #f0ece5;
  margin-bottom: clamp(22px, 3vw, 34px);
  max-width: 34ch;
}
/* автор прижат к низу карточки: у обеих цитат фото и подписи стоят на одной
   высоте, даже если тексты разной длины */
.quotecard__author { position: relative; display: flex; align-items: center; gap: 16px; margin-top: auto; }
.quotecard__photo {
  flex: 0 0 auto;
  width: 64px; height: 64px;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(0.25) brightness(1.02);
  box-shadow: 0 0 0 1px var(--line), 0 14px 30px -14px rgba(0, 0, 0, 0.9);
}
.quotecard__who { display: block; }
.quotecard__who b {
  display: block;
  font-weight: 400;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.2;
  color: var(--paper);
}
.quotecard__who i {
  display: block; margin-top: 6px;
  font-style: normal;
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--paper-faint);
}

/* -------------------------------------------------------------- новости */
.news { padding: clamp(50px, 7vw, 104px) 0; background: var(--ink); }
.section-title {
  font-family: var(--serif);
  font-size: clamp(26px, 3.2vw, 40px);
  text-align: center;
  margin: 0 0 clamp(30px, 4vw, 54px);
}
.news__carousel { position: relative; }
.news__viewport {
  position: relative;
  width: min(960px, 100%);
  margin-inline: auto;
  min-height: clamp(320px, 42vw, 460px);
}
.newscard {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  background: #0d0d11;
  border: 1px solid var(--line-soft);
  opacity: 0;
  visibility: hidden;
  transform: translateX(18px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), visibility 0.5s;
}
.newscard.is-active { opacity: 1; visibility: visible; transform: none; }
.newscard__media { position: relative; background: #000; min-height: 240px; }
.newscard__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.newscard__text {
  padding: clamp(26px, 3.4vw, 52px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}
.newscard__date { font-size: 12px; letter-spacing: 0.16em; color: var(--paper-faint); font-variant-numeric: tabular-nums; }
.newscard__title { font-family: var(--serif); font-size: clamp(18px, 1.9vw, 25px); line-height: 1.34; }
.newscard__link {
  align-self: flex-start;
  margin-top: 8px;
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--blood-bright);
  border-bottom: 1px solid rgba(184, 50, 63, 0.4);
  padding-bottom: 3px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.newscard__link:hover { color: #fff; border-color: #fff; }
.news__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(8, 8, 10, 0.6);
  color: var(--paper-dim);
  display: grid; place-items: center;
  cursor: pointer;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.news__arrow:hover { background: var(--blood); border-color: var(--blood); color: #fff; }
.news__arrow--prev { left: -8px; }
.news__arrow--next { right: -8px; }
.news__dots { display: flex; justify-content: center; gap: 9px; margin-top: 26px; }
.news__dot {
  width: 7px; height: 7px; padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.news__dot.is-active { background: var(--blood-bright); border-color: var(--blood-bright); }

/* ------------------------------------------------------------ магазины */
.storeblock { position: relative; overflow: hidden; background: #000; }
.storeblock__bg { position: absolute; inset: 0; }
.storeblock__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.42;
  filter: contrast(1.05);
}
.storeblock::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(8, 8, 10, 0.86), rgba(8, 8, 10, 0.6) 40%, rgba(8, 8, 10, 0.9));
  pointer-events: none;
}
.storeblock__inner { position: relative; z-index: 1; padding: clamp(52px, 7vw, 96px) 0; }
.storeblock + .storeblock { border-top: 1px solid var(--line-soft); }
.storeblock__items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(14px, 2vw, 26px);
}
.storeitem {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: clamp(130px, 15vw, 190px);
  padding: 22px 16px 18px;
  background: rgba(8, 8, 10, 0.42);
  border: 1px solid var(--line-soft);
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease), transform 0.4s var(--ease);
}
.storeitem__logo { display: grid; place-items: center; height: 40px; }
.storeitem__logo img { max-height: 30px; width: auto; filter: grayscale(1) brightness(2.4); opacity: 0.9; transition: filter 0.4s var(--ease), opacity 0.4s var(--ease); }
.storeitem__label {
  font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--paper-dim);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 7px 18px;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.storeitem:hover { background: rgba(236, 231, 224, 0.06); border-color: var(--line); transform: translateY(-3px); }
.storeitem:hover .storeitem__logo img { filter: grayscale(0) brightness(1); opacity: 1; }
.storeitem:hover .storeitem__label { background: var(--paper); border-color: var(--paper); color: var(--ink); }

/* ------------------------ герои цикла внизу главной: кадр во всю ширину */
/* Тот же снимок, что и в шапке, но здесь поверх него нет текста, поэтому
   кадр отдаётся ярким и целиком: высота не задаётся, картинка показывается
   в своих пропорциях, ничего не обрезается. */
.heroesband { position: relative; background: var(--ink); margin-top: clamp(40px, 6vw, 80px); }
.heroesband img {
  display: block;
  width: 100%;
  height: auto;
  /* на очень широких экранах кадр иначе стал бы выше самого экрана:
     тогда ограничиваем высоту, а картинка вписывается целиком (поля по
     бокам чёрные, их не видно) */
  max-height: 92svh;
  object-fit: contain;
  filter: brightness(1.08) contrast(1.03) saturate(1.06);
}


.page-head { padding: clamp(120px, 18vh, 200px) 0 clamp(30px, 5vw, 60px); border-bottom: 1px solid var(--line-soft); }
.page-head h1 { font-size: clamp(38px, 7vw, 86px); line-height: 1; margin-bottom: 20px; }
.page-head__lead { max-width: 60ch; color: var(--paper-dim); font-size: 17px; }

/* Шапка с картинкой (раздел «Герои»): кадр во всю ширину, текст поверх него
   внизу. Кадр смещён так, чтобы лица героев были в верхней части и надписи
   их не задевали, а низ растворяется в фоне страницы. */
/* Текст стоит на самом кадре: надпись раздела — вверху, над головами,
   а название раздела — внизу, на ногах героев. */
.page-head--image {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: clamp(400px, 46vh, 520px);
  padding: 82px 0 clamp(20px, 3vw, 34px);
  overflow: hidden;
}
.page-head__bg { position: absolute; inset: 0; z-index: 0; }
.page-head__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 36%;
  filter: brightness(0.94) contrast(1.03) saturate(1.02);
}
.page-head--image::after {
  content: '';
  position: absolute; inset: 0; z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to bottom,
      rgba(8, 8, 10, 0.68) 0%,
      rgba(8, 8, 10, 0.12) 26%,
      rgba(8, 8, 10, 0.38) 62%,
      rgba(8, 8, 10, 0.86) 88%,
      var(--ink) 100%),
    linear-gradient(to right, rgba(8, 8, 10, 0.72), rgba(8, 8, 10, 0) 58%);
}
.page-head--image > .wrap {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.page-head--image h1 { margin-bottom: 0; }
.page-head--image h1 { text-shadow: 0 2px 30px rgba(5, 5, 7, 0.92), 0 1px 4px rgba(5, 5, 7, 0.85); }
.page-head--image .eyebrow { text-shadow: 0 1px 12px rgba(5, 5, 7, 0.9); }

.heroes-nav { position: sticky; top: 74px; z-index: 40; background: rgba(8, 8, 10, 0.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-soft); }
.heroes-nav__inner { width: min(1240px, 100% - var(--gutter) * 2); margin-inline: auto; display: flex; gap: clamp(16px, 3vw, 40px); overflow-x: auto; padding: 16px 0; }
.heroes-nav a { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--paper-faint); white-space: nowrap; transition: color 0.3s var(--ease); }
.heroes-nav a:hover { color: var(--paper); }

/* Ровно 4 кружка в ряд (3 и 2 — на узких экранах), см. медиазапросы ниже. */
.cast { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(22px, 3vw, 46px) clamp(16px, 2.4vw, 32px); }
.person { text-align: center; }
.person__photo { position: relative; width: min(232px, 100%); aspect-ratio: 1; margin: 0 auto 18px; }
.person__photo::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid var(--line-soft);
  transition: border-color 0.5s var(--ease);
}
.person__photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; filter: grayscale(0.2) brightness(1.02) contrast(1.03); transition: filter 0.6s var(--ease); }
/* Фото героя с видео — просто кнопка: никаких значков и пометок */
button.person__photo { display: block; padding: 0; border: 0; background: none; cursor: pointer; }
button.person__photo img { display: block; }
/* Оживление фото: при наведении курсора поверх снимка проявляется видео.
   Только там, где есть настоящий курсор — на телефонах остаётся фото. */
.person__live {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s var(--ease);
}
@media (hover: hover) {
  .person__photo.is-live .person__live { opacity: 1; }
}
.person:hover .person__photo img { filter: grayscale(0) brightness(1); }
/* при наведении кружок не меняет размер — только подсвечивается ободок,
   а у героев с видео внутри оживает сама картинка */
.person:hover .person__photo::after { border-color: var(--blood-bright); }
/* Фокус с клавиатуры (и после закрытия ролика по Esc) — ободок по кругу,
   а не квадратная рамка вокруг круглого фото. */
button.person__photo:focus-visible { outline: none; }
button.person__photo:focus-visible::after {
  border-color: var(--blood-bright);
  box-shadow: 0 0 0 3px rgba(184, 50, 63, 0.35);
}
.person__name { font-family: var(--serif); font-size: 22px; line-height: 1.2; margin-bottom: 7px; color: #f2eee8; }
.person__role { font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--paper-faint); margin-bottom: 6px; }
.person__place { font-size: 13px; color: var(--paper-dim); }

/* Кнопка «Досье» у карточки героя: оттиск штампа на бумаге — чуть повёрнут,
   с тонкой рамкой и разрядкой в подписи. На устройствах с мышью появляется
   при наведении на карточку, на телефонах видна сразу. */
.dossierbtn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  margin: 10px auto 0;
  padding: 8px 18px 7px;
  background: rgba(142, 35, 49, 0.12);
  border: 1px solid rgba(184, 50, 63, 0.5);
  color: var(--blood-bright);
  cursor: pointer;
  transform: rotate(-1.6deg);
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease),
              color 0.35s var(--ease), transform 0.35s var(--ease), opacity 0.35s var(--ease);
}
@media (hover: hover) {
  .dossierbtn { opacity: 0; }
  .person:hover .dossierbtn,
  .person:focus-within .dossierbtn,
  .dossierbtn:focus-visible { opacity: 1; }
}
.dossierbtn__word {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  text-transform: uppercase;
  line-height: 1;
}
.dossierbtn__hint {
  font-size: 8.5px;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  text-transform: uppercase;
  color: var(--paper-faint);
}
.dossierbtn:hover {
  background: rgba(142, 35, 49, 0.24);
  border-color: var(--blood-bright);
  color: #fff;
  transform: rotate(0deg) scale(1.04);
}
.dossierbtn:focus-visible { outline: 1px solid var(--blood-bright); outline-offset: 3px; }

/* Окно с личным делом: тёмный фон, лист документа и красный штамп
   «рассекречено» — как на настоящих архивных бумагах. */
.dossier { position: fixed; inset: 0; z-index: 210; display: grid; place-items: center; padding: 3vh 4vw; }
.dossier[hidden] { display: none; }
.dossier__backdrop { position: absolute; inset: 0; background: rgba(4, 4, 6, 0.93); backdrop-filter: blur(7px); }
.dossier__sheet {
  position: relative;
  z-index: 1;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transform: rotate(-0.5deg);
}
.dossier__image {
  display: block;
  width: auto;
  height: auto;
  max-width: min(720px, 92vw);
  max-height: 76vh;
  object-fit: contain;
  border: 1px solid rgba(236, 231, 224, 0.14);
  box-shadow: 0 46px 110px -34px rgba(0, 0, 0, 0.95);
}
.dossier__image[hidden] { display: none; }
.dossier__close {
  position: absolute;
  top: -18px; right: -18px;
  z-index: 2;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: rgba(8, 8, 10, 0.9);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--paper-dim);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.dossier__close:hover { color: #fff; border-color: var(--blood-bright); }
/* Штамп «рассекречено» стоит под документом — так он не перекрывает
   ни строчки самого личного дела. */
.dossier__paper { position: relative; display: block; }
.dossier__stamp {
  align-self: flex-end;
  margin-top: 4px;
  padding: 6px 15px 5px;
  font-family: var(--serif);
  font-size: clamp(11px, 1.15vw, 15px);
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  text-transform: uppercase;
  color: rgba(168, 22, 35, 0.92);
  border: 2px solid rgba(168, 22, 35, 0.6);
  background: rgba(232, 226, 216, 0.07);
  box-shadow: inset 0 0 0 2px rgba(168, 22, 35, 0.2);
  text-shadow: 0 0 10px rgba(168, 22, 35, 0.35);
  transform: rotate(-3.5deg);
  pointer-events: none;
}
.dossier__caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper-faint);
}
.dossier__caption b {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.16em;
  color: var(--paper);
}

/* Заглушка для ещё не рассекреченного дела: тёмная папка с водяными
   полосами и тем же штампом, что и у документов. */
.dossier__stub {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: min(560px, 88vw);
  aspect-ratio: 4 / 5;
  max-height: 76vh;
  padding: clamp(24px, 4vw, 48px);
  text-align: center;
  background:
    repeating-linear-gradient(180deg, rgba(236, 231, 224, 0.026) 0 1px, rgba(236, 231, 224, 0) 1px 7px),
    linear-gradient(180deg, #121218, #0a0a0e);
  border: 1px solid var(--line);
  box-shadow: 0 46px 110px -34px rgba(0, 0, 0, 0.95);
}
.dossier__stub[hidden] { display: none; }
.dossier__stub-mark { font-size: 26px; line-height: 1; color: var(--blood-bright); }
.dossier__stub-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(20px, 2.4vw, 28px);
  letter-spacing: 0.04em;
  color: var(--paper);
}
.dossier__stub-text { margin: 0; max-width: 34ch; font-size: 14px; line-height: 1.6; color: var(--paper-faint); }

@media (max-width: 560px) {
  .dossier__close { top: -14px; right: -8px; width: 34px; height: 34px; }
  .dossier__stamp { font-size: 10.5px; padding: 5px 11px 4px; }
  .dossier__caption { flex-direction: column; gap: 4px; }
}
/* Окно с видео героя: тёмный фон, ролик по центру, подпись под ним */
.videobox { position: fixed; inset: 0; z-index: 220; display: grid; place-items: center; padding: 3vh 4vw; }
.videobox[hidden] { display: none; }
.videobox__backdrop { position: absolute; inset: 0; background: rgba(4, 4, 6, 0.93); backdrop-filter: blur(7px); }
.videobox__frame {
  position: relative;
  z-index: 1;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.videobox__player {
  display: block;
  width: auto;
  height: min(74vh, 640px);
  max-width: 92vw;
  object-fit: contain;
  background: #000;
  border: 1px solid rgba(236, 231, 224, 0.14);
  box-shadow: 0 46px 110px -34px rgba(0, 0, 0, 0.95);
}
.videobox__close {
  position: absolute;
  top: -18px; right: -18px;
  z-index: 2;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: rgba(8, 8, 10, 0.9);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--paper-dim);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.videobox__close:hover { color: #fff; border-color: var(--blood-bright); }
.videobox__caption {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper-faint);
}
@media (max-width: 560px) {
  .videobox__close { top: -14px; right: -8px; width: 34px; height: 34px; }
  .videobox__player { max-height: 70vh; }
}

/* ---------------------------------------------------- страница части цикла */
/* Вся страница части — на чистом чёрном: тогда чёрный фон картины с книгой
   переходит в чёрный под текстом без заметной ступеньки. */
body.page-part { background: #000; }
/* Слева название книги одной строкой и весь текст одним шрифтом, справа —
   картина части. Фон шапки — чистый чёрный, а картина взята в плотной версии
   с прозрачным фоном (deploy/mask-covers.js), поэтому её чёрный переходит в
   чёрный под текстом без стыка и без рамки. */
.part-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(460px, 62svh, 660px);
  padding: clamp(96px, 12vh, 140px) 0 clamp(40px, 5vw, 70px);
  overflow: hidden;
  background: #000;
}
.part-hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  /* правая колонка с книгой шире текстовой — книга показывается крупно */
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(24px, 4vw, 62px);
  align-items: center;
}
.part-hero__art { position: relative; display: grid; place-items: center; }
.part-hero__art img {
  display: block;
  width: 100%;
  max-height: clamp(320px, 60svh, 640px);
  object-fit: contain;
  filter: saturate(1.06) contrast(1.03);
}
/* по умолчанию картина справа; art_side: "left" в parts.json переставляет */
.part-hero__inner--flip .part-hero__art { order: -1; }
.part-hero__text { max-width: 64ch; }
.part-hero__num { font-family: var(--serif); font-size: clamp(14px, 1.4vw, 17px); letter-spacing: 0.34em; text-transform: uppercase; color: var(--blood-bright); margin-bottom: 16px; }
/* название книги — одной строкой: размер подобран так, чтобы самая длинная
   строка («Часть 1: Кто такие Подобные?») укладывалась в колонку целиком */
.part-hero h1 {
  font-size: clamp(20px, 2.1vw, 33px);
  line-height: 1.12;
  margin-bottom: 22px;
}
/* весь текст части — один шрифт, без выделенной вводной фразы */
.part-hero__body p {
  color: var(--paper-dim);
  font-size: 17px;
  line-height: 1.8;
  margin-bottom: 1em;
}
.part-hero__actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: 26px; }

/* Видеоотзыв слева, издания справа (когда видео нет — издания одни). */
/* ---------------------------------------------------------------- плееры */
/* Видео нигде не подсвечивается: браузер иначе обводит плеер рамкой фокуса
   после клика, рисует системную подсветку касания на телефонах и закрашивает
   его синим, если по странице протянуть курсором. */
video,
video:hover,
video:focus,
video:focus-visible,
video:active {
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}
video::-webkit-media-controls-panel { -webkit-tap-highlight-color: transparent; }

.part-lower { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: clamp(30px, 5vw, 80px); align-items: start; }
.part-lower--solo { grid-template-columns: minmax(0, 880px); }
/* видео части: обычно одно, у первой книги два — стоят друг под другом
   одинаковыми блоками */
.part-videos { display: grid; gap: clamp(22px, 3vw, 36px); }
.part-video { margin: 0; }
.part-video__player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--line-soft);
  box-shadow: 0 40px 90px -50px rgba(0, 0, 0, 0.95);
}
/* закольцованное видео с книгой в шапке страницы части */
.part-hero__art--video { display: grid; place-items: center; }
.part-hero__loop {
  display: block;
  width: min(100%, clamp(300px, 58svh, 620px));
  aspect-ratio: 1 / 1;
  margin-inline: auto;
  object-fit: contain;
  background: #000;
}
/* Петля с книгой — украшение: курсор её не задевает, поэтому браузер не
   рисует над ней ни подсветки, ни служебных кнопок. */
.part-hero__loop,
.trailer__video { pointer-events: none; }

.edition { border: 1px solid var(--line-soft); padding: clamp(20px, 2.4vw, 30px); margin-bottom: 20px; background: var(--ink-2); }
.edition__head { display: grid; grid-template-columns: 96px 1fr; gap: 20px; align-items: start; margin-bottom: 18px; }
.edition__head img { width: 96px; aspect-ratio: 1; object-fit: cover; background: #000; border: 1px solid var(--line-soft); }
/* перенос строки в названии издания сохраняем (например, «Часть первая:» и
   «Кто такие Подобные?» — на разных строках) */
.edition__title { font-family: var(--serif); font-size: 22px; line-height: 1.22; white-space: pre-line; }
.edition__sub { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--paper-faint); margin-top: 6px; }
.spec { margin: 0; padding: 0; list-style: none; columns: 2; column-gap: 26px; }
.spec li { font-size: 13.5px; color: var(--paper-dim); padding: 4px 0; break-inside: avoid; }
.spec li b { color: var(--paper); font-weight: 400; }

/* -------------------------------------------------------------- отзывы
   Как на прежнем сайте: белые «облачка» с тёмным текстом, по одному в ряд,
   с постраничной навигацией. */
.reviews { position: relative; padding: clamp(46px, 6vw, 88px) 0; background: var(--ink); }

/* Фон отзывов: кадры с книгами части. Полоса идёт за экраном (sticky),
   поэтому кадр не растягивается на всю высоту длинных отзывов, а спокойно
   стоит на месте; при смене отзыва картинка плавно перетекает в следующую.
   overflow: clip держит полосу внутри секции — ниже строки перехода кадры
   не продолжаются (clip, а не hidden: hidden сломал бы sticky). */
.reviews--with-bg { background: #000; isolation: isolate; overflow: clip; }
.reviews__bg {
  position: sticky;
  top: 0;
  z-index: -1;
  height: 100svh;
  /* полоса не занимает места в потоке — текст отзывов начинается с начала секции */
  margin-bottom: -100svh;
  overflow: hidden;
  pointer-events: none;
}
.reviews__bgimg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 44%;
  opacity: 0;
  transform: scale(1.03);
  filter: brightness(0.56) contrast(1.03) saturate(0.98);
  transition: opacity 1.1s var(--ease);
}
/* Часть 3: кадр — книги, стоящие в луже крови, и их отражение в ней.
   На широком экране показываем верх кадра (книги и кромку лужи), на узком —
   всю картинку целиком, вместе с отражением. Пустых полей не остаётся:
   под ней лежит та же картинка, растянутая на всю полосу и размытая. */
.reviews--bg-contain .reviews__bgimg { object-fit: cover; object-position: center top; }
.reviews--bg-contain .reviews__bgimg--fill {
  object-fit: cover;
  object-position: center;
  filter: blur(64px) brightness(0.62) saturate(1.15);
  transform: scale(1.25);
}
.reviews__bgimg.is-active { opacity: 1; }
/* лёгкое затемнение поверх кадра: сам текст лежит на карточке-стекле */
.reviews__bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(5, 5, 7, 0.5) 0%, rgba(5, 5, 7, 0.22) 22%, rgba(5, 5, 7, 0.22) 78%, rgba(5, 5, 7, 0.5) 100%);
}
/* края секции растворяются в чёрном, чтобы полоса не начиналась обрывом */
.reviews--with-bg::before,
.reviews--with-bg::after {
  content: '';
  position: absolute; left: 0; right: 0; height: clamp(70px, 10vw, 130px);
  pointer-events: none;
}
.reviews--with-bg::before { top: 0; background: linear-gradient(to bottom, #000, rgba(5, 5, 7, 0)); }
.reviews--with-bg::after { bottom: 0; background: linear-gradient(to top, #000, rgba(5, 5, 7, 0)); }
/* карточка отзыва поверх кадра — почти непрозрачное стекло: кадр виден по
   краям и чуть сквозь, но текст остаётся спокойным */
.reviews--with-bg .reviewbubble {
  background: linear-gradient(180deg, rgba(10, 10, 13, 0.94), rgba(8, 8, 10, 0.89));
  backdrop-filter: blur(9px);
}
.reviews--with-bg .reviewbubble.is-active {
  background: linear-gradient(180deg, rgba(10, 10, 13, 0.94), rgba(8, 8, 10, 0.89));
}
.reviews > .wrap { position: relative; z-index: 1; }
.reviewstage { width: min(760px, 100%); margin-inline: auto; }
/* все отзывы лежат в одной ячейке сетки: высоту задаёт самый длинный */
.reviewstage__stack { display: grid; align-items: start; }
.reviewstage__stack > * { grid-area: 1 / 1; }
.reviewbubble {
  display: none;
  position: relative;
  background: linear-gradient(180deg, rgba(236, 231, 224, 0.05), rgba(236, 231, 224, 0.015));
  border: 1px solid var(--line-soft);
  color: var(--paper-dim);
  padding: clamp(28px, 3.4vw, 54px) clamp(26px, 3.4vw, 56px);
  overflow: hidden;
}
.reviewbubble.is-active { display: block; }
/* слева тот же тонкий акцент, что в остальных блоках */
.reviewbubble::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(to bottom, var(--blood-bright), rgba(142, 35, 49, 0.1));
}
.reviewbubble::after {
  content: '';
  position: absolute; right: -80px; bottom: -80px;
  width: 240px; height: 240px;
  background: radial-gradient(closest-side, rgba(142, 35, 49, 0.18), transparent 72%);
  pointer-events: none;
}
.reviewbubble__head {
  position: relative;
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 8px 20px;
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line-soft);
}
.reviewbubble__author {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.25;
  color: var(--paper);
}
.reviewbubble__author a { color: var(--paper); border-bottom: 1px solid var(--line); }
.reviewbubble__author a:hover { color: #fff; border-bottom-color: var(--paper); }
.reviewbubble__stars { margin-left: 12px; font-size: 13px; letter-spacing: 0.16em; color: var(--blood-bright); }
.reviewbubble__source {
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--blood-bright);
}
.reviewbubble__source a { color: var(--blood-bright); border-bottom: 1px solid rgba(184, 50, 63, 0.4); }
.reviewbubble__source a:hover { color: #fff; border-bottom-color: #fff; }
/* основной текст отзыва — обычный, читаемый; курсив только у цитаты */
.reviewbubble__text {
  position: relative;
  font-size: 15.5px;
  line-height: 1.78;
  color: #b6b1a9;
}
.reviewbubble__text p { margin: 0 0 1.05em; }
.reviewbubble__text p:last-child { margin-bottom: 0; }
.reviewbubble__text p.is-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.48;
  color: #efeae3;
  margin-bottom: 1.25em;
}
.reviewnav {
  align-self: end;
  display: flex; align-items: center; justify-content: center;
  gap: 20px;
  margin-top: 28px;
}
.reviewnav__btn {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent; color: var(--paper-dim);
  display: grid; place-items: center; cursor: pointer;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.reviewnav__btn:hover { background: var(--blood); border-color: var(--blood); color: #fff; }
.reviewnav__count { font-size: 12px; letter-spacing: 0.18em; color: var(--paper-faint); font-variant-numeric: tabular-nums; }

/* три ссылки внизу страницы части: предыдущая, «на главную», следующая —
   space-between расставляет их по краям и в середине */
.pager { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line-soft); padding-top: 28px; }
.pager a { display: flex; flex-direction: column; gap: 4px; }
.pager span { font-size: 10.5px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--paper-faint); }
.pager b { font-family: var(--serif); font-size: 22px; font-weight: 400; }
.pager .pager__next { text-align: right; }
/* Строка перехода стоит на фоне кадров с книгами (полоса отзывов тянется
   дальше по странице), поэтому прикрываем её тёмным стеклом: надписи
   читаются, а кадр просвечивает как под затемнённым стеклом. */
.pager-section {
  background: rgba(5, 5, 7, 0.74);
  backdrop-filter: blur(10px) brightness(0.72);
}

/* ------------------------------------------------ стрелка «наверх» слева */
.totop {
  position: fixed;
  left: clamp(10px, 1.6vw, 26px);
  bottom: clamp(16px, 3vh, 30px);
  z-index: 60;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  color: var(--paper-dim);
  background: rgba(8, 8, 10, 0.74);
  border: 1px solid var(--line-soft);
  border-radius: 50%;
  backdrop-filter: blur(8px);
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease),
              visibility 0.35s linear, color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.totop.is-visible { opacity: 1; visibility: visible; transform: none; }
.totop:hover { color: #fff; border-color: var(--blood-bright); }

/* ------------------------------------------------------ страницы «скоро»/404 */
/* Фон — кадр с героями, приглушённый почти до темноты: надписи читаются,
   а картинка работает как настроение. */
.placeholder { position: relative; overflow: hidden; min-height: 78svh; display: grid; place-items: center; text-align: center; padding: 140px 0 80px; isolation: isolate; }
/* Кадр держится на месте (фиксирован к окну), а текст страницы едет по нему.
   Подвал перекрывает кадр, когда до него доскроллишь. */
.placeholder__bg { position: fixed; inset: 0; z-index: 0; }
.placeholder__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 32%;
  filter: brightness(0.92) contrast(1.04) saturate(1);
}
.placeholder::after {
  content: '';
  position: fixed; inset: 0; z-index: 1;
  pointer-events: none;
  /* кадр теперь светлее — его видно; затемнение держим только там, где лежит
     текст: мягкое пятно по центру и тёмные края, чтобы надписи читались */
  background:
    radial-gradient(62% 46% at 50% 46%, rgba(6, 6, 8, 0.62) 0%, rgba(6, 6, 8, 0.42) 55%, rgba(6, 6, 8, 0.18) 100%),
    linear-gradient(to bottom, rgba(6, 6, 8, 0.42) 0%, rgba(6, 6, 8, 0.1) 24%, rgba(6, 6, 8, 0.24) 70%, var(--ink) 100%);
}
.placeholder__inner { position: relative; z-index: 2; max-width: min(620px, 100% - var(--gutter) * 2); }
.placeholder h1 { font-size: clamp(40px, 7vw, 82px); line-height: 1.04; margin-bottom: 22px; text-shadow: 0 2px 30px rgba(5, 5, 7, 0.92), 0 1px 4px rgba(5, 5, 7, 0.85); }
.placeholder p { color: var(--paper-dim); font-size: 17px; }
.placeholder .eyebrow { text-shadow: 0 1px 12px rgba(5, 5, 7, 0.9); }
/* ------------------------------------------------------------------ подвал */
.footer { position: relative; z-index: 1; border-top: 1px solid var(--line-soft); margin-top: clamp(40px, 6vw, 90px); padding: clamp(44px, 6vw, 78px) 0 34px; background: var(--ink-2); }
.footer__inner { width: min(1240px, 100% - var(--gutter) * 2); margin-inline: auto; display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(30px, 5vw, 70px); }
.footer__mark { color: var(--blood); display: inline-flex; }
.footer__tagline { font-family: var(--serif); font-size: clamp(20px, 2.2vw, 26px); line-height: 1.4; color: var(--ash); margin: 18px 0 0; max-width: 24ch; }
.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.footer__col h3 { font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--paper-faint); font-family: var(--sans); margin-bottom: 16px; }
.footer__col ul { list-style: none; margin: 0; padding: 0; }
.footer__col li { font-size: 14px; color: var(--paper-dim); padding: 5px 0; }
.footer__col a:hover { color: #fff; }
.footer__bottom {
  width: min(1240px, 100% - var(--gutter) * 2); margin: 46px auto 0; padding-top: 22px;
  border-top: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 12px; color: var(--paper-faint);
}
.footer__up:hover { color: var(--paper); }

/* ---------------------------------------------------------------- лайтбокс */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(4, 4, 6, 0.94); display: none; place-items: center; padding: 4vh 4vw; }
.lightbox.is-open { display: grid; }
.lightbox img { max-width: 100%; max-height: 92vh; object-fit: contain; }
.lightbox__close { position: absolute; top: 22px; right: 26px; background: none; border: 0; font-size: 30px; line-height: 1; cursor: pointer; color: var(--paper-dim); }
.lightbox__close:hover { color: #fff; }

/* ------------------------------------------------------- дашборд (служебное) */
.page-dash { background: var(--ink-2); }
.dash { width: min(1320px, 100% - 40px); margin-inline: auto; padding: 110px 0 60px; }
.dash__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.dash__head h1 { font-size: clamp(30px, 4vw, 46px); }
.dash__sub { color: var(--paper-faint); font-size: 13px; margin-top: 8px; }
.dash__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 26px; }
.card { background: var(--ink); border: 1px solid var(--line-soft); padding: 20px 22px; }
.card h3 { font-family: var(--sans); font-size: 10.5px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--paper-faint); margin-bottom: 14px; }
.metric { font-family: var(--serif); font-size: 38px; line-height: 1; }
.metric small { font-family: var(--sans); font-size: 12px; color: var(--paper-faint); letter-spacing: 0.06em; }
.card p { font-size: 13px; color: var(--paper-dim); margin: 8px 0 0; }
.dash__cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin-bottom: 26px; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th, table.data td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line-soft); }
table.data th { font-weight: 400; font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--paper-faint); }
table.data td.num { text-align: right; font-variant-numeric: tabular-nums; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 90px; margin-top: 6px; }
.bars i { flex: 1; background: linear-gradient(to top, var(--blood), rgba(142, 35, 49, 0.25)); min-height: 2px; display: block; }
.bar-row { display: grid; grid-template-columns: 1fr 60px; gap: 12px; align-items: center; padding: 5px 0; font-size: 13px; }
.bar-row__track { height: 3px; background: var(--line-soft); position: relative; }
.bar-row__fill { position: absolute; inset: 0 auto 0 0; background: var(--blood-bright); }
.bar-row span { text-align: right; color: var(--paper-faint); font-variant-numeric: tabular-nums; }
.badge { display: inline-block; padding: 3px 9px; border: 1px solid var(--line); border-radius: 100px; font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--paper-dim); }
.badge--ok { border-color: rgba(90, 170, 120, 0.5); color: #7fc79b; }
.dash__note { font-size: 12px; color: var(--paper-faint); line-height: 1.7; }
.dash__note code { background: rgba(236, 231, 224, 0.06); padding: 2px 6px; font-size: 12px; }

/* ---------------------------------------------------------------- адаптив */
@media (max-width: 1080px) {
  .cast { grid-template-columns: repeat(3, 1fr); }
  .part-hero__inner { grid-template-columns: 1fr; }
  /* на узком экране картина всегда сверху, текст под ней */
  .part-hero__inner .part-hero__art { order: -1; }
  .part-hero__art { max-width: 440px; margin-inline: auto; }
  .part-hero__art img { max-height: clamp(240px, 34svh, 360px); }
  .part-hero__text { max-width: none; }
  .part-lower { grid-template-columns: 1fr; }
  .dash__cols { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
  .newscard { grid-template-columns: 1fr; }
  .newscard__media { min-height: 200px; }
  /* если в контенте задан image_position — на телефоне показываем эту часть кадра
     (например, чтобы книга в руках героини не обрезалась) */
  .newscard__media--focus img { object-position: var(--news-pos, 50% 50%); }
  .news__viewport { min-height: 520px; }
}

@media (max-width: 860px) {
  /* Кадры на узком экране показываем целиком, без обрезки: контейнер
     подстраивается под пропорции картинки, а не наоборот. */
  /* кадр уводим из-под фиксированной шапки, чтобы его не закрывало.
     Высота контейнера взята по самим книгам (в исходнике 1400x560, книги
     занимают полосу 46..485), поэтому чёрные поля сверху и снизу срезаются,
     а сами книги остаются целыми. */
  .edition__head { grid-template-columns: 76px 1fr; gap: 14px; }
  .edition__head img { width: 76px; }
  .edition__title { font-size: 19px; }
  .cover { height: auto; aspect-ratio: 1400 / 452; margin-top: 74px; }
  .cover__bg { position: static; height: 100%; }
  .cover__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
  .cover::after {
    background: linear-gradient(to bottom,
      rgba(8, 8, 10, 0.34) 0%, rgba(8, 8, 10, 0) 28%,
      rgba(8, 8, 10, 0) 66%, var(--ink) 100%);
  }

  .page-head--image { display: block; min-height: 0; padding: 0; }
  .page-head__bg { position: relative; margin-top: 74px; }
  .page-head__bg img { width: 100%; height: auto; object-fit: contain; object-position: center; }
  .page-head--image > .wrap {
    position: absolute;
    top: 74px; bottom: 0; left: 0; right: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-top: 12px;
    padding-bottom: 14px;
  }
  .page-head--image::after {
    background: linear-gradient(to bottom,
      rgba(8, 8, 10, 0.4) 0%, rgba(8, 8, 10, 0) 16%,
      rgba(8, 8, 10, 0) 58%, var(--ink) 100%);
  }

  .placeholder__bg img { object-fit: contain; object-position: center bottom; }

  /* на телефоне текст ложится поверх фигур — затемнение под ним чуть плотнее,
     но сам кадр остаётся разглядываемым */
  .placeholder::after {
    background:
      radial-gradient(80% 42% at 50% 32%, rgba(6, 6, 8, 0.68) 0%, rgba(6, 6, 8, 0.34) 62%, rgba(6, 6, 8, 0.1) 100%),
      linear-gradient(to bottom, rgba(6, 6, 8, 0.5) 0%, rgba(6, 6, 8, 0.12) 28%, rgba(6, 6, 8, 0.3) 60%, rgba(6, 6, 8, 0.52) 82%, var(--ink) 100%);
  }

  /* Часть 3: на узком экране кадр с книгами прижимаем к верху полосы — так
     все три книги видны над карточкой отзыва, а подложка закрывает остальное. */
  .reviews--bg-contain .reviews__bgimg { object-fit: contain; object-position: center top; }

  .cast { grid-template-columns: repeat(2, 1fr); }
  .burger { display: block; }
  .nav {
    position: fixed; inset: 74px 0 auto 0;
    flex-direction: column; align-items: flex-start; gap: 4px;
    background: rgba(8, 8, 10, 0.985);
    border-bottom: 1px solid var(--line);
    padding: 18px var(--gutter) 30px;
    transform: translateY(-12px);
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  }
  .nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav a { font-size: 15px; letter-spacing: 0.1em; padding: 11px 0; width: 100%; border-bottom: 1px solid var(--line-soft); }
  .nav a::after { display: none; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .footer__cols { grid-template-columns: 1fr 1fr; }
  .spec { columns: 1; }
  .partbar { top: 66px; }
  .partbar__scroll { justify-content: flex-start; }
  .quotes__row { grid-template-columns: 1fr; }
  /* высоту обложки на узком экране задаёт правило выше (по пропорциям книг) */
  .news__arrow--prev { left: 0; }
  .news__arrow--next { right: 0; }
  .news__viewport { min-height: 560px; }
}

@media (max-width: 560px) {
  .hero { padding-top: 40px; }
  .hero h1 { font-size: clamp(30px, 9.6vw, 46px); }
  .hero__sub { font-size: 14.5px; }
  .hero__actions .btn { width: 100%; }
  .trailer { width: 100%; }
  .about__body p { font-size: 15.5px; }
  .quotecard__photo { width: 84px; height: 84px; }
  .news__arrow { width: 40px; height: 40px; }
  .storeitem { width: calc(50% - 8px); }
  .cast { gap: 26px 14px; }
  .person__photo { width: min(150px, 100%); }
  .person__name { font-size: 19px; }
  .footer__cols { grid-template-columns: 1fr; }
  .brand__text i { display: none; }
}

@media print {
  .topbar, .footer, .burger { display: none; }
  body { background: #fff; color: #000; }
}

/* --------------------------------------------------- курсор-черепок (мышь)
   В компьютерной версии вместо системной стрелки — наклонённый черепок из
   вселенной «Поколения». Наклон запечён в саму картинку: CSS-курсор
   повернуть нельзя. Хотспот — центр черепка (16 16), размер 32×32 —
   предел, который принимают браузеры. Картинки печёт deploy/make-cursor.js.
   На тач-устройствах правило не действует: там курсора нет.
   !important здесь намеренно: ниже по файлу у кнопок и ссылок уже стоит
   cursor: pointer, и без этого черепок бы не показался. */
@media (hover: hover) and (pointer: fine) {
  html,
  body {
    cursor: url('/assets/img/cursor-skull.png') 16 16, auto !important;
  }
  /* Ссылки и кнопки — тот же черепок с красным свечением: видно, что нажимается */
  a,
  button,
  [role="button"],
  summary,
  label,
  select,
  input[type="checkbox"],
  input[type="radio"],
  .btn,
  .burger,
  /* только кликабельные фото (с полным роликом): у остальных курсор обычный */
  .person__photo--video,
  .dossierbtn,
  .news__arrow,
  .news__dot,
  .reviewnav__btn,
  .dossier__close,
  .videobox__close,
  .lightbox__close {
    cursor: url('/assets/img/cursor-skull-active.png') 16 16, pointer !important;
  }
}

/* ------------------------------------------------------- огненный шар (мышь)
   Через 5 секунд после входа на сайт по экрану время от времени пролетает
   огненный шар — втрое больше курсора-черепка (96 px против 32 px). Успел
   кликнуть — шар гаснет и оставляет на своём месте дымок и копоть.
   Пламя, искры, дым и сажу рисует canvas (public/assets/js/site.js), поэтому
   здесь только слой да прозрачная кнопка-цель: она ловит клик по шару и
   ничего не перехватывает вокруг. */
.firelayer {
  position: fixed;
  inset: 0;
  z-index: 150;
  overflow: hidden;
  pointer-events: none;
}
.firelayer__fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.fireball {
  position: absolute;
  top: 0;
  left: 0;
  width: 96px;
  height: 96px;
  margin: -48px 0 0 -48px;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 50%;
  pointer-events: auto;
  cursor: url('/assets/img/cursor-skull-active.png') 16 16, pointer;
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
}
.fireball:focus-visible { outline: 1px solid var(--blood-bright); outline-offset: 6px; }

@media (prefers-reduced-motion: reduce) {
  .firelayer { display: none; }
}

/* ------------------------------------------------- следы от пуль (часть 2)
   Только на странице второй части: раз в 4 секунды в случайном месте экрана
   резко появляется след от пули — дырка с крошкой стекла и трещины, которые
   остаются на экране. Слой ничего не перехватывает.
   Логика — public/assets/js/site.js, модуль shots. */
.shotlayer {
  position: fixed;
  inset: 0;
  z-index: 148;
  overflow: hidden;
  pointer-events: none;
}
.shotlayer__fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .shotlayer { display: none; }
}
