/* Справочник построек и архив «Вестника союза».
   Палитра та же, что на лендинге (index.html) — сайт должен читаться как одно
   целое. Разница одна: читать длинный текст на тёмном тяжело, поэтому тело
   страницы бумажное, а тёмными остаются только шапка и подвал. Тот же приём
   игра использует в наградной газете. */

@font-face {
    font-family: 'Russo One';
    src: url('/assets/RussoOne-Regular.ttf') format('truetype');
    font-weight: 400;
    font-display: swap;
}

:root {
    --bg:         rgb(20, 18, 14);
    --border:     rgba(217, 199, 153, 0.14);
    --text:       rgb(250, 240, 214);
    --text-dim:   rgb(217, 199, 153);
    --red:        rgb(158, 26, 26);
    --red-bright: rgb(190, 38, 38);
    --paper:      rgb(228, 219, 199);
    --paper-edge: rgb(206, 195, 172);
    --ink:        rgb(28, 25, 20);
    --ink-dim:    rgb(96, 87, 71);
    --radius:     6px;
    --maxw:       820px;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.wrap {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px;
}

/* ─── Шапка ──────────────────────────────────────────────────────────── */

.top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 24px;
}

.top__home img { display: block; height: 34px; width: auto; }

.top__nav {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 15px;
}

.top__nav a { color: var(--text-dim); text-decoration: none; }
.top__nav a:hover { color: var(--text); }

.top__play {
    padding: 6px 16px;
    border-radius: var(--radius);
    background: var(--red);
    color: var(--text) !important;
}

.top__play:hover { background: var(--red-bright); }

/* ─── Полоса документа ───────────────────────────────────────────────── */

.doc {
    background: var(--paper);
    border-top: 1px solid var(--paper-edge);
    border-bottom: 1px solid var(--paper-edge);
    padding: 36px 0 56px;
}

.crumbs {
    font-size: 14px;
    color: var(--ink-dim);
    margin-bottom: 20px;
}

.crumbs a { color: var(--ink-dim); }

h1 {
    font-family: 'Russo One', Impact, sans-serif;
    font-size: clamp(30px, 5vw, 44px);
    line-height: 1.1;
    margin: 0 0 14px;
    letter-spacing: 0.01em;
}

h2 {
    font-family: 'Russo One', Impact, sans-serif;
    font-size: clamp(21px, 3vw, 26px);
    margin: 36px 0 12px;
}

p { margin: 0 0 14px; }

a { color: var(--red); }
a:hover { color: var(--red-bright); }

.lead {
    font-size: 20px;
    line-height: 1.5;
    color: rgb(60, 54, 44);
    margin-bottom: 22px;
}

/* ─── Карточка постройки ─────────────────────────────────────────────── */

/* Подложка тёмная НАМЕРЕННО. Иконки построек — это игровые рендеры, снятые
   под тёмный интерфейс: дома на них светлые, и на бумажном фоне страницы
   они буквально исчезали. Тёмная плашка заодно честно показывает, как
   карточка выглядит в самой игре. */
.shot {
    margin: 0 0 24px;
    padding: 20px;
    background: var(--bg);
    border: 1px solid rgba(0, 0, 0, 0.25);
    border-radius: var(--radius);
    text-align: center;
}

.shot img { max-width: 100%; height: auto; }

.shot figcaption {
    margin-top: 12px;
    font-size: 14px;
    color: var(--text-dim);
}

.stats {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 20px;
    font-size: 16px;
}

.stats th,
.stats td {
    text-align: left;
    padding: 9px 12px;
    border-bottom: 1px solid var(--paper-edge);
}

.stats th {
    width: 45%;
    font-weight: 600;
    color: var(--ink-dim);
}

.stats tr:last-child th,
.stats tr:last-child td { border-bottom: none; }

.tips, .siblings { margin: 0 0 14px; padding-left: 22px; }
.tips li, .siblings li { margin-bottom: 8px; }

/* ─── Плитка справочника ─────────────────────────────────────────────── */

.cards {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.card a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    height: 100%;
    padding: 14px 10px;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid var(--paper-edge);
    border-radius: var(--radius);
    color: var(--ink);
    text-decoration: none;
    text-align: center;
}

.card a:hover {
    background: rgba(255, 255, 255, 0.75);
    border-color: var(--ink-dim);
}

/* Тот же случай, что и у .shot: светлый рендер на светлой карточке не читается,
   поэтому иконке даём собственную тёмную плитку. */
.card img {
    width: 96px;
    height: 96px;
    object-fit: contain;
    padding: 6px;
    background: var(--bg);
    border-radius: var(--radius);
}
.card__name { font-weight: 600; line-height: 1.25; }
.card__cost { font-size: 14px; color: var(--ink-dim); }

/* ─── Выпуски вестника ───────────────────────────────────────────────── */

.issues { list-style: none; margin: 0; padding: 0; }

.issue {
    padding: 16px 0;
    border-bottom: 1px solid var(--paper-edge);
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.issue:last-child { border-bottom: none; }

.issue img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius);
    flex: none;
}

.issue__date { font-size: 14px; color: var(--ink-dim); }
.issue__head { font-weight: 600; margin: 0 0 4px; }
.issue__head a { text-decoration: none; }

.photo {
    margin: 0 0 22px;
    padding: 0;
}

.photo img {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    border: 1px solid var(--paper-edge);
}

.photo figcaption {
    margin-top: 8px;
    font-size: 14px;
    color: var(--ink-dim);
}

.rubric {
    display: inline-block;
    margin-bottom: 10px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--red);
    color: var(--paper);
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.nextprev {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 28px;
    font-size: 15px;
}

/* ─── Кнопка и подвал ────────────────────────────────────────────────── */

.cta { margin-top: 34px; }

.btn {
    display: inline-block;
    padding: 13px 30px;
    border-radius: var(--radius);
    background: var(--red);
    color: var(--text);
    font-family: 'Russo One', Impact, sans-serif;
    font-size: 18px;
    text-decoration: none;
}

.btn:hover { background: var(--red-bright); color: var(--text); }

.foot {
    padding: 26px 0 34px;
    color: rgb(166, 158, 140);
    font-size: 15px;
    text-align: center;
}

.foot a { color: var(--text-dim); }

/* Юридическая строка подвала (продавец, оферта, политика): требование
   Робокассы к сайту продавца, стоит на каждой странице. */
.foot .legal { font-size: 13px; margin-top: 10px; }

@media (max-width: 640px) {
    body { font-size: 16px; }
    .lead { font-size: 18px; }
    .doc { padding: 24px 0 40px; }
    .issue img { width: 84px; height: 60px; }
}
