@charset "utf-8";

:root {
  --bg: #f7f4ec;
  --surface: #fffdf9;
  --ink: #2b2722;
  --muted: #6d6459;
  --line: #e2dbcc;
  --accent: #3d6b48;
  --accent-2: #8a6a3b;
  --soft: #eaf1e7;
  --shadow: 0 1px 2px rgba(43, 39, 34, .05), 0 8px 24px rgba(43, 39, 34, .06);
  --radius: 14px;
  --serif: Georgia, "Noto Serif", "Liberation Serif", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17181a;
    --surface: #1f2124;
    --ink: #e8e4dc;
    --muted: #a09889;
    --line: #33363b;
    --accent: #83b78c;
    --accent-2: #c9a26a;
    --soft: #232829;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.68 var(--serif);
}

img, svg { max-width: 100%; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ink); }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header .inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.brand {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.brand .mark {
  width: 26px;
  height: 26px;
  flex: none;
  color: var(--accent);
}

.nav {
  margin-left: auto;
  display: flex;
  gap: 20px;
  font-family: var(--sans);
  font-size: 14.5px;
}

.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); }

/* ---------- Каркас ---------- */

.wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 34px 22px 60px;
}

.wrap.wide { max-width: 1000px; }

.crumbs {
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 22px;
}

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

/* ---------- Типографика ---------- */

h1 {
  font-size: 2.05rem;
  line-height: 1.2;
  margin: 0 0 6px;
  letter-spacing: -.01em;
}

.latin {
  font-style: italic;
  color: var(--muted);
  font-size: 1.02rem;
  margin: 0 0 22px;
}

h2 {
  font-size: 1.32rem;
  line-height: 1.3;
  margin: 38px 0 12px;
  padding-top: 4px;
}

h3 {
  font-size: 1.08rem;
  margin: 28px 0 8px;
}

p { margin: 0 0 17px; }

.lead {
  font-size: 1.12rem;
  color: var(--ink);
  border-left: 3px solid var(--accent);
  padding-left: 18px;
  margin-bottom: 28px;
}

ul, ol { margin: 0 0 17px; padding-left: 24px; }
li { margin-bottom: 7px; }

blockquote {
  margin: 26px 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--line);
  color: var(--muted);
  font-style: italic;
}

.note {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: .96rem;
  margin: 26px 0;
}

.note strong { color: var(--accent); }

/* ---------- Иллюстрации ---------- */

figure { margin: 0 0 26px; }

.hero {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero svg { display: block; width: 100%; height: auto; }

figcaption {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  padding: 11px 18px;
  border-top: 1px solid var(--line);
}

/* ---------- Карточка вида ---------- */

.facts {
  display: grid;
  grid-template-columns: minmax(120px, 34%) 1fr;
  gap: 0;
  margin: 0 0 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  font-size: .95rem;
}

.facts dt {
  padding: 11px 18px;
  font-family: var(--sans);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--soft) 60%, transparent);
}

.facts dd {
  margin: 0;
  padding: 11px 18px;
  border-bottom: 1px solid var(--line);
}

.facts dt:last-of-type, .facts dd:last-of-type { border-bottom: 0; }

/* ---------- Сетка карточек ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin: 30px 0 10px;
  padding: 0;
  list-style: none;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}

.card:hover { transform: translateY(-3px); box-shadow: 0 4px 8px rgba(43, 39, 34, .07), 0 14px 32px rgba(43, 39, 34, .1); }

.card .thumb { display: block; width: 100%; height: auto; border-bottom: 1px solid var(--line); }

.card .body { padding: 16px 18px 20px; flex: 1; display: flex; flex-direction: column; }

.card h3 { margin: 0 0 3px; font-size: 1.09rem; }
.card h3 a { text-decoration: none; color: var(--ink); }
.card h3 a:hover { color: var(--accent); }

.card .sub { font-style: italic; color: var(--muted); font-size: .88rem; margin: 0 0 10px; }
.card p { font-size: .94rem; margin: 0 0 14px; color: var(--muted); }

.card .where {
  margin-top: auto;
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--accent-2);
}

/* ---------- Пагинация ---------- */

.pager {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-top: 46px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 14px;
}

.pager a {
  text-decoration: none;
  color: var(--muted);
  max-width: 47%;
}

.pager a:hover { color: var(--accent); }
.pager .dir { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--accent-2); margin-bottom: 2px; }
.pager .next { text-align: right; margin-left: auto; }

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

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--muted);
}

.site-footer .inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 26px 22px 34px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: space-between;
}

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

@media (max-width: 560px) {
  body { font-size: 16px; }
  h1 { font-size: 1.7rem; }
  .facts { grid-template-columns: 1fr; }
  .facts dt { border-bottom: 0; padding-bottom: 2px; }
  .nav { gap: 14px; }
}
