/* =========================================================================
   АНО «Арамильские беломестные казаки» — стили сайта
   Визуальная система из итогового макета: тёмно-синий фон, золотые
   обрамления, светлые «пергаментные» исторические блоки.
   Порядок: шрифты · переменные · база · общие элементы · шапка · меню ·
   главная (первый экран, «Белое место», «Почему Арамиль», авторская версия,
   стела, дом, маршрут, «Присоединиться») · окно историй · подвал · lightbox ·
   внутренние страницы · формы.
   ========================================================================= */

/* ---------- Шрифты (лежат на сайте, внешние сервисы не нужны) ---------- */
@font-face {
  font-family: "Aramil Serif";
  src: url("../fonts/noto-serif-cyrillic.woff2") format("woff2");
  font-weight: 400 800; font-stretch: 62.5% 100%; font-style: normal; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Aramil Serif";
  src: url("../fonts/noto-serif-latin.woff2") format("woff2");
  font-weight: 400 800; font-stretch: 62.5% 100%; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+2010-2027, U+2030-203A, U+2122, U+2190-2193, U+2212, U+20BD;
}
@font-face {
  font-family: "Aramil Serif";
  src: url("../fonts/noto-serif-cyrillic-italic.woff2") format("woff2");
  font-weight: 400 800; font-stretch: 62.5% 100%; font-style: italic; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Aramil Serif";
  src: url("../fonts/noto-serif-latin-italic.woff2") format("woff2");
  font-weight: 400 800; font-stretch: 62.5% 100%; font-style: italic; font-display: swap;
  unicode-range: U+0000-00FF, U+2010-2027, U+2030-203A, U+2122, U+2190-2193, U+2212, U+20BD;
}
@font-face {
  font-family: "Aramil Display";
  src: url("../fonts/noto-serif-display-cyrillic.woff2") format("woff2");
  font-weight: 400 800; font-stretch: 62.5% 100%; font-style: normal; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Aramil Display";
  src: url("../fonts/noto-serif-display-latin.woff2") format("woff2");
  font-weight: 400 800; font-stretch: 62.5% 100%; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+2010-2027, U+2030-203A, U+2122, U+2190-2193, U+2212, U+20BD;
}
@font-face {
  font-family: "Aramil Script";
  src: url("../fonts/marck-script-cyrillic.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Aramil Script";
  src: url("../fonts/marck-script-latin.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+2010-2027, U+2030-203A;
}

/* ---------- Переменные ---------- */
:root {
  --navy-950: #000f24;
  --navy-900: #00142d;
  --navy-850: #001a35;
  --navy-800: #001f3e;
  --navy-700: #052a54;
  --navy-600: #0b3a70;
  --navy-500: #1a4c88;

  --gold-100: #fff6dc;
  --gold-200: #fbe8b4;
  --gold-300: #f4d68e;
  --gold-400: #e9c26f;
  --gold-500: #d6a64f;
  --gold-600: #b5833a;
  --gold-700: #7f571d;

  --paper-50: #fbf4e3;
  --paper-100: #f6ead0;
  --paper-200: #efdfbc;
  --paper-300: #e3c993;
  --paper-400: #cfae73;

  --ink-900: #1f150b;
  --ink-800: #2d2012;
  --ink-600: #4d3a24;
  --ink-500: #6b543a;
  --burgundy: #8c1b1b;
  --forest-800: #12352a;
  --forest-900: #0b2219;

  --text-on-navy: #f5ebd2;
  --muted-on-navy: #cdbf9f;

  --font-text: "Aramil Serif", "PT Serif", Georgia, "Times New Roman", serif;
  --font-display: "Aramil Display", "Aramil Serif", "PT Serif", Georgia, serif;
  --font-script: "Aramil Script", "Aramil Serif", cursive;

  --gold-grad: linear-gradient(180deg, #fff3cf 0%, #f2d48a 38%, #dfb05b 68%, #b98034 100%);
  --gold-line: linear-gradient(90deg, transparent, rgba(233, 194, 111, .9) 12%, rgba(255, 236, 180, 1) 50%, rgba(233, 194, 111, .9) 88%, transparent);
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .32 0 0 0 0 .22 0 0 0 0 .1 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --noise-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .6 0 0 0 0 .75 0 0 0 0 1 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  --gutter: clamp(16px, 3vw, 48px);
  --wide: 1760px;
  /* 1% ширины экрана, но не больше 1% от максимальной ширины содержимого:
     блоки главной масштабируются вместе с экраном и перестают расти после 1760px */
  --u: min(1vw, 17.6px);
  --radius: 3px;
  --header-h: 64px;
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--navy-900);
  color: var(--ink-800);
  font-family: var(--font-text);
  font-size: 17px;
  font-stretch: 92%;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
p { margin: 0 0 .8em; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.12; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }
figure { margin: 0; }
blockquote { margin: 0; }
summary { cursor: pointer; }
summary::-webkit-details-marker { display: none; }
[hidden] { display: none !important; }
main:focus { outline: none; }

:focus-visible { outline: 2px solid var(--gold-300); outline-offset: 3px; }
.why :focus-visible, .author :focus-visible, .foundation :focus-visible, .stages :focus-visible, .inner-body :focus-visible { outline-color: var(--navy-600); }

.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1em; height: 1em; flex: none; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  padding: 10px 16px; background: var(--gold-300); color: var(--ink-900);
  font-weight: 600; text-decoration: none; border-radius: var(--radius);
}
.skip-link:focus { top: 12px; }

/* Орнаментальная линия-разделитель (цвет задаётся color) */
.flourish {
  display: block; width: 180px; height: 18px; color: var(--gold-500);
  background: currentColor;
  -webkit-mask: url("../img/ui/flourish.svg") center / contain no-repeat;
  mask: url("../img/ui/flourish.svg") center / contain no-repeat;
}
.flourish--start { margin-left: 0; }
.flourish--line { width: 100%; max-width: 360px; }

/* Пометки типа содержания: гипотеза, реконструкция, визуализация */
.tag {
  display: inline-flex; align-items: center; gap: .4em;
  padding: .28em .7em .3em .55em;
  border: 1px solid rgba(233, 194, 111, .55);
  border-radius: 999px;
  background: rgba(0, 18, 40, .82);
  color: var(--gold-200);
  font-size: 12px; font-stretch: 85%; line-height: 1.2; letter-spacing: .01em;
  white-space: nowrap;
}
.tag .icon { width: 1.15em; height: 1.15em; color: var(--gold-400); }

/* Ссылка со стрелкой */
.link-arrow {
  display: inline-flex; align-items: center; gap: .45em;
  color: var(--navy-700); font-weight: 600; text-decoration: none;
  border-bottom: 1px solid currentColor; padding-bottom: 1px;
}
.link-arrow .icon { width: 1.1em; height: 1.1em; transition: transform .2s; }
.link-arrow:hover .icon { transform: translateX(3px); }
.link-arrow--back .icon { transform: scaleX(-1); }
.link-arrow--back:hover .icon { transform: scaleX(-1) translateX(3px); }

/* Круглая золотая стрелка (символы «Белого места») */
.round-arrow {
  display: inline-grid; place-items: center; flex: none;
  width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff1c4, #e6bd68 55%, #b07b2f);
  box-shadow: 0 0 0 1px #8a5c1c, 0 2px 4px rgba(60, 35, 5, .35);
  color: var(--ink-900);
}
.round-arrow .icon { width: 15px; height: 15px; stroke-width: 2.4; }

/* ---------- Кнопки ---------- */
.btn {
  --frame: url("../img/ui/btn-navy.svg");
  display: inline-flex; align-items: center; justify-content: center; gap: .65em;
  min-height: 48px; padding: .55em 1.35em;
  border: 1px solid transparent;
  border-image: var(--frame) 14 fill / 13px / 0 stretch;
  background: transparent;
  color: var(--gold-200);
  font-family: var(--font-text); font-weight: 600; font-size: 17px; font-stretch: 84%;
  line-height: 1.12; text-align: left; text-decoration: none;
  cursor: pointer;
  transition: filter .2s, transform .2s;
}
.btn:hover { filter: brightness(1.12) saturate(1.06); }
.btn:active { transform: translateY(1px); }
.btn__icon { width: 1.7em; height: 1.7em; }
.btn__arrow { width: 1.3em; height: 1.3em; margin-left: auto; transition: transform .2s; }
.btn:hover .btn__arrow { transform: translateX(3px); }
/* background-color под рамкой не виден (рамка с заливкой рисуется поверх),
   но нужен как запасной фон и для проверок контрастности */
.btn--gold { --frame: url("../img/ui/btn-gold.svg"); color: var(--ink-900); text-shadow: 0 1px 0 rgba(255, 246, 214, .6); background: #ecc672 content-box; }
.btn--navy { --frame: url("../img/ui/btn-navy.svg"); color: var(--gold-200); background: #0a2a5c content-box; }
.btn--outline { --frame: url("../img/ui/btn-navy.svg"); color: var(--gold-300); background: #0a2a5c content-box; }
.btn--caps .btn__label { text-transform: uppercase; letter-spacing: .03em; }
.btn--small { min-height: 40px; padding: .35em 1em; font-size: 15px; }
.btn--green {
  --frame: url("../img/ui/btn-green.svg");
  background: #163d2c content-box;
  border-image: var(--frame) 28 fill / 24px / 0 stretch;
  padding: .4em .45em .4em 1.3em; min-height: 46px;
  color: var(--gold-200); text-transform: uppercase; letter-spacing: .03em; font-size: 15px;
}
.btn__round {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff1c4, #e6bd68 55%, #b07b2f);
  color: var(--ink-900);
}
.btn__round .icon { width: 18px; height: 18px; stroke-width: 2.2; }

/* =========================================================================
   ШАПКА
   ========================================================================= */
.site-header {
  position: sticky; top: 0; z-index: 60;
  height: var(--header-h);
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(30, 80, 150, .35), transparent 60%),
    linear-gradient(180deg, #00244a 0%, #001f3e 55%, #001a36 100%);
  border-bottom: 1px solid rgba(233, 194, 111, .45);
}
.site-header__ornament, .site-header__aside .site-motto, .site-title__kind, .site-title__flourish { display: none; }
.site-header__bar {
  position: relative; height: 100%;
  display: flex; align-items: center; gap: 12px;
  padding: 0 8px 0 12px;
}
.site-logo { flex: none; display: block; width: 50px; height: 50px; border-radius: 50%; }
.site-logo__img { width: 100%; height: 100%; filter: drop-shadow(0 0 6px rgba(255, 200, 90, .35)); }
.site-title { min-width: 0; flex: 1; }
.site-title__name {
  margin: 0; font-family: var(--font-text); font-weight: 600; font-stretch: 75%;
  font-size: clamp(16px, 4.6vw, 22px); line-height: 1.05; text-transform: uppercase; letter-spacing: .02em;
}
.site-title__name a {
  text-decoration: none;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.site-header__aside { display: flex; align-items: center; }
.site-tools { display: flex; align-items: center; gap: 4px; }
.site-tools .social { display: none; }
.tool-btn {
  display: grid; place-items: center; width: 44px; height: 44px;
  color: var(--gold-400); text-decoration: none; border-radius: 50%;
}
.tool-btn .icon { width: 24px; height: 24px; }
.tool-btn:hover { color: var(--gold-200); }
.burger {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  width: 52px; height: 48px; padding: 0; border: 1px solid rgba(233, 194, 111, .5); border-radius: var(--radius);
  background: rgba(0, 20, 45, .6); color: var(--gold-300);
}
.burger .icon { width: 24px; height: 24px; }
.burger__label { font-size: 10px; font-stretch: 80%; text-transform: uppercase; letter-spacing: .06em; line-height: 1; margin-top: 1px; }

/* Поиск в шапке */
.site-search {
  position: absolute; top: 100%; right: 0; left: 0; z-index: 70;
  display: flex; gap: 8px; align-items: center;
  padding: 12px; background: var(--navy-850);
  border-bottom: 1px solid rgba(233, 194, 111, .45);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .4);
}
.site-search__input { flex: 1; min-width: 0; min-height: 46px; height: 46px; }
.site-search__close {
  display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: none; color: var(--gold-300);
}
.site-search__close .icon { width: 22px; height: 22px; }

/* Соцсети */
.social { display: flex; align-items: center; gap: 2px; }
.social__link {
  display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 4px;
  color: var(--gold-400); text-decoration: none; border-radius: var(--radius);
}
.social__link:hover { color: var(--gold-200); }
.social__link .icon { width: 25px; height: 25px; }
.social__text { font-family: var(--font-display); font-weight: 800; font-stretch: 70%; font-size: 19px; letter-spacing: .02em; line-height: 1; }
.social__link--max .social__text { font-family: var(--font-text); font-weight: 700; font-stretch: 88%; font-size: 18px; letter-spacing: 0; }

@media (min-width: 700px) {
  :root { --header-h: 76px; }
  .site-logo { width: 62px; height: 62px; }
  .site-title__kind {
    display: block; margin: 0 0 3px; color: var(--muted-on-navy);
    font-size: 11px; font-stretch: 85%; line-height: 1.25; text-transform: uppercase; letter-spacing: .08em;
  }
  .site-title__kind span { display: none; }
}

/* Полная шапка - как в макете */
@media (min-width: 1180px) {
  /* высота шапки растёт вместе с шириной экрана: пропорции как в макете */
  :root { --header-h: clamp(96px, 8.3vw, 156px); }
  .site-header { position: relative; z-index: 50; border-bottom: 0; }
  .site-header__ornament {
    display: block; position: absolute; left: 0; top: 0; height: 100%; aspect-ratio: 1780 / 612;
    background: url("../img/header-ornament-900.jpg") left top / 100% 100% no-repeat;
    background-image: image-set(url("../img/header-ornament-900.avif") type("image/avif"), url("../img/header-ornament-900.webp") type("image/webp"), url("../img/header-ornament-900.jpg") type("image/jpeg"));
    -webkit-mask: linear-gradient(90deg, #000 70%, transparent);
    mask: linear-gradient(90deg, #000 70%, transparent);
  }
  .site-header__bar { padding: 0; gap: 0; }
  .site-logo {
    position: absolute; z-index: 3;
    width: calc(var(--header-h) * 1.08); height: calc(var(--header-h) * 1.08);
    left: calc(var(--header-h) * 1.15); top: calc(var(--header-h) * .045);
  }
  .site-logo__img { filter: drop-shadow(0 0 10px rgba(255, 196, 80, .45)) drop-shadow(0 6px 14px rgba(0, 0, 0, .45)); }
  .site-title {
    position: relative; z-index: 2;
    margin-left: calc(var(--header-h) * 2.45);
    margin-right: calc(var(--header-h) * 4.15);
    text-align: center;
    display: flex; flex-direction: column; align-items: center;
  }
  .site-title__kind {
    display: block; margin: 0 0 calc(var(--header-h) * .04);
    color: #f2e8d3; font-size: calc(var(--header-h) * .118); line-height: 1.22; letter-spacing: .07em;
    font-stretch: 88%; font-weight: 450;
  }
  .site-title__kind span { display: block; }
  .site-title__name {
    font-family: var(--font-display);
    font-size: calc(var(--header-h) * .25); font-stretch: 70%; font-weight: 700; letter-spacing: .02em;
    line-height: 1.08; white-space: nowrap;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .55));
  }
  .site-title__flourish { display: block; width: 100%; max-width: calc(var(--header-h) * 4.2); height: calc(var(--header-h) * .13); margin-top: calc(var(--header-h) * .04); color: var(--gold-500); }
  .site-header__aside {
    position: absolute; right: 0; top: 0; z-index: 1;
    height: 100%; aspect-ratio: 2985 / 612;
    background: url("../img/header-map-720.jpg") right top / 100% 100% no-repeat;
    background-image: image-set(url("../img/header-map-1440.avif") type("image/avif"), url("../img/header-map-1440.webp") type("image/webp"), url("../img/header-map-1440.jpg") type("image/jpeg"));
    -webkit-mask: linear-gradient(90deg, transparent 0, #000 16%);
    mask: linear-gradient(90deg, transparent 0, #000 16%);
  }
  .site-header__aside .site-motto {
    display: block; position: absolute; left: 13.5%; top: 37%; margin: 0;
    font-family: var(--font-script); font-size: calc(var(--header-h) * .2); line-height: 1.12;
    color: #10203f; text-align: center; text-shadow: 0 0 8px rgba(255, 240, 205, .55);
    transform: rotate(-3deg);
  }
  .site-tools { position: absolute; right: 1%; top: 59%; transform: translateY(-50%); gap: calc(var(--header-h) * .05); }
  .site-tools .social { display: flex; gap: calc(var(--header-h) * .05); }
  .site-tools .tool-btn, .site-tools .social__link { width: auto; min-width: calc(var(--header-h) * .27); height: calc(var(--header-h) * .34); padding: 0 2px; }
  .site-tools .tool-btn .icon, .site-tools .social__link .icon { width: calc(var(--header-h) * .22); height: calc(var(--header-h) * .22); }
  .site-tools .social__text { font-size: calc(var(--header-h) * .17); }
  .site-tools .social__link--max .social__text { font-size: calc(var(--header-h) * .16); }
  .burger { display: none; }
  .site-search { left: auto; width: min(560px, 60vw); top: calc(100% + 8px); right: 2vw; border: 1px solid rgba(233, 194, 111, .5); border-radius: var(--radius); }
}

/* =========================================================================
   ГЛАВНОЕ МЕНЮ
   ========================================================================= */
.main-nav__head { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 20px; border-bottom: 1px solid rgba(233, 194, 111, .3); }
.main-nav__head-title { color: var(--gold-300); font-family: var(--font-text); font-weight: 600; font-stretch: 80%; text-transform: uppercase; letter-spacing: .08em; }
.main-nav__close { display: grid; place-items: center; width: 48px; height: 48px; border: 0; background: none; color: var(--gold-300); }
.main-nav__close .icon { width: 24px; height: 24px; }
.main-nav__link { color: var(--text-on-navy); text-decoration: none; }
.main-nav__button { border: 0; background: none; cursor: pointer; }
.main-nav__chevron { color: var(--gold-400); transition: transform .2s; }
.main-nav__button[aria-expanded="true"] .main-nav__chevron { transform: rotate(180deg); }
.main-nav__sublink { display: block; color: var(--text-on-navy); text-decoration: none; }
.main-nav__sublink:hover, .main-nav__sublink[aria-current="page"] { color: var(--gold-300); }
.main-nav__subitem--overview .main-nav__sublink { display: flex; align-items: center; gap: .5em; color: var(--gold-300); font-weight: 600; }
.main-nav__subitem--overview .icon { width: 1.1em; height: 1.1em; flex: none; }
.main-nav__extra { padding: 18px 20px 28px; display: grid; gap: 14px; }
.main-nav__search { display: inline-flex; align-items: center; gap: 10px; color: var(--gold-300); text-decoration: none; font-size: 16px; }
.main-nav__search .icon { width: 22px; height: 22px; }
.main-nav__support {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 8px 16px;
  border: 1px solid #8a5c1c; border-radius: var(--radius);
  background: var(--gold-grad); color: var(--ink-900); text-decoration: none;
  font-weight: 700; font-stretch: 84%; font-size: 16px; text-transform: uppercase; letter-spacing: .03em;
}
.main-nav__support .icon { width: 22px; height: 22px; }
.main-nav__subitem--deep .main-nav__sublink { position: relative; color: var(--muted-on-navy); }
.main-nav__subitem--deep .main-nav__sublink::before { content: ""; position: absolute; top: 50%; width: 8px; height: 1px; background: var(--gold-500); }
.nav-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(0, 8, 20, .62); }

/* Телефон и планшет: выезжающая панель */
@media (max-width: 1179px) {
  .main-nav {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 100;
    width: min(400px, 90vw);
    background: linear-gradient(180deg, #00244a, #001530);
    border-left: 1px solid rgba(233, 194, 111, .5);
    box-shadow: -18px 0 40px rgba(0, 0, 0, .45);
    transform: translateX(105%); visibility: hidden;
    transition: transform .28s ease, visibility 0s linear .28s;
    overflow-y: auto; overscroll-behavior: contain;
  }
  .main-nav.is-open { transform: none; visibility: visible; transition: transform .28s ease, visibility 0s; }
  .main-nav__item { border-bottom: 1px solid rgba(233, 194, 111, .16); }
  .main-nav__link {
    width: 100%; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 16px 8px 20px;
    font-family: var(--font-text); font-weight: 600; font-stretch: 82%; font-size: 16px; line-height: 1.25;
    text-transform: uppercase; letter-spacing: .03em; text-align: left;
  }
  .main-nav__link span { flex: 1; }
  .main-nav__chevron { width: 22px; height: 22px; }
  .main-nav__home-icon { width: 20px; height: 20px; color: var(--gold-400); }
  .main-nav__item.is-active > .main-nav__link { color: var(--gold-300); box-shadow: inset 4px 0 0 var(--gold-400); }
  .main-nav__sub { display: none; padding: 2px 0 12px; background: rgba(0, 8, 22, .35); }
  .main-nav__item.is-open > .main-nav__sub { display: block; }
  .main-nav__sublink { padding: 9px 20px 9px 36px; font-size: 16px; line-height: 1.3; }
  .main-nav__subitem--deep .main-nav__sublink { padding-left: 56px; font-size: 15px; }
  .main-nav__subitem--deep .main-nav__sublink::before { left: 38px; }
  body.nav-locked { overflow: hidden; }
}

/* Компьютер: горизонтальная полоса */
@media (min-width: 1180px) {
  .main-nav {
    position: sticky; top: 0; z-index: 45;
    background:
      var(--noise-light),
      linear-gradient(180deg, #002148 0%, #001a38 50%, #00142c 100%);
    border-top: 1px solid rgba(233, 194, 111, .55);
    border-bottom: 1px solid rgba(233, 194, 111, .55);
    box-shadow: 0 1px 0 rgba(0, 0, 0, .5), 0 8px 20px rgba(0, 0, 0, .35);
  }
  .main-nav::before, .main-nav::after {
    content: ""; position: absolute; left: 0; right: 0; height: 1px; background: var(--gold-line); opacity: .8; pointer-events: none;
  }
  .main-nav::before { top: -1px; }
  .main-nav::after { bottom: -1px; }
  .main-nav__head, .main-nav__extra, .nav-backdrop { display: none !important; }
  .main-nav__list {
    display: flex; align-items: stretch; justify-content: space-between;
    max-width: 1920px; margin: 0 auto; padding: 0 .6vw;
  }
  .main-nav__item { position: relative; display: flex; align-items: center; flex: 1 1 auto; justify-content: center; }
  .main-nav__item + .main-nav__item::before {
    content: ""; position: absolute; left: 0; top: 16%; bottom: 16%; width: 1px;
    background: linear-gradient(180deg, transparent, rgba(233, 194, 111, .5), transparent);
  }
  .main-nav__link {
    display: flex; align-items: center; justify-content: center; gap: .3em;
    min-height: clamp(44px, 3.4vw, 58px); padding: 4px .45em;
    font-family: var(--font-text); font-weight: 600; font-stretch: 72%;
    font-size: clamp(11px, .8vw, 15px); line-height: 1.12; letter-spacing: .015em;
    text-transform: uppercase; text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
  }
  .main-nav__link span { max-width: 12.5em; text-wrap: balance; }
  .main-nav__link span.nowrap { white-space: nowrap; }
  .main-nav__link:hover { color: var(--gold-200); }
  .main-nav__chevron { width: 1.25em; height: 1.25em; }
  .main-nav__home-icon { width: 1.5em; height: 1.5em; }

  /* активный пункт - золотая плашка, как «Главная» в макете */
  .main-nav__item.is-active { padding: 5px 0; }
  .main-nav__item.is-active > .main-nav__link {
    align-self: stretch; padding-left: .9em; padding-right: .8em;
    border-radius: var(--radius);
    background: var(--gold-grad);
    color: var(--ink-900);
    text-shadow: 0 1px 0 rgba(255, 246, 214, .6);
    box-shadow: inset 0 0 0 1px rgba(255, 248, 225, .7), 0 0 0 1px #8a5c1c, 0 3px 8px rgba(0, 0, 0, .45);
  }
  .main-nav__item.is-active .main-nav__chevron { color: var(--ink-800); }
  .main-nav__item.is-active + .main-nav__item::before, .main-nav__item.is-active::before { display: none; }

  .main-nav__sub {
    position: absolute; top: 100%; left: 0; z-index: 10;
    min-width: 270px; max-width: 360px;
    padding: 10px 0 12px;
    background: linear-gradient(180deg, #00244a, #001836);
    border: 1px solid rgba(233, 194, 111, .5); border-top: 2px solid var(--gold-400);
    box-shadow: 0 18px 36px rgba(0, 0, 0, .5);
    visibility: hidden; opacity: 0; transform: translateY(6px);
    transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s;
  }
  .main-nav__item:nth-last-child(-n+4) > .main-nav__sub { left: auto; right: 0; }
  .main-nav__item.is-open > .main-nav__sub { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .main-nav__sublink { padding: 8px 20px; font-size: 15.5px; line-height: 1.3; }
  .main-nav__sublink:hover { background: rgba(233, 194, 111, .08); }
  .main-nav__subitem--overview { margin-bottom: 4px; padding-bottom: 4px; border-bottom: 1px solid rgba(233, 194, 111, .22); }
  .main-nav__subitem--deep .main-nav__sublink { padding: 5px 20px 5px 42px; font-size: 14.5px; }
  .main-nav__subitem--deep .main-nav__sublink::before { left: 24px; }
  .main-nav__subitem--deep .main-nav__sublink:hover { color: var(--gold-300); }
  .main-nav.is-stuck { box-shadow: 0 10px 26px rgba(0, 0, 0, .55); }
}
@media (min-width: 1180px) and (hover: hover) {
  .main-nav__item.has-sub:hover > .main-nav__sub { visibility: visible; opacity: 1; transform: none; transition-delay: .06s; }
}
@media (min-width: 1180px) and (max-width: 1299px) {
  .main-nav__link { padding-left: .32em; padding-right: .32em; gap: .15em; }
  .main-nav__chevron { width: 1.1em; height: 1.1em; }
}

/* =========================================================================
   ПЕРВЫЙ ЭКРАН: «Наш проект — Дом беломестных казаков»
   Компьютер: текст стоит на тёмной панели, нарисованной на иллюстрации,
   и масштабируется вместе с ней (единицы cqw = 1% ширины блока).
   Планшет и телефон: кадр с учредителями и домом, текст под ним.
   ========================================================================= */
.hero { position: relative; container-type: inline-size; background: var(--navy-950); color: var(--text-on-navy); }
.hero__media { position: relative; aspect-ratio: 3560 / 1994; overflow: hidden; background: var(--navy-800); }
.hero__media picture { height: 100%; }
.hero__img { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 28%; pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 15, 36, 0), var(--navy-950));
}
.hero__content { position: relative; z-index: 2; padding: 4px var(--gutter) 32px; text-align: center; }
.hero__kicker {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin: 0 0 8px; color: var(--gold-200);
  font-size: 15px; font-stretch: 85%; letter-spacing: .26em; text-transform: uppercase;
}
.hero__kicker::before, .hero__kicker::after { content: ""; flex: 0 1 64px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-400)); }
.hero__kicker::after { transform: scaleX(-1); }
.hero__title {
  margin: 0 auto 14px; max-width: 12em;
  font-family: var(--font-display); font-weight: 700; font-stretch: 74%;
  font-size: clamp(34px, 9.6vw, 62px); line-height: .98; letter-spacing: .01em; text-transform: uppercase;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .6));
}
.hero__title-text {
  background: linear-gradient(180deg, #fffdf6 0%, #fbefd0 38%, #f0cf8a 70%, #c8964a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.hero__lead { max-width: 32em; margin: 0 auto 20px; font-size: 18px; line-height: 1.45; color: #f1e8d4; }
.hero__btn { min-width: 250px; text-transform: uppercase; letter-spacing: .03em; font-size: 16px; }
.hero__copyright {
  position: absolute; z-index: 3; right: 10px; top: calc(56.18cqw - 26px); margin: 0;
  font-size: 12px; color: #f7ecd2; letter-spacing: .02em;
  text-shadow: 0 0 6px rgba(0, 0, 0, .95), 0 0 2px rgba(0, 0, 0, .95);
}

@media (min-width: 1180px) {
  .hero__media { aspect-ratio: 7520 / 1994; }
  .hero__media::after { display: none; }
  /* панель на картинке: левые 32,6% ширины, высота блока = 26,52cqw */
  .hero__content { position: absolute; top: 0; bottom: 0; left: 0; width: 32.6cqw; padding: 0; }
  .hero__kicker {
    position: absolute; left: 0; right: 0; top: 10.4%; margin: 0;
    font-size: 1.36cqw; letter-spacing: .13em; color: #f6ecd6;
    text-shadow: 0 0 .4cqw rgba(0, 10, 30, .9);
  }
  .hero__kicker::before, .hero__kicker::after { display: none; }
  .hero__title {
    position: absolute; top: 17.4%; left: 4.6cqw; right: 4.6cqw; margin: 0; max-width: none;
    font-size: 3.3cqw; font-stretch: 64%; line-height: .835; letter-spacing: .01em;
    filter: drop-shadow(0 .14cqw .14cqw rgba(0, 0, 0, .7));
  }
  .hero__lead {
    position: absolute; left: 4.65cqw; width: 24.2cqw; top: 60.2%; margin: 0;
    font-size: max(14px, 1.17cqw); font-stretch: 90%; line-height: 1.2; text-align: left; color: #f4ecdb;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
  }
  .hero__btn {
    position: absolute; left: 11.65cqw; top: 81.3%; width: 9.05cqw; height: 10.9%; min-width: 0; min-height: 0;
    padding: 0 .7cqw 0 .75cqw; gap: .55cqw;
    font-size: max(10px, .8cqw); font-stretch: 80%; line-height: 1.12; border-image-width: .6cqw;
  }
  .hero__btn .btn__icon { width: 1.55cqw; height: 1.55cqw; }
  .hero__btn .btn__arrow { width: 1.05cqw; height: 1.05cqw; align-self: flex-end; margin: 0 0 .5cqw -.2cqw; }
  .hero__copyright { top: auto; bottom: 1.5%; right: 8cqw; font-size: max(11px, .92cqw); }
}

/* =========================================================================
   ПЕРГАМЕНТ (общий фон исторических блоков и внутренних страниц)
   ========================================================================= */
.foundation, .why, .author, .stages, .inner-body {
  background-color: var(--paper-100);
  background-image:
    var(--noise),
    radial-gradient(130% 120% at 50% 40%, rgba(255, 250, 235, .6) 0%, rgba(255, 250, 235, 0) 55%),
    radial-gradient(160% 160% at 50% 50%, transparent 55%, rgba(158, 112, 48, .22) 100%);
}

/* =========================================================================
   «БЕЛОЕ МЕСТО — НЕ ПРИВИЛЕГИЯ, А ОТВЕТСТВЕННОСТЬ»: пять символов-историй
   ========================================================================= */
.foundation {
  position: relative; z-index: 5;
  border-top: 3px double rgba(155, 112, 50, .55);
  border-bottom: 3px double rgba(155, 112, 50, .55);
  box-shadow: 0 -6px 18px rgba(0, 0, 0, .35);
}
.foundation__inner { max-width: var(--wide); margin: 0 auto; padding: 20px var(--gutter) 22px; }
.foundation__title {
  display: flex; align-items: center; gap: 14px; margin: 0 0 4px;
  font-family: var(--font-text); font-weight: 600; font-stretch: 80%;
  font-size: clamp(16px, 4.4vw, 26px); line-height: 1.15; letter-spacing: .03em; text-transform: uppercase;
  color: var(--navy-700); text-align: center;
}
.foundation__title::before, .foundation__title::after {
  content: ""; flex: 1 1 0; min-width: 24px; height: 18px; background: var(--gold-600);
  -webkit-mask: url("../img/ui/flourish.svg") right center / auto 100% no-repeat;
  mask: url("../img/ui/flourish.svg") right center / auto 100% no-repeat;
}
.foundation__title::after { -webkit-mask-position: left center; mask-position: left center; }
.foundation__hint { margin: 0 0 12px; text-align: center; font-style: italic; font-size: 15px; color: var(--ink-500); }
.foundation__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; }
.foundation__item--root { grid-column: 1 / -1; }
.foundation__link {
  position: relative; height: 100%;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 1fr auto; align-items: end;
  padding: 6px 4px 10px; border-radius: 6px;
  color: var(--ink-900); text-decoration: none;
  transition: background-color .2s;
}
.foundation__link:hover { background-color: rgba(255, 252, 240, .6); }
.foundation__pic { grid-column: 1 / -1; grid-row: 1; align-self: center; }
.foundation__img { width: 100%; mix-blend-mode: multiply; transition: transform .35s ease; }
.foundation__item--root .foundation__img { max-width: 260px; margin: 0 auto; }
.foundation__link:hover .foundation__img { transform: scale(1.04); }
.foundation__label {
  grid-column: 1; grid-row: 2; justify-self: end; z-index: 1; padding-right: 8px;
  font-family: var(--font-text); font-weight: 600; font-stretch: 78%;
  font-size: 14px; line-height: 1.15; letter-spacing: .02em; text-transform: uppercase; text-align: right;
  text-shadow: 0 0 6px var(--paper-100), 0 0 3px var(--paper-100);
}
.foundation__link .round-arrow { grid-column: 2; grid-row: 2; z-index: 1; transition: transform .2s; }
.foundation__link:hover .round-arrow { transform: translateX(3px); }

@media (min-width: 600px) {
  .foundation__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foundation__item--root { grid-column: auto; grid-row: span 2; }
  .foundation__item--root .foundation__link { align-content: center; }
  .foundation__pic { padding: 0 8%; }
  .foundation__item--root .foundation__pic { padding: 0; }
}
@media (min-width: 1180px) {
  .foundation__inner { padding-top: 10px; padding-bottom: 12px; }
  .foundation__title { font-size: clamp(17px, calc(var(--u) * 1.42), 28px); }
  .foundation__hint { margin: 0 0 2px; font-size: clamp(13px, calc(var(--u) * .9), 16px); }
  .foundation__list { grid-template-columns: 1.24fr repeat(4, minmax(0, 1fr)); gap: 0; }
  .foundation__item--root { grid-row: auto; }
  .foundation__item + .foundation__item { border-left: 1px solid rgba(120, 85, 40, .3); }
  .foundation__link { grid-template-rows: auto; padding: 4px calc(var(--u) * .5) 6px calc(var(--u) * .9); }
  .foundation__pic { grid-row: 1 / 3; align-self: start; padding-right: 16%; }
  .foundation__item--root .foundation__pic { padding-right: 0; }
  .foundation__item--root .foundation__img { max-width: none; width: 62%; margin: 0 0 0 18%; }
  .foundation__label { grid-row: 2; font-size: clamp(12px, calc(var(--u) * .86), 16px); padding-right: calc(var(--u) * .5); }
  .foundation__link .round-arrow { width: clamp(24px, calc(var(--u) * 1.7), 32px); height: clamp(24px, calc(var(--u) * 1.7), 32px); }

  /* иву - во всю высоту блока слева, заголовок - над остальными символами, как в макете */
  @supports (grid-template-columns: subgrid) {
    .foundation__inner { display: grid; grid-template-columns: 1.24fr repeat(4, minmax(0, 1fr)); grid-template-rows: auto auto 1fr; }
    .foundation__title { grid-column: 2 / -1; grid-row: 1; }
    .foundation__hint { grid-column: 2 / -1; grid-row: 2; }
    .foundation__list { grid-column: 1 / -1; grid-row: 1 / -1; grid-template-columns: subgrid; grid-template-rows: subgrid; }
    .foundation__item--root { grid-column: 1; grid-row: 1 / -1; }
    .foundation__item:not(.foundation__item--root) { grid-row: 3; }
    .foundation__item--root .foundation__link { align-content: end; }
  }
}

/* =========================================================================
   «ПОЧЕМУ АРАМИЛЬ — МАТЬ ГОРОДОВ УРАЛА?» и хронология
   ========================================================================= */
.why { position: relative; }
.why__paper { position: relative; display: grid; max-width: 1640px; margin: 0 auto; }
.why__intro { position: relative; padding: 30px var(--gutter) 150px; overflow: hidden; }
.why__title {
  margin-bottom: 12px;
  font-family: var(--font-display); font-weight: 700; font-stretch: 82%;
  font-size: clamp(32px, 8.2vw, 48px); line-height: 1.04; letter-spacing: -.005em; color: var(--ink-900);
}
.why__intro .flourish { width: 130px; color: var(--gold-600); margin-bottom: 16px; }
.why__text { position: relative; z-index: 1; max-width: 32em; margin-bottom: 22px; font-size: 19px; line-height: 1.5; color: var(--ink-800); }
.why__intro .btn { position: relative; z-index: 1; font-size: 18px; }
.why__decor { position: absolute; left: 0; right: 0; bottom: 0; height: 170px; pointer-events: none; }
.why__pine { position: absolute; left: 0; bottom: 0; width: 46px; mix-blend-mode: multiply; opacity: .95; }
.why__sketch { position: absolute; right: 0; bottom: 0; width: min(78%, 380px); mix-blend-mode: multiply; opacity: .9; }

.timeline { position: relative; padding: 24px var(--gutter) 30px calc(var(--gutter) + 28px); border-top: 1px solid rgba(155, 112, 50, .35); }
.timeline::before {
  content: ""; position: absolute; top: 44px; bottom: 56px; left: calc(var(--gutter) + 8px); width: 3px;
  background: linear-gradient(180deg, #e7c272, #b3802f); box-shadow: 0 0 0 1px rgba(120, 80, 20, .35);
}
.timeline__item { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 0; }
.timeline__item + .timeline__item { border-top: 1px solid rgba(155, 112, 50, .3); }
.timeline__item::before {
  content: ""; position: absolute; left: -29px; top: 22px; width: 19px; height: 19px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff3c9, #e5b95e 55%, #8f6020);
  box-shadow: 0 0 0 1px #6f4a16, 0 2px 4px rgba(60, 35, 5, .4);
}
.timeline__body { flex: 1; min-width: 0; }
.timeline__year { margin: 0; font-family: var(--font-text); font-weight: 700; font-stretch: 80%; font-size: 30px; line-height: 1.05; color: var(--burgundy); }
.timeline__text { margin: 3px 0 0; font-size: 17px; line-height: 1.3; color: var(--ink-800); }
.timeline__img { width: 120px; flex: none; mix-blend-mode: multiply; }

@media (min-width: 900px) {
  .why__paper { grid-template-columns: 1.12fr 1fr; align-items: center; }
  .why__intro { align-self: stretch; padding: 46px calc(var(--u) * 3) 190px max(var(--gutter), calc(var(--u) * 3)); }
  .timeline { border-top: 0; border-left: 1px solid rgba(155, 112, 50, .35); padding: 30px max(var(--gutter), calc(var(--u) * 3)) 30px calc(var(--u) * 4 + 22px); }
  .timeline::before { left: calc(var(--u) * 2.4); }
  .timeline__item::before { left: calc(var(--u) * -1.6 - 21px); }
}
@media (min-width: 1280px) {
  .why__title { font-size: calc(var(--u) * 3.3); }
  .why__text { font-size: calc(var(--u) * 1.32); }
  .why__intro .btn { font-size: calc(var(--u) * 1.15); }
  .why__decor { height: calc(var(--u) * 12); }
  .why__pine { width: calc(var(--u) * 3.6); }
  .why__sketch { width: 64%; }
  .timeline__year { font-size: calc(var(--u) * 2); }
  .timeline__text { font-size: calc(var(--u) * 1.1); }
  .timeline__img { width: calc(var(--u) * 8.4); }
}

/* =========================================================================
   АВТОРСКАЯ ВЕРСИЯ НАЗВАНИЯ «АРА + МИЛЬ»
   Широкий блок (от 1080 px): текст стоит в рамках иллюстрированной панели.
   Узкий: та же информация карточкой, сверху герб «Арамиль — Иль».
   ========================================================================= */
.author { padding: 6px var(--gutter) 44px; }
.author__wrap { max-width: 1640px; margin: 0 auto; container-type: inline-size; }
.author__panel {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 16px;
  padding: 22px 18px 26px;
  background: var(--noise), linear-gradient(180deg, #f9eed6, #efdcb4);
  border: 1px solid #a8813f;
  box-shadow: inset 0 0 0 5px #f8ecd2, inset 0 0 0 6px rgba(168, 129, 63, .7), 0 8px 24px rgba(70, 45, 10, .25);
  color: var(--ink-900); text-align: center;
}
.author__art { display: none; }
.author__emblem { order: 2; width: min(80%, 340px); }
.author__emblem-img {
  width: 100%;
  -webkit-mask: radial-gradient(closest-side, #000 72%, transparent); mask: radial-gradient(closest-side, #000 72%, transparent);
}
.author__plaque {
  order: 1; align-self: stretch; margin: 0; padding: 14px 16px 16px;
  display: flex; flex-direction: column; align-items: center;
  background: linear-gradient(180deg, #0c2c5c, #051a3c);
  border: 1px solid #c79a4c;
  box-shadow: inset 0 0 0 3px #071f45, inset 0 0 0 4px rgba(233, 194, 111, .55), 0 6px 14px rgba(0, 0, 0, .3);
  font-family: var(--font-text); font-weight: 600; font-stretch: 78%; text-transform: uppercase; line-height: 1.1;
}
.author__kicker {
  font-family: var(--font-display); font-weight: 700; font-stretch: 80%; font-size: clamp(24px, 7vw, 34px); letter-spacing: .02em;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.author__subtitle { max-width: 15em; margin-top: 6px; font-size: clamp(16px, 4.4vw, 21px); color: #f4ead5; letter-spacing: .02em; }
.author__formula {
  order: 3; margin: 4px 0 0;
  font-family: var(--font-display); font-weight: 700; font-stretch: 80%;
  font-size: clamp(30px, 8.4vw, 44px); line-height: 1.05; color: var(--ink-900);
}
.author__formula span { display: block; }
.author__terms { order: 4; max-width: 30em; text-align: left; font-size: 17px; line-height: 1.4; }
.author__intro { margin: 0 0 6px; }
.author__terms dl { display: grid; gap: 6px; }
.author__terms div { position: relative; padding-left: 22px; }
.author__terms div::before {
  content: ""; position: absolute; left: 0; top: .32em; width: 0; height: 0;
  border-left: 12px solid #a8772c; border-top: 7px solid transparent; border-bottom: 7px solid transparent;
}
.author__terms dt, .author__terms dd { display: inline; }
.author__terms dt { font-weight: 700; }
.author__equation {
  order: 5; position: relative; align-self: stretch; margin: 6px 0 0;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px;
  padding: 12px;
  background: linear-gradient(180deg, #fbf1db, #ecd6a8);
  border: 1px solid #a8813f; border-radius: 10px;
  box-shadow: inset 0 0 0 3px #fbf1db, inset 0 0 0 4px rgba(168, 129, 63, .6), 0 3px 10px rgba(80, 50, 10, .2);
  font-family: var(--font-text); font-stretch: 82%; color: var(--ink-900);
}
.author__eq-part { display: flex; flex-direction: column; align-items: center; line-height: 1.05; }
.author__eq-part b { font-size: 24px; font-weight: 700; }
.author__eq-part small { font-size: 15px; }
.author__eq-op { font-size: 34px; font-weight: 600; line-height: 1; color: var(--ink-600); }
.author__eq-result {
  padding: 6px 16px; border-radius: 8px;
  background: linear-gradient(180deg, #0c2c5c, #051a3c);
  border: 1px solid #c79a4c; box-shadow: inset 0 0 0 2px #051a3c, inset 0 0 0 3px rgba(233, 194, 111, .55);
  color: var(--gold-200); font-size: 21px; font-weight: 700; line-height: 1.05; text-transform: uppercase; letter-spacing: .03em;
}
.author__meaning { order: 6; max-width: 34em; margin: 0; font-size: 17px; line-height: 1.4; }
.author__meaning b { letter-spacing: .02em; }
.author__note {
  order: 7; position: relative; max-width: 30em; margin: 10px 0 0; padding: 20px 20px;
  background: linear-gradient(90deg, #ead7ad, #faf0d6 18%, #faf0d6 82%, #e7d3a8);
  box-shadow: 0 6px 14px rgba(70, 45, 10, .25);
  font-style: italic; font-size: 16.5px; line-height: 1.42; color: var(--ink-800);
}
.author__note::before, .author__note::after {
  content: ""; position: absolute; left: -6px; right: -6px; height: 12px; border-radius: 6px;
  background: linear-gradient(180deg, #f6e6c2, #cfb07a 55%, #a7823f); box-shadow: 0 2px 4px rgba(70, 45, 10, .3);
}
.author__note::before { top: -6px; }
.author__note::after { bottom: -6px; }
.author__note p { margin: 0; }
.author__btn {
  order: 8; display: inline-flex; align-items: center; gap: 14px;
  min-height: 52px; padding: 6px 8px 6px 22px;
  border: 1px solid transparent; border-image: url("../img/ui/btn-navy.svg") 14 fill / 13px / 0 stretch;
  background: #0a2a5c content-box;
  color: var(--gold-200); text-decoration: none;
  font-family: var(--font-text); font-weight: 600; font-stretch: 80%; font-size: 16px; letter-spacing: .03em; text-transform: uppercase;
  transition: filter .2s;
}
.author__btn:hover { filter: brightness(1.12); }
.author__btn-round {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 30%, #fff1c4, #e6bd68 55%, #b07b2f);
  box-shadow: 0 0 0 1px #8a5c1c; color: var(--ink-900);
}
.author__btn-round .icon { width: 20px; height: 20px; stroke-width: 2.2; }
.author__tag { order: 9; }

@container (min-width: 700px) and (max-width: 1079.98px) {
  .author__panel {
    display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: center; gap: 14px 28px;
    grid-template-areas: "plaque plaque" "emblem formula" "emblem terms" "eq eq" "meaning note" "btn note" "tag tag";
    padding: 26px 28px 28px; text-align: left;
  }
  .author__plaque { grid-area: plaque; }
  .author__emblem { grid-area: emblem; width: 100%; }
  .author__formula { grid-area: formula; align-self: end; }
  .author__terms { grid-area: terms; align-self: start; }
  .author__equation { grid-area: eq; }
  .author__meaning { grid-area: meaning; }
  .author__note { grid-area: note; align-self: start; margin-top: 12px; }
  .author__btn { grid-area: btn; justify-self: start; }
  .author__tag { grid-area: tag; justify-self: start; }
}
@container (min-width: 1080px) {
  .author__panel {
    display: block; aspect-ratio: 3637 / 2043; padding: 0; gap: 0;
    background: none; border: 0; box-shadow: 0 10px 30px rgba(70, 45, 10, .3);
  }
  .author__art { display: block; position: absolute; inset: 0; }
  .author__art picture, .author__art-img { width: 100%; height: 100%; }
  .author__emblem { display: none; }
  .author__plaque, .author__formula, .author__terms, .author__equation, .author__meaning,
  .author__note, .author__btn, .author__tag { position: absolute; margin: 0; }
  .author__plaque {
    left: 9.6%; top: 4.3%; width: 47.8%; height: 19.6%; padding: 0; justify-content: center; gap: .3cqw;
    background: none; border: 0; box-shadow: none;
  }
  .author__kicker { font-size: 4.1cqw; line-height: 1; letter-spacing: .015em; filter: drop-shadow(0 .15cqw .15cqw rgba(0, 0, 0, .55)); }
  .author__subtitle { max-width: 15.5em; margin: 0; font-size: 2.42cqw; line-height: 1.04; color: #f6eedd; }
  .author__formula { left: 21.4%; top: 28.9%; width: 33.2%; font-size: 3.5cqw; line-height: 1.07; }
  .author__terms { left: 28.6%; top: 43.2%; width: 27.8%; max-width: none; font-size: 1.36cqw; line-height: 1.12; font-stretch: 86%; }
  .author__intro { margin: 0 0 .5cqw; }
  .author__terms dl { gap: .45cqw; }
  .author__terms div { padding-left: 2.6cqw; }
  .author__terms div::before { left: .45cqw; top: .18cqw; border-left-width: 1.2cqw; border-top-width: .62cqw; border-bottom-width: .62cqw; }
  .author__equation {
    left: 35.2%; top: 66.7%; width: 57.9%; height: 10.7%; padding: 0 0 0 1.4cqw;
    flex-wrap: nowrap; justify-content: flex-start; gap: 0;
    background: none; border: 0; box-shadow: none; border-radius: 0;
  }
  .author__eq-part { flex: none; }
  .author__eq-part--a { width: 12cqw; }
  .author__eq-part--b { width: 19.5cqw; }
  .author__eq-part b { font-size: 2.45cqw; }
  .author__eq-part small { font-size: 1.62cqw; }
  .author__eq-op { flex: none; width: 3.4cqw; text-align: center; font-size: 3.4cqw; color: var(--ink-900); }
  .author__eq-op--eq { margin-left: -1.3cqw; }
  .author__eq-result {
    position: absolute; left: 67.2%; top: 0; width: 30.7%; height: 100%;
    display: flex; align-items: center; justify-content: center; padding: 0; text-align: center;
    background: none; border: 0; box-shadow: none; font-size: 2.5cqw; line-height: 1.02;
  }
  .author__meaning { left: 33.2%; top: 79.7%; width: 40%; max-width: none; font-size: 1.32cqw; line-height: 1.25; }
  .author__note {
    left: 81.6%; top: 18.3%; width: 16.2%; height: 39%; max-width: none; padding: 0;
    display: flex; align-items: center; text-align: center;
    background: none; box-shadow: none; font-style: normal; font-size: 1.32cqw; line-height: 1.24;
    transform: rotate(-4.5deg);
  }
  .author__note::before, .author__note::after { display: none; }
  .author__btn {
    left: 75.4%; top: 83.6%; width: 22.5%; height: 7.4%; min-height: 0; padding: 0 0 0 1.4cqw; gap: 0;
    justify-content: space-between; border: 0; border-image: none; background: none;
    font-size: 1.62cqw; letter-spacing: .02em;
  }
  .author__btn-round { width: 4.4cqw; height: 4.4cqw; }
  .author__btn-round .icon { width: 2.3cqw; height: 2.3cqw; }
  .author__tag { left: 1.6%; bottom: 2.6%; font-size: max(12px, .95cqw); }
}

/* =========================================================================
   ПРОЕКТЫ: СТЕЛА «АРАМИЯ» И ДОМ БЕЛОМЕСТНЫХ КАЗАКОВ (тёмно-синие блоки)
   ========================================================================= */
.project {
  position: relative; color: var(--text-on-navy);
  background:
    var(--noise-light),
    radial-gradient(90% 120% at 15% 20%, rgba(40, 90, 170, .28), transparent 60%),
    linear-gradient(180deg, #002350 0%, #001b3e 100%);
  border-top: 1px solid rgba(233, 194, 111, .55);
}
.project::before { content: ""; position: absolute; left: 0; right: 0; top: 3px; height: 1px; background: var(--gold-line); opacity: .45; }
.project__grid { max-width: var(--wide); margin: 0 auto; display: grid; gap: 24px; padding: 34px var(--gutter) 38px; }
.project__kicker { margin: 0 0 4px; color: var(--muted-on-navy); font-size: 15px; font-stretch: 85%; letter-spacing: .26em; text-transform: uppercase; }
.project__title {
  margin-bottom: 10px;
  font-family: var(--font-display); font-weight: 700; font-stretch: 85%;
  font-size: clamp(32px, 8vw, 50px); line-height: 1.05;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.project__title--caps { font-weight: 500; font-stretch: 70%; text-transform: uppercase; letter-spacing: .02em; }
.project__lead { margin-bottom: 12px; font-size: 20px; line-height: 1.3; color: #f7eedb; }
.project .flourish { color: var(--gold-500); margin: 4px 0 14px; }
.project__text { max-width: 34em; font-size: 17px; line-height: 1.45; color: #e3d9c2; }
.project__intro .btn { margin-top: 10px; }

.gallery { display: grid; gap: 22px; }
.gallery__card { position: relative; min-width: 0; }
.gallery__media {
  position: relative; display: block; overflow: hidden;
  border: 1px solid var(--gold-500);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .5), 0 0 0 4px rgba(233, 194, 111, .12), 0 10px 22px rgba(0, 0, 0, .4);
  background: var(--navy-950);
}
.gallery__img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery--stela .gallery__media { aspect-ratio: 3 / 2; }
.gallery--house .gallery__media { aspect-ratio: 1676 / 1513; }
.gallery__media picture { height: 100%; }
.gallery__media:hover .gallery__img { transform: scale(1.035); }
.gallery__tag { position: absolute; left: 8px; top: 8px; z-index: 1; pointer-events: none; }
.gallery__hint {
  position: absolute; right: 8px; top: 8px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(0, 16, 38, .7); border: 1px solid rgba(233, 194, 111, .7); color: var(--gold-200);
  opacity: 0; transition: opacity .2s;
}
.gallery__hint .icon { width: 20px; height: 20px; }
.gallery__media:hover .gallery__hint, .gallery__media:focus-visible .gallery__hint { opacity: 1; }
.gallery__caption { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px; padding: 10px 2px 0; }
.gallery__title { grid-column: 1; font-family: var(--font-text); font-weight: 600; font-stretch: 88%; font-size: 20px; line-height: 1.2; color: #f6edd8; }
.gallery__subtitle { grid-column: 1; margin: 2px 0 0; font-size: 16px; line-height: 1.3; color: var(--muted-on-navy); }
.gallery__zoom {
  grid-column: 2; grid-row: 1 / 3;
  display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border-radius: 50%;
  border: 1.5px solid var(--gold-400); background: rgba(0, 16, 38, .5); color: var(--gold-300);
  box-shadow: inset 0 0 0 3px rgba(0, 16, 38, .9), inset 0 0 0 4px rgba(233, 194, 111, .35);
}
.gallery__zoom .icon { width: 22px; height: 22px; }
.gallery__zoom:hover { color: var(--gold-100); background: rgba(233, 194, 111, .12); }
.gallery--house .gallery__card { display: flex; flex-direction: column; }
.gallery__link {
  flex: 1; display: flex; align-items: center; gap: 12px; margin-top: 10px; min-height: 58px; padding: 8px 12px;
  border: 1px solid rgba(233, 194, 111, .75);
  box-shadow: inset 0 0 0 3px var(--navy-850), inset 0 0 0 4px rgba(233, 194, 111, .3);
  background: rgba(0, 18, 42, .55); color: #f3e8cf; text-decoration: none;
  font-family: var(--font-text); font-weight: 500; font-stretch: 80%; font-size: 15.5px; line-height: 1.2; text-transform: uppercase; letter-spacing: .02em;
  transition: background-color .2s, color .2s;
}
.gallery__link:hover { background: rgba(233, 194, 111, .1); color: var(--gold-200); }
.gallery__link-icon { width: 30px; height: 30px; color: var(--gold-400); }
.gallery__link-text { flex: 1; }
.gallery__link-arrow { width: 20px; height: 20px; color: var(--gold-400); }
/* та же галерея на светлом фоне (страница кластера) */
.gallery--light .gallery__title { color: var(--ink-900); }
.gallery--light .gallery__subtitle { color: var(--ink-600); }
.gallery--light .gallery__media { box-shadow: 0 0 0 4px rgba(168, 129, 63, .18), 0 8px 18px rgba(70, 45, 10, .25); }

.project--house .project__frame { position: relative; max-width: var(--wide); margin: 0 auto; }

@media (min-width: 700px) and (max-width: 1023px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery__card:nth-child(3):last-child { grid-column: 1 / -1; justify-self: center; width: calc(50% - 11px); }
}
@media (min-width: 1024px) {
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .gallery__title { font-size: 17px; }
  .gallery__subtitle { font-size: 15px; }
  .gallery__link { font-size: 13.5px; padding: 8px; gap: 8px; }
  .gallery__link-icon { width: 24px; height: 24px; }
}
@media (min-width: 1180px) {
  .project__grid { grid-template-columns: 1fr 2.75fr; gap: calc(var(--u) * 2.4); align-items: start; padding: calc(var(--u) * 2.4) max(var(--gutter), calc(var(--u) * 2.6)) calc(var(--u) * 2.6); }
  .project__title { font-size: calc(var(--u) * 3.1); }
  .project__title--caps { font-size: calc(var(--u) * 2.75); line-height: 1.08; }
  .project__lead { font-size: calc(var(--u) * 1.45); }
  .project__text { font-size: calc(var(--u) * 1.12); }
  .project__kicker { font-size: calc(var(--u) * 1.15); }
  .project__intro .btn { font-size: calc(var(--u) * 1.12); }
  .gallery { gap: calc(var(--u) * 1.6); }
  .gallery__title { font-size: calc(var(--u) * 1.3); }
  .gallery__subtitle { font-size: calc(var(--u) * 1.1); }
  .gallery__zoom { width: calc(var(--u) * 3.1); height: calc(var(--u) * 3.1); }
  .gallery__zoom .icon { width: 45%; height: 45%; }
  .gallery__link { font-size: max(13px, calc(var(--u) * .9)); font-stretch: 74%; min-height: calc(var(--u) * 4.2); padding: calc(var(--u) * .5) calc(var(--u) * .9); gap: calc(var(--u) * .8); }
  .gallery__link-icon { width: calc(var(--u) * 2); height: calc(var(--u) * 2); }
  .gallery__tag { font-size: calc(var(--u) * .82); }
  .project--house { padding: calc(var(--u) * 1.2) calc(var(--u) * 1.4); }
  .project--house .project__frame { border: 1px solid transparent; border-image: url("../img/ui/frame-gold.svg") 60 / 60px / 0 stretch; }
  .project--house .project__grid { padding: calc(var(--u) * 2.4) calc(var(--u) * 2.6) calc(var(--u) * 2.6); }
}

/* =========================================================================
   ЛОГИСТИЧЕСКИЙ МАРШРУТ ПЕРЕСЕЛЕНИЯ: карта на всю ширину и пять этапов
   ========================================================================= */
.route { position: relative; background: var(--navy-900); border-top: 1px solid rgba(233, 194, 111, .55); }
.route__map { position: relative; }
.route__scroller { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--gold-600) transparent; }
.route__zoom { display: block; }
.route__img { width: 100%; }
.route__tag { position: absolute; left: 10px; bottom: 10px; z-index: 1; pointer-events: none; }
.route__swipe { display: none; }
@media (max-width: 699px) {
  .route__zoom, .route__img { width: 1100px; max-width: none; }
  .route__tag { top: 10px; bottom: auto; }
  .route__swipe {
    display: block; margin: 0; padding: 8px var(--gutter) 10px; text-align: center;
    font-size: 14px; line-height: 1.3; color: var(--muted-on-navy); background: var(--navy-900);
  }
}

.stages {
  counter-reset: stage;
  display: grid; gap: 14px; margin: 0; padding: 18px var(--gutter) 26px;
  border-top: 2px solid #a8813f;
}
.stages__item {
  position: relative; display: flex; flex-direction: column;
  padding: 12px 14px 14px;
  background: rgba(255, 250, 238, .55);
  border: 1px solid #b08a48; box-shadow: inset 0 0 0 3px rgba(250, 240, 214, .9), inset 0 0 0 4px rgba(168, 129, 63, .4);
  color: var(--ink-900);
}
.stages__head { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; min-height: 44px; }
.stages__num {
  grid-row: 1 / 3; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #154283, #061d42 70%);
  box-shadow: 0 0 0 2px #d9b061, 0 0 0 3px #7f571d, 0 2px 6px rgba(0, 0, 0, .35);
  color: var(--gold-200); font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1;
}
.stages__title { grid-column: 2; font-family: var(--font-text); font-weight: 700; font-stretch: 78%; font-size: 18px; line-height: 1.1; text-transform: uppercase; letter-spacing: .01em; }
.stages__place { grid-column: 2; margin: 2px 0 0; font-size: 14.5px; line-height: 1.2; color: var(--ink-600); }
.stages__img { width: 100%; aspect-ratio: 2.85; object-fit: cover; margin: 10px 0; border: 1px solid rgba(168, 129, 63, .55); }
.stages__text { margin: 0; font-size: 16px; line-height: 1.4; color: var(--ink-800); }

@media (min-width: 640px) {
  .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .stages { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1180px) {
  .stages {
    grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0;
    padding: calc(var(--u) * .9) calc(var(--u) * 1) calc(var(--u) * 1.3);
  }
  .stages__item { padding: calc(var(--u) * .5) calc(var(--u) * .9) calc(var(--u) * .6); background: none; border: 0; box-shadow: none; }
  .stages__item + .stages__item { border-left: 1px solid rgba(155, 112, 50, .45); }
  .stages__item + .stages__item::before {
    content: ""; position: absolute; left: calc(var(--u) * -.45); top: calc(var(--u) * 4.3); z-index: 1;
    width: calc(var(--u) * .9); height: calc(var(--u) * 1.1);
    background: #8c1b1b; clip-path: polygon(0 0, 100% 50%, 0 100%);
  }
  .stages__head { column-gap: calc(var(--u) * .6); min-height: calc(var(--u) * 2.9); }
  .stages__num { width: calc(var(--u) * 2.3); height: calc(var(--u) * 2.3); font-size: calc(var(--u) * 1.3); }
  .stages__title { font-size: calc(var(--u) * 1.12); }
  .stages__place { font-size: calc(var(--u) * .9); }
  .stages__img { margin: calc(var(--u) * .5) 0; }
  .stages__text { font-size: calc(var(--u) * .98); line-height: 1.3; }
}

/* =========================================================================
   ПРИСОЕДИНИТЬСЯ К ПРОЕКТУ
   ========================================================================= */
.join {
  position: relative; overflow: hidden; color: var(--text-on-navy);
  background: radial-gradient(60% 140% at 50% 100%, rgba(30, 80, 150, .35), transparent 70%), linear-gradient(180deg, #001b3e, #00142e);
  border-top: 2px solid #b8893f;
  border-bottom: 1px solid rgba(233, 194, 111, .55);
}
.join__bg-img--trees, .join__bg-img--village { display: none; }
.join__bg-img--town { width: 100%; aspect-ratio: 968 / 360; object-fit: cover; object-position: 50% 70%; }
.join__bg {
  -webkit-mask: linear-gradient(180deg, #000 60%, transparent); mask: linear-gradient(180deg, #000 60%, transparent);
}
.join__inner { position: relative; z-index: 1; max-width: var(--wide); margin: -64px auto 0; padding: 0 var(--gutter) 30px; display: grid; gap: 22px; }
.join__brand { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.join__name {
  margin: 0; font-family: var(--font-display); font-weight: 500; font-stretch: 85%;
  font-size: clamp(40px, 12vw, 62px); line-height: 1; letter-spacing: .18em; text-transform: uppercase;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .7));
}
.join__words { margin: 0 0 12px; font-size: 16.5px; color: #f1e7d0; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); }
.join__books { text-transform: uppercase; letter-spacing: .03em; }
.join__text { text-align: center; }
.join__title { margin-bottom: 8px; font-family: var(--font-display); font-weight: 600; font-stretch: 85%; font-size: clamp(28px, 7vw, 38px); line-height: 1.08; color: #f7eedb; }
.join__lead { margin: 0; font-size: 18px; color: var(--muted-on-navy); }
.join-form { position: relative; display: grid; gap: 8px; }
.join-form__row { display: flex; flex-wrap: wrap; gap: 10px; }
.join-form__input {
  flex: 1 1 220px; min-width: 0; height: 52px; padding: 0 16px;
  border: 1px solid var(--paper-400); border-radius: 4px;
  background: #f6f4ff; color: var(--ink-900); font-size: 17px;
}
.join-form__input::placeholder { color: #6e6a8a; }
.join-form__input[aria-invalid="true"] { border-color: #e06a5c; box-shadow: 0 0 0 2px rgba(224, 106, 92, .45); }
.join-form__submit { flex: 0 0 auto; min-height: 52px; }
.join-form__consent { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; line-height: 1.35; color: var(--muted-on-navy); cursor: pointer; }
.join-form__consent a { color: var(--gold-300); }
.join-form__check { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--gold-500); }
.join-form .form__error { color: #ffb3a8; }
.join-form .form__status.is-ok { color: #bfe7b4; }
.join-form .form__status.is-error { color: #ffb3a8; }
.join__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 32px; margin-top: 12px; }
.join__link { display: inline-flex; align-items: center; gap: 10px; color: #f1e7d0; font-size: 17px; text-underline-offset: 4px; }
.join__link .icon { width: 30px; height: 30px; color: var(--gold-400); }
.join__link:hover { color: var(--gold-200); }

@media (min-width: 700px) {
  .join__bg-img--town { max-height: 240px; }
  .join__inner { grid-template-columns: 1fr 1fr; align-items: center; gap: 22px 36px; margin-top: -84px; }
  .join__brand { grid-column: 1 / -1; }
  .join__text { text-align: left; }
  .join__links { justify-content: flex-start; }
}
/* широкий экран: полоса как в макете - сосны, «Арамиль», текст, форма, деревня;
   от 1700 px между «Арамилью» и текстом появляется ещё и городок */
@media (min-width: 1440px) {
  .join__bg { position: absolute; inset: 0; -webkit-mask: none; mask: none; }
  .join__bg picture { position: absolute; top: 0; height: 100%; }
  .join__bg-img { width: 100%; height: 100%; object-fit: cover; }
  .join__bg-img--trees, .join__bg-img--village { display: block; }
  .join__bg picture:nth-child(1) { left: 0; width: 7.9%; }
  .join__bg picture:nth-child(2) { display: none; }
  .join__bg picture:nth-child(3) { right: 0; width: 11%; }
  .join__bg-img--town { max-height: none; aspect-ratio: auto; object-position: 50% 50%; }
  .join__inner {
    max-width: none; margin: 0; min-height: 116px;
    grid-template-columns: 21.1fr 25fr 35fr; align-items: center; gap: 0;
    padding: 8px 11% 8px 7.9%;
  }
  .join__brand { grid-column: 1; gap: calc(var(--u) * .2); }
  .join__text { grid-column: 2; padding: 0 calc(var(--u) * 1.2); }
  .join__action { grid-column: 3; padding-left: calc(var(--u) * .5); }
  .join__name { font-size: calc(var(--u) * 2.9); letter-spacing: .2em; }
  .join__words { margin: 0 0 calc(var(--u) * .35); font-size: max(13px, calc(var(--u) * .94)); white-space: nowrap; }
  .join__books { min-height: calc(var(--u) * 2.6); font-size: max(14px, calc(var(--u) * 1.05)); padding: 0 calc(var(--u) * 1.2); }
  .join__title { margin-bottom: calc(var(--u) * .3); font-size: calc(var(--u) * 1.75); line-height: 1.05; }
  .join__lead { font-size: max(14px, calc(var(--u) * .9)); line-height: 1.3; }
  .join-form__row { flex-wrap: nowrap; gap: calc(var(--u) * .6); }
  .join-form__input { flex: 1 1 auto; height: calc(var(--u) * 2.6); min-height: 42px; font-size: max(15px, calc(var(--u) * 1)); }
  .join-form__submit { min-height: max(42px, calc(var(--u) * 2.6)); font-size: max(15px, calc(var(--u) * 1.02)); white-space: nowrap; }
  .join-form__consent { font-size: max(13px, calc(var(--u) * .78)); }
  .join-form .form__error, .join-form .form__status { font-size: max(13.5px, calc(var(--u) * .82)); }
  .join__links { margin-top: calc(var(--u) * .4); gap: calc(var(--u) * 2.4); }
  .join__link { font-size: max(15px, calc(var(--u) * 1)); }
  .join__link .icon { width: calc(var(--u) * 1.9); height: calc(var(--u) * 1.9); }
}
@media (min-width: 1700px) {
  .join__bg picture:nth-child(2) { display: block; left: 29%; width: 12.75%; }
  .join__inner { grid-template-columns: 21.1fr 12.75fr 19fr 28.25fr; }
  .join__text { grid-column: 3; padding: 0 calc(var(--u) * 1) 0 calc(var(--u) * .9); }
  .join__action { grid-column: 4; }
}

/* =========================================================================
   ОКНО С ИСТОРИЯМИ «БЕЛОГО МЕСТА»
   Телефон: на весь экран, всё в одну колонку, листалка внизу.
   Компьютер: окно в золотой рамке, слева сцена и пояснения, справа схема.
   ========================================================================= */
.story {
  width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; overflow: hidden;
  background: transparent; color: var(--text-on-navy);
}
.story::backdrop { background: rgba(0, 8, 20, .84); }
.story[open] { display: block; }
.story__frame {
  position: relative; display: flex; flex-direction: column; width: 100%; height: 100%;
  background:
    var(--noise-light),
    radial-gradient(90% 70% at 30% 0%, rgba(40, 90, 170, .3), transparent 60%),
    linear-gradient(180deg, #002350, #00142c);
}
.story__close {
  position: absolute; top: 8px; right: 8px; z-index: 5;
  display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border-radius: 50%;
  border: 1.5px solid var(--gold-400); background: rgba(0, 16, 38, .85); color: var(--gold-200);
  box-shadow: inset 0 0 0 3px rgba(0, 16, 38, .9), inset 0 0 0 4px rgba(233, 194, 111, .35), 0 4px 12px rgba(0, 0, 0, .45);
}
.story__close:hover { color: var(--gold-100); background: #0a2a5c; }
.story__close .icon { width: 24px; height: 24px; }

.story__slide { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.story__slide:focus { outline: none; }
.story__main { display: flex; flex-direction: column; }
.story__scene { position: relative; background: var(--navy-950); }
.story__scene-img { width: 100%; }
.story__tag { position: absolute; left: 8px; bottom: 8px; }
.story__head { padding: 16px var(--gutter) 4px; }
.story__num { margin: 0 0 4px; color: var(--gold-300); font-size: 14px; font-stretch: 85%; letter-spacing: .14em; text-transform: uppercase; }
.story__title {
  font-family: var(--font-display); font-weight: 700; font-stretch: 78%; text-transform: uppercase;
  font-size: clamp(24px, 6.6vw, 34px); line-height: 1.05; letter-spacing: .01em;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.story__subtitle { margin: 4px 0 10px; font-family: var(--font-text); font-weight: 600; font-stretch: 82%; font-size: 17px; text-transform: uppercase; letter-spacing: .03em; color: #f1e7d0; }
.story__lead { margin: 0; font-size: 17px; line-height: 1.45; color: #e9dfc8; }
.story__info { display: grid; gap: 14px; padding: 14px var(--gutter) 6px; }
.story__brief, .story__docs {
  padding: 14px 16px 16px;
  background: var(--noise), linear-gradient(180deg, #f9eed6, #eedcb6);
  border: 1px solid #a8813f; box-shadow: inset 0 0 0 3px #f8ecd2, inset 0 0 0 4px rgba(168, 129, 63, .5);
  color: var(--ink-900); font-size: 16.5px; line-height: 1.45;
}
.story__brief p, .story__docs p { margin: 0 0 10px; }
.story__h3 {
  display: flex; align-items: center; gap: 8px; margin: 0 0 8px;
  font-family: var(--font-text); font-weight: 700; font-stretch: 80%; font-size: 16px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--navy-700);
}
.story__h3 .icon { width: 22px; height: 22px; color: var(--gold-700); }
.story__docs-btn { margin-top: 2px; }
.story__scheme { padding: 10px var(--gutter) 18px; }
.story__scheme-link { position: relative; display: block; max-width: 520px; margin: 0 auto; border: 1px solid rgba(233, 194, 111, .6); box-shadow: 0 8px 20px rgba(0, 0, 0, .4); }
.story__scheme-img { width: 100%; }
.story__zoom {
  position: absolute; right: 8px; top: 8px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(0, 16, 38, .78); border: 1px solid rgba(233, 194, 111, .7); color: var(--gold-200);
}
.story__zoom .icon { width: 20px; height: 20px; }

.story__nav {
  flex: none; position: relative; z-index: 4;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, #001a38, #000f24);
  border-top: 1px solid rgba(233, 194, 111, .5);
  box-shadow: 0 -8px 20px rgba(0, 0, 0, .35);
}
.story__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 48px; min-height: 48px; padding: 6px 12px;
  border: 1px solid rgba(233, 194, 111, .7); border-radius: 999px;
  background: rgba(0, 18, 42, .7); color: var(--gold-200);
  font-family: var(--font-text); font-weight: 600; font-stretch: 84%; font-size: 15px; line-height: 1.1;
}
.story__btn:hover { background: rgba(233, 194, 111, .15); color: var(--gold-100); }
.story__btn .icon { width: 22px; height: 22px; flex: none; }
.story__btn-wide { display: none; }
.story__btn--close { display: none; }
.story__counter { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 0; color: #f1e7d0; font-size: 15px; font-variant-numeric: tabular-nums; }
.story__dots { display: flex; gap: 6px; }
.story__dot { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--gold-300); }
.story__dot.is-active { background: var(--gold-300); }
html.story-open { overflow: hidden; }

@media (max-width: 479px) {
  .story__btn > span:not(.icon) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .story__btn { padding: 0; }
}
@media (min-width: 700px) {
  .story__btn-wide { display: inline; }
  .story__btn--close { display: inline-flex; }
  .story__info { grid-template-columns: 1.3fr 1fr; align-items: start; }
}

/* компьютер: окно в рамке посреди экрана */
@media (min-width: 1000px) {
  .story {
    width: min(1460px, calc(100vw - 48px)); height: min(940px, calc(100vh - 40px)); height: min(940px, calc(100dvh - 40px));
    margin: auto; overflow: visible;
  }
  .story__frame {
    border: 1px solid var(--gold-400);
    box-shadow: inset 0 0 0 4px #001a38, inset 0 0 0 5px rgba(233, 194, 111, .45), 0 24px 60px rgba(0, 0, 0, .6);
  }
  .story__close { top: -16px; right: -16px; width: 52px; height: 52px; }
  .story__slide { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: 18px; align-items: start; padding: 18px 18px 14px; }
  .story__scene { border: 1px solid rgba(233, 194, 111, .6); box-shadow: 0 6px 16px rgba(0, 0, 0, .4); }
  /* заголовок и вступление уже нарисованы на сцене и схеме - здесь они для экранных дикторов */
  .story__head { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .story__info { padding: 14px 0 0; gap: 14px; }
  .story__scheme { position: sticky; top: 0; padding: 0; }
  .story__scheme-link { max-width: none; }
  .story__scheme-img { max-height: calc(min(940px, 100vh - 40px) - 140px); width: auto; margin: 0 auto; }
  .story__nav { padding: 10px 18px; background: rgba(0, 12, 30, .6); }
  .story__counter { flex-direction: row; gap: 14px; font-size: 16px; }
  .story__btn { min-height: 46px; padding: 6px 18px; font-size: 16px; }
}

/* =========================================================================
   ПОДВАЛ
   ========================================================================= */
.site-footer { background: linear-gradient(180deg, #00132b, #000c1e); color: var(--muted-on-navy); }
.site-footer__main, .site-footer__legal { max-width: var(--wide); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.site-footer__main { display: grid; gap: 18px; padding-top: 24px; padding-bottom: 18px; }
.site-footer__note p { margin: 0 0 8px; font-size: 14.5px; line-height: 1.45; color: #d9cfb8; max-width: 46em; }
.site-footer__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.footer-nav__list { display: flex; flex-wrap: wrap; gap: 0; }
.footer-nav__item { position: relative; display: flex; align-items: center; }
.footer-nav__item + .footer-nav__item { border-left: 1px solid rgba(233, 194, 111, .4); }
.footer-nav__link {
  padding: 10px 6px 10px 16px; color: #f2e8d2; text-decoration: none;
  font-family: var(--font-text); font-weight: 500; font-stretch: 78%; font-size: 15px; text-transform: uppercase; letter-spacing: .03em;
}
.footer-nav__item:first-child .footer-nav__link { padding-left: 0; }
.footer-nav__item:not(.has-sub) .footer-nav__link { padding-right: 16px; }
.footer-nav__link:hover { color: var(--gold-200); }
.footer-nav__link--support { display: inline-flex; align-items: center; gap: 8px; color: var(--gold-300); }
.footer-nav__link--support .icon { width: 20px; height: 20px; }
.footer-nav__toggle { display: grid; place-items: center; width: 30px; height: 40px; border: 0; padding: 0; background: none; color: var(--gold-400); }
.footer-nav__toggle .icon { width: 18px; height: 18px; transition: transform .2s; }
.footer-nav__toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }
.footer-nav__sub {
  display: none; position: absolute; bottom: 100%; left: 0; z-index: 20; min-width: 250px; padding: 8px 0;
  background: #001a38; border: 1px solid rgba(233, 194, 111, .5); box-shadow: 0 -12px 30px rgba(0, 0, 0, .45);
}
.footer-nav__item.is-open .footer-nav__sub { display: block; }
.footer-nav__sub a { display: block; padding: 7px 16px; color: #f2e8d2; text-decoration: none; font-size: 15px; }
.footer-nav__sub a:hover { color: var(--gold-200); }
.site-footer__tools { display: flex; align-items: center; gap: 4px; }
@media (max-width: 699px) {
  .footer-nav__list { flex-direction: column; }
  .footer-nav__item { flex-wrap: wrap; border-bottom: 1px solid rgba(233, 194, 111, .18); }
  .footer-nav__item + .footer-nav__item { border-left: 0; }
  .footer-nav__link, .footer-nav__item:first-child .footer-nav__link { padding: 12px 6px 12px 0; }
  .footer-nav__sub { position: static; flex-basis: 100%; min-width: 0; padding: 0 0 10px 14px; background: none; border: 0; box-shadow: none; }
  .site-footer__tools .tool-btn { display: none; }
}
.site-footer__legal {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 20px;
  padding-top: 14px; padding-bottom: 18px; border-top: 1px solid rgba(233, 194, 111, .22);
  font-size: 14px;
}
.site-footer__copy { margin: 0; color: #f3e9d2; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.site-footer__links a { color: var(--muted-on-navy); }
.site-footer__links a:hover { color: var(--gold-200); }

@media (min-width: 1180px) {
  .site-footer__main { grid-template-columns: 1.3fr auto auto; align-items: center; gap: calc(var(--u) * 2.4); }
  .footer-nav { border-left: 1px solid rgba(233, 194, 111, .4); padding-left: calc(var(--u) * 1); }
  .site-footer__tools { border-left: 1px solid rgba(233, 194, 111, .4); padding-left: calc(var(--u) * 1); }
}

/* =========================================================================
   LIGHTBOX
   ========================================================================= */
.lightbox {
  width: calc(var(--u) * 100); height: 100vh; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: rgba(0, 6, 16, .96); color: var(--text-on-navy);
  overflow: hidden;
}
.lightbox::backdrop { background: rgba(0, 6, 16, .9); }
.lightbox[open] { display: grid; grid-template-rows: 1fr auto; }
.lightbox__stage {
  position: relative; overflow: auto; display: grid; place-items: center;
  padding: 56px 56px 8px; overscroll-behavior: contain; cursor: zoom-in;
}
.lightbox__img { max-width: 100%; max-height: calc(100dvh - 130px); width: auto; height: auto; object-fit: contain; box-shadow: 0 10px 40px rgba(0, 0, 0, .6); user-select: none; -webkit-user-drag: none; }
.lightbox.is-zoomed .lightbox__stage { place-items: start; cursor: grab; padding: 0; }
.lightbox.is-zoomed .lightbox__stage.is-dragging { cursor: grabbing; }
.lightbox.is-zoomed .lightbox__img { max-width: none; max-height: none; }
.lightbox__caption { margin: 0; padding: 10px 70px 16px; text-align: center; font-size: 16px; color: #e8dec7; }
.lightbox__counter { color: var(--gold-300); margin-right: 10px; font-variant-numeric: tabular-nums; }
.lightbox__bar { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; }
.lightbox__btn, .lightbox__nav {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid rgba(233, 194, 111, .6); background: rgba(0, 16, 38, .75); color: var(--gold-200);
}
.lightbox__btn:hover, .lightbox__nav:hover { background: rgba(233, 194, 111, .18); }
.lightbox__btn .icon, .lightbox__nav .icon { width: 24px; height: 24px; }
.lightbox__zoom-out, .lightbox.is-zoomed .lightbox__zoom-in { display: none; }
.lightbox.is-zoomed .lightbox__zoom-out { display: block; }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); }
.lightbox__nav--prev { left: 8px; }
.lightbox__nav--next { right: 8px; }
.lightbox.is-single .lightbox__nav, .lightbox.is-single .lightbox__counter { display: none; }
body.lightbox-open { overflow: hidden; }

/* =========================================================================
   ВНУТРЕННИЕ СТРАНИЦЫ
   Шапка раздела (крошки, заголовок, оглавление) на синем, текст на пергаменте.
   ========================================================================= */
.inner-head {
  color: var(--text-on-navy);
  background:
    var(--noise-light),
    radial-gradient(80% 140% at 20% 0%, rgba(40, 90, 170, .3), transparent 60%),
    linear-gradient(180deg, #002350, #001a3c);
  border-bottom: 1px solid rgba(233, 194, 111, .5);
}
.inner-head__in, .inner-body__in { max-width: 1120px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.inner-head__in { padding-top: 24px; padding-bottom: 28px; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; font-size: 14.5px; color: var(--muted-on-navy); }
.breadcrumbs li + li::before { content: "›"; margin: 0 8px; color: var(--gold-500); }
.breadcrumbs a { color: var(--gold-300); text-underline-offset: 3px; }
.inner-head__title {
  margin: 12px 0 10px; max-width: 26em;
  font-family: var(--font-display); font-weight: 700; font-stretch: 85%;
  font-size: clamp(30px, 7vw, 52px); line-height: 1.06; text-wrap: balance;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.inner-head__lead { margin: 0; max-width: 40em; font-size: 19px; line-height: 1.45; color: #ece2cb; }

/* оглавление раздела */
.toc { margin-top: 18px; }
.toc__list { display: flex; flex-wrap: wrap; gap: 8px; }
.toc__link {
  display: inline-flex; align-items: center; min-height: 40px; padding: 7px 14px;
  border: 1px solid rgba(233, 194, 111, .5); border-radius: 999px;
  background: rgba(0, 18, 42, .45); color: #f3e9d2; text-decoration: none;
  font-size: 15px; line-height: 1.25;
  transition: background-color .2s, border-color .2s, color .2s;
}
.toc__link:hover { background: rgba(233, 194, 111, .14); border-color: var(--gold-300); color: var(--gold-100); }

.inner-body { min-height: 40vh; color: var(--ink-800); }
.inner-body__in { padding-top: 34px; padding-bottom: 56px; }
.inner-body :focus-visible { outline-color: var(--navy-600); }
.inner-body a:not([class]) { color: var(--navy-600); text-underline-offset: 3px; }
.inner-body a:not([class]):hover { color: var(--burgundy); }
.inner-note { color: var(--ink-600); }
.inner-back { margin: 30px 0 0; }

/* ---------- Разделы страницы ---------- */
.sect { margin: 0 0 60px; scroll-margin-top: 80px; }
.sect:last-child { margin-bottom: 10px; }
.sect__title {
  position: relative; margin: 0 0 22px; padding-bottom: 16px;
  font-family: var(--font-display); font-weight: 700; font-stretch: 84%;
  font-size: clamp(26px, 5.6vw, 38px); line-height: 1.1; color: var(--navy-800); text-wrap: balance;
  scroll-margin-top: 80px;
}
.sect__title::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 180px; height: 14px;
  background: var(--gold-600);
  -webkit-mask: url("../img/ui/flourish.svg") left center / contain no-repeat;
  mask: url("../img/ui/flourish.svg") left center / contain no-repeat;
}
.sect__subtitle { margin: 34px 0 16px; font-family: var(--font-display); font-weight: 700; font-stretch: 85%; font-size: clamp(22px, 4.6vw, 28px); line-height: 1.15; color: var(--ink-900); }
.sect__tag { margin: -8px 0 16px; }
.sect__cols { display: grid; gap: 10px 40px; }
.sect__cols > * { min-width: 0; }
@media (min-width: 900px) {
  .sect__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .sect__cols--figure { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
  .sect__cols--figure-left { grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr); }
}

/* ---------- Текст ---------- */
.prose { max-width: 46em; font-size: 18px; line-height: 1.62; }
.prose > :last-child { margin-bottom: 0; }
.prose + .prose, .prose + .table-wrap, .prose + .doc-list { margin-top: 18px; }
.table-wrap + .prose, .doc-list + .prose, .prose__note + .prose, .formula-card + .prose, .steps + .prose { margin-top: 30px; }
.prose p { margin: 0 0 1em; }
.prose h3 { margin: 1.5em 0 .55em; font-family: var(--font-display); font-weight: 700; font-stretch: 85%; font-size: 23px; line-height: 1.2; color: var(--ink-900); }
.prose h3:first-child { margin-top: 0; }
.prose--intro { max-width: 52em; margin-bottom: 44px; padding-left: 20px; border-left: 3px solid var(--gold-500); }
.prose__kicker { margin: 0 0 8px !important; color: var(--gold-700); font-size: 14px; font-stretch: 85%; letter-spacing: .16em; text-transform: uppercase; }
.prose__lead { font-size: 20.5px; line-height: 1.5; color: var(--ink-900); }
.prose__note { margin: 14px 0 0; font-size: 15.5px; line-height: 1.5; font-style: italic; color: var(--ink-600); }
.prose__accent {
  margin: 1.4em 0 !important; padding: 16px 20px;
  border-left: 4px solid var(--burgundy); background: rgba(255, 250, 238, .7);
  font-family: var(--font-display); font-stretch: 88%; font-size: 21px; line-height: 1.45; color: var(--ink-900);
}
.legal h2 { margin: 1.6em 0 .6em; font-family: var(--font-display); font-weight: 700; font-stretch: 85%; font-size: 25px; line-height: 1.2; color: var(--navy-800); scroll-margin-top: 80px; }
.legal h2:first-of-type { margin-top: 1em; }

/* списки с золотыми ромбами */
.values { margin: 0 0 1.1em; display: grid; gap: 10px; }
.values li { position: relative; padding-left: 26px; }
.values li::before {
  content: ""; position: absolute; left: 3px; top: .55em; width: 9px; height: 9px;
  background: var(--gold-600); transform: rotate(45deg); box-shadow: 0 0 0 2px rgba(214, 166, 79, .25);
}
.formats { margin: 0 0 1.1em; display: grid; gap: 10px; }
.formats li { position: relative; padding: 10px 14px 10px 44px; background: rgba(255, 250, 238, .6); border: 1px solid rgba(168, 129, 63, .35); }
.formats li::before {
  content: ""; position: absolute; left: 14px; top: 15px; width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff1c4, #e3b660 55%, #94641f); box-shadow: 0 0 0 1px #6f4a16;
}
.route-steps { counter-reset: rs; margin: 0 0 1.1em; display: grid; gap: 12px; }
.route-steps li { counter-increment: rs; position: relative; padding-left: 44px; }
.route-steps li::before {
  content: counter(rs); position: absolute; left: 0; top: 0;
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--navy-700); color: var(--gold-200); font-weight: 700; font-size: 16px; line-height: 1;
}

/* пронумерованные шаги */
.steps { counter-reset: step; display: grid; gap: 12px; margin: 0 0 24px; }
.steps__item {
  position: relative; display: flex; align-items: flex-start; gap: 16px;
  padding: 14px 18px; background: rgba(255, 250, 238, .7);
  border: 1px solid rgba(168, 129, 63, .45); box-shadow: inset 0 0 0 3px rgba(255, 250, 238, .8);
  font-size: 17.5px; line-height: 1.5;
}
.steps__item p { margin: 0; padding-top: 6px; }
.steps__num {
  flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #154283, #061d42 70%);
  box-shadow: 0 0 0 2px #d9b061, 0 0 0 3px #7f571d;
  color: var(--gold-200); font-family: var(--font-display); font-weight: 700; font-size: 21px; line-height: 1;
}
@media (min-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* цитаты */
.quote {
  position: relative; margin: 1.2em 0 1.4em; padding: 18px 22px 18px 58px;
  background: rgba(255, 250, 238, .75); border-left: 4px solid var(--gold-600);
  font-style: italic; font-size: 19px; line-height: 1.5; color: var(--ink-900);
}
.quote::before {
  content: "«"; position: absolute; left: 16px; top: 4px;
  font-family: var(--font-display); font-style: normal; font-size: 54px; line-height: 1; color: var(--gold-600);
}
.quote p { margin: 0; }
.quote--archive {
  background: #f3e6c8; border-left-color: var(--burgundy);
  font-style: normal; font-family: "Courier New", Courier, monospace; font-size: 18px; letter-spacing: .01em;
}
.quote--archive::before { color: var(--burgundy); }

/* девиз и формулы */
.motto {
  margin: 26px 0; padding: 22px 24px; text-align: center;
  background: linear-gradient(180deg, #0c2c5c, #051a3c); color: var(--text-on-navy);
  border: 1px solid #c79a4c; box-shadow: inset 0 0 0 4px #071f45, inset 0 0 0 5px rgba(233, 194, 111, .5);
}
.motto__label { margin: 0 0 6px; color: var(--gold-300); font-size: 14px; letter-spacing: .2em; text-transform: uppercase; }
.motto__text {
  margin: 0; font-family: var(--font-display); font-weight: 700; font-stretch: 82%;
  font-size: clamp(22px, 5vw, 32px); line-height: 1.2;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.formula-card {
  margin: 1.2em 0; padding: 18px 22px;
  background: var(--noise), linear-gradient(180deg, #fbf1db, #f0dfba);
  border: 1px solid #a8813f; box-shadow: inset 0 0 0 4px #fbf1db, inset 0 0 0 5px rgba(168, 129, 63, .5);
  font-size: 19px; line-height: 1.5; color: var(--ink-900);
}
.formula-card p { margin: 0; }
.formula-card__label { margin-bottom: 6px !important; color: var(--gold-700); font-size: 14px; font-style: normal; letter-spacing: .16em; text-transform: uppercase; }
.formula-card__motto { margin-top: 10px !important; font-weight: 700; }

/* ---------- Иллюстрации ---------- */
.figure { position: relative; margin: 0 0 20px; }
.figure__frame { position: relative; display: block; border: 1px solid #a8813f; box-shadow: 0 0 0 4px rgba(168, 129, 63, .18), 0 10px 22px rgba(70, 45, 10, .25); background: var(--paper-50); }
a.figure__frame { cursor: zoom-in; }
.figure__img { width: 100%; }
.figure__tag { position: absolute; left: 8px; top: 8px; z-index: 1; pointer-events: none; }
.figure__caption { margin-top: 10px; font-size: 15.5px; line-height: 1.45; color: var(--ink-600); }
.figure--portrait { max-width: 420px; margin-left: auto; margin-right: auto; }
.figure--founders .figure__founders {
  overflow: hidden; padding-top: 18px; border: 1px solid #a8813f;
  background: radial-gradient(90% 80% at 50% 30%, #1b4a8a, #001a3c 75%);
  box-shadow: 0 0 0 4px rgba(168, 129, 63, .18), 0 10px 22px rgba(70, 45, 10, .25);
}
.figure--founders .figure__img { width: 86%; margin: 0 auto; }
.news-item__figure { max-width: 860px; }

/* ---------- Таблицы ---------- */
.table-wrap { overflow-x: auto; margin: 0 0 18px; -webkit-overflow-scrolling: touch; }
.table-wrap:focus { outline: none; }
.table-wrap:focus-visible { outline: 2px solid var(--navy-600); outline-offset: 2px; }
.data-table {
  width: 100%; border-collapse: collapse; min-width: 480px;
  background: rgba(255, 250, 238, .78); font-size: 16.5px; line-height: 1.4;
}
.data-table th, .data-table td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(168, 129, 63, .35); }
.data-table thead th {
  background: var(--navy-700); color: var(--gold-200); border-bottom: 0;
  font-weight: 600; font-stretch: 85%; font-size: 15px; letter-spacing: .03em; text-transform: uppercase;
}
.data-table tbody th { width: 32%; color: var(--ink-600); font-weight: 600; }
.data-table--grid td + td, .data-table--grid th + th { border-left: 1px solid rgba(168, 129, 63, .25); }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table tr.is-mine td { background: rgba(233, 194, 111, .3); }
.nowrap { white-space: nowrap; }

/* список 28 казаков с поиском */
.kazaki { margin-top: 28px; padding: 20px; background: rgba(255, 250, 238, .5); border: 1px solid rgba(168, 129, 63, .4); }
.kazaki__title { font-family: var(--font-display); font-weight: 700; font-stretch: 85%; font-size: 24px; line-height: 1.2; color: var(--navy-800); }
.kazaki__title span { font-family: var(--font-text); font-weight: 400; font-size: .72em; color: var(--ink-600); }
.kazaki__intro { margin: 8px 0 14px; font-size: 16.5px; }
.kazaki__search { margin: 0 0 18px; max-width: 460px; }
.kazaki__label { display: block; margin: 0 0 6px; font-weight: 600; font-size: 16px; }
.kazaki__status { margin: 6px 0 0; min-height: 1.4em; font-size: 15px; color: var(--ink-600); }
.kazaki__group { margin-top: 18px; }
.kazaki__group-title { margin: 0 0 8px; font-family: var(--font-text); font-weight: 700; font-stretch: 88%; font-size: 18px; color: var(--ink-900); }
.kazaki__group-title span { font-weight: 400; color: var(--ink-600); }
.kazaki__table { min-width: 600px; table-layout: fixed; }
.kazaki__table th:first-child { width: 56px; }
.kazaki__table th:last-child { width: 104px; }
.kazaki__table mark { background: rgba(233, 194, 111, .7); color: inherit; padding: 0 1px; }

/* схема «Устройство слободы» */
.scheme {
  display: flex; flex-direction: column; align-items: center; gap: 0;
  margin: 26px 0 30px; padding: 22px 16px 24px;
  background: var(--noise), linear-gradient(180deg, #fbf1db, #f0dfba);
  border: 1px solid #a8813f; box-shadow: inset 0 0 0 4px #fbf1db, inset 0 0 0 5px rgba(168, 129, 63, .5);
}
.scheme__caption { order: -1; margin: 0 0 16px; font-family: var(--font-display); font-weight: 700; font-stretch: 85%; font-size: 22px; text-align: center; color: var(--ink-900); }
.scheme__step, .scheme__box {
  width: min(100%, 420px); padding: 10px 16px; text-align: center;
  background: linear-gradient(180deg, #0c2c5c, #051a3c); color: #f6eedd;
  border: 1px solid #c79a4c; box-shadow: inset 0 0 0 3px #071f45, inset 0 0 0 4px rgba(233, 194, 111, .45);
  font-family: var(--font-text); font-weight: 600; font-stretch: 84%; font-size: 16.5px; line-height: 1.25; text-transform: uppercase; letter-spacing: .02em;
}
.scheme__step small { display: block; margin-top: 3px; font-weight: 400; font-size: 14px; text-transform: none; letter-spacing: 0; color: var(--gold-200); }
.scheme__step--accent { background: linear-gradient(180deg, #7a2a12, #4b1a0b); }
.scheme__step--final { background: linear-gradient(180deg, #f6dfa4, #d9ae5c); color: var(--ink-900); box-shadow: inset 0 0 0 3px #f6e2b0, inset 0 0 0 4px rgba(127, 87, 29, .6); }
.scheme__box { background: rgba(255, 250, 238, .9); color: var(--ink-900); box-shadow: inset 0 0 0 3px #fff8e8, inset 0 0 0 4px rgba(168, 129, 63, .5); }
.scheme__box-title { margin: 0 0 8px; font-weight: 700; }
.scheme__tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; text-transform: none; font-weight: 400; letter-spacing: 0; }
.scheme__tags li { padding: 2px 10px; border: 1px solid rgba(168, 129, 63, .6); border-radius: 999px; background: #fffaf0; font-size: 14.5px; }
.scheme__arrow { position: relative; width: 2px; height: 26px; background: #a8772c; }
.scheme__arrow::after {
  content: ""; position: absolute; left: 50%; bottom: -1px; transform: translateX(-50%);
  border-top: 8px solid #a8772c; border-left: 6px solid transparent; border-right: 6px solid transparent;
}
.scheme__pair { display: grid; gap: 10px; width: min(100%, 640px); }
.scheme__pair .scheme__step { width: 100%; }
@media (min-width: 600px) {
  .scheme__pair { grid-template-columns: 1fr 1fr; }
  .scheme__arrow--split, .scheme__arrow--join { width: min(50%, 320px); height: 26px; background: none; border: 2px solid #a8772c; }
  .scheme__arrow--split { border-bottom: 0; }
  .scheme__arrow--join { border-top: 0; }
  .scheme__arrow--split::after { display: none; }
  .scheme__arrow--split::before {
    content: ""; position: absolute; left: 50%; top: -14px; width: 2px; height: 14px; background: #a8772c; transform: translateX(-50%);
  }
  .scheme__arrow--join::after { bottom: -9px; }
  .scheme__arrow--join { margin-bottom: 8px; }
}

/* слои названия (дебаты) */
.layers {
  margin: 26px 0 30px; padding: 22px 16px 24px; text-align: center;
  background: var(--noise), linear-gradient(180deg, #fbf1db, #f0dfba);
  border: 1px solid #a8813f; box-shadow: inset 0 0 0 4px #fbf1db, inset 0 0 0 5px rgba(168, 129, 63, .5);
}
.layers__caption { margin: 0 0 16px; font-family: var(--font-display); font-weight: 700; font-stretch: 85%; font-size: 21px; line-height: 1.25; color: var(--ink-900); }
.layers__cols { display: grid; gap: 18px; }
.layers__label { margin: 0 0 8px; color: var(--gold-700); font-size: 14px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.layers__box {
  margin: 0; padding: 10px 14px; background: linear-gradient(180deg, #0c2c5c, #051a3c); color: #f6eedd;
  border: 1px solid #c79a4c; font-weight: 600; font-size: 17px;
}
.layers__arrow { margin: 4px 0; color: #a8772c; font-size: 24px; line-height: 1; }
.layers__arrow--join { margin: 10px 0 6px; }
.layers__result {
  display: inline-block; margin: 0; padding: 12px 22px;
  background: linear-gradient(180deg, #f6dfa4, #d9ae5c); border: 1px solid #7f571d; color: var(--ink-900);
  font-family: var(--font-display); font-weight: 700; font-stretch: 85%; font-size: 21px;
}
@media (min-width: 640px) { .layers__cols { grid-template-columns: 1fr 1fr; } }

/* позиции участников дебатов */
.positions { display: grid; gap: 22px; counter-reset: pos; }
.positions__item { padding: 18px 20px 20px; background: rgba(255, 250, 238, .72); border: 1px solid rgba(168, 129, 63, .45); }
.positions__name { display: flex; align-items: center; gap: 12px; margin: 0 0 6px; font-family: var(--font-display); font-weight: 700; font-stretch: 85%; font-size: 22px; line-height: 1.2; color: var(--navy-800); }
.positions__num { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--navy-700); color: var(--gold-200); font-size: 17px; }
.positions__link { margin: 0 0 14px; font-size: 15.5px; }
.positions__link a { display: inline-flex; align-items: center; gap: 6px; color: var(--navy-600); text-underline-offset: 3px; overflow-wrap: anywhere; }
.positions__link .icon { width: 16px; height: 16px; flex: none; }
.positions__cols { display: grid; gap: 14px; align-items: start; font-size: 16.5px; line-height: 1.5; }
.positions__cols p { margin: 0; }
.positions__their, .positions__ours { padding: 12px 14px; }
.positions__their { background: rgba(233, 220, 190, .5); border-left: 3px solid #9b8a6c; }
.positions__ours { background: rgba(255, 246, 220, .9); border-left: 3px solid var(--gold-600); }
.positions__label { margin: 0 0 4px !important; font-size: 13.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-600); }
.positions__ours .positions__label { color: var(--gold-700); }
@media (min-width: 800px) { .positions__cols { grid-template-columns: 1fr 1fr; } }

/* аудиозапись */
.audio {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px;
  margin: 24px 0 8px; padding: 18px 20px;
  background: linear-gradient(180deg, #0c2c5c, #051a3c); color: var(--text-on-navy);
  border: 1px solid #c79a4c; box-shadow: inset 0 0 0 4px #071f45, inset 0 0 0 5px rgba(233, 194, 111, .45);
}
.audio__play {
  display: inline-flex; align-items: center; gap: 12px; flex: none;
  min-height: 60px; padding: 8px 22px 8px 10px; border-radius: 999px;
  border: 1px solid #8a5c1c;
  background: linear-gradient(180deg, #fff3cf 0%, #f2d48a 38%, #dfb05b 68%, #b98034 100%);
  color: var(--ink-900); font-family: var(--font-text); font-weight: 700; font-stretch: 84%; font-size: 18px;
  box-shadow: inset 0 0 0 2px rgba(255, 248, 225, .7), 0 4px 10px rgba(0, 0, 0, .35);
}
.audio__play:hover { filter: brightness(1.06); }
.audio__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--navy-700); color: var(--gold-200); }
.audio__icon .icon { width: 24px; height: 24px; }
.audio.is-playing .audio__icon { background: var(--burgundy); }
.audio__body { flex: 1 1 300px; min-width: 0; }
.audio__title { margin: 0 0 2px; font-family: var(--font-display); font-weight: 700; font-stretch: 86%; font-size: 20px; line-height: 1.25; color: #f7eedb; }
.audio__meta { margin: 0 0 10px; font-size: 15px; color: var(--muted-on-navy); }
.audio__player { display: block; width: 100%; height: 44px; }
.audio__download { margin: 8px 0 0; font-size: 15px; }
.audio .audio__download a, .audio .audio__player a { display: inline-flex; align-items: center; gap: 6px; color: var(--gold-300); text-underline-offset: 3px; }
.audio .audio__download a:hover { color: var(--gold-100); }
.audio__download .icon { width: 18px; height: 18px; }

/* документы */
.doc-list { display: grid; gap: 10px; margin: 0 0 18px; }
.doc-list__item { background: rgba(255, 250, 238, .78); border: 1px solid rgba(168, 129, 63, .45); }
.doc-list__link {
  display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center;
  padding: 12px 16px; color: var(--ink-900); text-decoration: none;
}
a.doc-list__link:hover { background: #fffaf0; }
a.doc-list__link:hover .doc-list__title { color: var(--navy-600); text-decoration: underline; text-underline-offset: 3px; }
.doc-list__icon { grid-row: 1 / 3; width: 32px; height: 32px; color: var(--gold-700); }
.doc-list__title { font-weight: 600; font-size: 17px; line-height: 1.35; }
.doc-list__meta { font-size: 14.5px; color: var(--ink-600); }
.doc-list__desc { padding: 0 16px 12px 62px; font-size: 16px; line-height: 1.5; color: var(--ink-800); }
.doc-list__desc p { margin: 0 0 6px; }
.doc-list__item--pending { opacity: .75; border-style: dashed; }

/* карточки проектов */
.cards { display: grid; gap: 24px; margin: 0 0 32px; }
.card { display: flex; flex-direction: column; background: rgba(255, 250, 238, .8); border: 1px solid #a8813f; box-shadow: 0 8px 20px rgba(70, 45, 10, .15); }
.card__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1px solid #a8813f; }
.card__media picture, .card__img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card__media:hover .card__img { transform: scale(1.03); }
.card__body { padding: 18px 20px 22px; font-size: 17px; line-height: 1.55; }
.card__kicker { margin: 0 0 4px; color: var(--gold-700); font-size: 14px; letter-spacing: .16em; text-transform: uppercase; }
.card__title { margin: 0 0 10px; font-family: var(--font-display); font-weight: 700; font-stretch: 85%; font-size: 25px; line-height: 1.15; }
.card__title a { color: var(--navy-800); text-decoration: none; }
.card__title a:hover { text-decoration: underline; text-underline-offset: 4px; }
.card__links { display: grid; gap: 6px; margin-top: 12px; }
.card__links a { display: inline-flex; align-items: center; gap: 8px; color: var(--navy-600); text-underline-offset: 3px; }
.card__links a::before { content: ""; width: 7px; height: 7px; background: var(--gold-600); transform: rotate(45deg); flex: none; }
@media (min-width: 800px) { .cards { grid-template-columns: 1fr 1fr; } }

.card-links { display: grid; gap: 10px; margin-bottom: 26px; }
@media (min-width: 700px) { .card-links { grid-template-columns: repeat(2, 1fr); } }
.card-link {
  position: relative; display: flex; flex-direction: column; justify-content: center; height: 100%; min-height: 70px;
  padding: 14px 52px 14px 18px;
  background: rgba(255, 250, 238, .75); border: 1px solid var(--paper-400);
  box-shadow: inset 0 0 0 3px rgba(255, 250, 238, .9), inset 0 0 0 4px rgba(168, 129, 63, .35);
  color: var(--ink-900); text-decoration: none; transition: background-color .2s, border-color .2s;
}
.card-link:hover { background: #fffaf0; border-color: var(--gold-600); }
.card-link__title { font-family: var(--font-text); font-weight: 600; font-stretch: 88%; font-size: 18.5px; line-height: 1.25; }
.card-link__arrow { position: absolute; right: 18px; top: 50%; width: 22px; height: 22px; margin-top: -11px; color: var(--gold-700); transition: transform .2s; }
.card-link:hover .card-link__arrow { transform: translateX(3px); }

/* фотоблоки-карусели */
.carousel { position: relative; margin: 24px 0 8px; }
.carousel__track {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  overscroll-behavior-x: contain; padding-bottom: 6px;
  scrollbar-width: thin; scrollbar-color: var(--gold-600) transparent;
}
.carousel__item { flex: 0 0 100%; min-width: 0; scroll-snap-align: center; }
.carousel__figure { display: flex; flex-direction: column; align-items: center; }
.carousel__media {
  position: relative; display: flex; justify-content: center; max-width: 100%;
  border: 1px solid #a8813f; background: #1a1206;
  box-shadow: 0 0 0 4px rgba(168, 129, 63, .18), 0 8px 18px rgba(70, 45, 10, .25);
  cursor: zoom-in;
}
.carousel__img { max-height: min(72vh, 640px); width: auto; max-width: 100%; }
.carousel__zoom {
  position: absolute; right: 8px; top: 8px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(0, 16, 38, .72); border: 1px solid rgba(233, 194, 111, .7); color: var(--gold-200);
}
.carousel__zoom .icon { width: 20px; height: 20px; }
.carousel__tag { position: absolute; left: 8px; top: 8px; pointer-events: none; }
.carousel__figure { position: relative; }
.carousel__caption { max-width: 46em; margin-top: 10px; font-size: 15.5px; line-height: 1.45; color: var(--ink-600); text-align: center; }
.carousel__controls { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 10px; }
.carousel__btn {
  display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border-radius: 50%;
  border: 1.5px solid #a8813f; background: #fffaf0; color: var(--navy-700);
}
.carousel__btn:hover:not([disabled]) { background: var(--navy-700); color: var(--gold-200); border-color: var(--navy-700); }
.carousel__btn[disabled] { opacity: .4; cursor: default; }
.carousel__btn .icon { width: 22px; height: 22px; }
.carousel__counter { margin: 0; min-width: 4em; text-align: center; font-variant-numeric: tabular-nums; color: var(--ink-600); }

/* призыв поддержать проект */
.support-cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px;
  margin: 30px 0; padding: 20px 22px;
  background: linear-gradient(180deg, #0c2c5c, #051a3c); color: var(--text-on-navy);
  border: 1px solid #c79a4c; box-shadow: inset 0 0 0 4px #071f45, inset 0 0 0 5px rgba(233, 194, 111, .45);
}
.support-cta__text { flex: 1 1 360px; margin: 0; font-size: 17.5px; line-height: 1.5; }
.support-cta__text b { color: var(--gold-200); }
.support-cta__btn { flex: none; }

/* способы связи и поддержки */
.contact-email { display: flex; align-items: center; gap: 12px; margin: 0 0 22px; font-family: var(--font-display); font-weight: 700; font-stretch: 88%; font-size: clamp(22px, 5vw, 30px); overflow-wrap: anywhere; }
.contact-email .icon { width: 34px; height: 34px; color: var(--gold-700); flex: none; }
.contact-email a { color: var(--navy-700); text-underline-offset: 5px; }
.ways { display: grid; gap: 12px; margin: 0 0 26px; }
.ways__item { padding: 14px 18px; background: rgba(255, 250, 238, .75); border: 1px solid rgba(168, 129, 63, .45); font-size: 16.5px; line-height: 1.5; }
.ways__item p { margin: 0; }
.ways__title { display: block; margin: 0 0 4px; font-family: var(--font-text); font-weight: 700; font-stretch: 88%; font-size: 18px; color: var(--ink-900); }
.ways--three .ways__item { padding: 0; }
.ways__card {
  display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%;
  padding: 18px 16px 20px; text-align: center; color: var(--ink-800); text-decoration: none;
  transition: background-color .2s;
}
.ways__card:hover { background: #fffaf0; }
.ways__card .icon { width: 40px; height: 40px; margin-bottom: 4px; color: var(--burgundy); }
.ways__card .ways__title { font-size: 20px; color: var(--navy-800); }
@media (min-width: 700px) {
  .ways { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ways--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.places { display: grid; gap: 14px; margin: 18px 0 24px; }
.places__item { display: flex; gap: 14px; padding: 16px 18px; background: rgba(255, 250, 238, .78); border: 1px solid rgba(168, 129, 63, .45); font-size: 16.5px; line-height: 1.5; }
.places__item p { margin: 0 0 4px; }
.places__item a { display: inline-flex; align-items: center; gap: 6px; color: var(--navy-600); text-underline-offset: 3px; }
.places__item a .icon { width: 16px; height: 16px; }
.places__icon { flex: none; width: 34px; height: 34px; color: var(--burgundy); }
.places__title { font-weight: 700; font-size: 18px; color: var(--ink-900); }
@media (min-width: 800px) { .places { grid-template-columns: 1fr 1fr; } }
.social--page { margin: 6px 0 0; gap: 8px; }
.social--page .social__link { width: 50px; height: 50px; border-radius: 50%; background: var(--navy-700); color: var(--gold-200); }
.social--page .social__link:hover { background: var(--navy-600); color: var(--gold-100); }

/* счётчик поддержки */
.counter {
  margin: 0 0 24px; padding: 22px 24px; text-align: center;
  background: linear-gradient(180deg, #0c2c5c, #051a3c); color: var(--text-on-navy);
  border: 1px solid #c79a4c; box-shadow: inset 0 0 0 4px #071f45, inset 0 0 0 5px rgba(233, 194, 111, .45);
}
.counter__value { margin: 0 0 8px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 4px 14px; }
.counter__num {
  font-family: var(--font-display); font-weight: 700; font-stretch: 80%; font-size: clamp(48px, 12vw, 76px); line-height: 1;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  font-variant-numeric: tabular-nums;
}
.counter__label { font-size: 20px; color: #f7eedb; }
.counter__note { margin: 0 auto; max-width: 40em; font-size: 15.5px; color: var(--muted-on-navy); }

/* отзывы */
.reviews { display: grid; gap: 18px; margin: 0 0 26px; }
.review { padding: 18px 20px 16px; background: rgba(255, 250, 238, .85); border: 1px solid rgba(168, 129, 63, .45); box-shadow: 0 6px 14px rgba(70, 45, 10, .1); }
.review__text { position: relative; margin: 0 0 10px; padding-left: 40px; font-style: italic; font-size: 17.5px; line-height: 1.55; }
.review__text::before { content: "«"; position: absolute; left: 0; top: -10px; font-family: var(--font-display); font-style: normal; font-size: 50px; line-height: 1; color: var(--gold-600); }
.review__text p { margin: 0 0 8px; }
.review__author { margin: 0; padding-left: 40px; font-size: 16px; color: var(--ink-600); }
.review__author b { color: var(--ink-900); }
.review__video { margin: 6px 0 0; padding-left: 40px; }
.review__video a { display: inline-flex; align-items: center; gap: 6px; color: var(--navy-600); }
.review__video .icon { width: 20px; height: 20px; }
@media (min-width: 800px) { .reviews { grid-template-columns: 1fr 1fr; } }

/* выделенные блоки и пустые состояния */
.callout {
  display: flex; gap: 16px; align-items: flex-start; margin: 0 0 20px; padding: 18px 20px;
  background: rgba(255, 246, 220, .9); border: 1px solid #a8813f; border-left-width: 4px;
  font-size: 17.5px; line-height: 1.55;
}
.callout p { margin: 0 0 .7em; }
.callout p:last-child { margin: 0; }
.callout__icon { flex: none; width: 32px; height: 32px; color: var(--gold-700); }
.callout--plain { display: block; font-size: 16.5px; background: rgba(255, 250, 238, .85); }
.empty { margin: 0 0 24px; padding: 20px 22px; border: 1px dashed var(--paper-400); background: rgba(255, 250, 238, .55); font-size: 16.5px; }
.empty__title { margin: 0 0 6px; font-family: var(--font-text); font-weight: 700; font-stretch: 88%; font-size: 21px; color: var(--navy-700); }
.empty p:last-child { margin-bottom: 0; }

/* библиотека */
.books { display: grid; gap: 24px; margin: 0 0 12px; }
.book {
  display: grid; gap: 18px; padding: 18px;
  background: rgba(255, 250, 238, .8); border: 1px solid #a8813f; box-shadow: 0 8px 20px rgba(70, 45, 10, .12);
  scroll-margin-top: 80px;
}
.book__cover { width: min(70%, 260px); margin: 0 auto; box-shadow: 6px 8px 18px rgba(40, 25, 5, .35); }
.book__img { width: 100%; }
.book__cover--empty { aspect-ratio: 3 / 4; display: grid; place-items: center; background: linear-gradient(180deg, #0c2c5c, #051a3c); border: 1px solid #c79a4c; }
.book__placeholder { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px; text-align: center; color: var(--gold-200); font-family: var(--font-display); font-weight: 700; font-size: 18px; line-height: 1.2; }
.book__placeholder .icon { width: 44px; height: 44px; }
.book__author { margin: 0 0 2px; color: var(--gold-700); font-size: 15px; letter-spacing: .12em; text-transform: uppercase; }
.book__title { margin: 0 0 6px; font-family: var(--font-display); font-weight: 700; font-stretch: 85%; font-size: 27px; line-height: 1.15; color: var(--navy-800); }
.book__kind { margin: 0 0 10px; font-style: italic; color: var(--ink-600); }
.book__text { font-size: 17px; line-height: 1.55; }
.book__text p { margin: 0 0 .8em; }
.book__status { margin: 4px 0 14px; padding: 8px 12px; background: rgba(233, 194, 111, .3); border-left: 3px solid var(--gold-600); font-weight: 600; }
.book__status--quote { font-weight: 400; font-style: italic; }
.book__actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (min-width: 700px) {
  .book { grid-template-columns: 240px 1fr; align-items: start; padding: 22px; gap: 26px; }
  .book__cover { width: 100%; }
}

/* новости */
.news-list { display: grid; gap: 18px; margin: 0 0 24px; }
.news-card { display: grid; background: rgba(255, 250, 238, .8); border: 1px solid rgba(168, 129, 63, .5); }
.news-card__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; }
.news-card__img { width: 100%; height: 100%; object-fit: cover; }
.news-card__body { padding: 16px 18px 18px; }
.news-card__date { margin: 0 0 4px; color: var(--gold-700); font-size: 14.5px; letter-spacing: .06em; }
.news-card__title { margin: 0 0 8px; font-family: var(--font-display); font-weight: 700; font-stretch: 85%; font-size: 23px; line-height: 1.2; }
.news-card__title a { color: var(--navy-800); text-decoration: none; }
.news-card__title a:hover { text-decoration: underline; text-underline-offset: 4px; }
.news-card__text { margin: 0 0 10px; font-size: 16.5px; line-height: 1.5; }
@media (min-width: 700px) {
  .news-card--image { grid-template-columns: 260px 1fr; }
  .news-card__media { aspect-ratio: auto; height: 100%; min-height: 180px; }
}
.news-item__body { margin-top: 10px; }
.pager { display: flex; flex-wrap: wrap; gap: 6px; }
.pager__link {
  display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 10px;
  border: 1px solid #a8813f; background: #fffaf0; color: var(--navy-700); text-decoration: none; font-weight: 600;
}
.pager__link:hover { background: #fff3d6; }
.pager__link.is-current { background: var(--navy-700); color: var(--gold-200); border-color: var(--navy-700); }

/* поиск */
.search-page-form { display: flex; flex-wrap: wrap; gap: 10px; max-width: 680px; margin: 0 0 22px; }
.search-page-form__input { flex: 1 1 260px; }
.search-page-form .btn { min-height: 50px; }
.results { display: grid; gap: 14px; margin: 14px 0 0; }
.results__item { padding: 14px 18px; background: rgba(255, 250, 238, .8); border: 1px solid rgba(168, 129, 63, .45); }
.results__title { font-family: var(--font-text); font-weight: 700; font-stretch: 88%; font-size: 19px; color: var(--navy-700); text-underline-offset: 3px; }
.results__snippet { margin: 4px 0 0; font-size: 16px; line-height: 1.5; color: var(--ink-800); }
.results__snippet mark { background: rgba(233, 194, 111, .6); color: inherit; padding: 0 2px; }

/* аварийная страница */
.page-fatal { min-height: 100vh; display: grid; place-items: center; color: var(--text-on-navy); background: linear-gradient(180deg, #002350, #00122a); }
.fatal { max-width: 560px; padding: 32px var(--gutter); text-align: center; }
.fatal__name { color: var(--gold-300); font-family: var(--font-display); font-stretch: 75%; text-transform: uppercase; letter-spacing: .06em; }
.fatal__title { margin: 10px 0 12px; font-family: var(--font-display); font-stretch: 85%; font-size: 36px; }
.fatal__text { margin-bottom: 22px; color: var(--muted-on-navy); }
.fatal__hint { margin: -6px 0 24px; padding: 12px 14px; border: 1px solid rgba(232, 200, 140, .35); border-radius: 6px; color: var(--muted-on-navy); font-size: 15px; text-align: left; }

/* =========================================================================
   ФОРМЫ (обратная связь, экскурсия, родословная, анкета, отзыв, поддержка)
   ========================================================================= */
.form {
  position: relative; margin: 10px 0 24px; padding: 20px 18px 22px; max-width: 860px;
  background: rgba(255, 250, 238, .85);
  border: 1px solid #a8813f; box-shadow: inset 0 0 0 4px rgba(255, 250, 238, .9), inset 0 0 0 5px rgba(168, 129, 63, .4), 0 8px 20px rgba(70, 45, 10, .1);
  color: var(--ink-900);
}
.form__trap { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form__legend { margin: 0 0 14px; font-size: 15px; color: var(--ink-600); }
.form__req { color: var(--burgundy); font-weight: 700; }
.form__grid { display: grid; gap: 16px 20px; }
.form__field { min-width: 0; }
.form__label { display: block; margin: 0 0 6px; font-weight: 600; font-size: 16.5px; line-height: 1.3; }
.form__input, .search-page-form__input, .site-search__input {
  display: block; width: 100%; min-height: 50px; padding: 10px 14px;
  border: 1px solid var(--paper-400); border-radius: 4px;
  background: #fffdf7; color: var(--ink-900);
  font-family: var(--font-text); font-size: 17px; line-height: 1.35;
  transition: border-color .15s, box-shadow .15s;
}
.form__input::placeholder, .search-page-form__input::placeholder, .site-search__input::placeholder { color: #8b7a62; }
.form__input:focus, .search-page-form__input:focus, .site-search__input:focus {
  outline: none; border-color: var(--navy-600); box-shadow: 0 0 0 3px rgba(11, 58, 112, .2);
}
.form__input--area { min-height: 130px; resize: vertical; line-height: 1.5; }
.form__input--select {
  appearance: none; padding-right: 44px; cursor: pointer;
  background: #fffdf7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237f571d' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6.5 9.5 5.5 5.5 5.5-5.5'/%3E%3C/svg%3E") right 12px center / 22px no-repeat;
}
.form__input--short { max-width: 140px; }
.form__hint { margin: 5px 0 0; font-size: 14.5px; line-height: 1.4; color: var(--ink-600); }
.form__error { margin: 5px 0 0; font-size: 15px; line-height: 1.35; font-weight: 600; color: #a3261c; }
.form__error:empty { display: none; }
.form__field.is-invalid .form__input, .form__input[aria-invalid="true"] { border-color: #b8322a; box-shadow: 0 0 0 2px rgba(184, 50, 42, .18); }
.form__field.is-invalid .form__label { color: #a3261c; }
.form__consent { margin: 18px 0 0; }
.form__check { display: flex; align-items: flex-start; gap: 12px; font-size: 15.5px; line-height: 1.45; cursor: pointer; }
.form__check input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--navy-700); }
.form__check a { color: var(--navy-600); }
.form__consent.is-invalid .form__check { color: #a3261c; }
.form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 18px; }
.form__submit { min-height: 52px; font-size: 17px; }
.form__status { flex: 1 1 260px; margin: 0; font-size: 16px; line-height: 1.4; font-weight: 600; }
.form__status:empty { display: none; }
.form__status.is-ok { padding: 10px 14px; background: #e3f2df; border-left: 4px solid #2e7d32; color: #1f5a22; }
.form__status.is-error { padding: 10px 14px; background: #fbe6e3; border-left: 4px solid #b8322a; color: #8a1f17; }
.form.is-sending .form__submit, .join-form.is-sending .join-form__submit { opacity: .7; pointer-events: none; cursor: progress; }
@media (min-width: 700px) {
  .form { padding: 24px 26px 26px; }
  .form__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form__field--wide { grid-column: 1 / -1; }
}

/* Блоки ниже первого экрана браузер отрисовывает, только когда до них доходит прокрутка */
.why, .author, .project, .route, .join { content-visibility: auto; contain-intrinsic-size: auto 900px; }

/* ---------- Уменьшенное движение ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
  .gallery__media:hover .gallery__img, .foundation__link:hover .foundation__img, .card__media:hover .card__img { transform: none; }
  .carousel__track { scroll-behavior: auto; }
}

/* ---------- Печать: текст без меню, кнопок и тёмных фонов ---------- */
@media print {
  .site-header__aside, .main-nav, .nav-backdrop, .site-search, .burger, .site-footer__main, .lightbox, .story,
  .toc, .support-cta, .form, .carousel__controls, .audio__play, .join, .route__swipe { display: none !important; }
  body, .inner-body, .inner-head { background: #fff !important; color: #000 !important; }
  .inner-head__title { color: #000; background: none; -webkit-text-fill-color: #000; }
  .breadcrumbs, .breadcrumbs a { color: #444; }
  a { color: #000; }
  .carousel__track { display: block; overflow: visible; }
  .carousel__item { margin-bottom: 16px; }
}
