/* ============================================================
   Warm Editorial · токен-слой
   == ========================================================== */

:root {
  /* Цвет */
  --paper: #FAF7F2;
  --paper-soft: #F4EFE6;
  --surface: #FFFFFF;
  --ink: #1C1A17;
  --accent: #A84425;        /* terracotta для текста и ссылок, AA */
  --accent-soft: #C0512F;   /* terracotta бренда: крупные знаки, графика */
  --accent-strong: #8E3A1E; /* hover/press для заливок */
  --forest: #2F5B4F;
  --muted: #726961;         /* метаданные, AA */
  --hairline: rgba(28, 26, 23, 0.14);
  --hairline-strong: rgba(28, 26, 23, 0.3);
  --hairline-on-band: rgba(250, 247, 242, 0.22);

  /* Типографика */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-md: 1rem;
  --text-lg: 1.25rem;
  --text-xl: 1.75rem;
  --text-2xl: 2.5rem;
  --text-3xl: 3.5rem;
  --text-4xl: 5rem;

  /* Отступы (4px ритм) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Геометрия */
  --radius: 8px;
  --radius-btn: 12px;
  --radius-card: 16px;
  --container: 1200px;
  --measure: 65ch;

  /* Motion */
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-fast: 160ms;
  --duration-med: 320ms;
}

/* ============================================================
   База
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: auto;
}

[id] { scroll-margin-top: 120px; }

@media (prefers-reduced-motion: reduce) {
  .skip-link, a, .nav a, .brand, .footer__top { transition: none; }
}

body {
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

::selection { background: rgba(192, 81, 47, 0.22); }

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 2px;
}

button, a, [role="tab"] {
  -webkit-tap-highlight-color: transparent;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.container--narrow {
  max-width: var(--measure);
}

/* Skip link */
.skip-link {
  position: fixed;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 100;
  padding: var(--space-3) var(--space-4);
  background: var(--ink);
  color: var(--paper);
  font-size: var(--text-sm);
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform var(--duration-fast) var(--ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

/* ============================================================
   Мастхед + навигация
   ============================================================ */
.masthead {
  background: rgba(250, 247, 242, 0.78);
  position: sticky;
  top: 0;
  z-index: 50;
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  backdrop-filter: saturate(1.6) blur(16px);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .masthead { background: var(--paper); border-bottom: 1px solid var(--hairline); }
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding-block: var(--space-4);
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  white-space: nowrap;
}

.brand__icon {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
  justify-content: flex-end;
}

.nav a {
  position: relative;
  color: var(--ink);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
  padding: var(--space-1) 0;
  border-bottom: 1px solid transparent;
  transition: color var(--duration-fast) var(--ease),
              border-color var(--duration-fast) var(--ease);
}

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

.nav a:active {
  color: var(--accent-strong);
}

/* ============================================================
   Хиро (компактный шапочечный блок)
   ============================================================ */
.page-head {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 64vh;
  min-height: 560px;
  padding-block: var(--space-12) var(--space-12);
  padding-block: var(--space-12) var(--space-4);
  background: var(--paper-soft);
  color: var(--ink);
  border-bottom: 1px solid var(--hairline);
  overflow: hidden;
  overflow-x: clip;
  overflow-y: visible;
}

.page-head .container {
  position: relative;
  z-index: 1;
  width: 100%;
}

.page-head__emblem {
  position: absolute;
right: calc((100% - min(100%, var(--container))) / 2 - 0.02em);
  top: auto;
  bottom: -0.5em;
  z-index: 0;
  font-size: clamp(10rem, 28vw, 24rem);
  letter-spacing: -0.16em;
  line-height: 1;
  transform: none;
  user-select: none;
  pointer-events: none;
}

.page-head__letter {
  font-family: 'Sacramento', var(--font-display);
  font-weight: 400;
  font-size: 1em;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px rgba(28, 26, 23, 0.6);
}

.page-head__letter--b {
  margin-right: -0.06em;
}

.page-head__letter--c {
  margin-left: -0.06em;
}

.page-head .kicker { color: var(--forest); margin-bottom: var(--space-4); }

.page-head h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(3rem, 8.5vw, 7.5rem);
  line-height: 0.9;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  max-width: 14ch;
}

.page-head .page-head__intro {
  margin: var(--space-6) 0 0;
  font-size: var(--text-lg);
  line-height: 1.5;
  color: var(--muted);
  max-width: 34ch;
}

.kicker {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--forest);
  margin-bottom: var(--space-3);
}

