/* ==========================================================
   ЧИСТЫЙ ПОНЕДЕЛЬНИК · иммерсивный веб-экспириенс
   Зимняя Москва 1913 года · тёмное сияние, серебро и позолота
   ========================================================== */

/* ---------- шрифты (локальные, с кириллицей) ---------- */
@font-face {
  font-family: "Playfair Display";
  src: url("fonts/pf-cyrillic-400.woff2") format("woff2");
  font-weight: 400; font-style: normal;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Playfair Display";
  src: url("fonts/pf-latin-400.woff2") format("woff2");
  font-weight: 400; font-style: normal;
  unicode-range: U+0000-00FF, U+0131, U+2000-206F;
}
@font-face {
  font-family: "Playfair Display";
  src: url("fonts/pf-cyrillic-400-i.woff2") format("woff2");
  font-weight: 400; font-style: italic;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Playfair Display";
  src: url("fonts/pf-latin-400-i.woff2") format("woff2");
  font-weight: 400; font-style: italic;
  unicode-range: U+0000-00FF, U+0131, U+2000-206F;
}
@font-face {
  font-family: "Playfair Display";
  src: url("fonts/pf-cyrillic-700.woff2") format("woff2");
  font-weight: 700; font-style: normal;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Playfair Display";
  src: url("fonts/pf-latin-700.woff2") format("woff2");
  font-weight: 700; font-style: normal;
  unicode-range: U+0000-00FF, U+0131, U+2000-206F;
}
@font-face {
  font-family: "Playfair Display";
  src: url("fonts/pf-cyrillic-900.woff2") format("woff2");
  font-weight: 900; font-style: normal;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Playfair Display";
  src: url("fonts/pf-latin-900.woff2") format("woff2");
  font-weight: 900; font-style: normal;
  unicode-range: U+0000-00FF, U+0131, U+2000-206F;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/cg-cyrillic-400.woff2") format("woff2");
  font-weight: 400; font-style: normal;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/cg-latin-400.woff2") format("woff2");
  font-weight: 400; font-style: normal;
  unicode-range: U+0000-00FF, U+0131, U+2000-206F;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/cg-cyrillic-400-i.woff2") format("woff2");
  font-weight: 400; font-style: italic;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/cg-latin-400-i.woff2") format("woff2");
  font-weight: 400; font-style: italic;
  unicode-range: U+0000-00FF, U+0131, U+2000-206F;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/cg-cyrillic-600.woff2") format("woff2");
  font-weight: 600; font-style: normal;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/cg-latin-600.woff2") format("woff2");
  font-weight: 600; font-style: normal;
  unicode-range: U+0000-00FF, U+0131, U+2000-206F;
}
@font-face {
  font-family: "Manrope";
  src: url("fonts/mr-cyrillic-300.woff2") format("woff2");
  font-weight: 300; font-style: normal;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  src: url("fonts/mr-latin-300.woff2") format("woff2");
  font-weight: 300; font-style: normal;
  unicode-range: U+0000-00FF, U+0131, U+2000-206F;
}
@font-face {
  font-family: "Manrope";
  src: url("fonts/mr-cyrillic-400.woff2") format("woff2");
  font-weight: 400; font-style: normal;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  src: url("fonts/mr-latin-400.woff2") format("woff2");
  font-weight: 400; font-style: normal;
  unicode-range: U+0000-00FF, U+0131, U+2000-206F;
}
@font-face {
  font-family: "Manrope";
  src: url("fonts/mr-cyrillic-600.woff2") format("woff2");
  font-weight: 600; font-style: normal;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  src: url("fonts/mr-latin-600.woff2") format("woff2");
  font-weight: 600; font-style: normal;
  unicode-range: U+0000-00FF, U+0131, U+2000-206F;
}

/* ---------- переменные ---------- */
:root {
  --ink: #0b0e13;
  --ink-2: #10141b;
  --paper: #f4ead9;
  --paper-dim: rgba(244, 234, 217, 0.62);
  --paper-faint: rgba(244, 234, 217, 0.38);
  --gold: #c9a35c;
  --gold-bright: #e8c987;
  --gold-dim: rgba(201, 163, 92, 0.55);
  --wine: #7a2c31;
  --frost: #9db3c4;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--ink);
}

