/* Земляки. Оформление 22.11.2026: зеленая гамма, шрифт Raleway (SIL OFL), крупный текст
   (основной 20px, минимум 17px). Цифры обычной высоты (lnum): у Raleway по умолчанию старинные. */
@font-face { font-family: "Raleway"; src: url(fonts/raleway-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Raleway"; src: url(fonts/raleway-600.woff2) format("woff2"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "Raleway"; src: url(fonts/raleway-800.woff2) format("woff2"); font-weight: 750 800; font-display: swap; }
@font-face { font-family: "Raleway"; src: url(fonts/raleway-900.woff2) format("woff2"); font-weight: 900; font-display: swap; }
:root {
  --forest: #163A29;
  --forest-2: #1F4D36;
  --moss: #2F6B47;
  --leaf: #6FAE57;
  --gold: #D6A13F;
  --sand: #F4EFE6;
  --cream: #FBF9F4;
  --card: #F5F1EA;
  --ink: #12211A;
  --muted: #3E5047;
  --line: #DCD4C6;
  --radius: 28px;
  --shadow: 0 18px 50px rgba(22, 58, 41, .12);
  --font: "Raleway", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-display: "Raleway", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 20px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "lnum" 1;
}
input, button { font-feature-settings: "lnum" 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--moss); text-underline-offset: 4px; text-decoration-thickness: 2px; }
a:hover { color: var(--forest); }
h1, h2, h3 { font-family: var(--font-display); color: var(--forest); margin: 0; line-height: 1.08; letter-spacing: -.02em; }
h1 { font-size: clamp(46px, 6.4vw, 88px); font-weight: 800; }
h1 em { font-style: normal; color: var(--moss); }
h2 { font-size: clamp(32px, 3.8vw, 52px); font-weight: 750; }
h3 { font-size: clamp(26px, 2.4vw, 32px); font-weight: 700; }
p { margin: 0 0 1em; }
h1, h2, h3, .lead, .caption, .card p, .subscribe p { text-wrap: balance; }
article p, article li { text-wrap: pretty; }
.small { font-size: 18px; color: var(--muted); }

/* Плашка прототипа */
.preview {
  background: var(--forest);
  color: #EAF3E4;
  text-align: center;
  font-size: 17px;
  padding: 10px 20px;
  letter-spacing: .02em;
}

/* Шапка */
header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 32px;
  padding: 18px clamp(20px, 5vw, 72px);
  background: rgba(251, 249, 244, .9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--forest); }
.brand img { width: 52px; height: 52px; }
.brand-text { display: flex; flex-direction: column; gap: 4px; }
.brand-name { font: 900 30px/1 var(--font-display); letter-spacing: -.01em; color: var(--forest); }
.brand-sub { font: 600 17px/1.1 var(--font); color: var(--muted); }
.nav-wrap { position: relative; margin-left: auto; min-width: 0; }
nav { display: flex; gap: 26px; flex-wrap: wrap; }
nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--ink); text-decoration: none; font-size: 19px; font-weight: 600;
  border-bottom: 3px solid transparent;
}
nav a:hover, nav a[aria-current="page"] { border-color: var(--leaf); color: var(--forest); }
/* Затухание и стрелка у правого края меню, когда часть пунктов не видна (включает app.js) */
.nav-wrap.more::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 104px; pointer-events: none;
  background: linear-gradient(90deg, rgba(251, 249, 244, 0), rgba(251, 249, 244, .96) 55%);
}
.nav-more {
  position: absolute; top: 50%; right: 0; z-index: 1; transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0 0 4px 2px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--cream); color: var(--forest);
  font: 700 30px/1 var(--font); cursor: pointer;
}
.nav-more:hover { border-color: var(--moss); background: #fff; }
.nav-more[hidden] { display: none; }

main { display: block; }
section { padding: clamp(64px, 8vw, 120px) clamp(20px, 5vw, 72px); }

/* Кнопки. Одно семейство, два размера: обычный .button и компактный .button-sm (шапка).
   Внутри размера одинаковые шрифт, начертание, скругление и высота. Контурная .button-outline
   отличается только цветом. Высота цели касания от 44 px на любой ширине. */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 12px 32px;
  font: 700 20px/1.2 var(--font); text-align: center; text-decoration: none;
  background: var(--forest); color: #fff;
  border: 2px solid var(--forest); border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(22, 58, 41, .25);
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.button:hover { background: var(--moss); border-color: var(--moss); color: #fff; transform: translateY(-2px); }
.button-sm { min-height: 48px; padding: 8px 24px; font-size: 18px; box-shadow: none; white-space: nowrap; }
.button-sm:hover { transform: none; }
.button-outline { background: transparent; color: var(--forest); border-color: var(--moss); box-shadow: none; }
.button-outline:hover { background: rgba(111, 174, 87, .14); border-color: var(--forest); color: var(--forest); }

.eyebrow {
  display: inline-block; font-size: 17px; font-weight: 800; letter-spacing: .14em;
  color: var(--moss); margin-bottom: 18px; text-transform: uppercase;
}

/* Обложка главной */
.hero {
  position: relative; min-height: 88vh;
  display: flex; align-items: center;
  background: var(--hero) center / cover no-repeat;
  padding-top: 80px; padding-bottom: 80px;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(251, 249, 244, .97) 0%, rgba(251, 249, 244, .9) 34%, rgba(251, 249, 244, .35) 58%, rgba(251, 249, 244, 0) 75%);
}
.hero > div { position: relative; max-width: 840px; }
.hero h1 { margin-bottom: 28px; }
.lead { font-size: clamp(22px, 1.9vw, 26px); line-height: 1.5; color: var(--muted); max-width: 680px; margin-bottom: 36px; }
.caption { margin-top: 28px; font-size: 19px; font-weight: 600; color: var(--forest-2); }

/* Навигатор и карточки */
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 32px; flex-wrap: wrap; margin-bottom: 48px; }
.search { display: flex; flex-direction: column; gap: 10px; font-size: 18px; font-weight: 700; color: var(--forest); min-width: min(100%, 420px); }
.search input {
  font: 400 20px/1.3 var(--font); padding: 18px 22px;
  border: 2px solid var(--line); border-radius: 18px; background: #fff; color: var(--ink);
}
.search input:focus { outline: none; border-color: var(--leaf); box-shadow: 0 0 0 4px rgba(111, 174, 87, .2); }
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.card {
  display: flex; flex-direction: column;
  background: var(--card); border-radius: var(--radius);
  text-decoration: none; color: var(--ink); overflow: hidden;
  border: 1px solid var(--line);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card[hidden] { display: none; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); color: var(--ink); }
