/* Константы */
:root {
  --ink: #1d1814;
  --lacquer: #6f1515;
  --seal: #b3261e;
  --gold: #c9a24b;
  --paper: #f4ecd8;
  --silk: #fffaf0;
  --jade: #4d6b57;
  --font: 'Noto Serif', 'PT Serif', Georgia, serif;
  --font-brush: 'Ma Shan Zheng', 'KaiTi', 'STKaiti', cursive;
}

/* Сброс */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
}

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

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

/* Типографика */
h1,
h2,
h3 {
  margin: 0 0 .5em;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: .03em;
}

h1 {
  font-size: clamp(2rem, 6vw, 3.2rem);
}

h2 {
  font-size: clamp(1.8rem, 4.5vw, 3rem);
}

h3 {
  font-size: 1.3rem;
}

p {
  margin: 0 0 1em;
}

.han {
  font-family: var(--font-brush);
  font-weight: 400;
}

/* Кнопки */
.btn {
  display: inline-block;
  padding: .85em 1.9em;
  cursor: pointer;
  font: 700 1rem/1.2 var(--font);
  letter-spacing: .04em;
  text-decoration: none;
  color: var(--paper);
  background: var(--seal);
  border: 2px solid var(--gold);
  border-radius: 2px;
  box-shadow: 0 0 0 3px var(--seal);
  transition: background .2s, transform .2s;
}

.btn:hover {
  background: var(--lacquer);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  box-shadow: 0 0 0 3px transparent;
}

.btn--ghost:hover {
  background: rgba(201, 162, 75, .25);
}

/* Шапка и подвал подстраниц */
.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .6rem 1.5rem;
  padding: .7rem clamp(1rem, 5vw, 3rem);
  color: var(--paper);
  background: var(--lacquer);
  border-bottom: 3px double var(--gold);
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-decoration: none;
}

.topbar__brand img {
  width: 44px;
  height: 44px;
}

.topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.5rem;
}

.topbar nav a {
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.topbar nav a:hover {
  border-color: var(--gold);
}

.container {
  width: min(100% - 2rem, 52rem);
  margin: 2.5rem auto;
}

.footer {
  margin-top: 3rem;
  padding: 2rem 1rem;
  text-align: center;
  font-size: .9rem;
  color: #6b5d4a;
  border-top: 1px solid #dccfae;
}

/* 6. Доступность */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}