body {
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  cursor: default;
}

/* снежинки-курсор на десктопе */
@media (hover: hover) {
  body { cursor: none; }
  body a, body button { cursor: none; }
}

::selection { background: rgba(201, 163, 92, 0.35); color: #fff; }

/* ---------- 3D-канвас ---------- */
#gl {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
}

/* зернистость плёнки поверх всего */
#grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  z-index: 40;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.16'/%3E%3C/svg%3E");
  animation: grain 8s steps(6) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-4%, 3%); }
  40% { transform: translate(3%, -2%); }
  60% { transform: translate(-2%, -4%); }
  80% { transform: translate(4%, 2%); }
}

/* виньетка */
#vignette {
  position: fixed;
  inset: 0;
  z-index: 39;
  pointer-events: none;
  background:
    radial-gradient(ellipse 120% 90% at 50% 42%, transparent 55%, rgba(4, 6, 10, 0.55) 100%);
}

/* переход-шторка между сценами */
#curtain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, #05070c 0%, #010203 100%);
  opacity: 0;
  transform: scale(1.06);
}
#curtain.on {
  opacity: 1;
  transition: opacity 0.62s var(--ease);
}
#curtain.off {
  opacity: 0;
  transform: scale(1);
  transition: opacity 0.9s var(--ease), transform 1.2s var(--ease);
}

/* полоса прогресса перехода */
#transition-bar {
  position: fixed;
  left: 0;
  top: 0;
  height: 2px;
  width: 0%;
  z-index: 70;
  background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}
#transition-bar.run {
  width: 100%;
  opacity: 1;
  transition: width 0.72s var(--ease-soft), opacity 0.3s 0.6s;
}

/* ==========================================================
   UI-слой
   ========================================================== */
#ui {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* ---------- шапка ---------- */
#topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(14px, 2.6vw, 30px) clamp(16px, 3.6vw, 44px);
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
#topbar.visible { opacity: 1; transform: none; }

.brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
  pointer-events: auto;
}
.brand .seal {
  width: 34px;
  height: 34px;
  flex: none;
}
.brand .wordmark {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: clamp(15px, 1.7vw, 19px);
  letter-spacing: 0.06em;
  color: var(--paper);
}
.brand .wordmark em {
  font-style: italic;
  font-weight: 400;
  color: var(--gold-bright);
}
.brand .issue {
  font-size: clamp(10px, 1.1vw, 11px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper-faint);
  font-weight: 300;
}

/* счётчик-«лист» */
#counter {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(11px, 1.2vw, 13px);
  letter-spacing: 0.14em;
  color: var(--paper-dim);
}
#counter .num {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: clamp(18px, 2vw, 22px);
  color: var(--gold-bright);
  min-width: 2ch;
  text-align: right;
}
#counter .of {
  color: var(--paper-faint);
}
#counter .total {
  color: var(--paper-dim);
}
#counter .progress {
  width: clamp(50px, 8vw, 110px);
  height: 1px;
  background: rgba(244, 234, 217, 0.18);
  position: relative;
}
#counter .progress i {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: var(--gold);
  transition: width 0.7s var(--ease);
}

/* ---------- центральный блок контента ---------- */
#stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(16px, 3vw, 48px);
}

.sheet {
  /* лист-карточка поверх 3D */
  position: relative;
  width: min(560px, 88vw);
  max-height: 78vh;
  padding: clamp(20px, 3.4vw, 40px) clamp(22px, 3.8vw, 46px);
  background: linear-gradient(160deg, rgba(16, 20, 27, 0.86), rgba(11, 14, 19, 0.78));
  backdrop-filter: blur(14px) saturate(1.05);
  -webkit-backdrop-filter: blur(14px) saturate(1.05);
  border: 1px solid rgba(201, 163, 92, 0.22);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    inset 0 0 60px rgba(201, 163, 92, 0.05);
  opacity: 0;
  transform: translateY(26px) scale(0.985);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
  overflow: hidden;
  pointer-events: auto;
}
.sheet::before {
  /* тонкая золотая рамка внутри */
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(201, 163, 92, 0.14);
  pointer-events: none;
}
.sheet.visible {
  opacity: 1;
  transform: none;
}