/* ============================================================
   Аудиополоса «Читает автор»
   ============================================================ */
.listen {
  position: relative;
  z-index: 1;
  background: rgba(244, 239, 230, 0.18);
  -webkit-backdrop-filter: blur(5px) saturate(1.05);
  backdrop-filter: blur(5px) saturate(1.05);
  border-bottom: 1px solid var(--hairline);
  padding-block: var(--space-8);
}

.listen__inner {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  flex-wrap: wrap;
}

.listen__label {
  margin-bottom: 0;
  flex-shrink: 0;
}

.listen__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--space-12);
  flex-wrap: wrap;
}

.listen__item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.listen__audio {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.listen__play {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--accent-strong);
  background: transparent;
  color: var(--accent-strong);
  cursor: pointer;
  transition: background 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease),
              transform 100ms ease-out;
}

.listen__play:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: var(--paper);
}

.listen__play:active { transform: scale(0.94); }

.listen__icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
  margin-left: 2px;
}

.listen__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.listen__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-md);
  line-height: 1.2;
  color: var(--ink);
}

.listen__len {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--muted);
}

/* ============================================================
   Раздел (общая оболочка)
   ============================================================ */
.section {
  padding-block: var(--space-20);
}

.section--alt {
  background: var(--paper-soft);
}

.section__head {
  margin-bottom: var(--space-12);
}

.section__head h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  max-width: 22ch;
}

.section__head--on-band h2 {
  color: var(--paper);
}

/* ============================================================
   Прогресс чтения
   ============================================================ */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 60;
  pointer-events: none;
}

.progress__bar {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  will-change: transform;
}

/* ============================================================
   История: главы жизни
   ============================================================ */
.story__lead {
  margin-top: var(--space-4);
  max-width: 56ch;
  font-size: var(--text-lg);
  line-height: 1.6;
  color: var(--muted);
}

.story__grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: var(--space-16);
  align-items: start;
}

.story__toc {
  position: sticky;
  top: calc(96px + var(--space-8));
}

.story__toc-title {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-4);
}

.toc-list {
  list-style: none;
  border-top: 1px solid var(--hairline);
}

.toc-list li {
  border-bottom: 1px solid var(--hairline);
}

.toc-link {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  color: var(--ink);
  text-decoration: none;
  font-size: var(--text-sm);
  line-height: 1.45;
  transition: color var(--duration-fast) var(--ease),
              background-color var(--duration-fast) var(--ease);
}

.toc-link:hover { color: var(--accent); }
.toc-link:active {
  color: var(--accent-strong);
  background: rgba(168, 68, 37, 0.12);
}

.toc-link.is-active { color: var(--accent); background: rgba(168, 68, 37, 0.06); }
.toc-num {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-md);
  color: var(--accent);
  min-width: 1.6em;
}

.toc-years {
  flex-shrink: 0;
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--muted);
}

/* === Главы === */
.story__chapters {
  min-width: 0;
}

.chapter {
  padding-block: var(--space-12);
  border-top: 1px solid var(--hairline-strong);
}

.chapter:first-of-type { border-top: none; padding-top: 0; }
.chapter:last-of-type { border-bottom: 1px solid var(--hairline-strong); }

.chapter__head {
  display: flex;
  align-items: flex-start;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

.chapter__num {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 3.5rem;
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: var(--accent-soft);
}

.chapter__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  padding-top: 0.4rem;
}

.chapter__meta {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--muted);
}

.chapter__body p {
  max-width: var(--measure);
  margin-bottom: var(--space-4);
}

/* === Акцентные вставки вместо раскрывающихся блоков === */
.aside {
  margin-block: var(--space-6);
  padding: var(--space-4) var(--space-6);
  border-left: 3px solid var(--accent);
  background: rgba(168, 68, 37, 0.05);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.chapter__listen .listen__list {
  gap: var(--space-4);
}

.chapter__listen .listen__play {
  width: 40px;
  height: 40px;
}

.chapter__listen .aside__label {
  margin-bottom: var(--space-3);
}

.aside__label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-2);
}

.aside p:last-child {
  margin-bottom: 0;
  font-size: var(--text-sm);
  max-width: var(--measure);
}

