/* ============================================================
   МУЗЕЙ ШАВЕРМЫ · Санкт-Петербург
   Экспозиция-исследование. Оформление: «архивная папка»
   ============================================================ */

:root {
  --ink: #17120f;
  --ink-2: #241c17;
  --ink-3: #2f251e;
  --paper: #f4ede1;
  --paper-2: #e9dfcd;
  --paper-3: #dccfba;
  --red: #a32a20;
  --red-soft: #c4574a;
  --gold: #c69a54;
  --gold-soft: #e0c294;
  --olive: #6d7b4d;
  --muted: #6a5f51;
  --muted-dark: #a99c8b;

  --serif: "PT Serif", "Noto Serif", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;

  --maxw: 1180px;
  --radius: 3px;
  --shadow: 0 24px 60px -30px rgba(23, 18, 15, .55);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; }

::selection { background: var(--gold); color: var(--ink); }

/* ---------- утилиты ---------- */
.wrap {
  width: min(100% - 2.5rem, var(--maxw));
  margin-inline: auto;
}

.eyebrow {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--paper);
  color: var(--ink);
  padding: .8rem 1.2rem;
  z-index: 999;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- верхняя панель ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(23, 18, 15, .82);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(244, 237, 225, .12);
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  min-height: 62px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: .55rem;
  text-decoration: none;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 1.02rem;
  letter-spacing: .01em;
  white-space: nowrap;
}
.brand b { font-weight: 700; }
.brand span {
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(198, 154, 84, .45);
  padding: .18rem .4rem;
  border-radius: 2px;
}

.nav {
  margin-left: auto;
  display: flex;
  gap: .15rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  position: relative;
  display: block;
  padding: .45rem .55rem;
  text-decoration: none;
  color: var(--muted-dark);
  font-size: .78rem;
  letter-spacing: .04em;
  border-radius: 2px;
  transition: color .2s ease, background .2s ease;
  white-space: nowrap;
}
.nav a:hover { color: var(--paper); background: rgba(244, 237, 225, .07); }
.nav a[aria-current="true"] { color: var(--gold); }
.nav a[aria-current="true"]::after {
  content: "";
  position: absolute;
  left: .55rem; right: .55rem; bottom: .18rem;
  height: 1px;
  background: var(--gold);
}

.nav__num {
  font-family: var(--mono);
  font-size: .62rem;
  color: rgba(244, 237, 225, .55);
  margin-right: .3rem;
}

.burger {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid rgba(244, 237, 225, .3);
  color: var(--paper);
  padding: .45rem .7rem;
  border-radius: 2px;
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: min(92svh, 820px);
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid rgba(244, 237, 225, .1);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: url("../img/archive-shaverma-vitebsky-1997.jpg");
  background-size: cover;
  background-position: center 42%;
  filter: saturate(.85) contrast(1.05);
  transform: scale(1.02);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 80% at 15% 20%, rgba(23, 18, 15, .28), transparent 60%),
    linear-gradient(to top, rgba(23, 18, 15, .97) 6%, rgba(23, 18, 15, .72) 42%, rgba(23, 18, 15, .45) 100%);
}

.hero__inner {
  padding: 5.5rem 0 3.2rem;
  color: var(--paper);
}

.hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 1.4rem;
}
.hero__kicker::before {
  content: "";
  width: 42px;
  height: 1px;
  background: var(--gold);
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.9rem, 8.4vw, 6.6rem);
  line-height: .92;
  letter-spacing: -.02em;
  margin: 0 0 .35rem;
  text-wrap: balance;
}
.hero h1 em {
  display: block;
  font-style: normal;
  color: var(--gold);
  font-size: .38em;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-family: var(--mono);
  margin-top: 1.1rem;
  line-height: 1.4;
}

.hero__lead {
  max-width: 62ch;
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  color: rgba(244, 237, 225, .86);
  margin: 1.6rem 0 0;
}

