/* catalog.css — STUKALOV.MD. Концепция «ФОНД»: личный архив-музей, а не витрина товаров.
   Материал: архивная бумага, фотоотпечаток в паспарту, музейная этикетка, инвентарный номер.
   Типографика: Playfair Display (антиква-«вывеска») + Inter (этикетка/текст).
   Светлая («бумага») и тёмная («хранилище») темы через [data-theme]. Mobile-first.
   Правка → pm2 restart stukalov (seo.js кэширует index.html в константу при старте). */

/* ── тема: бумага (светлая) ─────────────────────────────────────────────── */
:root {
  --paper: #f4efe4;
  --paper2: #ece4d5;
  --card: #fffcf6;
  --ink: #211711;
  --ink2: #57453a;
  --muted: #7d6a58;
  --line: rgba(33, 23, 17, 0.14);
  --hair: rgba(33, 23, 17, 0.22);
  --accent: #ab2f22;
  --accent2: #8c1c1c;
  --gold: #97702f;
  --scrim: rgba(28, 18, 12, 0.82);
  --shadow-s: 0 1px 3px rgba(33, 23, 17, 0.10);
  --shadow-m: 0 10px 30px -12px rgba(33, 23, 17, 0.34);
  --shadow-l: 0 26px 60px -24px rgba(33, 23, 17, 0.48);
  --rad: 4px;         /* архив — почти без скруглений: лист, а не кнопка магазина */
  --rad-lg: 8px;
  --wrap: 1220px;
  --serif: 'Playfair Display', 'Iowan Old Style', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;
  color-scheme: light;
}
/* ── тема: хранилище (тёмная) ───────────────────────────────────────────── */
[data-theme="dark"] {
  --paper: #16120e;
  --paper2: #1e1813;
  --card: #241d16;
  --ink: #f2e9dc;
  --ink2: #cbb9a4;
  --muted: #9c8974;
  --line: rgba(242, 233, 220, 0.15);
  --hair: rgba(242, 233, 220, 0.26);
  --accent: #e2705c;
  --accent2: #f08a76;
  --gold: #cda45f;
  --scrim: rgba(8, 5, 3, 0.86);
  --shadow-s: 0 1px 3px rgba(0, 0, 0, 0.5);
  --shadow-m: 0 10px 30px -12px rgba(0, 0, 0, 0.75);
  --shadow-l: 0 26px 60px -24px rgba(0, 0, 0, 0.85);
  color-scheme: dark;
}

* { box-sizing: border-box }
html { scroll-behavior: smooth; overflow-x: clip }
body {
  margin: 0;
  background-color: var(--paper);
  /* зерно бумаги — очень тихое, только в светлой теме */
  background-image: radial-gradient(circle at 18% 12%, rgba(151, 112, 47, 0.05), transparent 42%),
                    radial-gradient(circle at 84% 68%, rgba(171, 47, 34, 0.04), transparent 46%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}
[data-theme="dark"] body { background-image: none }
img { max-width: 100%; height: auto; display: block }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.14; color: var(--ink); margin: 0 0 0.5em; font-weight: 700; letter-spacing: -0.012em }
a { color: var(--accent2); text-decoration: none }
a:hover { text-decoration: underline }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; border-radius: 2px }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px }
.loading { padding: 80px 0; text-align: center; color: var(--muted); font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase }
.hide { display: none !important }

