/* ============================================================
   САЙТ КНИГИ — стили (кибер-панк × тёмное фэнтези × романтика)
   Палитра и размеры вынесены в переменные ниже — меняй их,
   чтобы перекрасить весь сайт за пару секунд.
   ============================================================ */

:root {
  /* — Цвета — */
  --bg:        #07050d;   /* почти чёрный с фиолетовым подтоном */
  --bg-alt:    #0c0916;   /* фон чередующихся секций */
  --panel:     #120e1f;   /* карточки */
  --panel-2:   #171127;
  --line:      rgba(255,255,255,.08);

  --text:      #ece8f5;   /* основной текст */
  --muted:     #a99fc4;   /* приглушённый лиловый */
  --faint:     #6f6791;

  --neon:      #ff2e88;   /* неон-магента (акцент 1) */
  --neon-2:    #25e0e0;   /* неон-циан (акцент 2) */
  --gold:      #d8b45a;   /* тёплое золото для «фэнтези» */

  /* — Шрифты — */
  --font-display: "Oswald", system-ui, sans-serif;        /* кинематографичные конденс-заголовки */
  --font-serif:   "Lora", Georgia, serif;                 /* антиква для цитат/романтики */
  --font-body:    "Inter", system-ui, sans-serif;         /* основной текст */

  /* — Раскладка — */
  --maxw: 1180px;
  --radius: 16px;
}

/* ----------------------- БАЗА ----------------------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* Лёгкий фоновый «туман» по всему сайту */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vw 60vw at 12% -10%, rgba(255,46,136,.10), transparent 60%),
    radial-gradient(55vw 55vw at 100% 10%, rgba(37,224,224,.08), transparent 60%),
    radial-gradient(50vw 50vw at 50% 120%, rgba(216,180,90,.06), transparent 60%);
}

/* ----------------------- ТИПОГРАФИКА ----------------------- */
h1,h2,h3 { line-height: 1.12; font-weight: 700; letter-spacing: .2px; }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.4vw, 52px);
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  line-height: 1.05;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 12px; font-weight: 600;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--neon-2);
  padding-bottom: 6px;
  margin-bottom: 14px;
  position: relative;
}
.section-tag::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 36px; height: 2px;
  background: linear-gradient(90deg, var(--neon), var(--neon-2));
}

.section-sub { color: var(--muted); max-width: 620px; font-size: 17px; }
.center { text-align: center; }
.center .section-tag::after { left: 50%; transform: translateX(-50%); }
.section-head.center { margin: 0 auto 48px; max-width: 720px; }
.section-head.center .section-sub { margin: 0 auto; }

/* ----------------------- КНОПКИ ----------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600; font-size: 14px; letter-spacing: 1px;
  text-transform: uppercase;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .25s ease, background .25s ease, border-color .25s;
  white-space: nowrap;
}
.btn-primary {
  color: #0a0510;
  background: linear-gradient(120deg, var(--neon), #ff6aae 45%, var(--neon-2), #ff6aae 90%, var(--neon));
  background-size: 220% auto; background-position: 0% center;
  box-shadow: 0 8px 30px rgba(255,46,136,.30);
  transition: transform .2s ease, box-shadow .25s ease, background-position .5s ease, border-color .25s;
}
.btn-primary:hover { transform: translateY(-2px); background-position: 100% center; box-shadow: 0 12px 38px rgba(255,46,136,.45); }
.btn-ghost {
  color: var(--text);
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.03);
}
.btn-ghost:hover { border-color: var(--neon-2); color: #fff; box-shadow: 0 0 24px rgba(37,224,224,.18); }

/* ----------------------- ШАПКА (живая, реагирует на скролл) ----------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7,5,13,.55);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: background .35s ease, backdrop-filter .35s ease, border-color .35s ease, box-shadow .35s ease;
}
/* при скролле вниз — плотнее, с неоновым свечением снизу */
.site-header.scrolled {
  background: rgba(7,5,13,.92);
  backdrop-filter: blur(16px) saturate(1.1);
  border-bottom-color: rgba(255,255,255,.08);
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
}
/* бегущая неоновая линия снизу шапки (появляется при скролле) */
.site-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon), var(--neon-2), transparent);
  background-size: 200% 100%;
  opacity: 0; transition: opacity .35s ease;
  animation: lineSlide 6s linear infinite;
}
.site-header.scrolled::after { opacity: .85; }
@keyframes lineSlide { from { background-position: 0% 0; } to { background-position: 200% 0; } }

