/* ==========================================================================
   Dark Tales — стили сайта
   Шрифты (все с кириллицей, кроме Pirata One):
   Cormorant SC — заголовки, Alegreya — текст,
   Pirata One — только латинский логотип «Dark Tales» и цифры 404.
   Файлы шрифтов лежат на своём сервере: /assets/fonts/ (лицензия OFL — там же).
   ========================================================================== */

/* unicode-range как у Google Fonts: браузер качает сабсет, только если на странице есть его символы */
@font-face {
  font-family: "Alegreya";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/alegreya-400-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Alegreya";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/alegreya-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Alegreya";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/alegreya-400italic-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Alegreya";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/alegreya-400italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cormorant SC";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/cormorant-sc-600-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Cormorant SC";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/cormorant-sc-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cormorant SC";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/cormorant-sc-700-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Cormorant SC";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/cormorant-sc-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Pirata One";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/pirata-one-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --c-bg: #0e0c0a;          /* уголь */
  --c-bg-2: #15110d;
  --c-surface: #1d1813;
  --c-surface-2: #261f17;
  --c-border: #4a3a24;
  --c-gold: #c9a24f;        /* старое золото */
  --c-gold-light: #ecd28f;
  --c-gold-dim: #8a6d33;
  --c-blood: #8e1c1c;       /* кровь */
  --c-rust: #cf6d42;        /* ржавчина, читаемая на тёмном фоне */
  --c-parchment: #e6d7b5;   /* пергамент */
  --c-ink: #2b1d10;
  --c-text: #ddd0b3;
  --c-muted: #a69878;

  --font-logo: "Pirata One", serif;
  --font-head: "Cormorant SC", Georgia, serif;
  --font-body: "Alegreya", Georgia, serif;

  --header-h: 4.5rem;
  --container: 72rem;
  --shadow: 0 1.25rem 2.5rem rgb(0 0 0 / 0.5);
}

/* ---------- База ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

/* scrollbar-gutter: при блокировке прокрутки (menu-open) контент не сдвигается */
html { scroll-padding-top: calc(var(--header-h) + 1rem); scrollbar-gutter: stable; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--c-text);
  font: 400 1.0625rem/1.65 var(--font-body);
  background:
    radial-gradient(ellipse at 50% -10%, rgb(142 28 28 / 0.2), transparent 60%),
    radial-gradient(ellipse at 50% 110%, rgb(201 162 79 / 0.08), transparent 60%),
    var(--c-bg);
}

html.menu-open { overflow: hidden; }

main { flex: 1; }

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

h1, h2, h3 {
  margin: 0 0 0.5em;
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: var(--c-gold-light);
  overflow-wrap: break-word;
  hyphens: auto;
}

p { margin: 0 0 1em; }