/* «музейная этикетка» — служебная строчка-подпись, главный шрифтовой приём сайта */
.lab {
  font-family: var(--sans); font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.inv { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: var(--gold); font-variant-numeric: tabular-nums }

/* тонкая линейка-разделитель как в описи */
.rule { height: 1px; background: var(--line); border: 0; margin: 0 }

/* ── кнопки ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 44px; padding: 11px 24px; border-radius: 2px; border: 1px solid transparent;
  font-family: var(--sans); font-weight: 600; font-size: 14px; letter-spacing: 0.06em;
  text-transform: uppercase; cursor: pointer; text-align: center;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px) }
.btn--primary { background: var(--accent); color: #fff }
.btn--primary:hover { background: var(--accent2); color: #fff }
.btn--light { background: #fff; color: #211711; border-color: #fff }
.btn--light:hover { background: rgba(255, 255, 255, 0.86) }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.5) }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.12) }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--hair) }
.btn--outline:hover { border-color: var(--accent); color: var(--accent2) }

/* ── шапка ──────────────────────────────────────────────────────────────── */
.hdr {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(12px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) { .hdr { background: var(--paper) } }
.hdr__in { display: flex; align-items: center; gap: 14px; height: 72px; max-width: var(--wrap) }
.hdr__brand { display: flex; align-items: center; gap: 11px; flex: none }
.hdr__brand:hover { text-decoration: none }
.hdr__logo { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 1px solid var(--hair) }
.hdr__names { display: flex; flex-direction: column; line-height: 1.05 }
.hdr__name { font-family: var(--serif); font-weight: 800; font-size: 18px; color: var(--ink); letter-spacing: 0.01em }
.hdr__tag { font-size: 9.5px; color: var(--muted); font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; margin-top: 3px }
.nav { display: flex; gap: 4px; align-items: center; margin-left: auto }
.nav a {
  position: relative; color: var(--ink2); font-weight: 500; font-size: 14px;
  padding: 9px 11px; white-space: nowrap; border-radius: 2px;
}
.nav a::after {
  content: ''; position: absolute; left: 11px; right: 11px; bottom: 4px; height: 1.5px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.22s;
}
.nav a:hover { color: var(--ink); text-decoration: none }
.nav a:hover::after { transform: scaleX(1) }
.nav a.on { color: var(--ink); font-weight: 700 }
.nav a.on::after { transform: scaleX(1) }
.hdr__acts { display: flex; align-items: center; gap: 2px; flex: none }
.iconbtn {
  width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 1px solid transparent; border-radius: 2px; cursor: pointer;
  color: var(--ink2); font-size: 16px; line-height: 1; padding: 0;
}
.iconbtn:hover { color: var(--accent2); border-color: var(--line) }
.iconbtn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round }
.themebtn .i-moon { display: none }
[data-theme="dark"] .themebtn .i-sun { display: none }
[data-theme="dark"] .themebtn .i-moon { display: block }
.hdr__phone { font-weight: 600; color: var(--ink); white-space: nowrap; font-size: 13.5px; letter-spacing: 0.02em; padding-left: 8px }
.hdr__phone:hover { color: var(--accent2); text-decoration: none }
.hdr__burger { display: none }

/* поиск */
.search { position: relative }
.search__form { display: none; position: absolute; right: 0; top: 52px; background: var(--card); border: 1px solid var(--hair); box-shadow: var(--shadow-l); padding: 6px; width: 330px; z-index: 70; align-items: center }
.search.open .search__form { display: flex }
.search__input { flex: 1; border: 0; outline: none; font: inherit; font-size: 15px; padding: 9px 10px; background: transparent; color: var(--ink); min-width: 0 }
.search__submit { min-height: 40px; width: 40px; background: none; border: 0; cursor: pointer; color: var(--ink2); display: inline-flex; align-items: center; justify-content: center }
.search__submit svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round }
.search__sugg { position: absolute; right: 0; top: 106px; width: 360px; background: var(--card); border: 1px solid var(--hair); box-shadow: var(--shadow-l); padding: 6px; z-index: 70; max-height: 66vh; overflow: auto }
.sugg__group-h { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--muted); padding: 10px 10px 4px; font-weight: 600 }
.sugg__item { display: flex; gap: 11px; align-items: center; width: 100%; text-align: left; background: none; border: 0; padding: 8px 10px; cursor: pointer; font: inherit; color: var(--ink) }
.sugg__item:hover { background: var(--paper2) }
.sugg__item img { width: 44px; height: 34px; object-fit: cover; flex: none; border: 1px solid var(--line) }
.sugg__item-ic { font-size: 17px; width: 44px; text-align: center; flex: none }
.sugg__item-t b { font-weight: 500; font-size: 14px; line-height: 1.35; display: block }
.sugg__all { width: 100%; background: var(--paper2); border: 0; padding: 11px; cursor: pointer; font: inherit; font-weight: 600; font-size: 13px; color: var(--accent2); margin-top: 4px; letter-spacing: 0.04em }
.sugg__empty { padding: 14px; color: var(--muted); font-size: 14px }