.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 16px; transition: height .35s ease; }
.site-header.scrolled .nav-wrap { height: 58px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; letter-spacing: 2px; }
.brand-mark { color: var(--neon); font-size: 18px; animation: markPulse 2.8s ease-in-out infinite; }
@keyframes markPulse {
  0%,100% { text-shadow: 0 0 8px var(--neon); opacity: .8; }
  50%     { text-shadow: 0 0 20px var(--neon), 0 0 34px rgba(255,46,136,.6); opacity: 1; }
}
.brand-name { font-size: 16px; }

.nav { display: flex; align-items: center; gap: 26px; }
.nav a {
  font-size: 14px; color: var(--muted); font-weight: 500;
  letter-spacing: .4px; transition: color .2s; position: relative;
}
.nav a:not(.nav-cta)::after {
  content:""; position:absolute; left:0; bottom:-6px; width:0; height:2px;
  background: linear-gradient(90deg, var(--neon), var(--neon-2)); transition: width .25s;
}
.nav a:not(.nav-cta):hover { color: var(--text); }
.nav a:not(.nav-cta):hover::after { width: 100%; }
.nav-cta {
  padding: 9px 18px; border-radius: 999px; color: var(--text);
  border: 1px solid rgba(255,46,136,.5); background: rgba(255,46,136,.08);
}
.nav-cta:hover { background: rgba(255,46,136,.18); }

.nav-tools { display: flex; align-items: center; gap: 14px; }
.lang-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang-toggle button {
  font-family: var(--font-display); font-size: 12px; font-weight: 600; letter-spacing: 1px;
  padding: 7px 12px; background: transparent; color: var(--muted); border: 0; cursor: pointer; transition: .2s;
}
.lang-toggle button.is-active { background: linear-gradient(120deg, var(--neon), var(--neon-2)); color: #0a0510; }

.burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.burger span { width: 24px; height: 2px; background: var(--text); transition: .25s; }
.burger.is-open span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2){ opacity: 0; }
.burger.is-open span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

/* ----------------------- ГЕРОЙ (баннер) ----------------------- */
.hero { position: relative; min-height: 90vh; display: flex; align-items: stretch; overflow: hidden; }
/* Баннер во всю ширину */
.hero .hero-bg { position: absolute; inset: 0; z-index: 0; opacity: 1; filter: saturate(1.05); }
/* Затемнение для читаемости: слева темнее (под подпись), снизу — переход в фон */
.hero-overlay {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(7,5,13,.85) 0%, rgba(7,5,13,.35) 45%, rgba(7,5,13,.15) 100%),
    linear-gradient(180deg, rgba(7,5,13,.35) 0%, transparent 30%, rgba(7,5,13,.55) 80%, var(--bg) 100%);
}

.hero-inner {
  position: relative; z-index: 2; width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 40px;
  padding: 120px 24px 96px;
}

/* Подпись слева (название поверх баннера) */
.hero-caption { max-width: 560px; }
.eyebrow {
  font-family: var(--font-display); font-size: 13px; letter-spacing: 5px; text-transform: uppercase;
  color: var(--neon-2); margin-bottom: 18px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 104px);
  font-weight: 700; letter-spacing: 1px; line-height: .95; text-transform: uppercase;
  color: #fff;
  text-shadow: 0 4px 40px rgba(0,0,0,.7), 0 0 50px rgba(255,46,136,.25);
}
.hero-tagline {
  font-family: var(--font-serif); font-style: italic;
  font-size: clamp(17px, 2.1vw, 23px); color: var(--text);
  max-width: 540px; margin-top: 22px; line-height: 1.5;
  text-shadow: 0 2px 16px rgba(0,0,0,.8);
}