/* на десктопе — лист сдвинут вправо, 3D слева */
@media (min-width: 961px) {
  #stage {
    display: block;
  }
  .sheet {
    position: absolute;
    right: clamp(16px, 4vw, 72px);
    top: 50%;
    transform: translateY(calc(-50% + 26px)) scale(0.985);
  }
  .sheet.visible {
    transform: translateY(-50%);
  }
}

/* орнамент-разделитель */
.ornament {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: clamp(10px, 1.6vw, 18px) 0;
}
.ornament .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 163, 92, 0.5), transparent);
}
.ornament .diamond {
  width: 7px;
  height: 7px;
  flex: none;
  background: var(--gold);
  transform: rotate(45deg);
  box-shadow: 0 0 10px rgba(201, 163, 92, 0.8);
}

.sheet .num {
  font-family: "Manrope", sans-serif;
  font-weight: 300;
  font-size: clamp(11px, 1.2vw, 13px);
  letter-spacing: 0.34em;
  color: var(--gold);
  text-transform: uppercase;
}
.sheet .num span {
  color: var(--paper-faint);
  letter-spacing: 0.18em;
}

.sheet h1 {
  font-family: "Playfair Display", serif;
  font-weight: 900;
  font-size: clamp(30px, 5.2vw, 54px);
  line-height: 1.04;
  letter-spacing: 0.01em;
  color: #fbf3e3;
  margin: clamp(6px, 0.8vw, 10px) 0 clamp(4px, 0.6vw, 8px);
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
}

.sheet .subtitle {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: clamp(15px, 2vw, 19px);
  color: var(--gold-bright);
  letter-spacing: 0.02em;
}

.sheet .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: clamp(8px, 1.2vw, 14px);
  font-size: clamp(10px, 1.1vw, 12px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper-faint);
  font-weight: 300;
}
.sheet .meta b {
  color: var(--paper-dim);
  font-weight: 400;
}

.sheet .lead {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(15px, 1.9vw, 18.5px);
  line-height: 1.5;
  color: var(--paper-dim);
  margin-top: clamp(12px, 1.6vw, 18px);
}

/* цитата */
.sheet blockquote {
  position: relative;
  margin: clamp(14px, 2vw, 22px) 0;
  padding: clamp(12px, 1.8vw, 18px) clamp(14px, 2vw, 22px);
  background: rgba(122, 44, 49, 0.12);
  border-left: 2px solid var(--wine);
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: clamp(14.5px, 1.9vw, 18px);
  line-height: 1.5;
  color: #efe4cf;
}
.sheet blockquote::before {
  content: "«";
  position: absolute;
  top: -4px;
  left: 8px;
  font-family: "Playfair Display", serif;
  font-size: clamp(30px, 4vw, 44px);
  color: var(--gold-dim);
  line-height: 1;
}
.sheet blockquote .note {
  display: block;
  margin-top: 8px;
  font-family: "Manrope", sans-serif;
  font-style: normal;
  font-size: clamp(10px, 1.1vw, 11.5px);
  letter-spacing: 0.05em;
  color: var(--paper-faint);
}

/* факты */
.facts {
  margin-top: clamp(8px, 1.2vw, 14px);
  max-height: clamp(120px, 24vh, 240px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 163, 92, 0.4) transparent;
  padding-right: 6px;
  mask-image: linear-gradient(180deg, transparent 0, #000 12px, #000 calc(100% - 18px), transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 12px, #000 calc(100% - 18px), transparent 100%);
}
.facts li {
  position: relative;
  list-style: none;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(13.5px, 1.7vw, 16.5px);
  line-height: 1.42;
  color: var(--paper-dim);
  padding-left: 20px;
  margin-bottom: clamp(7px, 1vw, 11px);
}
.facts li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border: 1px solid var(--gold-dim);
  transform: rotate(45deg);
}
.facts li b {
  font-weight: 600;
  color: var(--paper);
}