/* === Фотоархив в главах: карусель (порт с site: 100 лет Черниговке) === */
.chapter__gallery {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--hairline);
}

.carousel {
  position: relative;
  max-width: var(--container);
  margin-inline: auto;
}

.carousel__viewport {
  position: relative;
  overflow: hidden;
  padding: var(--space-6) 0 calc(var(--space-6) + 44px);
  border-radius: var(--radius-card);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 12%, black 88%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 12%, black 88%, transparent 100%);
}

.carousel__track {
  position: relative;
  aspect-ratio: 16 / 8;
  perspective: 1200px;
  touch-action: pan-y;
}

.carousel__slide {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 60%;
  min-width: 0;
  margin: 0;
  background: var(--surface);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 10px 34px rgba(28, 26, 23, 0.18);
  transition: transform 800ms cubic-bezier(0.34, 1.2, 0.5, 1),
              opacity 800ms var(--ease),
              filter 800ms var(--ease),
              box-shadow 400ms var(--ease);
}

.carousel__track.is-animating .carousel__slide {
  will-change: transform, opacity;
}

.carousel__track.is-dragging .carousel__slide {
  transition: none;
  will-change: transform, opacity;
}

.carousel__slide.is-active {
  box-shadow: 0 20px 60px rgba(28, 26, 23, 0.3);
}

.carousel__media {
  aspect-ratio: 3 / 2;
  background: var(--paper-soft);
  overflow: hidden;
}

.carousel__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.carousel__caption {
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--hairline);
  opacity: 0;
  transition: opacity 600ms var(--ease);
}

.carousel__slide.is-active .carousel__caption { opacity: 1; }

.carousel__num {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.06em;
}

.carousel__text {
  font-size: var(--text-sm);
  color: var(--muted);
}

.carousel__arrow {
  position: absolute;
  top: 42%;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: rgba(250, 247, 242, 0.9);
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 18px rgba(28, 26, 23, 0.18);
  color: var(--ink);
  cursor: pointer;
  transform: translateY(-50%);
  transition: color var(--duration-fast) var(--ease),
              background-color var(--duration-fast) var(--ease),
              transform var(--duration-fast) var(--ease);
  z-index: 6;
}

.carousel__arrow:hover {
  color: var(--accent);
  background: var(--paper);
  transform: translateY(-50%) scale(1.06);
}

.carousel__arrow:active { transform: translateY(-50%) scale(0.94); }

.carousel__arrow--prev { left: 8px; }
.carousel__arrow--next { right: 8px; }

.carousel__bar {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-3);
}

.carousel__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-width: 0;
  flex: 1 1 auto;
}

.carousel__dot {
  position: relative;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease);
}

.carousel__dot::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hairline-strong);
  transform: translate(-50%, -50%);
  transition: background-color var(--duration-fast) var(--ease),
              transform var(--duration-fast) var(--ease);
}

.carousel__dot:hover::before { background: var(--accent-soft); }
.carousel__dot:active::before { transform: translate(-50%, -50%) scale(1.4); }
.carousel__dot.is-active::before { background: var(--accent); }

.carousel__counter {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--muted);
}

/* === Полноэкранный просмотр фото === */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.97) translateY(10px);
  transition: opacity var(--duration-med) var(--ease-out),
              transform var(--duration-med) var(--ease-out),
              visibility 0s linear var(--duration-med);
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0);
  transition: opacity var(--duration-med) var(--ease-out),
              transform var(--duration-med) var(--ease-out);
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 26, 23, 0.9);
  backdrop-filter: blur(8px);
}

.lightbox__frame {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: min(92vw, 1200px);
}

.lightbox__picture {
  display: grid;
  place-items: center;
}

.lightbox__picture img {
  max-width: 100%;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-card);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  transition: transform var(--duration-med) var(--ease-out),
              opacity var(--duration-med) var(--ease-out);
  -webkit-user-drag: none;
  user-select: none;
}

.lightbox__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(250, 247, 242, 0.25);
  border-radius: 50%;
  background: rgba(28, 26, 23, 0.4);
  color: var(--paper);
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease),
              color var(--duration-fast) var(--ease),
              transform 100ms ease-out;
}

.lightbox__arrow:hover {
  background: rgba(168, 68, 37, 0.85);
  color: #fff;
}

.lightbox__arrow:active { transform: translateY(-50%) scale(0.92); }

.lightbox__arrow--prev { left: var(--space-4); }
.lightbox__arrow--next { right: var(--space-4); }