/* Карточка подписки справа (как у Mark Dawson) */
.hero-card {
  width: min(420px, 100%); flex-shrink: 0;
  background: rgba(8,5,14,.78); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  padding: 30px 28px;
  box-shadow: 0 0 60px rgba(255,46,136,.22), 0 30px 60px rgba(0,0,0,.5);
}
.hero-card-title {
  font-family: var(--font-display); font-weight: 600; text-transform: uppercase;
  font-size: clamp(18px, 2vw, 23px); line-height: 1.2; letter-spacing: .5px; margin-bottom: 20px;
}
.hero-card .subscribe { margin: 0; }
.hero-card .subscribe input { background: rgba(0,0,0,.35); }
.hero-card .btn-primary { padding: 14px 18px; font-size: 18px; }

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.scroll-hint {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  z-index: 2; color: var(--muted); font-size: 22px; animation: bob 1.8s infinite;
}
@keyframes bob { 0%,100%{ transform: translate(-50%,0);} 50%{ transform: translate(-50%,8px);} }

/* ----------------------- СЕКЦИИ ----------------------- */
.section { padding: 100px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.two-col { display: grid; grid-template-columns: minmax(0, 0.85fr) 1.15fr; gap: 64px; align-items: center; }
.two-col-text p { color: var(--muted); margin-bottom: 16px; font-size: 17px; }
.two-col-text .section-title { margin-bottom: 18px; }

/* Обложка */
.book-cover { position: relative; perspective: 1200px; }
.cover-ph { aspect-ratio: 2/3; border-radius: 10px; transform: rotateY(-8deg) rotateX(2deg); box-shadow: 0 30px 70px rgba(0,0,0,.6); }
.cover-shadow {
  position: absolute; inset: auto 6% -22px 6%; height: 40px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255,46,136,.35), transparent 70%); filter: blur(14px);
}

.meta-list { list-style: none; display: grid; gap: 12px; margin: 24px 0 28px; }
.meta-list li { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.meta-list span { color: var(--faint); font-family: var(--font-display); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; }
.meta-list b { color: var(--text); font-weight: 600; }

/* ----------------------- СЕТКИ КАРТОЧЕК ----------------------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }

.card, .post, .char-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s ease, border-color .25s, box-shadow .25s;
}
.card:hover, .post:hover, .char-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255,46,136,.45);
  box-shadow: 0 18px 50px rgba(0,0,0,.5), 0 0 0 1px rgba(255,46,136,.15);
}

.card-img { aspect-ratio: 4/3; }
.card-body, .post-body { padding: 22px; }
.card-body h3, .post-body h3 { font-family: var(--font-serif); font-size: 22px; margin-bottom: 10px; }
.card-body p, .post-body p { color: var(--muted); font-size: 15px; }

/* Персонажи */
.char-img { aspect-ratio: 5/6; }
.char-body { padding: 18px; }
.char-body h3 { font-family: var(--font-serif); font-size: 20px; }
.char-role { font-family: var(--font-display); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--neon-2); margin: 4px 0 10px; }
.char-body p { color: var(--muted); font-size: 14px; }

