/* blog.css — дизайн-система блога «Ямми Ямми»
   ─────────────────────────────────────────────────────────────────────────
   Вся графика — кодом: CSS-градиенты рубрик + inline-SVG «узор-россыпь»
   ингредиентов (финик/кешью/семечка/кунжут). Никаких фотографий.
   Обложка .bl-cover используется И в карточке листа, И как hero статьи.
   Токены/шрифты/скругления наследуются из yammi.css. */

:root {
  /* SVG-паттерны как маски (currentColor задаёт цвет узора под рубрику) */
  --bl-pat-scatter: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='260'%20height='260'%20viewBox='0%200%20260%20260'%3E%3Cg%20fill='%23000'%3E%20%3Cellipse%20cx='42'%20cy='40'%20rx='17'%20ry='9'%20transform='rotate(-22%2042%2040)'/%3E%20%3Cpath%20d='M168%2026c14%201%2024%2012%2022%2027c-1%209-9%2013-14%209c8-9%204-24-11-31c1-3%202-5%203-5z'%20transform='rotate(12%20178%2044)'/%3E%20%3Cpath%20d='M214%20132c11%203%2016%2017%209%2030c-3%206-9%206-12%201c9-9%206-22-3-27c1-2%203-4%206-4z'%20transform='rotate(-30%20216%20148)'/%3E%20%3Ccircle%20cx='66'%20cy='150'%20r='6'/%3E%3Ccircle%20cx='86'%20cy='166'%20r='6'/%3E%3Ccircle%20cx='58'%20cy='174'%20r='6'/%3E%20%3Cellipse%20cx='128'%20cy='116'%20rx='16'%20ry='8'%20transform='rotate(38%20128%20116)'/%3E%20%3Ccircle%20cx='34'%20cy='214'%20r='9'/%3E%20%3Cpath%20d='M150%20200c12%200%2018%2015%206%2027c-11-9-17-27-6-27z'%20transform='rotate(20%20156%20214)'/%3E%20%3Cellipse%20cx='220'%20cy='214'%20rx='15'%20ry='8'%20transform='rotate(-14%20220%20214)'/%3E%20%3Ccircle%20cx='198'%20cy='68'%20r='5'/%3E%3Ccircle%20cx='108'%20cy='210'%20r='5'/%3E%20%3C/g%3E%3C/svg%3E");
  --bl-pat-accent: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='300'%20height='300'%20viewBox='0%200%20300%20300'%3E%3Cg%20fill='%23000'%3E%20%3Cellipse%20cx='150'%20cy='150'%20rx='78'%20ry='40'%20transform='rotate(-18%20150%20150)'/%3E%20%3Cpath%20d='M210%2070c34%204%2058%2034%2052%2078c-3%2024-24%2033-38%2022c24-24%2014-64-30-84c4-8%2010-16%2016-16z'%20transform='rotate(10%20224%20118)'/%3E%20%3Cpath%20d='M96%20214c30%202%2044%2040%2016%2070c-28-22-44-70-16-70z'%20transform='rotate(16%20112%20244)'/%3E%20%3Ccircle%20cx='70'%20cy='108'%20r='15'/%3E%3Ccircle%20cx='104'%20cy='90'%20r='13'/%3E%3Ccircle%20cx='58'%20cy='140'%20r='12'/%3E%20%3Cellipse%20cx='236'%20cy='214'%20rx='40'%20ry='20'%20transform='rotate(28%20236%20214)'/%3E%20%3C/g%3E%3C/svg%3E");
}

/* ════════════════════════════════════════════════════════════════════════
   ОБЛОЖКА .bl-cover — ядро дизайн-системы
   ════════════════════════════════════════════════════════════════════════ */
.bl-cover {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  color: #fff;                 /* currentColor: цвет узора + текста поверх */
  isolation: isolate;
}