.lightbox__close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  z-index: 2;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: rgba(28, 26, 23, 0.5);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: var(--text-xl);
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease),
              color var(--duration-fast) var(--ease),
              transform var(--duration-fast) var(--ease);
}

.lightbox__close:hover {
  background: var(--accent);
  color: #fff;
  transform: scale(1.06);
}

.lightbox__close:active { transform: scale(0.94); }

.lightbox__counter {
  position: absolute;
  bottom: var(--space-6);
  left: 0;
  right: 0;
  z-index: 2;
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  letter-spacing: 0.08em;
  color: rgba(250, 247, 242, 0.8);
}

html.is-locked,
body.is-locked {
  overflow: hidden;
}

/* === Переходы между главами === */
.chapter__foot {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-8);
}

.chapter__prev,
.chapter__next,
.chapter__end {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  color: var(--accent);
  padding: var(--space-2) 0;
  border-bottom: 1px solid transparent;
  transition: color var(--duration-fast) var(--ease),
              border-color var(--duration-fast) var(--ease);
}

.chapter__prev:hover,
.chapter__next:hover,
.chapter__end:hover {
  color: var(--accent-strong);
  border-color: var(--accent);
}

.chapter__prev:active,
.chapter__next:active,
.chapter__end:active {
  color: #7A2F13;
}

.chapter__next {
  margin-left: auto;
  text-align: right;
}

/* ============================================================
   Произведения (asymmetric split)
   ============================================================ */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-16);
  align-items: stretch;
}

.split__col {
  display: flex;
  flex-direction: column;
}

.split__col:first-child .works {
  margin-bottom: var(--space-12);
}

.split__col h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-xl);
  line-height: 1.3;
  margin-bottom: var(--space-6);
}

.works {
  list-style: none;
}

.works li {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding-block: var(--space-3);
  border-bottom: 1px solid var(--hairline);
}

.work__cover {
  position: relative;
  flex-shrink: 0;
  width: 120px;
  aspect-ratio: 2 / 3;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--duration-med) var(--ease-out),
              box-shadow var(--duration-med) var(--ease-out),
              color var(--duration-fast) var(--ease-out);
  will-change: transform;
}

.work__cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.work__cover-letter {
  position: relative;
  z-index: 0;
}

.work__cover > img:not(.is-missing) + .work__cover-letter {
  visibility: hidden;
}

.works li:hover .work__cover,
.work__cover:hover,
.works li:focus-within .work__cover,
.work__cover:focus-visible {
  transform: translateY(-4px) scale(1.012);
  border-color: var(--hairline-strong);
  box-shadow: 0 10px 40px rgba(28, 26, 23, 0.14);
  color: var(--accent-strong);
}

@media (prefers-reduced-motion: reduce) {
  .works li:hover .work__cover,
  .work__cover:hover,
  .works li:focus-within .work__cover,
  .work__cover:focus-visible {
    transform: none;
    box-shadow: 0 8px 18px rgba(28, 26, 23, 0.12);
  }
}

.works__title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--text-md);
  font-weight: 500;
}

.works__tag {
  flex-shrink: 1;
  min-width: 0;
  font-size: var(--text-xs);
  color: var(--muted);
  text-align: right;
  overflow-wrap: anywhere;
}

.theatre {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--space-8);
  align-items: stretch;
}

.theatre-nav {
  display: grid;
  gap: var(--space-3);
  align-content: start;
}

.theatre-tab {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: var(--space-4);
  width: 100%;
  padding: var(--space-4) var(--space-6);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: border-color var(--duration-fast) var(--ease),
              background-color var(--duration-fast) var(--ease),
              box-shadow var(--duration-med) var(--ease),
              transform 100ms ease-out;
}

.theatre-tab:active { transform: scale(0.99); }

.theatre-tab::before {
  content: "";
  position: absolute;
  inset: -1px -1px auto -1px;
  height: 3px;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-med) var(--ease);
}

.theatre-tab__text {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.theatre-tab__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
  transition: color var(--duration-fast) var(--ease);
}

.theatre-tab__meta {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.45;
  color: var(--muted);
}

.theatre-tab__arrow {
  flex-shrink: 0;
  align-self: center;
  width: 18px;
  height: 18px;
  color: var(--hairline-strong);
  transition: color var(--duration-fast) var(--ease),
              transform var(--duration-med) var(--ease);
}