.hero__lead b { color: var(--paper); font-weight: 600; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 2.8rem;
  border: 1px solid rgba(244, 237, 225, .16);
  background: rgba(244, 237, 225, .16);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat {
  background: rgba(23, 18, 15, .58);
  padding: 1rem 1.1rem;
}
.stat b {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1;
  color: var(--gold-soft);
}
.stat span {
  display: block;
  margin-top: .45rem;
  font-size: .76rem;
  line-height: 1.35;
  color: rgba(244, 237, 225, .62);
}

.hero__scroll {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-top: 2.6rem;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(244, 237, 225, .62);
}
.hero__scroll::after {
  content: "";
  width: 1px; height: 34px;
  background: linear-gradient(to bottom, var(--gold), transparent);
}

/* ---------- общий каркас зала ---------- */
.hall {
  padding: clamp(3.6rem, 8vw, 6.4rem) 0;
  background: var(--paper);
  border-bottom: 1px solid var(--paper-3);
}
.hall--dark {
  background: var(--ink);
  color: var(--paper);
  border-bottom: 1px solid rgba(244, 237, 225, .1);
}
.hall--paper2 { background: var(--paper-2); }

.hall__head {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.6rem);
  align-items: start;
  margin-bottom: clamp(2rem, 4vw, 3.2rem);
}

.hall__num {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: .5rem;
  border-top: 2px solid var(--red);
  padding-top: .7rem;
}
.hall--dark .hall__num { color: var(--muted-dark); border-top-color: var(--gold); }
.hall__num b {
  display: block;
  font-family: var(--serif);
  font-size: 2.1rem;
  line-height: 1;
  color: var(--red);
  letter-spacing: 0;
  margin-bottom: .2rem;
}
.hall--dark .hall__num b { color: var(--gold); }

.hall__title {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 4.2vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -.015em;
  margin: 0 0 .7rem;
  text-wrap: balance;
}
.hall__sub {
  max-width: 68ch;
  color: #564a3e;
  margin: 0;
}
.hall--dark .hall__sub { color: rgba(244, 237, 225, .7); }

/* ---------- текстовые блоки ---------- */
.prose { max-width: 72ch; }
.prose p { margin: 0 0 1.05rem; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { font-weight: 650; }
.prose em { font-style: italic; }

.dropcap::first-letter {
  float: left;
  font-family: var(--serif);
  font-size: 3.4em;
  line-height: .82;
  padding: .06em .12em 0 0;
  color: var(--red);
}
.hall--dark .dropcap::first-letter { color: var(--gold); }

.pullquote {
  margin: 2.2rem 0;
  padding: 1.5rem 0 1.5rem 1.6rem;
  border-left: 3px solid var(--gold);
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.3vw, 1.5rem);
  line-height: 1.42;
  font-style: italic;
}
.pullquote cite {
  display: block;
  margin-top: .9rem;
  font-family: var(--mono);
  font-style: normal;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- две колонки ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(1.6rem, 4vw, 3.4rem);
  align-items: start;
}
.split--reverse .split__media { order: -1; }

.figure {
  margin: 0;
  background: var(--ink-2);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.figure img { width: 100%; height: auto; }
.figure figcaption {
  padding: .85rem 1rem 1rem;
  color: rgba(244, 237, 225, .78);
  font-size: .78rem;
  line-height: 1.5;
  border-top: 1px solid rgba(244, 237, 225, .1);
}
.figure figcaption b {
  display: block;
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .3rem;
  font-weight: 500;
}

.figure--framed {
  background: var(--paper);
  padding: .55rem .55rem 0;
  border: 1px solid var(--paper-3);
  box-shadow: 0 18px 40px -28px rgba(23, 18, 15, .5);
}
.figure--framed figcaption {
  color: #6b5c4c;
  border-top: 1px solid var(--paper-3);
  margin-top: .5rem;
}
.figure--framed figcaption b { color: var(--red); }

/* ---------- плашка «экспонат» ---------- */
.exhibit-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--red);
  border: 1px solid rgba(163, 42, 32, .35);
  border-radius: 999px;
  padding: .28rem .7rem;
  margin-bottom: 1rem;
  background: rgba(163, 42, 32, .05);
}
.hall--dark .exhibit-badge {
  color: var(--gold-soft);
  border-color: rgba(198, 154, 84, .4);
  background: rgba(198, 154, 84, .08);
}