/* карусель фотографий */
.carousel {
  margin-top: clamp(12px, 1.8vw, 18px);
  pointer-events: auto;
}
.carousel .viewport {
  position: relative;
  height: clamp(120px, 17vw, 172px);
  border: 1px solid rgba(201, 163, 92, 0.2);
  background: #060a10;
  overflow: hidden;
}
.carousel .viewport::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 7, 12, 0.0) 70%, rgba(5, 7, 12, 0.5));
}
.carousel .track {
  display: flex;
  gap: 10px;
  height: 100%;
  padding: 10px;
  will-change: transform;
  cursor: grab;
}
.carousel .track:active { cursor: grabbing; }
.carousel .cell {
  position: relative;
  flex: none;
  width: auto;
  height: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}
.carousel .cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: sepia(0.22) saturate(0.9) contrast(1.02);
  transition: filter 0.4s, transform 0.6s var(--ease);
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}
.carousel .cell:hover img {
  filter: sepia(0.1) saturate(1.05) contrast(1.05);
  transform: scale(1.04);
}
.carousel .cell .cap {
  position: absolute;
  left: 8px;
  bottom: 6px;
  right: 8px;
  font-size: clamp(8.5px, 0.95vw, 10.5px);
  letter-spacing: 0.06em;
  color: rgba(244, 234, 217, 0.85);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
.carousel .nav {
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(34px, 4vw, 44px);
  display: grid;
  place-items: center;
  background: linear-gradient(90deg, rgba(6, 10, 16, 0.85), transparent);
  border: 0;
  z-index: 2;
  color: var(--paper-dim);
  transition: color 0.3s, background 0.3s;
}
.carousel .nav:hover { color: var(--gold-bright); }
.carousel .nav.next {
  right: 0;
  background: linear-gradient(270deg, rgba(6, 10, 16, 0.85), transparent);
}
.carousel .nav svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.carousel .dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 8px;
}
.carousel .dots button {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 0;
  background: rgba(244, 234, 217, 0.25);
  transition: background 0.3s, transform 0.3s;
}
.carousel .dots button.active {
  background: var(--gold-bright);
  transform: scale(1.35);
  box-shadow: 0 0 8px rgba(201, 163, 92, 0.7);
}

/* ---------- подсказки управления ---------- */
#hints {
  display: flex;
  gap: clamp(10px, 2vw, 22px);
  justify-content: center;
  padding-bottom: clamp(8px, 1.4vw, 14px);
  font-size: clamp(9px, 1vw, 11px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(244, 234, 217, 0.4);
  opacity: 0;
  transition: opacity 0.8s;
}
#hints.visible { opacity: 1; }
#hints .k {
  display: inline-block;
  padding: 2px 7px;
  margin-right: 6px;
  border: 1px solid rgba(244, 234, 217, 0.28);
  border-radius: 3px;
  font-size: 0.9em;
  color: var(--paper-dim);
}
@media (pointer: coarse) {
  #hints .desktop-only { display: none; }
}

