/* ARBOR — базовая типографика и сетка */
:root {
  --ink: #1d2a23;
  --muted: #5c6b61;
  --line: #d9ded7;
  --paper: #f6f5ef;
  --card: #ffffff;
  --green: #2e5b45;
  --green-2: #3d7257;
  --sand: #e9e3d3;
  --accent: #8a6a3b;
  --danger: #8c2f2f;
  --max: 1080px;
  --radius: 6px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-2); text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2rem, 4.2vw, 3rem); }
h2 { font-size: clamp(1.45rem, 2.6vw, 2rem); }
h3 { font-size: 1.18rem; }
h4 { font-size: 1rem; }

p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
li { margin: 0.3em 0; }

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

.skip { position: absolute; left: -9999px; }

/* Шапка */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
}
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: Georgia, serif; font-size: 1.18rem; letter-spacing: 0.12em; }
.brand-text small { color: var(--muted); font-size: 0.68rem; letter-spacing: 0.04em; text-transform: uppercase; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 0.86rem; }
.nav a { color: var(--ink); white-space: nowrap; }
.nav a:hover { color: var(--green); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--green); border-bottom: 2px solid var(--green); padding-bottom: 2px; }
.nav .nav-login {
  border: 1px solid var(--green);
  color: var(--green);
  padding: 7px 14px;
  border-radius: var(--radius);
}
.nav .nav-login:hover { background: var(--green); color: #fff; }
.nav-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 8px 12px;
  border-radius: var(--radius);
  font: inherit;
  cursor: pointer;
}

/* Секции */
.section { padding: 58px 0; }
.section.paper { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 28px; }
.section-head p { color: var(--muted); margin-bottom: 0; }
.eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Hero */
.hero {
  position: relative;
  padding: 72px 0 60px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("hero.svg") right -40px center / 620px no-repeat;
  opacity: 0.55;
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }
.hero-inner { max-width: 720px; }
.hero p.lead { font-size: 1.12rem; color: var(--muted); max-width: 620px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.button {
  display: inline-block;
  padding: 11px 20px;
  border-radius: var(--radius);
  background: var(--green);
  color: #fff;
  border: 1px solid var(--green);
  font-size: 0.94rem;
}
.button:hover { background: var(--green-2); border-color: var(--green-2); color: #fff; text-decoration: none; }
.button.ghost { background: transparent; color: var(--green); }
.button.ghost:hover { background: var(--green); color: #fff; }

/* Метрики */
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.metric { background: var(--card); padding: 22px 20px; }
.metric strong { display: block; font-family: Georgia, serif; font-size: 2rem; line-height: 1.1; color: var(--green); }
.metric span { color: var(--muted); font-size: 0.86rem; }

/* Карточки */
.grid { display: grid; gap: 18px; }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.card h3 { margin-bottom: 0.45em; }
.card p:last-child { margin-bottom: 0; }
.card .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--sand);
  color: var(--accent);
  font-family: Georgia, serif;
  font-size: 0.9rem;
}

/* Списки обновлений */
.updates { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.updates li { display: flex; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.updates time { flex: 0 0 96px; color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.updates span { flex: 1; }

/* Таблицы */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
caption { caption-side: bottom; padding: 10px 14px; color: var(--muted); font-size: 0.8rem; text-align: left; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--paper); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  background: #eaf1ec;
  color: var(--green);
  font-size: 0.76rem;
  white-space: nowrap;
}
.tag.warn { background: #f6eee2; color: #8a5a1f; }

/* Публикации */
.pub-list { list-style: none; padding: 0; margin: 0; }
.pub-list > li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.pub-list > li:first-child { border-top: 1px solid var(--line); }
.pub-title { display: block; font-weight: 600; margin-bottom: 4px; }
.pub-meta { color: var(--muted); font-size: 0.9rem; }
.pub-links { margin-top: 8px; display: flex; gap: 16px; font-size: 0.86rem; }
details { margin-top: 8px; }
summary { cursor: pointer; color: var(--green); font-size: 0.88rem; }
details p { margin: 8px 0 0; color: var(--muted); font-size: 0.9rem; }

/* Формы */
.form-card {
  max-width: 430px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; font-size: 0.88rem; font-weight: 600; }
.field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #c8cfc7;
  border-radius: 4px;
  font: inherit;
  background: #fff;
}
.field input:focus { outline: 2px solid rgba(46, 91, 69, 0.25); border-color: var(--green); }
.form-error, .form-note {
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 0.88rem;
  margin-bottom: 16px;
}
.form-error { background: #fbeeee; border: 1px solid #e4c4c4; color: var(--danger); }
.form-note { background: var(--paper); border: 1px solid var(--line); color: var(--muted); }
.form-help { color: var(--muted); font-size: 0.84rem; margin-top: 14px; }
.form-card .button { width: 100%; }

/* Контакты */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.contact-block { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.contact-block h3 { font-size: 1rem; margin-bottom: 8px; }
.contact-block p { margin: 0 0 6px; font-size: 0.94rem; }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }

/* Подвал */
.site-footer { background: #22392d; color: #d9e3db; padding: 46px 0 22px; margin-top: 0; }
.site-footer a { color: #eef4ef; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; padding-bottom: 26px; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.footer-grid h4 { color: #fff; margin-bottom: 10px; font-size: 0.95rem; }
.footer-grid p { color: #b9c9bd; font-size: 0.9rem; margin: 0; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; font-size: 0.9rem; }
.footer-grid li { margin: 5px 0; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; padding-top: 18px; color: #a9bbae; font-size: 0.82rem; }

/* 404 */
.error-page { padding: 90px 0; text-align: center; }
.error-page .code { font-family: Georgia, serif; font-size: 4rem; color: var(--sand); line-height: 1; }

/* Фотографии */
.figure { margin: 0; }
.figure img {
  display: block;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--paper);
}
.figure figcaption { margin-top: 8px; color: var(--muted); font-size: 0.82rem; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.photo-grid .figure img { aspect-ratio: 4 / 3; object-fit: cover; }
.photo-band img { aspect-ratio: 16 / 7; object-fit: cover; }
.photo-split { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.photo-split .figure img { aspect-ratio: 4 / 3; object-fit: cover; }

/* Печать */
@media print {
  .site-header, .site-footer, .hero-actions, .nav-toggle { display: none; }
  body { font-size: 12pt; }
}

/* Навигация не помещается в одну строку — уводим в «Меню» */
@media (max-width: 1080px) {
  .nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 10px 22px 16px;
    font-size: 0.95rem;
  }
  .nav.open { display: flex; }
  .nav a { padding: 9px 0; width: 100%; }
  .nav .nav-login { margin-top: 6px; text-align: center; width: auto; }
  .nav-toggle { display: block; }
  .header-inner { position: relative; }
}

/* Мобильная версия */
@media (max-width: 900px) {
  .section { padding: 42px 0; }
  .hero { padding: 48px 0 44px; }
  .hero::after { opacity: 0.3; }
  .footer-grid { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: 1fr; }
  .photo-split { grid-template-columns: 1fr; }
}