/* ---------- хронология ---------- */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 118px;
  top: .6rem;
  bottom: .6rem;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--paper-3) 6%, var(--paper-3) 94%, transparent);
}
.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.4rem);
  padding: .9rem 0;
}
.timeline li::after {
  content: "";
  position: absolute;
  left: 114px;
  top: 1.55rem;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--red);
  box-sizing: content-box;
}
.timeline li.is-milestone::after {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(163, 42, 32, .12);
}
.tl-year {
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--red);
  text-align: right;
  line-height: 1.35;
  padding-right: .2rem;
}
.tl-year small {
  display: block;
  font-family: var(--mono);
  font-size: .6rem;
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: .15rem;
}
.tl-body { padding-left: .2rem; }
.tl-body h4 {
  margin: 0 0 .25rem;
  font-family: var(--serif);
  font-size: 1.02rem;
  font-weight: 700;
}
.tl-body p { margin: 0; font-size: .93rem; color: #4f4438; }
.tl-body .src {
  display: inline-block;
  margin-top: .3rem;
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .06em;
  color: var(--muted);
}

/* ---------- карточки легендарных точек ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(1rem, 2.2vw, 1.6rem);
}

.card {
  display: flex;
  flex-direction: column;
  background: #fffaf1;
  border: 1px solid var(--paper-3);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 16px 40px -34px rgba(23, 18, 15, .6);
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 26px 50px -34px rgba(23, 18, 15, .55);
}

.card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--ink-2);
}
.card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.card:hover .card__media img { transform: scale(1.04); }
.card__media--placeholder {
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(135deg, rgba(244, 237, 225, .05) 0 8px, transparent 8px 16px),
    linear-gradient(150deg, #2b211a, #17120f 70%);
}
.card__media--placeholder span {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 7vw, 4rem);
  color: rgba(198, 154, 84, .5);
  line-height: 1;
}

.card__tag {
  position: absolute;
  left: .7rem; top: .7rem;
  font-family: var(--mono);
  font-size: .6rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--gold);
  padding: .25rem .5rem;
  border-radius: 2px;
}

.card__body {
  padding: 1.1rem 1.15rem 1.2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card__body h3 {
  margin: 0 0 .3rem;
  font-family: var(--serif);
  font-size: 1.18rem;
  line-height: 1.22;
}
.card__addr {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .06em;
  color: var(--red);
  margin-bottom: .7rem;
}
.card__body p {
  margin: 0 0 .9rem;
  font-size: .9rem;
  color: #4f4438;
}
.card__meta {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.chip {
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .05em;
  color: #5c4f42;
  border: 1px solid var(--paper-3);
  background: var(--paper);
  padding: .2rem .45rem;
  border-radius: 2px;
}

/* ---------- анатомия ---------- */
.anatomy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.6rem, 4vw, 3rem);
  align-items: start;
}

.layer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: layer;
  border-top: 1px solid var(--paper-3);
}
.layer-list li {
  counter-increment: layer;
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  gap: .9rem;
  padding: .95rem 0;
  border-bottom: 1px solid var(--paper-3);
}
.layer-list li::before {
  content: counter(layer, decimal-leading-zero);
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .1em;
  color: var(--red);
  padding-top: .25rem;
}
.layer-list b {
  display: block;
  font-family: var(--serif);
  font-size: 1rem;
  margin-bottom: .1rem;
}
.layer-list span { font-size: .87rem; color: #4f4438; }

/* ---------- таблица сравнения ---------- */
.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: .93rem;
  margin-top: .4rem;
}
.compare caption {
  text-align: left;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: .8rem;
}
.compare th, .compare td {
  text-align: left;
  padding: .85rem .9rem;
  border-bottom: 1px solid var(--paper-3);
  vertical-align: top;
}
.compare thead th {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--red);
  border-bottom: 2px solid var(--red);
  white-space: nowrap;
}
.compare tbody th {
  font-weight: 600;
  font-family: var(--serif);
  font-size: .95rem;
  width: 26%;
  color: #3c332a;
}