.theatre-tab:hover {
  border-color: var(--hairline-strong);
  box-shadow: 0 6px 18px rgba(28, 26, 23, 0.08);
}

.theatre-tab:hover .theatre-tab__arrow {
  color: var(--accent);
  transform: translateX(3px);
}

.theatre-tab:active {
  box-shadow: 0 1px 4px rgba(28, 26, 23, 0.12);
}

.theatre-tab[aria-selected="true"] {
  border-color: var(--accent);
  box-shadow: 0 14px 34px rgba(28, 26, 23, 0.1);
}

.theatre-tab[aria-selected="true"]::before {
  transform: scaleX(1);
}

.theatre-tab[aria-selected="true"] .theatre-tab__title {
  color: var(--accent);
}

.theatre-tab[aria-selected="true"] .theatre-tab__arrow {
  color: var(--accent);
}

.theatre-stage {
  display: grid;
  min-width: 0;
}

.theatre-panel {
  min-width: 0;
  min-height: 340px;
}

.theatre-panel[hidden] { display: none; }

.theatre-panel__body {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-2);
  padding-top: var(--space-4);
  border-top: 1px solid var(--hairline);
}

.theatre-panel__body p {
  max-width: var(--measure);
}

@media (prefers-reduced-motion: no-preference) {
  .theatre-panel:not([hidden]) {
    animation: theatre-in 420ms var(--ease) both;
  }
}

@keyframes theatre-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .theatre-tab,
  .theatre-tab::before,
  .theatre-tab__title,
  .theatre-tab__arrow,
  .theatre-panel {
    transition: none;
    animation: none;
  }
}

/* Карточка-справка внутри колонок */
.card {
  margin-top: 0;
  flex: 1;
  padding: var(--space-6);
  border: 1px solid var(--hairline);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.card__label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-3);
}

.card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-xl);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-4);
}

.card__facts > div {
  padding-block: var(--space-2);
  border-top: 1px solid var(--hairline);
}

.card__facts dt {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--space-1);
}

.card__facts dd {
  font-size: var(--text-sm);
  color: var(--muted);
}

/* ============================================================
   Лента «Мир переводов»
   ============================================================ */
.band {
  background: var(--forest);
  color: var(--paper);
  padding-block: var(--space-20);
}

.band .kicker--on-band { color: var(--paper); opacity: 0.85; }

.band__intro {
  margin-top: var(--space-4);
  max-width: 56ch;
  color: var(--paper);
  opacity: 0.9;
}

.countries {
  list-style: none;
  margin-top: var(--space-12);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: var(--space-16);
}

.countries li {
  padding-block: var(--space-6);
  border-top: 1px solid var(--hairline-on-band);
}

.countries__name {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-xl);
  letter-spacing: -0.01em;
  margin-bottom: var(--space-2);
  color: var(--paper);
}

.countries p {
  color: var(--paper);
  opacity: 0.9;
  max-width: 44ch;
}

/* ============================================================
   Награды (компактная карточная сетка)
   ============================================================ */
.awards {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

.awards__item {
  position: relative;
  padding: var(--space-6);
  border: 1px solid var(--hairline);
  border-top: 3px solid var(--accent);
  background: var(--surface);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.awards__year {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-2xl);
  line-height: 1;
  color: var(--accent-soft);
}

.awards__item::after {
  content: "+";
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: 1;
  color: var(--hairline-strong);
  transition: color var(--duration-fast) var(--ease),
    transform var(--duration-med) var(--ease);
}

.awards__item:hover::after,
.awards__item:focus-within::after {
  color: var(--accent);
  transform: rotate(45deg);
}

.awards__title {
  font-size: var(--text-sm);
  line-height: 1.45;
  font-weight: 500;
  color: var(--ink);
  max-width: none;
}

.awards__desc {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--duration-med) var(--ease);
}

.awards__desc-inner {
  overflow: hidden;
  min-height: 0;
}

.awards__desc-inner p {
  margin-top: var(--space-2);
  border-top: 1px dashed var(--hairline);
  padding-top: var(--space-2);
  font-size: var(--text-sm);
  line-height: 1.5;
  font-weight: 400;
  color: var(--muted);
  max-width: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--duration-med) var(--ease),
    transform var(--duration-med) var(--ease);
}