/* ---------- нижняя навигация ---------- */
#nav {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: clamp(10px, 2vw, 20px);
  padding: 0 clamp(16px, 3.6vw, 44px) clamp(14px, 2.4vw, 26px);
}
.nav-btn {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(160deg, rgba(20, 24, 32, 0.7), rgba(11, 14, 19, 0.6));
  border: 1px solid rgba(201, 163, 92, 0.25);
  color: var(--paper-dim);
  padding: clamp(10px, 1.4vw, 14px) clamp(14px, 2vw, 22px);
  font-family: "Manrope", sans-serif;
  font-size: clamp(10px, 1.1vw, 12px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: color 0.35s, border-color 0.35s, box-shadow 0.35s, background 0.35s;
  max-width: 42vw;
}
.nav-btn:hover {
  color: var(--gold-bright);
  border-color: rgba(201, 163, 92, 0.6);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), inset 0 0 30px rgba(201, 163, 92, 0.06);
}
.nav-btn .t {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-btn.next { justify-content: flex-end; text-align: right; }
.nav-btn svg {
  width: 17px;
  height: 17px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}
.nav-btn:disabled {
  opacity: 0.25;
  pointer-events: none;
}

/* ---------- оглавление (индекс мест) ---------- */
#index {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(5, 7, 12, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease);
}
#index.open {
  opacity: 1;
  pointer-events: auto;
}
#index .panel {
  width: min(720px, 92vw);
  max-height: 84vh;
  overflow-y: auto;
  padding: clamp(20px, 3vw, 36px);
  border: 1px solid rgba(201, 163, 92, 0.25);
  background: linear-gradient(170deg, rgba(16, 20, 27, 0.9), rgba(9, 12, 17, 0.92));
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
}
#index h2 {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: clamp(20px, 2.6vw, 28px);
  color: #fbf3e3;
  margin-bottom: 4px;
}
#index .sub {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  color: var(--gold-bright);
  margin-bottom: clamp(12px, 2vw, 20px);
}
#index ol {
  list-style: none;
}
#index li {
  border-bottom: 1px solid rgba(244, 234, 217, 0.07);
}
#index li a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: clamp(9px, 1.2vw, 13px) 4px;
  color: var(--paper-dim);
  text-decoration: none;
  transition: color 0.3s, padding-left 0.3s;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(15px, 1.9vw, 19px);
}
#index li a:hover {
  color: var(--gold-bright);
  padding-left: 12px;
}
#index li a .n {
  font-family: "Manrope", sans-serif;
  font-size: 0.72em;
  letter-spacing: 0.2em;
  color: var(--gold);
  flex: none;
  width: 3ch;
}
#index li a .era-i {
  margin-left: auto;
  font-family: "Manrope", sans-serif;
  font-size: 0.62em;
  letter-spacing: 0.12em;
  color: var(--paper-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 40%;
}

/* кнопка индекса */
#index-open {
  pointer-events: auto;
  background: transparent;
  border: 1px solid rgba(201, 163, 92, 0.35);
  color: var(--paper-dim);
  padding: 8px 14px;
  font-family: "Manrope", sans-serif;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: color 0.3s, border-color 0.3s;
}
#index-open:hover {
  color: var(--gold-bright);
  border-color: rgba(201, 163, 92, 0.7);
}