a { color: var(--c-gold-light); text-underline-offset: 0.2em; }
a:hover { color: #fff3cf; }

:focus-visible { outline: 2px solid var(--c-gold-light); outline-offset: 3px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.container { width: min(100% - 2rem, var(--container)); margin-inline: auto; }
.section { padding-block: 2.5rem 3.5rem; }
.center { margin-top: 2.5rem; text-align: center; }

.noscript {
  margin: 1rem;
  padding: 1rem;
  border: 1px solid var(--c-rust);
  text-align: center;
}

/* ---------- Декор: разделитель, рамка, кнопки ---------- */

.divider {
  position: relative;
  width: min(22rem, 80%);
  height: 1px;
  margin: 1.25rem auto 1.5rem;
  border: 0;
  overflow: visible;
  /* Разрыв линии в центре оставляет место под ✦ без подложки */
  background: linear-gradient(90deg, transparent, var(--c-gold-dim) 20%, var(--c-gold) 44%,
    transparent 44%, transparent 56%, var(--c-gold) 56%, var(--c-gold-dim) 80%, transparent);
}

.divider::after {
  content: "✦";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  font-size: 1rem;
  line-height: 1;
  color: var(--c-rust);
}

/* Рамка с двойной линией и золотыми уголками */
.frame {
  position: relative;
  border: 1px solid var(--c-border);
  background: linear-gradient(180deg, var(--c-surface), var(--c-bg-2));
  box-shadow: var(--shadow);
}

.frame::before {
  --g: linear-gradient(var(--c-gold), var(--c-gold));
  content: "";
  position: absolute;
  inset: 6px;
  pointer-events: none;
  border: 1px solid rgb(201 162 79 / 0.15);
  background:
    var(--g) top left / 16px 2px, var(--g) top left / 2px 16px,
    var(--g) top right / 16px 2px, var(--g) top right / 2px 16px,
    var(--g) bottom left / 16px 2px, var(--g) bottom left / 2px 16px,
    var(--g) bottom right / 16px 2px, var(--g) bottom right / 2px 16px;
  background-repeat: no-repeat;
}

.btn {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  font: 700 1.15rem/1.1 var(--font-head);
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--c-gold-light);
  border: 1px solid var(--c-gold-dim);
  background: rgb(14 12 10 / 0.6);
  box-shadow: inset 0 0 0 3px var(--c-bg), inset 0 0 0 4px rgb(201 162 79 / 0.35);
  transition: background-color 0.2s, color 0.2s;
}

.btn:hover { color: #fff3cf; background-color: var(--c-surface-2); }

.btn--primary {
  color: #fbe9c4;
  border-color: #c4542f;
  background: linear-gradient(180deg, #a3291f, var(--c-blood));
}

.btn--primary:hover { background: linear-gradient(180deg, #b8321f, #a3241c); }

.link-arrow { font: 700 1.1rem var(--font-head); text-decoration: none; }
.link-arrow::after { content: " →"; }

/* Список с ромбами-маркерами */
.rune-list { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.rune-list li { position: relative; padding-left: 1.5rem; }
.rune-list li::before {
  content: "";
  position: absolute;
  top: 0.6em;
  left: 0.2rem;
  width: 0.45rem;
  height: 0.45rem;
  background: var(--c-gold);
  transform: rotate(45deg);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--c-border);
  background: rgb(14 12 10 / 0.94);
  box-shadow: 0 0.5rem 1.5rem rgb(0 0 0 / 0.4);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 2rem, var(--container));
  min-height: var(--header-h);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: -3rem;
  left: 1rem;
  z-index: 20;
  padding: 0.5rem 1rem;
  color: var(--c-bg);
  background: var(--c-gold);
}

.skip-link:focus { top: 0.5rem; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font: 400 1.85rem/1 var(--font-logo);
  color: var(--c-gold-light);
  text-decoration: none;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  color: var(--c-gold-light);
  background: transparent;
  border: 1px solid var(--c-border);
  cursor: pointer;
}

.menu-toggle__bars,
.menu-toggle__bars::before,
.menu-toggle__bars::after {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s, background-color 0.2s;
}

.menu-toggle__bars { position: relative; }
.menu-toggle__bars::before,
.menu-toggle__bars::after { content: ""; position: absolute; left: 0; }
.menu-toggle__bars::before { top: -6px; }
.menu-toggle__bars::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars { background-color: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

/* Мобильное меню: выпадающая панель */
.site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: calc(100vh - var(--header-h));
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  padding: 0.5rem 1rem 1.25rem;
  background: var(--c-bg-2);
  border-bottom: 1px solid var(--c-border);
}

.menu-toggle[aria-expanded="true"] + .site-nav { display: block; }

.site-nav ul { margin: 0; padding: 0; list-style: none; }

.site-nav a {
  display: block;
  padding: 0.7rem 0.25rem;
  font: 600 1.2rem/1.2 var(--font-head);
  color: var(--c-text);
  text-decoration: none;
  border-bottom: 1px solid rgb(74 58 36 / 0.5);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--c-gold-light); }
.site-nav ul a[aria-current="page"]::before { content: "✦ "; color: var(--c-rust); }

.site-nav .lang-switch {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.4rem 1rem;
  font-size: 1.05rem;
  border: 1px solid var(--c-gold-dim);
}

/* Брейкпоинт синхронизирован с matchMedia в js/layout.js */
@media (min-width: 1240px) {
  .menu-toggle { display: none; }

  .site-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: static;
    max-height: none;
    overflow: visible;
    padding: 0;
    background: none;
    border: 0;
  }

  .site-nav ul { display: flex; gap: 1.1rem; }
  .site-nav ul a { position: relative; padding: 0.4rem 0; font-size: 1.1rem; white-space: nowrap; border: 0; }
  .site-nav ul a[aria-current="page"]::before { content: none; }

  .site-nav ul a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--c-rust);
    transform: scaleX(0);
    transition: transform 0.2s;
  }

  .site-nav ul a:hover::after,
  .site-nav ul a[aria-current="page"]::after { transform: scaleX(1); }

  .site-nav .lang-switch { margin: 0; }
}