/* Слой 1 — узор-россыпь (повторяющийся SVG через mask, тон = currentColor) */
.bl-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: currentColor;
  -webkit-mask-image: var(--bl-pat-scatter);
          mask-image: var(--bl-pat-scatter);
  -webkit-mask-repeat: repeat;
          mask-repeat: repeat;
  -webkit-mask-size: 200px 200px;
          mask-size: 200px 200px;
  opacity: .12;
  pointer-events: none;
}

/* Слой 2 — крупный акцент-«стикер» в углу, чуть выходит за край */
.bl-cover::after {
  content: "";
  position: absolute;
  right: -6%;
  bottom: -14%;
  width: min(300px, 62%);
  aspect-ratio: 1 / 1;
  z-index: 0;
  background-color: currentColor;
  -webkit-mask-image: var(--bl-pat-accent);
          mask-image: var(--bl-pat-accent);
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-size: contain;
          mask-size: contain;
  opacity: .2;
  pointer-events: none;
}

/* Контент поверх узора */
.bl-cover > * { position: relative; z-index: 1; }

/* Капс-метка рубрики */
.bl-cover-cat {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 13px;
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 16%, transparent);
  border: 1px solid color-mix(in srgb, currentColor 34%, transparent);
  color: currentColor;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  line-height: 1;
}

/* Заголовок и мета внутри hero-обложки */
.bl-cover-title {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin: 16px 0 0;
  color: currentColor;
}
.bl-cover-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 600;
  color: currentColor;
  opacity: .82;
}
.bl-cover-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .55; }