/* ── ГЛАВНАЯ: hero-«диафильм» ───────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; background: #14100c; min-height: 560px; display: flex; align-items: flex-end }
.hero__slides { position: absolute; inset: 0 }
.hero__slide {
  position: absolute; inset: 0; background-size: cover; background-position: center 32%;
  opacity: 0; transition: opacity 1.6s ease-in-out;
}
.hero__slide.on { opacity: 0.62 }
.hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(184deg, rgba(20, 16, 12, 0.42) 0%, rgba(20, 16, 12, 0.30) 38%, rgba(20, 16, 12, 0.93) 100%);
}
.hero__in { position: relative; z-index: 2; width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 120px 22px 44px; color: #fff }
.hero__eyebrow { display: flex; align-items: center; gap: 12px; color: #e5c99a; font-size: 11px; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; margin-bottom: 18px }
.hero__eyebrow::before { content: ''; width: 46px; height: 1px; background: #e5c99a; opacity: 0.8 }
.hero h1 { color: #fff; font-size: clamp(38px, 6.6vw, 78px); margin: 0 0 6px; letter-spacing: -0.022em; line-height: 1.02; max-width: 15ch }
.hero__role { font-family: var(--serif); font-style: italic; font-size: clamp(17px, 2.4vw, 24px); color: #e8dccb; margin: 0 0 18px }
.hero p.hero__sub { font-size: clamp(15px, 1.6vw, 17.5px); color: rgba(255, 255, 255, 0.84); max-width: 60ch; margin: 0 0 26px; line-height: 1.55 }
.hero__btns { display: flex; gap: 10px; flex-wrap: wrap }
/* живая опись фонда — цифры считаются из реального каталога */
.hero__meta { display: flex; flex-wrap: wrap; gap: 0 34px; margin-top: 30px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.22) }
.hmeta { padding: 4px 0 }
.hmeta__n { font-family: var(--serif); font-size: clamp(24px, 3.2vw, 34px); font-weight: 700; color: #fff; line-height: 1; font-variant-numeric: tabular-nums }
.hmeta__l { font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255, 255, 255, 0.62); margin-top: 6px; font-weight: 600 }
/* «дорогая деталь»: штемпель фонда */
.stamp {
  position: absolute; right: 34px; top: 96px; z-index: 3; transform: rotate(-7deg);
  border: 2px solid rgba(229, 201, 154, 0.75); padding: 9px 14px 7px; text-align: center;
  color: rgba(229, 201, 154, 0.9); box-shadow: inset 0 0 0 1px rgba(229, 201, 154, 0.35);
  mix-blend-mode: screen; pointer-events: none;
}
.stamp__t { font-family: var(--serif); font-weight: 700; font-size: 15px; letter-spacing: 0.16em; line-height: 1 }
.stamp__s { font-size: 8.5px; letter-spacing: 0.24em; text-transform: uppercase; margin-top: 5px; font-weight: 600 }
@media (max-width: 900px) { .stamp { display: none } }

/* ── секции ─────────────────────────────────────────────────────────────── */
.sec { padding: 62px 0 }
.sec--tight { padding: 34px 0 }
.sec__h { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 6px }
.sec__h h1, .sec__h h2 { margin: 0; font-size: clamp(26px, 3.8vw, 40px) }
.sec__k { margin: 0 0 10px }  /* надзаголовок-этикетка */
.sec__sub { color: var(--ink2); max-width: 68ch; margin: 10px 0 0; font-size: 16px }
.sec__sub--html p { margin: 0 0 10px }
.sec__line { margin: 22px 0 26px }
.crumbs { padding: 22px 0 0; font-size: 12px; color: var(--muted); letter-spacing: 0.05em }
.crumbs a { color: var(--muted) }
.crumbs a:hover { color: var(--accent2) }