/* ---------- Подвал ---------- */

.site-footer {
  margin-top: 3rem;
  padding: 3rem 0 1.5rem;
  border-top: 1px solid var(--c-border);
  background: linear-gradient(180deg, var(--c-bg-2), #080706);
}

.footer__inner {
  display: grid;
  gap: 2rem;
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

@media (min-width: 800px) {
  .footer__inner { grid-template-columns: 1.2fr 2fr 1fr; }
}

.footer__tagline { margin-top: 0.75rem; font-style: italic; color: var(--c-muted); }

.footer__title {
  margin-bottom: 0.75rem;
  font-size: 1.05rem;
  letter-spacing: 0.15em;
  color: var(--c-gold);
}

.footer__list { display: grid; gap: 0.35rem; margin: 0; padding: 0; list-style: none; }
.footer__list--cols { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.5rem; }
.footer__list a { color: var(--c-text); text-decoration: none; }
.footer__list a:hover { color: var(--c-gold-light); text-decoration: underline; }

.footer__copy {
  width: min(100% - 2rem, var(--container));
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  font-size: 0.9rem;
  text-align: center;
  color: var(--c-muted);
  border-top: 1px solid rgb(74 58 36 / 0.5);
}

/* ---------- Заголовки страниц ---------- */

.page-head { padding-top: 3.5rem; text-align: center; }

.page-head h1 {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 4rem);
  color: transparent;
  background: linear-gradient(180deg, var(--c-gold-light), var(--c-gold) 60%, var(--c-gold-dim));
  -webkit-background-clip: text;
  background-clip: text;
}

.page-head__lead {
  max-width: 40rem;
  margin: 0 auto;
  font-size: 1.15rem;
  font-style: italic;
  color: var(--c-muted);
}

.section__title { margin: 0; font-size: clamp(1.9rem, 5vw, 2.75rem); text-align: center; }

/* ---------- Главная ---------- */

.hero {
  display: grid;
  place-items: center;
  min-height: min(88vh, 52rem);
  padding: 4rem 1rem;
  text-align: center;
  border-bottom: 1px solid var(--c-border);
  background:
    linear-gradient(180deg, rgb(14 12 10 / 0.25), rgb(14 12 10 / 0.55) 60%, var(--c-bg)),
    url("/assets/img/hero.svg") center 30% / cover no-repeat;
}

.hero__content { max-width: 46rem; }

.eyebrow {
  margin: 0;
  font: 700 1rem/1.2 var(--font-head);
  letter-spacing: 0.3em;
  color: var(--c-rust);
}

.hero__title {
  margin: 0.15em 0 0.25em;
  font: 400 clamp(3.75rem, 15vw, 8rem)/0.95 var(--font-logo);
  letter-spacing: 0.01em;
  color: var(--c-gold-light);
  text-shadow: 0 0 2rem rgb(201 162 79 / 0.35), 0 0.25rem 0 #000;
}

.hero__lead {
  max-width: 38rem;
  margin: 0 auto 2rem;
  font-size: clamp(1.1rem, 2.6vw, 1.35rem);
  color: var(--c-parchment);
  text-shadow: 0 1px 2px #000;
}

.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card { display: flex; flex-direction: column; padding: 1.25rem 1.25rem 1.5rem; }
/* Арты разных пропорций (портреты 4:5, иконки 1:1) вписываются целиком в одинаковую высоту */
.card img { width: 100%; height: 16rem; object-fit: contain; margin-bottom: 1.25rem; }
.card h3 { font-size: 1.6rem; }
.card p { flex: 1; color: var(--c-muted); }

/* ---------- Об игре: хроника на пергаменте ---------- */

.chronicle {
  max-width: 48rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 6vw, 3.5rem);
  color: var(--c-ink);
  border: 1px solid var(--c-gold-dim);
  background: radial-gradient(ellipse at center, #efe3c4, var(--c-parchment) 55%, #c9b48a);
  box-shadow: var(--shadow), inset 0 0 3rem rgb(90 60 20 / 0.45);
}

.chronicle h2 { font-size: clamp(1.6rem, 4.5vw, 2.1rem); color: #5a1a12; }

.chapter p { margin: 0; }
.chapter p::first-letter {
  float: left;
  margin: 0.05em 0.12em 0 0;
  font: 700 3.4em/0.8 var(--font-head);
  color: var(--c-blood);
}

.chapter + .chapter {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgb(90 60 20 / 0.3);
}

/* ---------- Карусель (расы, классы) ---------- */

.carousel__picker {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.carousel__pick {
  padding: 0.5rem 1rem;
  font: 600 1.05rem/1.2 var(--font-head);
  color: var(--c-muted);
  background: var(--c-bg-2);
  border: 1px solid var(--c-border);
  cursor: pointer;
}

.carousel__pick:hover { color: var(--c-gold-light); border-color: var(--c-gold-dim); }

.carousel__pick[aria-current="true"] {
  color: var(--c-bg);
  background: var(--c-gold);
  border-color: var(--c-gold-light);
}

.carousel__viewport { overflow: hidden; }
.carousel__track { display: flex; transition: transform 0.5s ease; }
.carousel__slide { flex: 0 0 100%; min-width: 0; }
.carousel__slide .frame { height: 100%; box-shadow: none; }

.carousel__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.carousel__arrow {
  width: 3rem;
  height: 3rem;
  font-size: 2rem;
  line-height: 1;
  color: var(--c-gold-light);
  background: var(--c-bg-2);
  border: 1px solid var(--c-gold-dim);
  cursor: pointer;
}

.carousel__arrow:hover { background: var(--c-surface-2); }

.carousel__count { min-width: 4ch; font: 600 1.15rem var(--font-head); text-align: center; color: var(--c-muted); }

.profile { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; padding: 1.5rem; }
.profile__art { width: 100%; max-width: 22rem; margin: 0 auto; border: 1px solid var(--c-border); }
.profile__name { margin-bottom: 0.15em; font-size: clamp(2rem, 5vw, 2.75rem); }
.profile__tagline { font-size: 1.15rem; font-style: italic; color: var(--c-rust); }
.profile h3 { margin-top: 1.25rem; font-size: 1.4rem; color: var(--c-gold); }

@media (min-width: 800px) {
  .profile {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    align-items: start;
    gap: 2.5rem;
    padding: 2.25rem;
  }
}

.stats { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0.5rem 0 1.25rem; }
.stats div { padding: 0.5rem 0.9rem; border: 1px solid var(--c-border); background: var(--c-bg); }
.stats dt { font: 700 0.95rem/1 var(--font-head); letter-spacing: 0.12em; color: var(--c-muted); }
.stats dd { margin: 0.3rem 0 0; color: var(--c-parchment); }

/* ---------- Крафт ---------- */

.craft-nav {
  padding: 0.75rem 0;
  border-block: 1px solid var(--c-border);
  background: rgb(14 12 10 / 0.95);
}

.craft-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-block: 0;
  padding: 0;
  list-style: none;
}

.craft-nav a {
  display: block;
  padding: 0.45rem 1rem;
  font: 600 1.1rem/1.2 var(--font-head);
  color: var(--c-text);
  text-decoration: none;
  background: var(--c-bg-2);
  border: 1px solid var(--c-border);
}

.craft-nav a:hover { color: var(--c-gold-light); border-color: var(--c-gold-dim); }

.craft-list { display: grid; gap: 2rem; }

.craft { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; padding: 1.75rem 1.5rem; }
.craft__icon { width: 8rem; margin-inline: auto; }
.craft__tagline { font-size: 1.15rem; font-style: italic; color: var(--c-rust); }
.craft h2 { font-size: clamp(1.8rem, 4.5vw, 2.4rem); margin-bottom: 0.15em; }
.craft h3 { font-size: 1.35rem; color: var(--c-gold); }

@media (min-width: 800px) {
  /* Липкие вкладки только на широких экранах: на телефоне они заняли бы пол-экрана */
  .craft-nav { position: sticky; top: var(--header-h); z-index: 5; }
  .craft { grid-template-columns: 10rem minmax(0, 1fr); gap: 2.5rem; padding: 2.25rem; scroll-margin-top: 4.5rem; }
  .craft__icon { width: 10rem; }
}

/* ---------- Дорожная карта ---------- */

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.75rem;
  margin: 0 0 2.5rem;
  padding: 0;
  list-style: none;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font: 700 1rem/1.2 var(--font-head);
  letter-spacing: 0.08em;
}

/* Общий значок статуса: ромб (заполнен / наполовину / контур) */
.status::before,
.item::before {
  content: "";
  flex: none;
  width: 0.7rem;
  height: 0.7rem;
  border: 2px solid currentColor;
  transform: rotate(45deg);
}

.status--done,
.item--done::before { color: var(--c-gold); }
.status--progress,
.item--progress::before { color: var(--c-rust); }
.status--planned,
.item--planned::before { color: var(--c-muted); }

.status--done::before,
.item--done::before { background: currentColor; }
.status--progress::before,
.item--progress::before { background: linear-gradient(90deg, currentColor 50%, transparent 50%); }

.roadmap { position: relative; max-width: 62rem; margin: 0 auto; padding: 0; list-style: none; }

.roadmap::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 1rem;
  width: 2px;
  background: linear-gradient(var(--c-gold), var(--c-border));
}