/* ---------- цитата-плакат ---------- */
.plakat {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  padding: clamp(1.6rem, 4vw, 3rem);
  position: relative;
  overflow: hidden;
}
.plakat::before {
  content: "“";
  position: absolute;
  right: 1rem; top: -2.4rem;
  font-family: var(--serif);
  font-size: 14rem;
  line-height: 1;
  color: rgba(198, 154, 84, .13);
}
.plakat p {
  position: relative;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 3.4vw, 2.2rem);
  line-height: 1.25;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.plakat footer {
  position: relative;
  margin-top: 1.2rem;
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ---------- галерея ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(.6rem, 1.4vw, 1rem);
}
.gallery__item {
  position: relative;
  margin: 0;
  border: 0;
  padding: 0;
  background: var(--ink-2);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  grid-column: span 4;
  aspect-ratio: 4 / 3;
}
.gallery__item--wide { grid-column: span 8; }
.gallery__item--tall { grid-column: span 4; aspect-ratio: 3 / 4; }
.gallery__item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .7s cubic-bezier(.2, .7, .2, 1), filter .4s ease;
}
.gallery__item:hover img { transform: scale(1.05); }
.gallery__item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2.4rem .85rem .75rem;
  font-size: .74rem;
  line-height: 1.4;
  color: var(--paper);
  text-align: left;
  background: linear-gradient(to top, rgba(23, 18, 15, .94), rgba(23, 18, 15, .55) 55%, transparent);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .3s ease, transform .3s ease;
}
.gallery__item:hover figcaption,
.gallery__item:focus-visible figcaption { opacity: 1; transform: none; }
.gallery__item:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* лайтбокс */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  place-items: center;
  background: rgba(12, 9, 7, .94);
  padding: clamp(1rem, 4vw, 3rem);
}
.lightbox.is-open { display: grid; }
.lightbox__fig {
  margin: 0;
  max-width: min(1200px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: .8rem;
}
.lightbox__fig img {
  max-height: 76svh;
  width: auto;
  margin-inline: auto;
  border-radius: 2px;
}
.lightbox__cap {
  color: rgba(244, 237, 225, .8);
  font-size: .84rem;
  line-height: 1.5;
  max-width: 80ch;
}
.lightbox__cap b { color: var(--gold); font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; display: block; margin-bottom: .25rem; }
.lightbox__close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: none;
  border: 1px solid rgba(244, 237, 225, .35);
  color: var(--paper);
  width: 44px; height: 44px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
}
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 1px solid rgba(244, 237, 225, .3);
  color: var(--paper);
  width: 46px; height: 46px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
}
.lightbox__nav:hover, .lightbox__close:hover { background: rgba(244, 237, 225, .12); }
.lightbox__nav--prev { left: 1rem; }
.lightbox__nav--next { right: 1rem; }

/* ---------- видеозал ---------- */
.videos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(1rem, 2.2vw, 1.6rem);
}
.video {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border: 1px solid rgba(244, 237, 225, .16);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(244, 237, 225, .04);
  transition: border-color .25s ease, background .25s ease, transform .25s ease;
}
.video:hover {
  border-color: rgba(198, 154, 84, .55);
  background: rgba(244, 237, 225, .07);
  transform: translateY(-2px);
}
.video__poster {
  position: relative;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 25%, rgba(198, 154, 84, .22), transparent 55%),
    repeating-linear-gradient(135deg, rgba(244, 237, 225, .04) 0 10px, transparent 10px 20px),
    linear-gradient(160deg, #2b211a, #120e0b);
  border-bottom: 1px solid rgba(244, 237, 225, .12);
}
.video__play {
  width: 62px; height: 62px;
  border-radius: 50%;
  border: 1px solid rgba(198, 154, 84, .7);
  display: grid;
  place-items: center;
  color: var(--gold);
  background: rgba(23, 18, 15, .5);
  transition: background .25s ease, transform .25s ease;
}
.video:hover .video__play { background: var(--gold); color: var(--ink); transform: scale(1.06); }
.video__play svg { width: 20px; height: 20px; }
.video__dur {
  position: absolute;
  right: .6rem; bottom: .6rem;
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .08em;
  color: rgba(244, 237, 225, .7);
  background: rgba(23, 18, 15, .7);
  padding: .15rem .4rem;
  border-radius: 2px;
}
.video__body { padding: .95rem 1rem 1.1rem; }
.video__body h3 {
  margin: 0 0 .35rem;
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.3;
  color: var(--paper);
}
.video__body p {
  margin: 0;
  font-size: .82rem;
  color: rgba(244, 237, 225, .6);
}
.video__ch {
  display: block;
  margin-top: .55rem;
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ---------- карта / адреса ---------- */
.addr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: var(--paper-3);
  border: 1px solid var(--paper-3);
  border-radius: var(--radius);
  overflow: hidden;
}
.addr {
  background: var(--paper);
  padding: 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.addr h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.02rem;
}
.addr span {
  font-family: var(--mono);
  font-size: .72rem;
  color: #5c4f42;
  letter-spacing: .02em;
}
.addr a {
  margin-top: .6rem;
  align-self: flex-start;
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--red);
  border-bottom: 1px solid rgba(163, 42, 32, .4);
  padding-bottom: 2px;
}
.addr a:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* ---------- источники ---------- */
.sources {
  columns: 2;
  column-gap: clamp(1.6rem, 4vw, 3rem);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: src;
}
.sources li {
  counter-increment: src;
  break-inside: avoid;
  margin-bottom: .95rem;
  padding-left: 2.1rem;
  position: relative;
  font-size: .84rem;
  line-height: 1.5;
  color: #4f4438;
}
.sources li::before {
  content: "[" counter(src) "]";
  position: absolute;
  left: 0;
  font-family: var(--mono);
  font-size: .68rem;
  color: var(--red);
}
.sources a { color: inherit; text-decoration-color: rgba(163, 42, 32, .35); text-underline-offset: 2px; }
.sources a:hover { color: var(--red); }
.sources b { font-weight: 600; }