/* ── ЗАЛЫ (разделы) — обложка с надписью, без товарных «карточек» ───────── */
.halls { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); margin-top: 24px }
.halls--big { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 22px }
.hall {
  position: relative; display: block; overflow: hidden; background: var(--paper2);
  aspect-ratio: 5 / 4; border: 1px solid var(--line);
}
.halls--big .hall { aspect-ratio: 16 / 10 }
.hall:hover { text-decoration: none }
.hall__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1); filter: saturate(0.92) }
.hall:hover .hall__img { transform: scale(1.05) }
.hall::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20, 14, 10, 0.05) 26%, rgba(20, 14, 10, 0.55) 62%, rgba(20, 14, 10, 0.92) 100%);
}
.hall__b { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 18px 18px 16px; color: #fff }
.hall__t { font-family: var(--serif); font-weight: 700; font-size: clamp(18px, 2.1vw, 23px); line-height: 1.16; color: #fff; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45) }
.hall__n { color: rgba(255, 255, 255, 0.72); margin-top: 7px; display: block }
.hall__d { color: rgba(255, 255, 255, 0.78); font-size: 13.5px; margin-top: 7px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
.hall__ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 40px; opacity: 0.35 }

/* ── ОПИСЬ ФОНДА (страница «Разделы») ───────────────────────────────────── */
.fond { margin-top: 10px }
.fond__grp { padding: 34px 0; border-top: 1px solid var(--line) }
.fond__grp:first-child { border-top: 0 }
.fond__h { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 4px }
.fond__h h2 { margin: 0; font-size: clamp(22px, 3vw, 31px) }
.fond__d { color: var(--ink2); font-size: 15px; max-width: 70ch; margin: 6px 0 0 }

/* ── ЭКСПОНАТЫ: кладка с сохранением пропорций кадра ─────────────────────── */
.gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); grid-auto-rows: 6px; column-gap: 22px; margin-top: 26px }
.gal--wide { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) }
.exh { grid-row-end: span 44 }        /* дефолт до замера картинки */
.exh__in { display: block }
.exh__ph { position: relative; display: block; background: var(--paper2); overflow: hidden; cursor: zoom-in; border: 1px solid var(--line); transition: border-color 0.25s }
.exh__ph img { width: 100%; height: auto; display: block; transition: opacity 0.5s, transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1) }
.exh:hover .exh__ph { border-color: var(--hair) }
.exh:hover .exh__ph img { transform: scale(1.03) }
.exh__ph::after {
  content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  opacity: 0; transition: opacity 0.25s; pointer-events: none;
}
.exh:hover .exh__ph::after { opacity: 1 }
/* лупа при наведении — «рассмотреть экспонат» */
.exh__zoom {
  position: absolute; right: 8px; bottom: 8px; width: 34px; height: 34px; z-index: 2;
  display: flex; align-items: center; justify-content: center; color: #fff;
  background: rgba(20, 14, 10, 0.62); backdrop-filter: blur(3px);
  opacity: 0; transform: translateY(5px); transition: opacity 0.25s, transform 0.25s;
}
.exh__zoom svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round }
.exh:hover .exh__zoom, .exh__ph:focus-visible .exh__zoom { opacity: 1; transform: none }
/* инвентарный номер — вместо повторяющейся подписи-«артикула» */
.exh__inv {
  position: absolute; left: 0; top: 0; z-index: 2; padding: 4px 9px 4px 8px;
  background: rgba(20, 14, 10, 0.6); backdrop-filter: blur(3px);
  color: rgba(255, 255, 255, 0.9); font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.05em;
  opacity: 0; transition: opacity 0.25s;
}
.exh:hover .exh__inv { opacity: 1 }
/* музейная этикетка под кадром — только если подпись осмысленная */
.exh__lab { padding: 10px 2px 0; border-top: 0 }
.exh__t { font-size: 13.5px; line-height: 1.42; color: var(--ink); font-weight: 500 }
.exh:hover .exh__t { color: var(--accent2) }
.exh__meta { margin-top: 5px; display: block }

