/* =========================================================
   KAZIMIR — SECRET ARCHIVE · стили сайта
   Простая версия: только HTML и CSS, без JavaScript.

   Содержание:
   1.  Переменные
   2.  Общие настройки
   3.  Шапка и меню
   4.  Кнопки
   5.  Обложка
   6.  Секции
   7.  Case file
   8.  Type analysis
   9.  Specimens
   10. Evidence gallery
   11. Заключение
   12. Подвал
   13. Адаптив
   ========================================================= */


/* ---------- 1. ПЕРЕМЕННЫЕ ---------- */
:root {
  --black: #171918;   /* Archive Black */
  --paper: #E9E4D9;   /* Evidence Paper */
  --red:   #B83235;   /* Evidence Red */
  --green: #35483D;   /* Case Green */
  --grey:  #8D8B83;   /* подписи на тёмном фоне */
  --ink:   #5A5852;   /* подписи на светлом фоне */
  --line:  #2E302F;   /* тонкие линии на тёмном фоне */

  /* Kazimir первым: если он установлен на компьютере, браузер его возьмёт */
  --serif: "Kazimir", "Old Standard TT", Georgia, serif;
  --sans:  "Inter", Arial, sans-serif;

  --side: 64px;       /* поля слева и справа */
}


/* ---------- 2. ОБЩИЕ НАСТРОЙКИ ---------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--black);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.5;
}

a {
  color: inherit;
}


/* ---------- 3. ШАПКА И МЕНЮ ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 18px var(--side);
  background: var(--black);
  border-bottom: 1px solid var(--line);
}

.site-header__logo {
  flex-shrink: 0;
  font-family: var(--serif);
  font-size: 24px;
  text-decoration: none;
  white-space: nowrap;
}

.site-header__logo-red {
  color: var(--red);
}

.site-header__menu {
  display: flex;
  gap: 28px;
}

.menu-link {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}

.menu-link:hover {
  border-bottom-color: var(--red);
}

.menu-link--red {
  color: var(--red);
}


/* ---------- 4. КНОПКИ ----------
   При наведении кнопка заливается красным. */
.button {
  display: inline-block;
  padding: 14px 26px;
  border: 2px solid var(--red);
  color: var(--paper);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease;
}

.button:hover {
  background: var(--red);
  color: var(--paper);
}

.button--ghost {
  border-color: var(--grey);
}

.button--dark {
  color: var(--black);
}


/* ---------- 5. ОБЛОЖКА ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 56px var(--side) 72px;
}

.hero__label {
  color: var(--grey);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero__title {
  margin-top: 24px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(72px, 18vw, 320px);
  line-height: 0.85;
  white-space: nowrap;
}

.hero__stamp {
  display: inline-block;
  margin-top: 24px;
  padding: 8px 18px;
  border: 3px solid var(--red);
  color: var(--red);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transform: rotate(-4deg);
}

.hero__bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  margin-top: 40px;
}

.hero__subtitle {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(28px, 3.6vw, 56px);
  line-height: 1.1;
}

.case-card {
  width: 360px;
  flex-shrink: 0;
  border-top: 1px solid var(--grey);
}

.case-card__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.case-card__row span {
  color: var(--grey);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 40px;
}

.hero__note {
  margin-top: 20px;
  color: var(--grey);
  font-size: 13px;
}


/* ---------- 6. СЕКЦИИ ---------- */
.section {
  padding: 96px var(--side);
  scroll-margin-top: 70px;   /* шапка не закрывает заголовок */
}

.section--paper {
  background: var(--paper);
  color: var(--black);
}

.section--dark {
  background: var(--black);
  color: var(--paper);
}

.section-head {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 48px;
}

.section-head__code {
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.section-head__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 5vw, 80px);
  line-height: 1;
}


