/* moskvin.ru — дизайн «Архив»: тёмная музейная эстетика, латунный акцент.
   Токены — из дизайн-макета claude.ai/design «Новый дизайн Moskvin.ru». */

:root {
  --bg: #14100b;
  --bg-dark: rgba(0, 0, 0, 0.25);
  --bg-warm: rgba(201, 162, 75, 0.04);
  --text: #e9e1d1;
  --text-head: #f3ecdd;
  --text-soft: #c3b9a3;
  --text-mute: #a99e88;
  --text-dim: #8c8270;
  --text-faint: #7a6f5a;
  --accent: #c9a24b;
  --line: #2a2117;
  --line-card: #33291b;
  --line-accent: #6a5a30;
  --line-node: #4a3d24;
  --overlay: rgba(8, 6, 3, 0.94);
  --serif-display: 'Cormorant Garamond', Georgia, serif;
  --serif-body: 'Lora', Georgia, serif;
  --mono: 'JetBrains Mono', Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif-body);
  font-size: 18px;
  line-height: 1.75;
}

body.no-scroll { overflow: hidden; }

a { color: inherit; text-decoration: none; transition: color 0.2s ease, border-color 0.2s ease; }
a:hover { color: var(--accent); }

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

button { font: inherit; }

/* ---------- Служебные ---------- */

.mono-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.mono-label.accent { color: var(--accent); letter-spacing: 0.3em; font-size: 12px; }

.mono-tag { font-family: var(--mono); font-size: 10px; color: var(--text-faint); }

.text-link {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--line-accent);
  padding-bottom: 4px;
  display: inline-block;
}
.text-link:hover { border-color: var(--accent); }

/* ---------- Шапка ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 60px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}

.logo {
  font-family: var(--serif-display);
  font-size: 26px;
  letter-spacing: 0.06em;
  color: var(--text);
}
.logo:hover { color: var(--accent); }

.site-nav {
  display: flex;
  gap: 34px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9a8f7a;
}
.site-nav a.active { color: var(--accent); }

.search-btn, .burger {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--accent);
  letter-spacing: 0.06em;
  padding: 8px 0;
}
.search-btn:hover { opacity: 0.7; }
.burger { display: none; font-size: 24px; line-height: 1; padding: 4px 8px; }

/* ---------- Hero ---------- */

.hero { padding: 80px 60px 56px; }

.hero h1 {
  margin: 18px 0 0;
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: clamp(72px, 12vw, 172px);
  line-height: 0.9;
  color: var(--text-head);
}

.hero.hero-page h1 { font-size: clamp(56px, 7vw, 104px); line-height: 0.92; }

.hero-lead {
  margin: 28px 0 0;
  max-width: 720px;
  font-size: 20px;
  line-height: 1.7;
  color: var(--text-soft);
}

.lead-italic {
  margin: 0;
  max-width: 820px;
  font-family: var(--serif-display);
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.4;
  color: #d8cfb9;
  font-style: italic;
}

.stats-row { display: flex; gap: 56px; margin-top: 44px; flex-wrap: wrap; }

.stat .stat-num {
  font-family: var(--serif-display);
  font-size: 52px;
  color: var(--accent);
  line-height: 1;
}
.stat .stat-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-top: 10px;
}

/* ---------- Секции ---------- */

.section { border-top: 1px solid var(--line); padding: 64px 60px 72px; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 40px;
}

.section h2 {
  margin: 16px 0 0;
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: clamp(34px, 4vw, 46px);
  line-height: 1;
  color: var(--text-head);
}

.two-col { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.two-col > div { padding: 60px; }
.two-col > div:first-child { border-right: 1px solid var(--line); }
.two-col .warm { background: var(--bg-warm); }
.two-col p { margin: 0 0 20px; font-size: 18px; line-height: 1.8; color: var(--text-soft); }
.two-col p:last-child { margin-bottom: 0; }

blockquote {
  margin: 24px 0;
  padding-left: 22px;
  border-left: 2px solid var(--line-accent);
  font-style: italic;
  color: var(--text-soft);
}

/* ---------- Карточки персон ---------- */

.person-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.person-card { display: block; }

.person-portrait {
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line-card);
  overflow: hidden;
  transition: border-color 0.2s ease;
  background: repeating-linear-gradient(135deg, rgba(201, 162, 75, 0.08) 0 8px, transparent 8px 16px);
}
.person-portrait img { width: 100%; height: 100%; object-fit: cover; filter: sepia(0.18); }
/* Портрета нет — рисуем намеренный empty-state: крупная монограмма из инициалов
   и подпись. Раньше пустая штриховка читалась как сломанная картинка. */
