/* commonrootsurbanfarm.com - Buffalo Urban Farm Guide
   Палитра и типографика по SITE_SPEC.md разделу 6. */
:root {
  --bg: #FFFFFF;
  --text: #5F6360;
  --accent: #116DFF;
  --dark: #010101;
  --line: #CBD3DC;
  --font-head: "Cormorant Garamond", Georgia, serif;
  --font-body: "Raleway", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
}
h1, h2, h3 { font-family: var(--font-head); color: var(--dark); line-height: 1.15; font-weight: 600; }
h1 { font-size: 48px; margin: 0.3em 0 0.4em; }
h2 { font-size: 34px; margin: 1.5em 0 0.4em; }
h3 { font-size: 24px; margin: 1.2em 0 0.3em; }
a { color: var(--accent); }
a:hover { color: #0b4fc0; }
a[href^="mailto:"] { overflow-wrap: anywhere; }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: 1140px; margin-left: auto; margin-right: auto; padding-left: 24px; padding-right: 24px; }
.block { margin-top: 56px; margin-bottom: 56px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--dark); color: #fff; padding: 8px 16px; }
.skip:focus { left: 0; z-index: 10; }
.btn {
  display: inline-block; font-family: var(--font-body); font-size: 15px; font-weight: 600;
  color: #FFFFFF; background: var(--dark); border: 0; border-radius: 2px;
  padding: 12px 28px; cursor: pointer; text-decoration: none; letter-spacing: 0.02em;
}
.btn:hover { background: #333; color: #fff; }

/* Шапка: белая, лого по центру сверху, меню под ним (спек 6 «Шапка») */
.site-head { background: var(--bg); border-bottom: 1px solid var(--line); padding: 18px 0 0; }
.brand-row { text-align: center; }
.brand {
  font-family: var(--font-head); font-size: 26px; color: var(--dark);
  text-decoration: none; font-weight: 600;
}
.menu-toggle, .hamb { display: none; }
.nav { margin-top: 10px; }
.nav ul {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 24px;
  list-style: none; margin: 0; padding: 10px 0 16px;
}
.nav a {
  font-size: 14px; letter-spacing: 0.02em; text-decoration: none; color: var(--text);
}
.nav a:hover { color: var(--accent); }
.nav a.active { color: var(--accent); }

/* Хлебные крошки: под шапкой, над H1, разделитель «/» (спек 6) */
.crumbs { font-size: 13px; color: var(--text); margin-top: 16px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; color: var(--line); margin-right: 6px; }
.crumbs a { color: var(--text); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs span[aria-current] { color: var(--dark); }

/* Герой главной: фото 16:9 на ширину контейнера, H1 белый на затемнении 35% */
.hero { position: relative; overflow: hidden; margin-top: 24px; }
.hero-photo { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.hero-veil { position: absolute; inset: 0; background: rgba(1, 1, 1, 0.35); }
.hero-text {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  justify-content: flex-end; padding: 0 48px 42px;
}
.hero-text h1 { color: #fff; margin: 0; max-width: 860px; }
.hero-sub { color: #fff; font-size: 17px; margin: 10px 0 0; max-width: 640px; }

/* Чередующиеся блоки «фото + карточка с наездом» (спек 6 «Главная») */
.duet { display: grid; grid-template-columns: 1fr 1fr; align-items: center; margin: 56px 0; }
.duet-photo img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; }
.duet-card {
  background: var(--bg); border: 1px solid var(--line); padding: 32px 36px;
  margin-left: -52px; position: relative; z-index: 1;
}
.duet.flip .duet-photo { order: 2; }
.duet.flip .duet-card { order: 1; margin-left: 0; margin-right: -52px; }
.duet-card h2 { margin-top: 0; }
.duet-card .more { font-size: 14px; font-weight: 600; text-decoration: none; }

/* Сетка «Что растёт»: карточки 3 в ряд, фото 4:3, подпись */
.grow-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grow-card { border: 1px solid var(--line); border-radius: 2px; overflow: hidden; text-decoration: none; }
.grow-card img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; }
.grow-name {
  display: block; font-family: var(--font-head); font-size: 22px; color: var(--dark);
  padding: 14px 16px 16px; text-align: center;
}
.grow-card:hover { border-color: var(--accent); }

/* Текстовые плитки разделов с тонкой рамкой */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.tile {
  border: 1px solid var(--line); border-radius: 2px; padding: 20px 22px;
  text-decoration: none; display: flex; flex-direction: column; gap: 8px;
}
.tile-name { font-family: var(--font-head); font-size: 22px; color: var(--dark); }
.tile-text { font-size: 14px; color: var(--text); line-height: 1.6; }
.tile:hover { border-color: var(--accent); }

/* Контактный блок внизу главной */
.contact-band { border-top: 1px solid var(--line); text-align: center; padding: 48px 0 56px; }
.contact-band p { max-width: 640px; margin: 0 auto 20px; }

/* Статья: колонка 760-820 по центру, слева липкое «Содержание» 220px (спек 6) */
.article-grid {
  display: grid; grid-template-columns: 220px minmax(0, 800px); gap: 56px;
  justify-content: center; margin-top: 8px; margin-bottom: 64px;
}
.toc { position: sticky; top: 24px; align-self: start; font-size: 14px; }
.toc-title { font-family: var(--font-head); font-size: 20px; color: var(--dark); margin: 0 0 10px; }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li { margin-bottom: 8px; line-height: 1.45; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.byline { font-size: 14px; color: var(--text); margin-top: -4px; }
.lede { font-size: 19px; }
.art-figure { margin: 24px 0 8px; }
.art-figure img { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; }
.art-figure figcaption { font-size: 13px; color: var(--text); margin-top: 8px; }

/* «Смотрите также»: 3 карточки соседних статей */
.see-also { border-top: 1px solid var(--line); margin-top: 48px; padding-top: 24px; }
.see-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.see-card {
  border: 1px solid var(--line); border-radius: 2px; padding: 18px 20px;
  text-decoration: none; display: flex; flex-direction: column; gap: 8px;
}
.see-name { font-family: var(--font-head); font-size: 21px; color: var(--dark); line-height: 1.2; }
.see-text { font-size: 14px; color: var(--text); line-height: 1.6; }
.see-card:hover { border-color: var(--accent); }
.editor-note { border: 1px solid var(--line); border-radius: 2px; padding: 20px 24px; margin-top: 32px; }
.editor-note p { margin: 0; }

/* Узкая колонка служебных страниц */
.narrow { max-width: 760px; margin-left: auto; margin-right: auto; margin-bottom: 64px; }

/* Сетка культур в 3 колонки с линиями-разделителями (спек 6 «Страница категории») */
.crop-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 32px; list-style: none; margin: 20px 0; padding: 0; }
.crop-list li { border-bottom: 1px solid var(--line); }
.crop-list a {
  display: block; padding: 10px 2px; font-size: 17px; color: var(--dark); text-decoration: none;
}
.crop-list a:hover { color: var(--accent); }

/* Форма контактов: поля с рамкой, кнопка тёмной плашкой */
.form input, .form textarea {
  width: 100%; max-width: 480px; padding: 10px 12px; font: inherit; color: var(--text);
  border: 1px solid var(--line); border-radius: 2px; background: var(--bg);
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--accent); }
.form label { font-size: 14px; font-weight: 600; color: var(--dark); letter-spacing: 0.02em; }

/* Подвал: белый, линия сверху, текст по центру (спек 6 «Подвал») */
.site-foot {
  border-top: 1px solid var(--line); margin-top: 64px; padding: 48px 0;
  text-align: center; font-size: 14px;
}
.site-foot p { margin: 0 0 14px; }
.foot-about { max-width: 640px; margin-left: auto; margin-right: auto; }
.site-foot nav ul {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 20px;
  list-style: none; margin: 0 0 14px; padding: 0;
}
.site-foot nav a { text-decoration: none; color: var(--text); }
.site-foot nav a:hover { color: var(--accent); }
.foot-copy { color: var(--text); font-size: 13px; margin-bottom: 0; }

/* Страницы 404/410: цифра крупно, пояснение, кнопка «домой» (спек 6) */
.err-page { text-align: center; margin-top: 70px; margin-bottom: 100px; }
.err-code { font-family: var(--font-head); font-size: 96px; color: var(--dark); line-height: 1; margin: 0 0 12px; }
.err-page h1 { font-size: 34px; margin: 0 0 10px; }
.err-page p { max-width: 520px; margin: 0 auto 24px; }

/* Планшет и мобильный */
@media (max-width: 1100px) {
  .article-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc { position: static; margin-bottom: 8px; }
  .grow-grid, .see-grid { grid-template-columns: repeat(2, 1fr); }
  .tiles { grid-template-columns: repeat(2, 1fr); }
}
/* Шапка на узких экранах (до 900px - 8 пунктов меню не влезают в один ряд):
   лого слева, бургер справа, меню вертикально (спек 6) */
@media (max-width: 900px) {
  .site-head { padding: 0; position: relative; }
  .brand-row {
    text-align: left; display: flex; align-items: center; justify-content: space-between;
    height: 64px; padding: 0 24px;
  }
  .hamb { display: block; width: 28px; height: 22px; position: relative; cursor: pointer; }
  .hamb span, .hamb span::before, .hamb span::after {
    content: ""; position: absolute; left: 0; width: 28px; height: 2px; background: var(--dark);
  }
  .hamb span { top: 10px; }
  .hamb span::before { top: -8px; }
  .hamb span::after { top: 8px; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 64px;
    background: var(--bg); border-bottom: 1px solid var(--line); z-index: 5; margin: 0; }
  .nav ul { flex-direction: column; gap: 0; padding: 8px 24px 16px; }
  .nav li { border-top: 1px solid var(--line); }
  .nav li:first-child { border-top: 0; }
  .nav a { display: block; padding: 12px 0; }
  .menu-toggle:checked ~ .nav { display: block; }
}
@media (max-width: 720px) {
  h1 { font-size: 34px; }
  h2 { font-size: 27px; }
  h3 { font-size: 22px; }
  .hero-text { padding: 0 20px 22px; }
  .hero-photo { aspect-ratio: 4 / 3; }
  .duet { grid-template-columns: 1fr; margin: 40px 0; }
  .duet-card { margin-top: -40px; width: calc(100% - 32px); margin-right: auto; margin-left: auto; }
  .duet.flip .duet-card { margin-right: auto; margin-top: -40px; }
  .duet.flip .duet-photo { order: 0; }
  .grow-grid, .tiles, .see-grid { grid-template-columns: 1fr; }
  .crop-list { grid-template-columns: 1fr; }
}