/* ── ВИДЕО: свои плитки 16:9 (без чёрных полей от 4:3) ───────────────────── */
.vgrid { display: grid; gap: 30px 22px; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); margin-top: 26px }
.vcard { display: flex; flex-direction: column }
.vcard__m { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #0d0a08; border: 1px solid var(--line) }
.vcard__m img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1), opacity 0.3s }
.vcard:hover .vcard__m img { transform: scale(1.045); opacity: 0.82 }
.vcard__play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 56px; height: 56px; border-radius: 50%; background: rgba(20, 14, 10, 0.55);
  border: 1.5px solid rgba(255, 255, 255, 0.8); display: flex; align-items: center; justify-content: center;
  transition: background 0.25s, transform 0.25s; backdrop-filter: blur(2px);
}
.vcard__play::after { content: ''; border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent #fff; margin-left: 3px }
.vcard:hover .vcard__play { background: var(--accent); border-color: var(--accent); transform: translate(-50%, -50%) scale(1.08) }
.vcard__b { padding: 12px 2px 0 }
.vcard__t { font-size: 14.5px; line-height: 1.42; color: var(--ink); font-weight: 500; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden }
.vcard:hover .vcard__t { color: var(--accent2) }
.vcard__meta { margin-top: 7px; display: block }

/* «показать ещё» */
.more-wrap { text-align: center; margin-top: 40px }

/* ── ОБЛОЖКА РАЗДЕЛА ────────────────────────────────────────────────────── */
.cover { position: relative; overflow: hidden; margin-top: 12px; background: var(--paper2); border: 1px solid var(--line) }
.cover__img { width: 100%; height: clamp(220px, 34vw, 380px); object-fit: cover; object-position: center 30%; display: block; filter: saturate(0.94) }
.cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 14, 10, 0.10) 30%, rgba(20, 14, 10, 0.86) 100%) }
.cover__b { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 26px 26px 22px; color: #fff }
.cover__k { color: rgba(255, 255, 255, 0.72); margin-bottom: 8px; display: block }
.cover__b h1 { color: #fff; margin: 0; font-size: clamp(26px, 4.6vw, 46px); text-shadow: 0 2px 18px rgba(0, 0, 0, 0.4) }

/* ── ЭКСПОНАТ (страница материала) — паспарту ────────────────────────────── */
.exhibit { margin: 18px 0 0 }
.mat { background: var(--card); border: 1px solid var(--line); padding: clamp(14px, 3vw, 34px); box-shadow: var(--shadow-m) }
.mat__in { position: relative; box-shadow: inset 0 0 0 1px var(--line) }
.mat img { width: 100%; height: auto; display: block; cursor: zoom-in }
.mat--video { padding: 0; border: 0; box-shadow: none; background: none }
.pmedia__yt { position: relative; padding-bottom: 56.25%; overflow: hidden; box-shadow: var(--shadow-l); background: #000 }
.pmedia__yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0 }
.exhibit__b { max-width: 74ch; margin: 28px auto 0; text-align: left }
.exhibit__b h1 { font-size: clamp(21px, 3vw, 32px); margin: 8px 0 12px }
.exhibit__desc { color: var(--ink2); font-size: 16.5px }
.exhibit__desc img { margin: 14px 0 }
.exhibit__foot { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; gap: 14px; flex-wrap: wrap; align-items: center; justify-content: space-between }

/* ── прочие блоки ───────────────────────────────────────────────────────── */
.infobox { background: var(--card); border: 1px solid var(--line); padding: 26px; box-shadow: var(--shadow-s) }
.infobox h3 { margin-top: 0 }
.page { max-width: 74ch }
.page h1 { margin-top: 0; font-size: clamp(28px, 4.4vw, 44px) }
.page h2 { font-size: clamp(21px, 2.6vw, 28px); margin-top: 1.6em }
.page p { color: var(--ink2) }
.page img { margin: 18px 0; border: 1px solid var(--line) }
.cols2 { display: grid; gap: 26px }
@media (min-width: 860px) { .cols2 { grid-template-columns: 1.15fr 1fr; align-items: center } }
/* полоса-призыв: как надпись на музейной стене, без «магазинного» баннера */
.cta-band { border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); padding: 44px 0; text-align: center }
.cta-band h3 { font-size: clamp(21px, 3vw, 30px); margin: 0 0 8px }
.cta-band p { color: var(--ink2); margin: 0 auto 20px; max-width: 56ch }

/* ── контакты ───────────────────────────────────────────────────────────── */
.contacts-grid { display: grid; gap: 26px; margin-top: 26px }
@media (min-width: 900px) { .contacts-grid { grid-template-columns: 1fr 1.1fr } }
.contact-cards { display: grid; gap: 0; align-content: start; border-top: 1px solid var(--line) }
.contact-card { display: flex; gap: 16px; align-items: baseline; padding: 16px 2px; border-bottom: 1px solid var(--line) }
.cc-h { display: block; margin-bottom: 3px }
.cc-v { font-weight: 500; font-size: 16px; color: var(--ink) }
.cc-text { min-width: 0; word-break: break-word }
.contact-actions { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap }
/* карта: карточка-ссылка вместо блокируемого CSP-фрейма */
.mapcard { position: relative; display: block; overflow: hidden; border: 1px solid var(--line); background: var(--paper2); min-height: 260px; padding: 26px; text-decoration: none }
.mapcard:hover { text-decoration: none; border-color: var(--hair) }
.mapcard__grid {
  position: absolute; inset: 0; opacity: 0.5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 34px 34px;
}
.mapcard__in { position: relative; z-index: 2; display: flex; flex-direction: column; height: 100%; justify-content: flex-end; min-height: 208px }
.mapcard__pin { font-size: 28px; line-height: 1; margin-bottom: auto }
.mapcard__t { font-family: var(--serif); font-size: 21px; font-weight: 700; color: var(--ink); margin-bottom: 6px }
.mapcard__a { color: var(--ink2); font-size: 15px; max-width: 42ch }
.mapcard__go { margin-top: 14px; color: var(--accent2); font-weight: 600; font-size: 14px }

/* ── модалка обратной связи ─────────────────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 90; background: var(--scrim); display: flex; align-items: center; justify-content: center; padding: 18px }
.modal[hidden], .lightbox[hidden] { display: none }
.modal__box { background: var(--card); padding: 30px; width: 100%; max-width: 470px; position: relative; box-shadow: var(--shadow-l); max-height: 90vh; overflow: auto; border: 1px solid var(--line) }
.modal__box h3 { font-size: 25px; margin-bottom: 4px }
.modal__x { position: absolute; right: 8px; top: 6px; background: none; border: 0; font-size: 28px; cursor: pointer; color: var(--muted); width: 44px; height: 44px; line-height: 1 }
.modal__x:hover { color: var(--ink) }
.modal__hint { color: var(--muted); font-size: 14px; margin: 0 0 6px }
.oform { display: grid; gap: 11px; margin-top: 14px }
.oform input, .oform textarea { padding: 13px 14px; border: 1px solid var(--hair); font: inherit; font-size: 15.5px; background: var(--paper); color: var(--ink); width: 100%; border-radius: 2px }
.oform input:focus, .oform textarea:focus { outline: none; border-color: var(--accent) }
.oform textarea { min-height: 110px; resize: vertical }
.oform__msg { font-size: 14px; margin: 4px 0 0 }
.oform__msg.ok { color: #2e7d32; font-weight: 600 }
[data-theme="dark"] .oform__msg.ok { color: #7fd18a }
.oform__msg.err { color: var(--accent); font-weight: 600 }
.hp { position: absolute; left: -9999px }

/* ── лайтбокс ───────────────────────────────────────────────────────────── */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(12, 8, 5, 0.96); display: flex; align-items: center; justify-content: center; flex-direction: column }
.lightbox__fig { margin: 0; max-width: 94vw; max-height: 84vh; display: flex; flex-direction: column; align-items: center; gap: 14px }
.lightbox__fig img { max-width: 94vw; max-height: 76vh; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); background: #0c0805 }
.lightbox__fig figcaption { color: rgba(255, 255, 255, 0.88); font-size: 14.5px; text-align: center; max-width: 76ch; line-height: 1.5; padding: 0 16px }
.lightbox__x { position: absolute; top: 10px; right: 12px; background: none; border: 0; color: rgba(255, 255, 255, 0.85); font-size: 30px; cursor: pointer; z-index: 3; width: 48px; height: 48px; line-height: 1 }
.lightbox__x:hover { color: #fff }
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18); color: #fff; font-size: 32px; cursor: pointer;
  width: 56px; height: 56px; line-height: 1; z-index: 3; transition: background 0.2s;
}
.lightbox__nav:hover { background: rgba(255, 255, 255, 0.2) }
.lightbox__nav.prev { left: 16px }
.lightbox__nav.next { right: 16px }
.lightbox__count { position: absolute; top: 20px; left: 22px; z-index: 3; color: rgba(255, 255, 255, 0.66); font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em }