.card img { aspect-ratio: 16 / 10; object-fit: cover; mix-blend-mode: multiply; }
.card .number, .card h3, .card p, .card .go { margin-left: 36px; margin-right: 36px; }
.card .number { margin-top: 8px; }
.card h3 { margin-top: 6px; margin-bottom: 12px; }
.card p { color: var(--muted); }
.card .go { margin-top: auto; margin-bottom: 32px; font-weight: 800; color: var(--moss); font-size: 19px; }
.number { font: 800 18px/1 var(--font-display); color: var(--leaf); letter-spacing: .08em; }
#empty, #results { font-size: 19px; margin-top: 24px; }

/* Принципы */
.principles {
  background: var(--forest); color: #EAF3E4;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start;
}
.principles .eyebrow { color: var(--leaf); grid-column: 1 / -1; margin-bottom: 0; }
.principles h2 { color: #fff; }
.principles p { font-size: 22px; }
.principles a { color: #fff; font-weight: 700; font-size: 21px; }

/* Подписка */
.subscribe {
  position: relative;
  margin: clamp(48px, 6vw, 96px) clamp(20px, 5vw, 72px);
  border-radius: 40px;
  background: var(--sand); border: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; gap: 40px; flex-wrap: wrap;
}
.subscribe, .subscribe .anchor { scroll-margin-top: calc(var(--header-height, 110px) + 16px); }
.subscribe .anchor { position: absolute; top: 0; left: 0; }
.subscribe > div:first-of-type { flex: 1 1 420px; }
.subscribe h2 { margin-bottom: 14px; }
.subscribe p { font-size: 22px; margin: 0; color: var(--muted); }
.subscribe-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Подвал */
footer {
  background: #0F2A1E; color: #CFDCD4;
  padding: 56px clamp(20px, 5vw, 72px);
  display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap;
  font-size: 18px;
}
footer .brand-name { color: #fff; }
footer .brand-sub { color: #9FB5A8; }
footer p { margin: 0; }
.footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 20px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; color: #fff; font-weight: 700; }
.footer-links a:hover { color: #CFE8C2; }

/* Страницы разделов */
.crumb { padding: 28px clamp(20px, 5vw, 72px) 0; font-size: 18px; color: var(--muted); }
.crumb a { color: var(--moss); font-weight: 600; }
.article-head {
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center;
  padding-top: 40px; padding-bottom: 56px;
}
.article-head h1 { font-size: clamp(42px, 5vw, 72px); margin-bottom: 24px; }
.article-head .lead { margin-bottom: 16px; }
.article-byline { color: var(--muted); font-size: 17px; margin: 0; }
.article-head img { border-radius: var(--radius); mix-blend-mode: multiply; }
.tag {
  display: inline-block; background: #FFF4DA; color: #7A5410; border: 1px solid #EBCB86;
  padding: 8px 18px; border-radius: 999px; font-weight: 700; font-size: 17px;
}
.article-layout {
  display: grid; grid-template-columns: 300px minmax(0, 820px); gap: 64px;
  padding: 0 clamp(20px, 5vw, 72px) 40px;
}
.article-layout aside {
  position: sticky; top: calc(var(--header-height, 110px) + 16px); align-self: start;
  display: flex; flex-direction: column; gap: 14px;
  background: var(--card); border-radius: 22px; padding: 28px; border: 1px solid var(--line);
  max-height: calc(100vh - var(--header-height, 110px) - 32px); overflow-y: auto; /* длинное оглавление на невысоком экране */
}
.article-layout aside .eyebrow { margin-bottom: 4px; font-size: 17px; }
.article-layout aside a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 18px; line-height: 1.35; }
.article-layout aside a:hover { color: var(--moss); }
article section { padding: 0 0 56px; scroll-margin-top: calc(var(--header-height, 110px) + 16px); }
article section + section { border-top: 1px solid var(--line); padding-top: 48px; }
article .number { display: block; margin-bottom: 12px; font-size: 20px; }
article h2 { font-size: clamp(30px, 3vw, 42px); margin-bottom: 22px; }
article p, article li { font-size: 21px; line-height: 1.7; }
article ul { margin: 0 0 1em; padding-left: 1.2em; }
article li { margin-bottom: 10px; }
article li::marker { color: var(--leaf); }
.editor-note {
  background: #FFF8E8; border-left: 6px solid var(--gold);
  border-radius: 0 22px 22px 0; padding: 28px 32px; margin: 8px 0 40px;
}
.editor-note strong { display: block; font-size: 21px; color: #6B4A0E; margin-bottom: 8px; }
.editor-note p { margin: 0; font-size: 20px; }

/* Меню в отдельную строку, пока шесть пунктов не помещаются рядом с логотипом */
@media (max-width: 1420px) {
  header { flex-wrap: wrap; row-gap: 10px; }
  header .button-sm { margin-left: auto; order: 2; }
  .nav-wrap { order: 3; width: 100%; margin-left: 0; }
  nav { flex-wrap: nowrap; overflow-x: auto; gap: 22px; scrollbar-width: none; }
  nav::-webkit-scrollbar { display: none; }
  nav a { white-space: nowrap; font-size: 18px; }
}

/* Планшеты и телефоны */
@media (max-width: 1100px) {
  .article-layout { grid-template-columns: 1fr; gap: 32px; }
  .article-layout aside { position: static; }
  .article-head { grid-template-columns: 1fr; }
  .principles { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 18px; }
  .cards { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding-top: 48px; background-position: 70% center; background-image: var(--hero-sm, var(--hero)); }
  .hero::before { background: linear-gradient(180deg, rgba(251, 249, 244, .96) 0%, rgba(251, 249, 244, .88) 60%, rgba(251, 249, 244, .6) 100%); }
  /* Шапка в две строки: знак, название и «Подписаться», под ними меню */
  header { gap: 12px; row-gap: 4px; padding: 10px 16px; }
  .brand { gap: 10px; }
  .brand-sub { display: none; }
  .brand img { width: 40px; height: 40px; }
  .brand-name { font-size: 24px; }
  .button { font-size: 18px; padding: 12px 20px; }
  .button-sm { min-height: 44px; padding: 6px 18px; font-size: 17px; }
  .subscribe { margin-left: 16px; margin-right: 16px; border-radius: 28px; }
  .subscribe-actions { grid-template-columns: 1fr; width: 100%; }
  article p, article li { font-size: 19px; }
  .card .number, .card h3, .card p, .card .go { margin-left: 24px; margin-right: 24px; }
  .preview, .small, .tag, .crumb, footer { font-size: 17px; }
}
/* Самые узкие экраны (320 px): знак, название и «Подписаться» остаются в одной строке */
@media (max-width: 349px) {
  header { gap: 8px; padding-left: 12px; padding-right: 12px; }
  .brand { gap: 8px; }
  .brand img { width: 34px; height: 34px; }
  .brand-name { font-size: 21px; }
  .button-sm { padding: 6px 14px; font-size: 16px; }
}

/* Финальный логотип: дом 7.2 и надпись «Вывеска». */
.brand-final { --word-width: 168px; --house-size: 76px; --tag-size: 18px; gap: 6px; flex-shrink: 0; }
.brand-final > img { width: var(--house-size); height: var(--house-size); }
.brand-final .brand-text { align-items: center; gap: 4px; }
.brand-final .brand-name img { display: block; width: var(--word-width); height: auto; }
.brand-final .brand-sub { display: block; font-size: var(--tag-size); white-space: nowrap; text-align: center; }
.brand-accessible { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
footer .brand-final .brand-name img { filter: brightness(0) invert(1); }
@media (max-width: 760px) {
  .brand-final { --word-width: 116px; --house-size: 48px; --tag-size: 13px; gap: 4px; }
  .brand-final .brand-text { gap: 2px; }
}
@media (max-width: 349px) {
  .brand-final { --word-width: 108px; --house-size: 38px; --tag-size: 12px; }
}