.person-portrait.placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 14px;
  background:
    radial-gradient(60% 50% at 50% 42%, rgba(201, 162, 75, 0.10) 0%, transparent 70%),
    repeating-linear-gradient(135deg, rgba(201, 162, 75, 0.05) 0 8px, transparent 8px 16px);
}
.person-monogram {
  font-family: var(--serif-display);
  font-size: 54px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--accent);
  opacity: 0.85;
  line-height: 1;
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-accent);
  border-radius: 50%;
}
.person-portrait .portrait-note { text-align: center; letter-spacing: 0.14em; text-transform: uppercase; }
.person-card:hover .person-portrait { border-color: var(--accent); }
.person-card:hover .person-monogram { opacity: 1; border-color: var(--accent); }

.person-name {
  font-family: var(--serif-display);
  font-size: 25px;
  color: var(--text-head);
  margin-top: 14px;
  line-height: 1.1;
}
.person-years { font-family: var(--mono); font-size: 12px; color: var(--accent); margin-top: 6px; }
.person-role { font-size: 14px; color: var(--text-mute); margin-top: 4px; line-height: 1.4; }

/* ---------- Чипы-фильтры ---------- */

.chip-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.chip {
  padding: 9px 18px;
  border: 1px solid var(--line-card);
  color: var(--text-mute);
  background: none;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { background: var(--accent); color: var(--bg); border-color: var(--accent); }

/* ---------- Страница персоны ---------- */

.person-page { display: grid; grid-template-columns: 1fr 1.25fr; }
.person-page-left { border-right: 1px solid var(--line); padding: 60px; }
.person-page-right { padding: 60px; }

.person-page-left .portrait {
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line-card);
  overflow: hidden;
}
.person-page-left .portrait img { width: 100%; height: 100%; object-fit: cover; filter: sepia(0.15); }

.meta-list { margin-top: 28px; display: flex; flex-direction: column; gap: 16px; font-family: var(--mono); font-size: 13px; }
.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}
.meta-row:last-child { border-bottom: none; padding-bottom: 0; }
.meta-row .k { color: var(--text-dim); letter-spacing: 0.1em; }
.meta-row .v { color: var(--text); text-align: right; }
.meta-row .v.accent { color: var(--accent); }

.person-page h1 {
  margin: 0;
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: clamp(44px, 5.5vw, 76px);
  line-height: 0.98;
  color: var(--text-head);
}

.person-page-right p { margin: 20px 0 0; font-size: 18px; line-height: 1.75; color: var(--text-soft); }
.person-page-right h3 {
  margin: 44px 0 0;
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: 30px;
  color: var(--text-head);
}
.person-page-right ul { margin: 16px 0 0; padding-left: 20px; color: var(--text-soft); font-size: 16px; line-height: 1.7; }
.person-page-right li { margin-bottom: 6px; }

.person-gallery { margin-top: 40px; }
.person-gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 18px; }
.person-gallery-grid img {
  aspect-ratio: 1;
  width: 100%;
  object-fit: cover;
  border: 1px solid var(--line);
  filter: sepia(0.12);
  cursor: zoom-in;
  transition: border-color 0.2s ease;
}
.person-gallery-grid img:hover { border-color: var(--accent); }

.page-prev-next {
  padding: 40px 60px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
}
.page-prev-next a { color: var(--accent); }

/* ---------- Фотоархив ---------- */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  grid-auto-flow: dense;
  gap: 16px;
}