.stage { position: relative; padding-left: 3rem; margin-bottom: 2rem; }
.stage:last-child { margin-bottom: 0; }

.stage__marker {
  position: absolute;
  top: 1.75rem;
  left: calc(1rem + 1px - 0.7rem);
  width: 1.4rem;
  height: 1.4rem;
  border: 2px solid var(--c-muted);
  background: var(--c-bg);
  transform: rotate(45deg);
}

.stage--done .stage__marker { border-color: var(--c-gold); background: var(--c-gold); }

.stage--progress .stage__marker {
  border-color: var(--c-rust);
  background: var(--c-rust);
  animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
  from { box-shadow: 0 0 0 0 rgb(207 109 66 / 0.6); }
  to { box-shadow: 0 0 0 0.8rem rgb(207 109 66 / 0); }
}

.stage__card { padding: 1.5rem 1.5rem 1.75rem; }
.stage--progress .stage__card { border-color: rgb(207 109 66 / 0.6); }
.stage--planned .stage__card { border-style: dashed; }

.stage__period { margin-bottom: 0.4rem; font: 700 1rem/1.2 var(--font-head); letter-spacing: 0.12em; color: var(--c-muted); }
.stage__title { margin-bottom: 0.3rem; font-size: clamp(1.6rem, 4vw, 2.1rem); }