/* ── Рубрики (градиент + цвет узора/текста через currentColor) ──────────── */
.cov-health  { background: linear-gradient(135deg, #1C3626 0%, #2E4A3A 46%, #6A8F5B 100%); color: #F3F6EF; }
.cov-ingr    { background: linear-gradient(135deg, #C08828 0%, #DBA859 52%, #ECCB8A 100%); color: #2A1E08; }
.cov-recipe  { background: linear-gradient(135deg, #EFD4A0 0%, #F6E7C6 54%, #FCF4E4 100%); color: #5A431E; }
.cov-prod    { background: linear-gradient(135deg, #0F130D 0%, #223A2A 55%, #365845 100%); color: #EAF0E6; }

/* Модификатор — размер обложки в карточке листа */
.bl-cover--card { aspect-ratio: 16 / 10; padding: 18px; }

/* Модификатор — hero статьи */
.bl-cover--hero {
  min-height: clamp(240px, 40vw, 380px);
  padding: clamp(24px, 4vw, 48px);
  border-radius: 24px;
}
.bl-cover--hero .bl-cover-title { font-size: clamp(30px, 5.4vw, 62px); }

/* ════════════════════════════════════════════════════════════════════════
   ЛИСТ БЛОГА (blog.html)
   ════════════════════════════════════════════════════════════════════════ */
/* Светлый hero — как на «О фабрике», «Доставке», «Контактах» (общая концепция
   светлых шапок, yammi.css → «КОНЦЕПЦИЯ: светлые хиро»). Раньше был тёмно-зелёный
   и выбивался из остальных страниц. */
.blog-hero {
  padding: 64px 0 48px;
  background:
    radial-gradient(circle at 82% 18%, rgba(219,168,89,.16), transparent 46%),
    linear-gradient(135deg, #FBF7EC 0%, #F3EEDF 60%, #EDE6D3 100%);
  color: #2E4A3A;
  position: relative;
  overflow: hidden;
}
.blog-hero::before {
  content: "";
  position: absolute; inset: 0; z-index: 0;
  background-color: #2E4A3A;
  -webkit-mask-image: var(--bl-pat-scatter); mask-image: var(--bl-pat-scatter);
  -webkit-mask-repeat: repeat; mask-repeat: repeat;
  -webkit-mask-size: 220px 220px; mask-size: 220px 220px;
  opacity: .06;
  pointer-events: none;
}
.blog-hero .wrap { position: relative; z-index: 1; }
.blog-crumbs { font-size: 13px; color: rgba(46,74,58,.6); margin: 0 0 22px; display: flex; gap: 8px; align-items: center; }
.blog-crumbs a { color: inherit; }
.blog-kicker {
  display: inline-flex; align-items: center; width: fit-content; margin-bottom: 18px;
  padding: 7px 13px; border-radius: 999px;
  background: rgba(219,168,89,.20); border: 1px solid rgba(158,104,10,.34);
  color: #8A5A08; font-size: 12px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase;
}
.blog-hero h1 {
  font-size: clamp(30px, 7vw, 68px); line-height: 1; letter-spacing: -0.03em; font-weight: 800;
  margin: 0 0 16px; max-width: 900px; color: #2E4A3A;
}
.blog-hero h1 .a { color: #9A6A1E; }
.blog-hero p { font-size: 17px; line-height: 1.55; max-width: 680px; color: rgba(46,74,58,.78); margin: 0; }

/* Featured-статья — крупная обложка-hero со ссылкой */
.bl-featured { padding: 56px 0 8px; }
.bl-featured .eyebrow { margin-bottom: 18px; display: block; }
.bl-featured-link { display: block; transition: transform .25s, box-shadow .25s; border-radius: 24px; }
.bl-featured-link:hover { transform: translateY(-4px); box-shadow: 0 26px 54px rgba(0,0,0,.14); }
.bl-featured .bl-cover-title { font-size: clamp(28px, 4.4vw, 52px); max-width: 720px; }
.bl-featured-excerpt {
  position: relative; z-index: 1;
  margin: 16px 0 0; max-width: 560px;
  font-size: 16px; line-height: 1.55; color: currentColor; opacity: .86;
}

/* Тулбар с фильтром по рубрикам */
.bl-list { padding: 44px 0 96px; }
.bl-head {
  display: grid; grid-template-columns: 1fr; gap: 22px; align-items: end; margin-bottom: 34px;
}
@media (min-width: 1024px) { .bl-head { grid-template-columns: minmax(0,.9fr) minmax(420px,1.1fr); } }
.bl-head h2 { margin: 12px 0 0; }
.bl-tags { display: flex; gap: 10px; flex-wrap: wrap; }
@media (min-width: 1024px) { .bl-tags { justify-content: flex-end; } }
.bl-tag {
  padding: 10px 18px; background: var(--c-bg-alt); border: 1px solid transparent; border-radius: 999px;
  font-size: 13px; font-weight: 800; cursor: pointer;
  transition: background-color .15s, color .15s, transform .15s, border-color .15s;
}
.bl-tag:hover { transform: translateY(-1px); border-color: rgba(26,31,22,.14); }
.bl-tag:hover, .bl-tag.is-active { background: var(--c-ink); color: var(--c-on-ink); }

/* Сетка карточек 3-в-ряд */
.bl-grid { display: grid; grid-template-columns: 1fr; gap: 22px; }
@media (min-width: 640px)  { .bl-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .bl-grid { grid-template-columns: repeat(3, 1fr); } }

.bl-card {
  background: var(--c-bg-alt); border-radius: 20px; overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .22s, box-shadow .22s;
}
.bl-card:hover { transform: translateY(-4px); box-shadow: 0 18px 36px rgba(0,0,0,.07); }
.bl-card > a { display: block; color: inherit; }
.bl-card .bl-cover { border-radius: 0; }
.bl-card-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.bl-card-meta { font-size: 12px; color: var(--c-text-mut); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bl-card-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .4; }
.bl-card h2 { font-size: 21px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; margin: 0 0 10px; }
.bl-card h2 a { color: inherit; }
.bl-card-excerpt { font-size: 14px; color: var(--c-text-mut); line-height: 1.55; margin: 0 0 16px; flex: 1; }
.bl-card-more { font-weight: 800; font-size: 14px; color: var(--c-green); }
.bl-card-more::after { content: ' →'; display: inline-block; transition: transform .15s; }
.bl-card:hover .bl-card-more::after { transform: translateX(4px); }

/* ════════════════════════════════════════════════════════════════════════
   СТАТЬЯ — компоненты
   ════════════════════════════════════════════════════════════════════════ */
.bl-hero { padding: 32px 0 8px; }
.bl-hero .blog-crumbs { color: var(--c-text-mut); margin-bottom: 20px; }
.bl-hero .blog-crumbs a:hover { color: var(--c-green); }
.bl-hero .blog-crumbs .sep { opacity: .5; }

.bl-article { max-width: 760px; margin: 0 auto; padding: 40px 0 24px; font-size: 17px; line-height: 1.7; color: var(--c-text); }
.bl-article > h2 { font-size: clamp(26px, 3vw, 36px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; margin: 52px 0 18px; }
.bl-article > h2:first-child { margin-top: 0; }
.bl-article h3 { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; margin: 34px 0 12px; }
.bl-article p { margin: 0 0 18px; }
.bl-article ul, .bl-article ol { padding-left: 24px; margin: 0 0 22px; }
.bl-article li { margin: 0 0 8px; }
.bl-article strong { color: var(--c-dark); font-weight: 700; }
.bl-article a:not(.btn) { color: var(--c-green); text-decoration: underline; text-underline-offset: 3px; }
.bl-article table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 15px; }
.bl-article th, .bl-article td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--c-line); }
.bl-article th { font-weight: 700; background: var(--c-bg-alt); }

/* Лид-абзац */
.bl-lead {
  font-size: clamp(19px, 2.4vw, 23px); line-height: 1.5; font-weight: 500;
  color: var(--c-dark); margin: 0 0 8px;
}

/* Врезка (факт / «наше мнение») */
.bl-callout {
  --bl-accent: var(--c-green);
  position: relative; margin: 30px 0; padding: 22px 24px 22px 26px;
  background: color-mix(in srgb, var(--bl-accent) 8%, var(--c-bg-alt));
  border-left: 4px solid var(--bl-accent);
  border-radius: 0 16px 16px 0;
}
.bl-callout.acc-honey  { --bl-accent: var(--c-honey); }
.bl-callout.acc-berry  { --bl-accent: var(--c-berry); }
.bl-callout-label {
  display: block; font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  color: var(--bl-accent); margin-bottom: 8px;
}
.bl-callout p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--c-text); }
.bl-callout p + p { margin-top: 12px; }

/* Пул-цитата */
.bl-quote {
  position: relative; margin: 40px 0; padding: 8px 0 8px 4px; border: none;
  font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em;
  font-size: clamp(22px, 3.2vw, 30px); line-height: 1.24; color: var(--c-dark);
}
.bl-quote::before {
  content: "«"; display: block; font-size: 1.4em; line-height: .6; color: var(--c-honey); margin-bottom: 6px;
}
.bl-quote cite { display: block; margin-top: 14px; font-family: var(--font-text); font-style: normal; font-weight: 600; font-size: 14px; color: var(--c-text-mut); }

/* Товары из статьи */
.bl-products { margin: 44px 0; }
.bl-products-h { font-family: var(--font-display); font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 18px; }
.bl-products-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 620px) { .bl-products-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .bl-products-grid { grid-template-columns: repeat(3, 1fr); } }
.bl-product-card {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--c-bg-alt); border: 1px solid var(--c-line); border-radius: 16px;
  padding: 16px 18px; color: var(--c-text);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.bl-product-card:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(0,0,0,.07); border-color: transparent; }
.bl-product-card .pc-swatch { width: 42px; height: 42px; border-radius: 12px; margin-bottom: 10px; }
.bl-product-card .pc-name { font-weight: 800; font-size: 16px; line-height: 1.25; letter-spacing: -0.01em; }
.bl-product-card .pc-note { font-size: 13px; color: var(--c-text-mut); line-height: 1.45; }
.bl-product-card .pc-more { margin-top: 8px; font-size: 13px; font-weight: 800; color: var(--c-green); }
.bl-product-card .pc-more::after { content: ' →'; display: inline-block; transition: transform .15s; }
.bl-product-card:hover .pc-more::after { transform: translateX(4px); }

/* Читайте также */
.bl-related { margin: 48px 0 8px; }
.bl-related-h { font-family: var(--font-display); font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 18px; }
.bl-related-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 768px) { .bl-related-grid { grid-template-columns: repeat(3, 1fr); } }
.bl-related-card {
  background: var(--c-bg-alt); border-radius: 16px; padding: 20px 20px 22px;
  transition: transform .18s, box-shadow .18s; color: var(--c-text);
}
.bl-related-card:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(0,0,0,.07); }
.bl-related-card .rl-meta { font-size: 12px; color: var(--c-text-mut); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }
.bl-related-card h3 { font-size: 17px; font-weight: 700; line-height: 1.28; margin: 0; letter-spacing: -0.01em; }

/* Финальный призыв */
.bl-cta {
  margin: 40px auto 0; max-width: 900px;
  position: relative; overflow: hidden; border-radius: 24px;
  padding: clamp(32px, 5vw, 56px);
  background: linear-gradient(135deg, #1C3626 0%, #2E4A3A 55%, #6A8F5B 100%);
  color: #fff; text-align: center; isolation: isolate;
}
.bl-cta::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background-color: #fff;
  -webkit-mask-image: var(--bl-pat-scatter); mask-image: var(--bl-pat-scatter);
  -webkit-mask-repeat: repeat; mask-repeat: repeat;
  -webkit-mask-size: 200px 200px; mask-size: 200px 200px;
  opacity: .1; pointer-events: none;
}
.bl-cta > * { position: relative; z-index: 1; }
.bl-cta h2 { font-family: var(--font-display); font-size: clamp(26px, 4vw, 42px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; margin: 0 0 14px; color: #fff; }
.bl-cta p { font-size: 16px; line-height: 1.55; max-width: 560px; margin: 0 auto 24px; color: rgba(255,255,255,.82); }
.bl-cta .btn-honey { background: var(--c-honey); color: var(--c-dark); }
.bl-cta .btn-honey:hover { background: #fff; color: var(--c-dark); }

/* Вторая кнопка CTA (btn-outline-dark) на тёмно-зелёном фоне — светлый аутлайн, чтобы не сливалась */
.bl-cta .btn-outline-dark { background: transparent !important; color: #fff !important; border: 2px solid rgba(255,255,255,.6) !important; }
.bl-cta .btn-outline-dark:hover { background: rgba(255,255,255,.14) !important; border-color: #fff !important; color: #fff !important; }


/* ── Секция «Похожие» на листе / внизу — общий фон-блок статьи ──────────── */
.bl-article-foot { padding: 8px 0 80px; }

/* ════════════════════════════════════════════════════════════════════════
   Адаптив
   ════════════════════════════════════════════════════════════════════════ */
@media (max-width: 720px) {
  .bl-cover--hero { min-height: 220px; }
  /* yammi.css добавляет !important-padding на .bl-card на мобиле — возвращаем
     обложке край-в-край (перебиваем тем же весом, но позже по порядку загрузки). */
  .bl-card { padding: 0 !important; border-radius: 20px !important; }
  .bl-card-body { padding: 18px !important; }
  .bl-article { padding-top: 28px; font-size: 16px; }
  .bl-quote { font-size: 21px; }
  .bl-cover::after { width: min(220px, 66%); }
}

/* ── Тёмная тема: карточки и текст берут переменные yammi/theme; обложки
   остаются на своих градиентах (осознанно, для узнаваемости рубрик). ───── */
@media (prefers-color-scheme: dark) {
  .bl-tag:hover, .bl-tag.is-active { color: var(--c-on-ink); }
}