.photo-tile {
  position: relative;
  border: 1px solid var(--line-card);
  padding: 0;
  background: var(--bg-dark);
  cursor: zoom-in;
  overflow: hidden;
  transition: border-color 0.2s ease;
  text-align: left;
}
.photo-tile img { width: 100%; height: 100%; object-fit: cover; filter: sepia(0.2); }
.photo-tile:hover { border-color: var(--accent); }
.photo-tile.featured { grid-column: span 2; grid-row: span 2; }
.photo-tile.tall { grid-row: span 2; }
.photo-tile .photo-year {
  position: absolute;
  left: 12px;
  bottom: 10px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-head);
  background: rgba(8, 6, 3, 0.72);
  padding: 4px 8px;
  letter-spacing: 0.1em;
}

/* ---------- Лайтбокс ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: var(--overlay);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: min(860px, 92vw);
  max-height: 62vh;
  object-fit: contain;
  border: 1px solid var(--line-accent);
}
.lightbox .lb-title {
  margin-top: 22px;
  font-family: var(--serif-display);
  font-size: 30px;
  color: var(--text-head);
  text-align: center;
}
.lightbox .lb-story {
  margin-top: 12px;
  max-width: 720px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-soft);
  text-align: center;
  max-height: 20vh;
  overflow: auto;
}
.lightbox .lb-hint {
  margin-top: 20px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* ---------- Регионы (география) ---------- */

.region-list { display: flex; flex-direction: column; gap: 22px; }
.region-row .region-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 8px;
}
.region-row .region-name { font-family: var(--serif-display); font-size: 22px; color: var(--text-head); }
.region-row .region-num { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.region-bar { height: 4px; background: var(--line); }
.region-bar span { display: block; height: 100%; background: var(--accent); }

/* ---------- Хроника ---------- */

.timeline { display: flex; flex-direction: column; }
.timeline-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 30px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.timeline-row:last-child { border-bottom: 1px solid var(--line); }
.timeline-row .t-year { font-family: var(--serif-display); font-size: 34px; color: var(--accent); line-height: 1.1; }
.timeline-row .t-text { font-size: 19px; color: #d8cfb9; align-self: center; }

/* ---------- Список памяти (репрессированные) ---------- */

.memory-input {
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid var(--line-node);
  padding: 12px 0;
  font-family: var(--serif-display);
  font-size: 28px;
  color: var(--text-head);
  outline: none;
}
.memory-input::placeholder { color: #6a6050; }

.memory-list { margin-top: 40px; }
.memory-entry { padding: 22px 0; border-top: 1px solid var(--line); }
.memory-entry .m-name { font-family: var(--serif-display); font-size: 24px; color: var(--text-head); }
.memory-entry .m-text { margin-top: 8px; font-size: 15px; line-height: 1.65; color: var(--text-mute); }

/* ---------- Оверлей поиска ---------- */

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(8, 6, 3, 0.96);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 100px 24px 40px;
  overflow-y: auto;
}
.search-overlay[hidden] { display: none; }
.search-inner { width: 100%; max-width: 760px; }
.search-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 34px; }
.search-head button, .mobile-menu-head button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 20px;
  color: var(--accent);
  padding: 8px;
}
.search-input-row {
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line-node);
  padding-bottom: 18px;
}
.search-glyph { font-family: var(--mono); font-size: 26px; color: var(--accent); }
#search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: var(--serif-display);
  font-size: clamp(28px, 5vw, 48px);
  color: var(--text-head);
  caret-color: var(--accent);
  min-width: 0;
}
#search-input::placeholder { color: #6a6050; font-size: 0.7em; }

.search-block-label { margin: 36px 0 6px; }

.search-results { display: flex; flex-direction: column; }
.search-result {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.search-result:hover { background: rgba(201, 162, 75, 0.05); }
.search-result .r-years { font-family: var(--mono); font-size: 12px; color: var(--accent); width: 96px; flex: 0 0 auto; }
.search-result .r-name { font-family: var(--serif-display); font-size: 26px; color: var(--text-head); flex: 1; line-height: 1.15; }
.search-result .r-role { font-size: 14px; color: var(--text-mute); }
.search-empty { padding: 18px 0; color: var(--text-dim); font-size: 15px; }

.search-sections { display: flex; gap: 12px; flex-wrap: wrap; font-family: var(--mono); font-size: 12px; margin-top: 10px; }
.search-sections a { padding: 9px 18px; border: 1px solid var(--line-card); color: var(--text-mute); }
.search-sections a:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Мобильное меню ---------- */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--bg);
  padding: 22px;
  display: flex;
  flex-direction: column;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 44px; }