/* ── подвал ─────────────────────────────────────────────────────────────── */
.ftr { margin-top: 0; background: #191410; color: rgba(255, 255, 255, 0.78); border-top: 1px solid rgba(255, 255, 255, 0.08) }
[data-theme="dark"] .ftr { background: #100c09 }
.ftr__in { display: grid; gap: 30px; padding: 56px 22px 36px; max-width: var(--wrap); margin: 0 auto }
@media (min-width: 820px) { .ftr__in { grid-template-columns: 1.5fr 1fr 1.1fr } }
.ftr__brand { font-family: var(--serif); font-weight: 800; font-size: 24px; color: #fff; letter-spacing: 0.01em }
.ftr__md { color: #d9ac62 }
.ftr__about { color: #d9ac62; font-weight: 600; margin: 8px 0 14px; font-size: 14px; letter-spacing: 0.02em }
.ftr__quote { font-size: 13.5px; color: rgba(255, 255, 255, 0.58); font-style: italic; max-width: 46ch; line-height: 1.6; font-family: var(--serif) }
.ftr__quote em { display: block; margin-top: 6px; font-style: normal; color: rgba(255, 255, 255, 0.42); font-family: var(--sans); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase }
.ftr__col h4 { color: rgba(255, 255, 255, 0.5); font-family: var(--sans); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.2em; margin: 0 0 14px; font-weight: 600 }
.ftr__col a { display: block; color: rgba(255, 255, 255, 0.82); padding: 6px 0; font-size: 15px }
.ftr__col a:hover { color: #d9ac62; text-decoration: none }
.ftr__contacts { font-size: 14.5px; display: grid; gap: 10px; color: rgba(255, 255, 255, 0.78) }
.ftr__contacts a { display: inline; padding: 0; color: rgba(255, 255, 255, 0.82) }
.ftr__copy { border-top: 1px solid rgba(255, 255, 255, 0.1); text-align: center; padding: 18px; font-size: 12.5px; color: rgba(255, 255, 255, 0.45) }
.ftr__copy a { color: rgba(255, 255, 255, 0.6) }

/* ── появление при скролле ──────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.55s ease, transform 0.55s ease }
.reveal.in { opacity: 1; transform: none }

/* ── планшет/телефон ────────────────────────────────────────────────────── */
@media (max-width: 1040px) {
  .hdr__phone { display: none }
  .nav a { padding: 9px 8px; font-size: 13.5px }
}
@media (max-width: 880px) {
  .hdr__in { height: 62px; gap: 6px }
  .hdr__logo { width: 38px; height: 38px }
  .hdr__name { font-size: 16px }
  .hdr__tag { font-size: 8.5px; letter-spacing: 0.16em }
  .hdr__burger { display: inline-flex; order: 9 }
  .nav {
    position: fixed; left: 0; right: 0; top: 62px; bottom: 0; z-index: 80;
    display: none; flex-direction: column; align-items: stretch; gap: 0; margin: 0;
    background: var(--paper); padding: 10px 22px 30px; overflow: auto;
    border-top: 1px solid var(--line);
  }
  .nav.open { display: flex }
  .nav a { padding: 16px 4px; font-size: 18px; font-family: var(--serif); font-weight: 700; border-bottom: 1px solid var(--line) }
  .nav a::after { display: none }
  .nav a.on { color: var(--accent2) }
  .search__form, .search__sugg { position: fixed; left: 12px; right: 12px; width: auto; top: 70px }
  .search__sugg { top: 128px; max-height: 60vh }
  .hero { min-height: 470px }
  .hero__in { padding: 96px 22px 34px }
  .hero__meta { gap: 0 24px; margin-top: 22px }
  .sec { padding: 44px 0 }
  .gal { column-gap: 14px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) }
  .vgrid { gap: 24px 16px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)) }
  .halls { gap: 14px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)) }
  .lightbox__nav { width: 46px; height: 46px; font-size: 26px }
  .lightbox__nav.prev { left: 6px }
  .lightbox__nav.next { right: 6px }
}
@media (max-width: 560px) {
  body { font-size: 16px }
  .wrap, .hero__in, .ftr__in { padding-left: 16px; padding-right: 16px }
  .hero { min-height: 430px }
  .hero h1 { font-size: clamp(30px, 9vw, 42px) }
  .halls, .halls--big { grid-template-columns: 1fr 1fr; gap: 12px }
  .halls--big .hall { aspect-ratio: 5 / 4 }
  .gal { grid-template-columns: 1fr 1fr; column-gap: 12px }
  .vgrid { grid-template-columns: 1fr; gap: 26px }
  .cover__b { padding: 18px 16px 16px }
  .mat { padding: 10px }
  .exh__inv, .exh__zoom { opacity: 1 }  /* на тач-устройствах hover не бывает */
  .modal__box { padding: 22px }
}
@media (max-width: 380px) {
  .gal { grid-template-columns: 1fr }
  .halls { grid-template-columns: 1fr }
}

/* ── уважение к настройкам пользователя ─────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none }
  .hero__slide { transition: none }
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important }
}
@media print {
  .hdr, .ftr, .modal, .lightbox, .hero__btns, .iconbtn { display: none !important }
  body { background: #fff; color: #000 }
  .gal { grid-template-columns: repeat(3, 1fr) }
}