.stage__items { display: grid; gap: 0.55rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.item { display: flex; align-items: baseline; gap: 0.75rem; }
.item::before { width: 0.55rem; height: 0.55rem; transform: translateY(-0.1em) rotate(45deg); }
.item--planned { color: var(--c-muted); }

@media (min-width: 900px) {
  .roadmap::before { left: calc(50% - 1px); }
  .stage { width: 50%; padding: 0 3rem 0 0; }
  .stage:nth-child(even) { margin-left: 50%; padding: 0 0 0 3rem; }
  .stage__marker { left: auto; right: -0.7rem; }
  .stage:nth-child(even) .stage__marker { right: auto; left: -0.7rem; }
}

/* ---------- FAQ ---------- */

.faq { display: grid; gap: 1rem; max-width: 48rem; margin: 0 auto; }

.faq__item { border: 1px solid var(--c-border); background: var(--c-surface); }
.faq__item[open] { border-color: var(--c-gold-dim); }

.faq__item summary {
  position: relative;
  padding: 1.1rem 3.25rem 1.1rem 1.25rem;
  font: 700 1.3rem/1.3 var(--font-head);
  color: var(--c-gold-light);
  list-style: none;
  cursor: pointer;
}

.faq__item summary::-webkit-details-marker { display: none; }

.faq__item summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 1.25rem;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--c-rust);
  transform: translateY(-50%);
  transition: transform 0.2s;
}