/* ---------- подвал ---------- */
.footer {
  background: #100d0b;
  color: rgba(244, 237, 225, .62);
  padding: clamp(2.4rem, 5vw, 4rem) 0 2rem;
  font-size: .84rem;
}
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(244, 237, 225, .12);
}
.footer h4 {
  margin: 0 0 .8rem;
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}
.footer p { margin: 0 0 .6rem; }
.footer a { color: rgba(244, 237, 225, .8); text-decoration-color: rgba(244, 237, 225, .3); }
.footer a:hover { color: var(--gold); }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  padding-top: 1.4rem;
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(244, 237, 225, .55);
}

/* ---------- появление при скролле ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- адаптив ---------- */
@media (max-width: 1080px) {
  .nav a { padding: .4rem .4rem; font-size: .72rem; }
  .nav__num { display: none; }
}

@media (max-width: 900px) {
  .split, .anatomy { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .gallery__item { grid-column: span 6; }
  .gallery__item--wide { grid-column: span 12; }
  .gallery__item--tall { grid-column: span 6; aspect-ratio: 4 / 3; }
  .sources { columns: 1; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .burger { display: block; }
  .nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    flex-direction: column;
    align-items: stretch;
    background: rgba(16, 13, 11, .98);
    border-bottom: 1px solid rgba(244, 237, 225, .14);
    padding: .6rem 1rem 1rem;
    gap: .1rem;
  }
  .nav.is-open { display: flex; }
  .nav a { font-size: .92rem; padding: .6rem .3rem; border-bottom: 1px solid rgba(244, 237, 225, .07); }
  .nav__num { display: inline; }

  .hall__head { grid-template-columns: 1fr; gap: 1rem; }
  .hall__num { display: flex; align-items: baseline; gap: .6rem; border-top: 0; padding-top: 0; }
  .hall__num b { font-size: 1.3rem; margin: 0; }

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

  .timeline::before { left: 6px; }
  .timeline li { grid-template-columns: 1fr; gap: .2rem; padding-left: 1.9rem; }
  .timeline li::after { left: 1px; top: 1.35rem; }
  .tl-year { text-align: left; }
  .tl-year small { display: inline; margin-left: .5rem; }

  .footer__grid { grid-template-columns: 1fr; }
  .gallery__item, .gallery__item--tall { grid-column: span 12; aspect-ratio: 4 / 3; }
  .gallery__item figcaption { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- печать ---------- */
@media print {
  .topbar, .hero__scroll, .lightbox, .burger { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .hall, .hall--dark, .hall--paper2 { background: #fff !important; color: #000 !important; padding: 1.2cm 0; }
  .hall--dark .hall__sub, .hall--dark .hall__num { color: #333 !important; }
  .hero { min-height: auto; color: #000; }
  .hero::before, .hero__bg { display: none; }
  .hero h1, .hero h1 em { color: #000; }
  .hero__lead { color: #222; }
  .stat { background: #fff; border: 1px solid #ccc; }
  .stat b, .stat span { color: #000; }
  .card, .figure, .plakat, .video { break-inside: avoid; border: 1px solid #ccc; }
  .reveal { opacity: 1 !important; transform: none !important; }
  a { text-decoration: none; color: #000; }
  .sources a::after { content: " (" attr(href) ")"; font-size: 8pt; color: #555; }
}

/* ============================================================
   ДОПОЛНЕНИЯ: карточки-заметки, ленты витрин
   ============================================================ */

/* заметки / версии / мини-факты */
.notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--paper-3);
  border: 1px solid var(--paper-3);
  border-radius: var(--radius);
  overflow: hidden;
}
.note {
  background: var(--paper);
  padding: 1.15rem 1.2rem 1.25rem;
}
.note b {
  display: block;
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.3;
  margin-bottom: .45rem;
  color: var(--ink);
}
.note span {
  display: block;
  font-size: .85rem;
  line-height: 1.55;
  color: #4f4438;
}
.hall--dark .notes { background: rgba(244, 237, 225, .16); border-color: rgba(244, 237, 225, .16); }
.hall--dark .note { background: var(--ink-2); }
.hall--dark .note b { color: var(--paper); }
.hall--dark .note span { color: rgba(244, 237, 225, .7); }

/* горизонтальная лента витрин */
.strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(.7rem, 1.4vw, 1rem);
}
.strip .figure figcaption { font-size: .74rem; }
.strip .figure figcaption b { font-size: .6rem; }

/* тег внутри текстовой части карточки */
.card__body .card__tag {
  position: static;
  display: inline-block;
  margin-bottom: .55rem;
  align-self: flex-start;
}

/* карточка без фото: подпись-экспонат */
.card__media--placeholder span {
  font-family: var(--serif);
  letter-spacing: 0;
}

@media (max-width: 900px) {
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .strip { grid-template-columns: 1fr; }
}

/* надёжное появление: скрывает только JS, а не CSS по умолчанию */
.reveal--pending {
  opacity: 0;
  transform: translateY(18px);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}
@media print {
  .reveal--pending { opacity: 1 !important; transform: none !important; }
}

/* ============================================================
   ТЁМНЫЙ ЗАЛ: читаемость текста на тёмном фоне
   (светлые значения по умолчанию здесь дают почти невидимый текст)
   ============================================================ */

.hall--dark .layer-list { border-top-color: rgba(244, 237, 225, .18); }
.hall--dark .layer-list li { border-bottom-color: rgba(244, 237, 225, .12); }
.hall--dark .layer-list li::before { color: var(--gold); }
.hall--dark .layer-list b { color: var(--paper); }
.hall--dark .layer-list span { color: rgba(244, 237, 225, .74); }

.hall--dark .compare caption { color: rgba(244, 237, 225, .55); }
.hall--dark .compare th,
.hall--dark .compare td { border-bottom-color: rgba(244, 237, 225, .16); }
.hall--dark .compare thead th {
  color: var(--gold);
  border-bottom-color: rgba(198, 154, 84, .55);
}
.hall--dark .compare tbody th { color: var(--paper); }
.hall--dark .compare tbody td { color: rgba(244, 237, 225, .82); }

.hall--dark .figure figcaption b { color: var(--gold); }

/* ============================================================
   ВИДЕОЗАЛ: локальные файлы (video + poster)
   ============================================================ */
.video--local {
  margin: 0;
  cursor: default;
  transition: none;
  cursor: default;
}
.video--local:hover {
  transform: none;
  border-color: rgba(244, 237, 225, .16);
  background: rgba(244, 237, 225, .04);
}

.video--local video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: #000;
  border-bottom: 1px solid rgba(244, 237, 225, .12);
}

.video--local figcaption h3 {
  margin: 0 0 .35rem;
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.3;
  color: var(--paper);
}
.video--local figcaption p {
  margin: 0;
  font-size: .82rem;
  color: rgba(244, 237, 225, .62);
}
.video--local .video__ch {
  display: block;
  margin-top: .55rem;
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
}

/* Печать: видео не должно занимать полстраницы чёрным прямоугольником */
@media print {
  .video--local video {
    max-height: 5.5cm;
    object-fit: cover;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .video--local { break-inside: avoid; }
}