.awards__item:hover .awards__desc,
.awards__item:focus-within .awards__desc {
  grid-template-rows: 1fr;
}

.awards__item:hover .awards__desc-inner p,
.awards__item:focus-within .awards__desc-inner p {
  opacity: 1;
  transform: none;
}

@media (hover: none) {
  .awards__desc {
    grid-template-rows: 1fr;
  }

  .awards__desc-inner p {
    opacity: 1;
    transform: none;
  }

  .awards__item::after {
    display: none;
  }

  .carousel__arrow {
    width: 48px;
    height: 48px;
  }
}

/* ============================================================
   Библиотека (двухколоночный макет)
   ============================================================ */
.library {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--space-16);
  align-items: start;
}

.library__story > p {
  max-width: var(--measure);
  margin-bottom: var(--space-4);
}

.library__story > .quote {
  margin-block: var(--space-8);
}

.library__card {
  position: sticky;
  top: calc(96px + var(--space-8));
  padding: var(--space-6);
  border: 1px solid var(--hairline);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.library__card-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-3);
}

.library__card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-xl);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-4);
}

.library__facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-1) var(--space-4);
}

.library__facts > div {
  padding-block: var(--space-2);
  border-top: 1px solid var(--hairline);
}

.library__facts dt {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-1);
}

.library__facts dd {
  font-size: var(--text-sm);
  color: var(--ink);
}

/* Вехи истории: структурированный список */
.library__milestones {
  margin-top: var(--space-2);
  padding-top: var(--space-4);
  border-top: 1px solid var(--hairline);
}

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

.milestones li {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  padding-block: var(--space-2);
  border-bottom: 1px solid var(--hairline);
  font-size: var(--text-sm);
  color: var(--ink);
}

.milestones li:last-child {
  border-bottom: none;
}

.milestones span {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--accent);
  min-width: 3.5ch;
}

/* Визиты: минималистичный таймлайн */
.library__visits {
  margin-top: var(--space-2);
  padding-top: var(--space-4);
  border-top: 1px solid var(--hairline);
}

.library__visits-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-4);
}

.visits {
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  border-top: 2px solid var(--hairline);
  padding-top: 0;
}

.visits li {
  flex: 1;
  position: relative;
  text-align: center;
}

.visits li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface);
  transform: translate(-50%, -50%);
}

.visits span {
  display: block;
  margin-top: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--ink);
}

/* ============================================================
   Библиотека (editorial stack + quote)
   ============================================================ */
.quote {
  margin-block: var(--space-12);
  padding-block: var(--space-8);
  border-top: 1px solid var(--hairline-strong);
  border-bottom: 1px solid var(--hairline-strong);
}

.quote p {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.mono, code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: rgba(28, 26, 23, 0.05);
  border-radius: var(--radius);
  padding: 0.1em 0.35em;
}

/* ============================================================
   Ссылки
   ============================================================ */
a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(168, 68, 37, 0.4);
  text-underline-offset: 3px;
  transition: color var(--duration-fast) var(--ease),
              text-decoration-color var(--duration-fast) var(--ease);
}

a:hover {
  color: var(--accent-strong);
  text-decoration-color: transparent;
}
a:active { color: #7A2F13; }

/* ============================================================
   Медиа-зона / панорама (в будущем здесь будет медиа)
   ============================================================ */
.pano {
  position: relative;
  display: block;
  width: 100%;
  max-width: calc(150svh - 8.0625rem);
  margin-inline: auto;
  aspect-ratio: 3 / 2;
  background: var(--paper-soft);
}

.pano__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pano__player {
  position: absolute;
  left: var(--space-6);
  bottom: var(--space-6);
  z-index: 1;
  padding: var(--space-4) var(--space-6);
  border: 1px solid rgba(250, 247, 242, 0.55);
  background: rgba(250, 247, 242, 0.15);
  -webkit-backdrop-filter: blur(4px) brightness(1.18) saturate(1.35);
  backdrop-filter: blur(4px) brightness(1.18) saturate(1.35);
  border-radius: var(--radius-card);
  box-shadow: 0 4px 24px rgba(28, 26, 23, 0.35), inset 0 1px 0 rgba(250, 247, 242, 0.35);
}

.pano__player .listen__list {
  gap: var(--space-4);
}

.pano__player .listen__play {
  width: 40px;
  height: 40px;
}

/* ============================================================
   Футер
   ============================================================ */
.footer {
  border-top: 1px solid var(--hairline);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-8);
  font-size: var(--text-sm);
  color: var(--muted);
}