.mobile-menu-nav { display: flex; flex-direction: column; gap: 4px; }
.mobile-menu-nav a {
  font-family: var(--serif-display);
  font-size: 38px;
  color: var(--text-head);
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.mobile-menu-search {
  margin-top: auto;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  text-transform: uppercase;
  padding: 16px 0;
}

/* ---------- Форма (о сайте / добавить персону) ---------- */

.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; }
.contact-left { padding: 80px 60px; border-right: 1px solid var(--line); }
.contact-right { padding: 80px 60px; background: var(--bg-warm); }

.contact-left h1 {
  margin: 24px 0 0;
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: clamp(48px, 6vw, 82px);
  line-height: 0.95;
  color: var(--text-head);
}
.contact-left p { margin: 28px 0 0; max-width: 440px; font-size: 18px; line-height: 1.75; color: var(--text-soft); }

.contact-meta { margin-top: 44px; display: flex; flex-direction: column; gap: 20px; font-family: var(--mono); font-size: 14px; }
.contact-meta .row { display: flex; gap: 16px; }
.contact-meta .k { color: var(--text-dim); width: 110px; flex: 0 0 auto; }
.contact-meta .v { color: var(--text); }

.form-field { margin-bottom: 26px; }
.form-field .f-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  margin-bottom: 10px;
  text-transform: uppercase;
}
.form-field input, .form-field select {
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid var(--line-node);
  padding: 10px 0;
  font-family: var(--serif-display);
  font-size: 24px;
  color: var(--text-head);
  outline: none;
  border-radius: 0;
}
.form-field select { cursor: pointer; }
.form-field select option { background: var(--bg); color: var(--text); font-size: 16px; }
.form-field textarea {
  width: 100%;
  background: none;
  border: 1px solid var(--line-card);
  padding: 16px;
  min-height: 110px;
  font-family: var(--serif-body);
  font-size: 17px;
  color: var(--text);
  outline: none;
  resize: vertical;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { border-color: var(--accent); }
.form-field input.error, .form-field textarea.error { border-color: #b0523e; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }

.form-note { font-family: var(--mono); font-size: 11px; color: var(--text-dim); letter-spacing: 0.08em; line-height: 1.8; margin-bottom: 26px; }

.submit-btn {
  background: var(--accent);
  color: var(--bg);
  border: none;
  cursor: pointer;
  padding: 16px 34px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: opacity 0.2s ease;
}
.submit-btn:hover { opacity: 0.85; }
.submit-btn:disabled { opacity: 0.5; cursor: default; }

.form-msg { margin-top: 18px; font-size: 15px; color: var(--accent); }
.form-msg.error { color: #d07a62; }

/* ---------- Видео ---------- */

.video-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.video-item .frame {
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line-card);
  background: var(--bg-dark);
}
.video-item iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-title { font-family: var(--serif-display); font-size: 24px; color: var(--text-head); margin-top: 16px; line-height: 1.2; }
.video-note { font-size: 14px; color: var(--text-mute); margin-top: 6px; }

/* ---------- Футер ---------- */

.site-footer { border-top: 1px solid var(--line); padding: 48px 60px 40px; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9a8f7a;
  margin-bottom: 36px;
}
.footer-note {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text-faint);
}
.footer-note a { color: var(--text-faint); }
.footer-note a:hover { color: var(--accent); }

/* ---------- Внешний список ссылок ---------- */

.link-list { display: flex; flex-direction: column; }
.link-list .link-row {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.link-list .link-row:first-child { border-top: 1px solid var(--line); }
.link-list .l-name { font-family: var(--serif-display); font-size: 24px; color: var(--text-head); line-height: 1.2; }
.link-list .l-note { font-size: 14px; color: var(--text-mute); flex: 1; }
.link-list .l-ext { font-family: var(--mono); font-size: 11px; color: var(--accent); white-space: nowrap; }

/* ---------- Мобильная адаптация ---------- */

@media (max-width: 900px) {
  .site-header { padding: 18px 22px; }
  .site-nav, .search-btn { display: none; }
  .burger { display: block; }

  .hero, .section { padding-left: 22px; padding-right: 22px; }
  .hero { padding-top: 40px; padding-bottom: 40px; }
  .hero h1 { font-size: 72px; }
  .hero.hero-page h1 { font-size: 46px; }
  .hero-lead { font-size: 16px; }
  .stats-row { gap: 24px; margin-top: 28px; }
  .stat .stat-num { font-size: 34px; }

  .section { padding-top: 40px; padding-bottom: 48px; }

  .two-col { grid-template-columns: 1fr; }
  .two-col > div { padding: 32px 22px; }
  .two-col > div:first-child { border-right: none; border-bottom: 1px solid var(--line); }

  .person-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .person-name { font-size: 20px; }

  .person-page { grid-template-columns: 1fr; }
  .person-page-left { border-right: none; border-bottom: 1px solid var(--line); }
  .person-page-left, .person-page-right { padding: 32px 22px; }
  .page-prev-next { padding: 28px 22px; }

  .photo-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; }

  .contact-grid { grid-template-columns: 1fr; }
  .contact-left { border-right: none; border-bottom: 1px solid var(--line); }
  .contact-left, .contact-right { padding: 40px 22px; }
  .form-row-2 { grid-template-columns: 1fr; gap: 0; }

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

  .timeline-row { grid-template-columns: 72px 1fr; gap: 16px; }
  .timeline-row .t-year { font-size: 24px; }
  .timeline-row .t-text { font-size: 16px; }

  .site-footer { padding: 36px 22px 30px; }

  .search-overlay { padding: 60px 22px 32px; }
  .search-result .r-name { font-size: 20px; }
  .search-result .r-years { width: 76px; font-size: 11px; }

  .person-gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 480px) {
  .person-grid { grid-template-columns: 1fr 1fr; }
  .photo-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 130px; }
}