/* ---------- welcome / closing ---------- */
.hero {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  text-align: center;
  padding: clamp(20px, 5vw, 60px);
  pointer-events: none;
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.hero .inner {
  max-width: min(860px, 92vw);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero .eyebrow {
  font-family: "Manrope", sans-serif;
  font-weight: 300;
  font-size: clamp(10px, 1.3vw, 13px);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
}
.hero h1 {
  font-family: "Playfair Display", serif;
  font-weight: 900;
  font-size: clamp(38px, 9vw, 104px);
  line-height: 1.02;
  color: #fcf4e4;
  margin: clamp(10px, 2vw, 22px) 0;
  text-shadow: 0 10px 60px rgba(0, 0, 0, 0.8), 0 0 90px rgba(201, 163, 92, 0.14);
}
.hero h1 .gold {
  display: block;
  font-style: italic;
  font-weight: 400;
  background: linear-gradient(100deg, #e8c987, #b98f4e 55%, #e8c987);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 0.94em;
}
.hero .byline {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: clamp(15px, 2.2vw, 21px);
  color: var(--paper-dim);
  max-width: 30ch;
  line-height: 1.45;
}
.hero .start {
  pointer-events: auto;
  margin-top: clamp(20px, 3.4vw, 40px);
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: clamp(14px, 1.8vw, 20px) clamp(26px, 3.4vw, 42px);
  background: transparent;
  border: 1px solid rgba(201, 163, 92, 0.5);
  color: var(--paper);
  font-family: "Manrope", sans-serif;
  font-size: clamp(11px, 1.3vw, 13px);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  transition: color 0.4s, border-color 0.4s, box-shadow 0.4s;
}
.hero .start::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(201, 163, 92, 0.16), transparent 60%);
  transform: translateX(-101%);
  transition: transform 0.55s var(--ease);
}
.hero .start:hover {
  color: var(--gold-bright);
  border-color: var(--gold);
  box-shadow: 0 12px 44px rgba(201, 163, 92, 0.18);
}
.hero .start:hover::before { transform: none; }
.hero .start svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.hero .scroll-cue {
  position: absolute;
  bottom: clamp(18px, 4vh, 44px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(244, 234, 217, 0.4);
}
.hero .scroll-cue .mouse {
  width: 22px;
  height: 36px;
  border: 1px solid rgba(244, 234, 217, 0.35);
  border-radius: 12px;
  position: relative;
}
.hero .scroll-cue .mouse::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  width: 3px;
  height: 7px;
  margin-left: -1.5px;
  background: var(--gold-bright);
  border-radius: 2px;
  animation: wheel-hint 1.8s var(--ease-soft) infinite;
}
@keyframes wheel-hint {
  0% { transform: translateY(0); opacity: 0; }
  25% { opacity: 1; }
  60% { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}
@media (pointer: coarse) {
  .hero .scroll-cue .mouse { display: none; }
}

.hero-exit {
  opacity: 0;
  transform: translateY(-40px) scale(0.98);
  pointer-events: none;
}
.hero-enter {
  opacity: 1;
  transform: none;
}

/* подпись автора на welcome */
.hero .credit {
  margin-top: clamp(26px, 4vw, 48px);
  font-family: "Manrope", sans-serif;
  font-size: clamp(9px, 1vw, 11px);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(244, 234, 217, 0.34);
}
.hero .credit b {
  display: block;
  margin-top: 6px;
  color: var(--paper-dim);
  font-weight: 400;
}

/* индикатор загрузки */
#loader {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--ink);
  display: grid;
  place-items: center;
  transition: opacity 0.8s var(--ease);
}
#loader.done { opacity: 0; pointer-events: none; }
#loader .inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
#loader .mark {
  font-family: "Playfair Display", serif;
  font-weight: 900;
  font-size: clamp(28px, 5vw, 44px);
  color: #fcf4e4;
  letter-spacing: 0.02em;
}
#loader .mark span {
  color: var(--gold-bright);
  font-style: italic;
  font-weight: 400;
}
#loader .bar {
  width: min(240px, 60vw);
  height: 1px;
  background: rgba(244, 234, 217, 0.15);
  position: relative;
  overflow: hidden;
}
#loader .bar i {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--gold-bright));
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.3s var(--ease-soft);
}
#loader .label {
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--paper-faint);
}

/* кастомный курсор */
#cursor {
  position: fixed;
  z-index: 100;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 14px rgba(232, 201, 135, 0.9);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  mix-blend-mode: screen;
}
#cursor-ring {
  position: fixed;
  z-index: 100;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 1px solid rgba(201, 163, 92, 0.5);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s, transform 0.08s linear;
  mix-blend-mode: screen;
}
@media (pointer: coarse) {
  #cursor, #cursor-ring { display: none; }
}

/* ---------- доступность и мелочи ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.15s !important;
  }
}

/* тонкие скроллбары в sheet */
.sheet ::-webkit-scrollbar { width: 4px; }
.sheet ::-webkit-scrollbar-thumb { background: rgba(201, 163, 92, 0.35); }
.sheet ::-webkit-scrollbar-track { background: transparent; }
#index ::-webkit-scrollbar { width: 5px; }
#index ::-webkit-scrollbar-thumb { background: rgba(201, 163, 92, 0.35); }

/* вертикальная надпись-«корешок» слева на десктопе */
#spine {
  position: fixed;
  left: clamp(10px, 1.6vw, 22px);
  top: 50%;
  transform: translateY(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  z-index: 31;
  font-family: "Manrope", sans-serif;
  font-size: 10px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: rgba(244, 234, 217, 0.3);
  opacity: 0;
  transition: opacity 0.8s;
  pointer-events: none;
}
#spine.visible { opacity: 1; }
@media (max-width: 960px) {
  #spine { display: none; }
}