/* Посты блога */
.post-img { display: block; aspect-ratio: 8/5; }
.post-tag { display: inline-block; font-family: var(--font-display); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.post-body h3 a { transition: color .2s; }
.post-body h3 a:hover { color: var(--neon); }
.read-more { display: inline-block; margin-top: 14px; font-family: var(--font-display); font-size: 13px; letter-spacing: 1px; color: var(--neon-2); }
.read-more:hover { color: #fff; }

/* ----------------------- ОТРЫВОК ----------------------- */
.excerpt { max-width: 820px; margin: 0 auto; text-align: center; position: relative; }
.excerpt::before {
  content: "“"; font-family: var(--font-serif); font-size: 140px; line-height: 1;
  color: var(--neon); opacity: .25; position: absolute; top: -50px; left: 50%; transform: translateX(-50%);
}
.excerpt blockquote {
  font-family: var(--font-serif); font-style: italic; font-size: clamp(20px, 2.6vw, 30px);
  line-height: 1.55; color: var(--text);
}
.excerpt figcaption { margin-top: 22px; font-family: var(--font-display); letter-spacing: 2px; text-transform: uppercase; font-size: 13px; color: var(--neon-2); }
.excerpt-cta { text-align: center; margin-top: 44px; }

/* ----------------------- АВТОР ----------------------- */
/* HUD-рамка: тонкая обводка ПО ВСЕЙ форме (включая срезы) + неоновые скобки */
.author-photo { position: relative; }
/* слой-рамка даёт тонкую обводку, идущую по срезанным углам */
.author-frame {
  --cut: 18px;
  padding: 1px;                               /* толщина обводки */
  background: rgba(255,255,255,.22);          /* цвет обводки (тонкая светлая линия) */
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
}
.author-ph {
  aspect-ratio: 1/1; border-radius: 0;
  --cut: 17px; /* на 1px меньше — обводка ровная и на срезах */
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
}
/* скобки на двух острых углах: верх-лево (магента) и низ-право (циан) */
.author-photo::after {
  content: ""; position: absolute; inset: -6px; pointer-events: none; z-index: 2;
  --b: 2px;    /* толщина уголков */
  --l: 36px;   /* длина уголков */
  background:
    linear-gradient(var(--neon),   var(--neon))   top    left  / var(--l) var(--b) no-repeat,
    linear-gradient(var(--neon),   var(--neon))   top    left  / var(--b) var(--l) no-repeat,
    linear-gradient(var(--neon-2), var(--neon-2)) bottom right / var(--l) var(--b) no-repeat,
    linear-gradient(var(--neon-2), var(--neon-2)) bottom right / var(--b) var(--l) no-repeat;
  opacity: 0; transition: opacity .5s ease .5s; /* скобки проявляются после развёртки */
}

/* === Скан-разворот фото при скролле === */
/* фото скрыто маской и раскрывается сверху вниз */
.author-frame {
  -webkit-mask: linear-gradient(#000 0 0) top / 100% 0% no-repeat;
          mask: linear-gradient(#000 0 0) top / 100% 0% no-repeat;
  transition: -webkit-mask-size 1s cubic-bezier(.6,0,.2,1), mask-size 1s cubic-bezier(.6,0,.2,1);
}
/* неоновая скан-линия (едет сверху вниз во время развёртки) */
.author-photo::before {
  content: ""; position: absolute; left: -4px; right: -4px; top: 0; height: 2px; z-index: 3;
  background: linear-gradient(90deg, transparent, var(--neon-2), var(--neon), transparent);
  box-shadow: 0 0 12px var(--neon-2); opacity: 0; pointer-events: none;
}
/* запуск, когда блок попадает в зону видимости (.is-visible ставит script.js) */
.two-col.is-visible .author-frame { -webkit-mask-size: 100% 100%; mask-size: 100% 100%; }
.two-col.is-visible .author-photo::after { opacity: 1; }
.two-col.is-visible .author-photo::before { animation: authorScan 1s cubic-bezier(.6,0,.2,1) forwards; }
@keyframes authorScan {
  0%   { top: 0;    opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}
.socials { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.socials a {
  font-family: var(--font-display); font-size: 13px; letter-spacing: 1px;
  padding: 9px 18px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); transition: .2s;
}
.socials a:hover { color: #fff; border-color: var(--neon-2); box-shadow: 0 0 20px rgba(37,224,224,.15); }

/* ----------------------- ПОДПИСКА ----------------------- */
.join { position: relative; padding: 110px 0; text-align: center; overflow: hidden; background: var(--bg-alt); border-top: 1px solid var(--line); }
.join-glow { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(50% 80% at 50% 0%, rgba(255,46,136,.16), transparent 70%); }
.join-inner { position: relative; z-index: 1; max-width: 640px; }
.join .section-tag, .join .section-sub { margin-left: auto; margin-right: auto; }
.join .section-tag::after { left: 50%; transform: translateX(-50%); }
.join .section-title { margin: 4px 0 16px; }

.subscribe { display: flex; gap: 12px; margin: 34px auto 0; max-width: 520px; }
.subscribe input {
  flex: 1; min-width: 0; padding: 15px 20px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); color: var(--text); font-size: 15px; font-family: var(--font-body);
}
.subscribe input:focus { outline: none; border-color: var(--neon-2); box-shadow: 0 0 0 3px rgba(37,224,224,.15); }
.form-note { margin-top: 18px; color: var(--neon-2); font-size: 14px; }

/* ----------------------- ПОДВАЛ ----------------------- */
.site-footer { padding: 48px 0; border-top: 1px solid var(--line); background: var(--bg); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-nav a { color: var(--muted); font-size: 14px; transition: .2s; }
.footer-nav a:hover { color: var(--neon); }
.copyright { color: var(--faint); font-size: 13px; }

/* ----------------------- ПЛЕЙСХОЛДЕРЫ КАРТИНОК ----------------------- */
.img-ph {
  position: relative;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  border: 1px dashed rgba(255,255,255,.12);
}
/* Полосатая заглушка — только пока картинка НЕ задана */
.img-ph:not([style*="url"]) {
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,.018) 0 12px, transparent 12px 24px),
    linear-gradient(135deg, var(--panel-2), #0e0a1a);
}
.img-ph::before {
  content: attr(data-ph);
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 16px;
  font-family: var(--font-display); font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--faint);
}
/* Когда задашь background-image инлайном — подпись прячется автоматически */
.img-ph[style*="url"]::before { content: ""; }
.img-ph[style*="url"] { border-style: solid; border-color: var(--line); }

/* ----------------------- АНИМАЦИЯ ПОЯВЛЕНИЯ ----------------------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .scroll-hint { animation: none; }
}

/* ----------------------- АДАПТИВ ----------------------- */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; gap: 40px; }

  /* Геро: подпись сверху, карточка снизу */
  .hero-inner { flex-direction: column; align-items: stretch; justify-content: flex-end; gap: 28px; padding: 110px 24px 80px; }
  .hero-caption { max-width: 100%; }
  .hero-card { width: 100%; }
  .hero-overlay { background:
    linear-gradient(180deg, rgba(7,5,13,.45) 0%, rgba(7,5,13,.2) 30%, rgba(7,5,13,.7) 75%, var(--bg) 100%); }
  .book-cover { max-width: 320px; margin: 0 auto; }
  .cover-ph { transform: none; }

  .nav, .nav-cta { /* мобильное меню */
    position: fixed; inset: 70px 0 auto 0;
    flex-direction: column; gap: 0;
    background: rgba(10,7,18,.98); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    padding: 8px 0 18px;
    transform: translateY(-120%); transition: transform .3s ease;
  }
  .nav { display: flex; }
  .nav.is-open { transform: translateY(0); }
  .nav a { padding: 14px 24px; width: 100%; }
  .nav a:not(.nav-cta)::after { display: none; }
  .nav-cta { margin: 10px 24px 0; width: auto; text-align: center; }
  .burger { display: flex; }
}

@media (max-width: 560px) {
  .section { padding: 72px 0; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .subscribe { flex-direction: column; }
  .subscribe .btn { width: 100%; }
  .footer-inner { flex-direction: column; text-align: center; }
  /* длинные заголовки секций не должны упираться в край */
  .section-title { font-size: clamp(24px, 7.5vw, 34px); overflow-wrap: break-word; }
}

/* ===========================================================
   КНОПКА «СМОТРЕТЬ ВСЁ» ПОД СЕКЦИЕЙ
   =========================================================== */
.section-cta { text-align: center; margin-top: 44px; }

/* ===========================================================
   СТРАНИЦЫ-РАЗДЕЛЫ (world / characters / journal)
   =========================================================== */
.page-top { padding-top: 76px; }
.page-top .grid-3, .page-top .grid-4 { margin-top: 8px; }
/* карточки-ссылки кликабельны целиком */
a.post { color: inherit; display: flex; flex-direction: column; }

/* ===========================================================
   СТРАНИЦА-ИСТОРИЯ (entry.html)
   =========================================================== */
.entry-wrap { padding-top: 40px; padding-bottom: 90px; }

.breadcrumb {
  display: inline-block; margin-bottom: 26px;
  font-family: var(--font-display); font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--muted); transition: color .2s, transform .2s;
}
.breadcrumb:hover { color: var(--neon-2); transform: translateX(-3px); }

.entry-hero {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
  margin-bottom: 52px;
}
.entry-cover {
  aspect-ratio: 4/3; border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0,0,0,.5), 0 0 0 1px rgba(255,46,136,.12);
}
.entry-hero-text .section-tag { margin-bottom: 16px; }
.entry-title {
  font-family: var(--font-display); text-transform: uppercase; font-weight: 700;
  font-size: clamp(32px, 5vw, 60px); line-height: 1.02; letter-spacing: .5px;
  color: #fff; text-shadow: 0 0 40px rgba(255,46,136,.2);
}
.entry-tagline {
  font-family: var(--font-serif); font-style: italic; color: var(--neon-2);
  font-size: clamp(17px, 2vw, 22px); margin-top: 14px;
}

/* тело истории — комфортная ширина для чтения */
.entry-body { max-width: 760px; margin: 0 auto; }
.entry-body > p {
  color: var(--text); font-size: 18px; line-height: 1.8; margin-bottom: 24px;
  opacity: .92;
}
.entry-quote {
  margin: 38px 0; padding: 6px 0 6px 26px;
  border-left: 3px solid var(--neon);
  font-family: var(--font-serif); font-style: italic; font-size: clamp(20px, 2.5vw, 27px);
  line-height: 1.5; color: #fff;
}
.entry-figure { margin: 40px 0; }
.entry-img {
  aspect-ratio: 16/9; border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(0,0,0,.45);
}
/* варианты размеров одиночной картинки */
.entry-img--wide     { aspect-ratio: 16/9; }
.entry-img--full     { aspect-ratio: 21/9; }
.entry-img--portrait { aspect-ratio: 2/3; }
.entry-img--square   { aspect-ratio: 1/1; }
.entry-figure--portrait, .entry-figure--square { max-width: 460px; margin-left: auto; margin-right: auto; }
/* ряд из нескольких картинок */
.entry-gallery { display: grid; gap: 16px; margin: 40px 0; align-items: start; }
.entry-gallery .entry-figure { margin: 0; }
.entry-img--gallery { aspect-ratio: 4/3; }
@media (max-width: 640px) { .entry-gallery { grid-template-columns: 1fr !important; } }

/* текст сбоку от картинки */
.entry-split { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; margin: 40px 0; }
.entry-split .entry-figure { margin: 0; max-width: none; }
.entry-split.img-right .entry-figure { order: 2; }
.entry-split-text p, .entry-split-text blockquote { margin: 0; }
@media (max-width: 640px) {
  .entry-split { grid-template-columns: 1fr; gap: 18px; }
  .entry-split.img-right .entry-figure { order: 0; }
}
.entry-figure figcaption {
  margin-top: 12px; text-align: center; color: var(--faint);
  font-size: 14px; font-style: italic;
}
.entry-notfound { text-align: center; padding: 80px 0; color: var(--muted); font-size: 20px; }

@media (max-width: 760px) {
  .entry-hero { grid-template-columns: 1fr; gap: 24px; }
  .entry-body > p { font-size: 17px; }
}

/* ===========================================================
   ДОП. НЕОНОВЫЕ ШТРИХИ
   =========================================================== */
/* мягкое свечение у карточек при наведении усиливаем за счёт обводки-градиента */
.post:hover .post-img::after,
.card:hover .card-img::after { opacity: 1; }

/* анимированный «дрейф» неонового пятна в секции подписки */
.join-glow { animation: glowDrift 9s ease-in-out infinite; }
@keyframes glowDrift {
  0%,100% { transform: translateX(-4%) scale(1); opacity: .9; }
  50%     { transform: translateX(4%)  scale(1.08); opacity: 1; }
}

/* ===========================================================
   КИБЕРПАНК-ЭФФЕКТЫ
   =========================================================== */

/* 1. Анимированная неоновая сетка в баннере (поверх фото, под текстом) */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .16;
  background-image:
    linear-gradient(rgba(37,224,224,.55) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,46,136,.45) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(75% 65% at 32% 52%, #000 35%, transparent 78%);
          mask-image: radial-gradient(75% 65% at 32% 52%, #000 35%, transparent 78%);
  animation: gridDrift 14s linear infinite;
}
@keyframes gridDrift { to { background-position: 46px 46px; } }

/* 2. Глитч названия книги — короткий RGB-сбой раз в ~8 сек */
.hero-title { animation: titleGlitch 8s steps(1) infinite; }
@keyframes titleGlitch {
  0%, 90%, 100% { text-shadow: 0 4px 40px rgba(0,0,0,.7), 0 0 50px rgba(255,46,136,.25); }
  91% { text-shadow: -2px 0 var(--neon), 2px 0 var(--neon-2), 0 4px 40px rgba(0,0,0,.7); transform: translateX(1px); }
  93% { text-shadow: 2px 0 var(--neon), -2px 0 var(--neon-2); transform: translateX(-1px); }
  95% { text-shadow: -1px 0 var(--neon-2), 1px 0 var(--neon); transform: translateX(1px); }
  97% { text-shadow: 0 0 50px rgba(255,46,136,.25); transform: none; }
}

/* 3. Световой блик, пробегающий по карточкам при наведении */
.post, .card, .char-card { position: relative; }
.post::after, .card::after, .char-card::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(115deg, transparent 32%, rgba(255,255,255,.07) 46%, rgba(37,224,224,.05) 52%, transparent 64%);
  transform: translateX(-120%); transition: transform .65s ease;
}
.post:hover::after, .card:hover::after, .char-card:hover::after { transform: translateX(120%); }

/* 4. Неоновый скроллбар */
* { scrollbar-color: var(--neon) #0b0716; scrollbar-width: thin; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: #0b0716; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--neon), var(--neon-2));
  border-radius: 20px; border: 2px solid #0b0716;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #ff5ea0, #57ecec); }

/* 5. Лёгкое кинематографичное «зерно» поверх всего сайта */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 9999; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}

/* 6. Расшифровка текста — лёгкое свечение в момент сборки заголовка */
.is-decoding { text-shadow: 0 0 14px var(--neon-2), 0 0 5px var(--neon); }

/* 7. Живой баннер: параллакс (управляется из script.js) */
.hero .hero-bg { transform: scale(1.06); transition: transform .18s ease-out; will-change: transform; }

/* 8. Плавный неоновый шлейф за курсором (рисуется на canvas) */
.cursor-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 46; mix-blend-mode: screen; }