.faq__item[open] summary::after { transform: translateY(-50%) rotate(45deg); }

.faq__answer { margin: 0; padding: 0 1.25rem 1.25rem; }

/* ---------- Галерея ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gallery__thumb {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  font: inherit;
  color: inherit;
  text-align: left;
  background: var(--c-bg-2);
  border: 1px solid var(--c-border);
  cursor: zoom-in;
}

.gallery__thumb:hover { border-color: var(--c-gold-dim); }
.gallery__thumb img { width: 100%; aspect-ratio: 8 / 5; object-fit: cover; transition: transform 0.4s; }
.gallery__thumb:hover img,
.gallery__thumb:focus-visible img { transform: scale(1.04); }

.gallery__caption {
  position: relative;
  display: block;
  padding: 0.75rem 1rem;
  font: 600 1.2rem/1.3 var(--font-head);
  color: var(--c-gold-light);
  background: var(--c-bg-2);
  border-top: 1px solid var(--c-border);
}

.lightbox {
  width: min(64rem, 100% - 2rem);
  max-width: none;
  padding: 0;
  color: var(--c-text);
  background: var(--c-bg);
  border: 1px solid var(--c-gold-dim);
  box-shadow: var(--shadow);
}

.lightbox::backdrop { background: rgb(5 4 3 / 0.88); }
.lightbox img { width: 100%; max-height: 80vh; object-fit: contain; }
.lightbox__caption { margin: 0; padding: 0.85rem 1.25rem; font: 600 1.3rem/1.3 var(--font-head); color: var(--c-gold-light); }

.lightbox__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--c-gold-light);
  background: rgb(14 12 10 / 0.85);
  border: 1px solid var(--c-gold-dim);
  cursor: pointer;
}

/* ---------- Контакты ---------- */

.contacts { display: grid; gap: 3rem; }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  height: 100%;
  padding: 1.5rem;
  color: var(--c-text);
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}

a.contact-card:hover { color: var(--c-text); border-color: var(--c-gold-dim); transform: translateY(-3px); }

.contact-card__name {
  font: 700 1.5rem/1.2 var(--font-head);
  color: var(--c-gold-light);
  overflow-wrap: anywhere;
}

.contact-card__desc { color: var(--c-muted); }

/* ---------- 404 ---------- */

.notfound { padding-block: 4rem; text-align: center; }
.notfound__emblem { margin: 0 auto; }

.notfound__code {
  margin: 0.5rem 0 0;
  font: 400 clamp(6rem, 26vw, 11rem)/1 var(--font-logo);
  color: #c4542f; /* контраст с фоном ≥ 3:1 */
  text-shadow: 0 0 2rem rgb(142 28 28 / 0.6);
}

.notfound h1 { font-size: clamp(1.9rem, 5vw, 2.75rem); }
.notfound__text { max-width: 32rem; margin: 0 auto 2rem; color: var(--c-muted); }

/* ---------- Плавность и уменьшение движения ---------- */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