/* ---------- Записи Героев / духовенства (война, церковь) ---------- */
.hero-entry {
  padding: 40px 0;
  border-top: 1px solid var(--line);
}
.hero-entry:last-child { border-bottom: 1px solid var(--line); }
.hero-entry-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.hero-entry-name {
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: 38px;
  line-height: 1.05;
  color: var(--text-head);
  margin: 0;
}
.hero-entry-years {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.hero-entry-meta { margin: 26px 0 24px; max-width: 620px; }
.hero-entry-feat {
  font-size: 18px;
  line-height: 1.8;
  color: var(--text-soft);
  max-width: 820px;
  margin: 0 0 16px;
}
.hero-entry-after {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-mute);
  max-width: 820px;
  margin: 0 0 22px;
}
.hero-entry .text-link + .text-link { margin-left: 26px; }

@media (max-width: 900px) {
  .hero-entry-name { font-size: 29px; }
  .hero-entry-feat { font-size: 16px; }
}

/* ---------- Фасад видео (плеер грузится по клику) ---------- */
.video-facade {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line-card);
  background: var(--bg-dark);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s ease;
}
/* Абсолютное позиционирование, а не height:100%: процентная высота внутри
   <button> с aspect-ratio разрешается ненадёжно, и обложка не отрисовывалась. */
.video-facade img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.75) brightness(0.82);
  transition: filter 0.25s ease, transform 0.4s ease;
}
.video-facade:hover { border-color: var(--accent); }
.video-facade:hover img { filter: saturate(0.95) brightness(0.95); transform: scale(1.02); }
.video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 66px;
  height: 66px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: rgba(20, 16, 11, 0.72);
  color: var(--accent);
  font-size: 20px;
  line-height: 64px;
  text-align: center;
  padding-left: 5px;
  transition: background 0.2s ease, color 0.2s ease;
}
.video-facade:hover .video-play { background: var(--accent); color: var(--bg); }
.video-dur {
  position: absolute;
  right: 10px;
  bottom: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-head);
  background: rgba(8, 6, 3, 0.8);
  padding: 4px 8px;
}

/* Ролик запрещён к встраиванию правообладателем — открываем на Rutube */
.video-external { text-decoration: none; }
.video-ext-note {
  position: absolute;
  left: 10px;
  bottom: 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(8, 6, 3, 0.82);
  padding: 5px 9px;
}