/* ---------- 7. CASE FILE ---------- */
.folder__tab {
  display: inline-block;
  padding: 10px 24px;
  background: var(--green);
  color: var(--paper);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.folder__inside {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  padding: 32px;
  background: var(--green);
}

.paper-sheet {
  padding: 32px;
  background: var(--paper);
}

.paper-sheet__name {
  font-family: var(--serif);
  font-size: clamp(48px, 5vw, 80px);
  line-height: 1;
}

.facts {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px 20px;
  margin: 24px 0 28px;
  font-size: 16px;
}

.facts dt {
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding-top: 3px;
}

.source {
  color: var(--paper);
  align-self: center;
}

.source__year {
  font-family: var(--serif);
  font-size: clamp(80px, 9vw, 150px);
  line-height: 0.9;
}

.source__text {
  margin-top: 16px;
  font-size: 16px;
}


/* ---------- 8. TYPE ANALYSIS ---------- */
.exhibits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.exhibit {
  border-top: 1px solid var(--grey);
  padding-top: 20px;
}

.exhibit__index {
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.exhibit__glyph {
  margin: 12px 0;
  font-family: var(--serif);
  font-size: clamp(140px, 15vw, 240px);
  line-height: 1;
}

.exhibit__glyph--red {
  color: var(--red);
}

.exhibit__text {
  color: var(--grey);
  font-size: 16px;
}


/* ---------- 9. SPECIMENS ---------- */
.alphabet {
  display: grid;
  grid-template-columns: repeat(11, 1fr);   /* 33 буквы = 3 ряда по 11 */
  border-top: 1px solid var(--black);
  border-left: 1px solid var(--black);
}

.glyph-cell {
  display: flex;
  justify-content: center;
  align-items: center;
  aspect-ratio: 1 / 1.1;
  border-right: 1px solid var(--black);
  border-bottom: 1px solid var(--black);
  font-family: var(--serif);
  font-size: clamp(28px, 3.6vw, 56px);
}

.glyph-cell--marked {
  box-shadow: inset 0 0 0 3px var(--red);
}

.specimen-line {
  margin-top: 40px;
  font-family: var(--serif);
  font-size: clamp(26px, 4.4vw, 60px);
  letter-spacing: 0.06em;
  overflow-wrap: anywhere;
}

.specimen-line--grey {
  margin-top: 8px;
  color: var(--ink);
}

.specimen-caption {
  margin-top: 24px;
  color: var(--ink);
  font-size: 14px;
}


/* ---------- 10. EVIDENCE GALLERY ---------- */
.series-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

/* Ярлыки серий, как закладки на папках */
.series-tabs__link {
  padding: 10px 16px 8px;
  background: var(--green);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 6px 6px 0 0;
  transition: background 0.2s ease, transform 0.2s ease;
}

.series-tabs__link:hover,
.series-tabs__link:focus-visible {
  background: var(--red);
  transform: translateY(-4px);
}

.series {
  padding-top: 56px;
  scroll-margin-top: 70px;
}

.series__title {
  margin-bottom: 20px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 3.4vw, 48px);
}

.series__title span {
  color: var(--red);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.16em;
  vertical-align: middle;
}

/* Ряд из пяти улик */
.evidence-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

/* Карточка улики. Это <figure>, а не ссылка: по клику ничего не открывается. */
.evidence {
  position: relative;
}

.evidence__image {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;          /* формат постеров 900 × 1200 */
  pointer-events: none;
  background: #222;
  transition: transform 0.4s ease;
}

/* Красная рамка анализа при наведении */
.evidence::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  aspect-ratio: 3 / 4;
  border: 3px solid var(--red);
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.evidence:hover::after {
  opacity: 1;
  transform: scale(1);
}

.evidence:hover .evidence__image {
  transform: rotate(-1deg);
}

.evidence__number {
  display: block;
  margin-top: 12px;
  color: var(--red);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.evidence__title {
  display: block;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.2;
}


/* ---------- 11. ЗАКЛЮЧЕНИЕ ---------- */
.stamp-small {
  margin-left: auto;
  padding: 6px 16px;
  border: 3px solid var(--red);
  color: var(--red);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transform: rotate(-4deg);
}

.conclusions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  list-style: none;
  counter-reset: item;
}

.conclusions li {
  counter-increment: item;
  border-top: 2px solid var(--black);
  padding-top: 16px;
  font-size: 17px;
}

.conclusions li::before {
  content: "0" counter(item);
  display: block;
  margin-bottom: 10px;
  color: var(--red);
  font-family: var(--serif);
  font-size: 48px;
  line-height: 1;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 64px;
}

.section--paper .button:hover {
  color: var(--paper);
}


/* ---------- 12. ПОДВАЛ ---------- */
.site-footer {
  display: grid;
  grid-template-columns: auto 1fr 1.6fr;
  align-items: end;
  gap: 48px;
  padding: 56px var(--side) 48px;
  border-top: 1px solid var(--line);
  color: var(--grey);
  font-size: 14px;
}

.site-footer__big {
  font-family: var(--serif);
  font-size: clamp(56px, 7vw, 100px);
  line-height: 0.8;
  color: var(--paper);
}

.site-footer__label {
  margin-bottom: 6px;
  color: var(--red);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-footer a:hover {
  color: var(--paper);
}


/* ---------- 13. АДАПТИВ ---------- */

/* Планшет */
@media (max-width: 1100px) {
  :root {
    --side: 40px;
  }

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

  .conclusions {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Улики листаются вбок пальцем */
  .evidence-row {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 12px;
  }

  .evidence {
    flex: 0 0 240px;
    scroll-snap-align: start;
  }
}

/* Телефон */
@media (max-width: 720px) {
  :root {
    --side: 20px;
  }

  body {
    font-size: 16px;
  }

  .site-header__menu {
    min-width: 0;
    gap: 20px;
    overflow-x: auto;      /* меню листается вбок */
    padding: 6px 0;
  }

  .hero__bottom {
    flex-direction: column;
    align-items: stretch;
  }

  .case-card {
    width: 100%;
  }

  .section {
    padding-top: 72px;
    padding-bottom: 72px;
  }

  .section-head {
    flex-wrap: wrap;
    gap: 12px;
  }

  .stamp-small {
    margin-left: 0;
  }

  .folder__inside,
  .paper-sheet {
    padding: 20px;
  }

  .facts {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .facts dd {
    margin-bottom: 10px;
  }

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

  .alphabet {
    grid-template-columns: repeat(6, 1fr);
  }

  .evidence {
    flex-basis: 70%;
  }

  .conclusions,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .site-footer {
    gap: 24px;
  }
}

/* Если анимации выключены в системе */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