/* уважаем настройку «меньше движения» */
@media (prefers-reduced-motion: reduce) {
  .brand-mark, .site-header::after, .join-glow,
  .hero::before, .hero-title { animation: none; }
  .post::after, .card::after, .char-card::after { display: none; }
  .cursor-canvas { display: none; }
  .hero .hero-bg { transform: none; }
  /* фото автора — без скан-разворота */
  .author-frame { -webkit-mask: none; mask: none; }
  .author-photo::after { opacity: 1; transition: none; }
  .author-photo::before { display: none; }
}

/* ТАЧ-УСТРОЙСТВА (телефоны/планшеты): убираем то, что портит скролл/свайп */
@media (hover: none) {
  /* блик-«наведение» на карточках залипает при тапе — выключаем */
  .post::after, .card::after, .char-card::after { display: none; }
  /* и сам hover-стиль не должен «прилипать» при тапе — гасим его на тач */
  .post:hover, .card:hover, .char-card:hover {
    transform: none; border-color: var(--line);
    box-shadow: 0 18px 50px rgba(0,0,0,.5);
  }
  /* подсветка переходит на карточку, которая сейчас по центру экрана (ставится из script.js) */
  .post.is-active, .card.is-active, .char-card.is-active {
    transform: translateY(-4px);
    border-color: rgba(255,46,136,.5);
    box-shadow: 0 16px 44px rgba(0,0,0,.5), 0 0 22px rgba(255,46,136,.20);
  }
  .is-active .read-more { color: #fff; }
  .post.is-active .post-body h3 a { color: var(--neon); }
  /* плёнка-«зерно» с наложением тяжела для мобильного скролла */
  body::after { display: none; }
  /* фоновое свечение больше НЕ fixed: едет вместе с контентом, без дёрганья при свайпе */
  body::before { position: absolute; min-height: 100%; }
  /* баннер без увеличения под параллакс (параллакса на тач нет) */
  .hero .hero-bg { transform: none; }
}