.footer__top {
  text-decoration: none;
  font-weight: 500;
}

/* ============================================================
   Motion: reveal + hero-вход
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 560ms var(--ease), transform 560ms var(--ease);
  }

  .js [data-reveal].is-in {
    opacity: 1;
    transform: none;
  }

  @keyframes rise {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: none; }
  }

  .page-head__emblem { animation: rise 600ms var(--ease) both; }
  .page-head .kicker { animation: rise 600ms var(--ease) 80ms both; }
  .page-head h1 { animation: rise 600ms var(--ease) 140ms both; }
  .page-head .page-head__intro { animation: rise 600ms var(--ease) 220ms both; }
}

/* ============================================================
   Респонсив
   ============================================================ */
@media (max-width: 900px) {
  .split,
  .theatre {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .story__grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .story__toc {
    position: static;
  }

  .toc-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-4);
    border-top: none;
  }

  .toc-list li {
    border-bottom: none;
  }

  .toc-link {
    padding: var(--space-1) var(--space-2);
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
  }

  .toc-years {
    margin-left: auto;
  }

  .library {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }

  .library__card {
    position: static;
  }

  .awards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .page-head__emblem {
    right: var(--space-6);
  }
  .section { padding-block: var(--space-12); }

  .theatre-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-2);
  }

  .theatre-tab {
    padding: var(--space-3) var(--space-2);
    justify-content: center;
  }

  .theatre-tab__meta,
  .theatre-tab__arrow { display: none; }

  .theatre-tab__title {
    font-size: var(--text-md);
    text-align: center;
  }

  .theatre-panel {
    min-height: 0;
  }

  .listen__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
  }

  .carousel__arrow {
    width: 40px;
    height: 40px;
  }

  .carousel__dots { display: none; }

  .carousel__bar {
    justify-content: flex-end;
  }

  .lightbox__arrow {
    width: 40px;
    height: 40px;
  }

  .lightbox__counter {
    bottom: var(--space-4);
  }
  .page-head { min-height: 70vh; min-height: 460px; }

  .listen__list {
    flex-direction: column;
    gap: var(--space-4);
  }
  .page-head { min-height: 70vh; min-height: 460px; }
  .page-head h1 { font-size: clamp(2.6rem, 11vw, 4.5rem); }
  .page-head__emblem { font-size: clamp(7rem, 30vw, 15rem); bottom: -0.5em; top: auto; }
  .page-head .page-head__intro { font-size: var(--text-md); }
  .section__head { margin-bottom: var(--space-8); }

  .masthead__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }

  .nav { justify-content: flex-start; }

  .chapter { padding-block: var(--space-8); }

  .chapter__head {
    gap: var(--space-4);
  }

  .chapter__num {
    font-size: 2.6rem;
  }

  .chapter__next {
    margin-left: 0;
    text-align: left;
  }

  .work__cover {
    width: 96px;
    font-size: 1.5rem;
  }

  .works li {
    gap: var(--space-3);
  }

  .countries {
    grid-template-columns: 1fr;
    column-gap: 0;
  }

  .awards {
    grid-template-columns: 1fr;
  }

  .pano__player {
    left: var(--space-4);
    bottom: var(--space-4);
    right: var(--space-4);
    padding: var(--space-3) var(--space-4);
  }
}

@media (max-width: 420px) {
  .container { padding-inline: var(--space-4); }
  .section { padding-block: var(--space-8); }
  .band { padding-block: var(--space-12); }
  .page-head__emblem { right: var(--space-4); }
}

/* Reduced-motion: итоговый guard поверх всех ранее объявленных transition */
@media (prefers-reduced-motion: reduce) {
  .toc-link, .listen__play, .carousel__dot, .carousel__dot::before,
  .lightbox__arrow, .lightbox__close, .lightbox,
  .lightbox__picture img, .theatre-tab, .theatre-tab::before,
  .theatre-tab__title, .theatre-tab__arrow, .theatre-panel,
  .awards__desc, .awards__desc-inner p, .chapter__prev,
  .chapter__next, .chapter__end {
    transition: none;
    animation: none;
  }

  .js [data-reveal] { opacity: 1; transform: none; }

  .carousel__track { transition: none; }
  .carousel__slide, .carousel__arrow { transition: none; }
}