/* Страницы блога (/ru/blog/ и статьи). Разметку собирает scripts/blog.mjs.
   Цвета, шрифт и кнопки — как на главной: фон #101010, текст #f5f5f5, Inter,
   красный логотипа #ff3300 для наведения, кнопка #e02a00. Текст статьи — колонка ~68 знаков. */

:root {
  --db-bg: #101010;
  --db-fg: #f5f5f5;
  --db-muted: #a8a8a8;
  --db-faint: #8a8a8a;
  --db-line: rgba(245, 245, 245, .12);
  --db-red: #ff3300;
  --db-btn: #e02a00;
  --db-side: 40px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.db {
  margin: 0; background: var(--db-bg); color: var(--db-fg);
  font: 400 17px/1.6 Inter, Arial, sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
.db a { color: inherit; }
.db img, .db video { max-width: 100%; height: auto; display: block; }
.db-wrap { max-width: 1440px; margin: 0 auto; padding: 0 var(--db-side); }
.db-skip { position: absolute; left: -9999px; top: 8px; z-index: 10; background: var(--db-fg); color: var(--db-bg); padding: 8px 12px; border-radius: 4px; }
.db-skip:focus { left: 8px; }
.db :focus-visible { outline: 2px solid var(--db-fg); outline-offset: 3px; }

/* ——— кнопки (как .daruma-btn на главной) */
.db-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 28px; border-radius: 4px; border: 1px solid transparent;
  font: 700 13px/1 Inter, Arial, sans-serif; letter-spacing: .02em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.db-btn--primary { background: var(--db-btn); color: #fff; }
.db-btn--primary:hover, .db-btn--primary:focus-visible { background: var(--db-fg); color: var(--db-bg); }

/* ——— шапка */
.db-header { position: sticky; top: 0; z-index: 5; background: rgba(16, 16, 16, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--db-line); }
.db-header__in { display: flex; align-items: center; gap: 32px; height: 72px; }
.db-logo { display: inline-flex; align-items: center; flex-shrink: 0; }
.db-logo__img { display: block; width: 200px; height: auto; }
.db-nav { display: flex; gap: 28px; margin-left: auto; font-size: 12px; font-weight: 500; line-height: 1; letter-spacing: .08em; text-transform: uppercase; }
.db-nav a { color: rgba(245, 245, 245, .78); text-decoration: none; padding: 8px 0; border-bottom: 1px solid transparent; transition: color .2s ease, border-color .2s ease; }
.db-nav a:hover, .db-nav a:focus-visible, .db-nav a[aria-current] { color: #fff; border-bottom-color: var(--db-red); }
.db-header__cta { height: 40px; padding: 0 20px; }

/* ——— список статей */
.db-index { padding: 96px 0 40px; }
.db-index__title { margin: 0; font-size: clamp(48px, 8vw, 120px); line-height: .95; font-weight: 400; letter-spacing: -.05em; }
.db-index__lead { max-width: 44ch; margin: 24px 0 72px; font-size: 18px; line-height: 1.5; color: var(--db-muted); }
.db-list { margin: 0; padding: 0; list-style: none; }
.db-list > li { border-top: 1px solid var(--db-line); }
.db-list > li:last-child { border-bottom: 1px solid var(--db-line); }
.db-card { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 48px; align-items: center; padding: 32px 0; text-decoration: none; }
.db-card__img { display: block; aspect-ratio: 1200 / 630; overflow: hidden; border-radius: 4px; background: #1b1b1b; }
.db-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.db-card__body { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.db-card__date { font-size: 13px; color: var(--db-faint); letter-spacing: .02em; }
.db-card__title { margin: 0; font-size: clamp(24px, 2.6vw, 38px); line-height: 1.12; font-weight: 400; letter-spacing: -.03em; transition: color .2s ease; text-wrap: balance; }
.db-card__text { font-size: 16px; line-height: 1.55; color: var(--db-muted); }
@media (hover: hover) {
  .db-card:hover .db-card__title { color: var(--db-red); }
  .db-card:hover .db-card__img img { transform: scale(1.03); }
}

/* ——— статья */
.db-article__head { max-width: calc(700px + 2 * var(--db-side)); padding-top: 72px; padding-bottom: 48px; }
.db-back { display: inline-flex; gap: 8px; font-size: 14px; color: var(--db-muted) !important; text-decoration: none; transition: color .2s ease; }
.db-back:hover { color: var(--db-fg) !important; }
.db-article__title { margin: 32px 0 0; font-size: clamp(34px, 5vw, 64px); line-height: 1.04; font-weight: 400; letter-spacing: -.04em; text-wrap: balance; }
/* строка автора: фото, имя, дата · время чтения · просмотры */
.db-byline { display: flex; align-items: center; gap: 14px; margin-top: 28px; }
.db-byline__photo { flex-shrink: 0; width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: #1b1b1b; }
.db-byline__photo--initials { display: inline-flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; color: var(--db-fg); background: #262626; }
.db-byline__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.db-byline__name { font-size: 15px; font-weight: 500; color: var(--db-fg); }
.db-byline__role { font-weight: 400; color: var(--db-muted); }
.db-byline__meta, .db-views { display: flex; flex-wrap: wrap; gap: 0 8px; font-size: 14px; color: var(--db-faint); }
.db-views[hidden] { display: none; }

.db-prose { max-width: calc(700px + 2 * var(--db-side)); margin: 0 auto; padding: 0 var(--db-side) 96px; font-size: 19px; line-height: 1.65; color: #e6e6e6; }
.db-prose > * { margin: 0 0 1.1em; }
.db-prose h2 { margin: 2.2em 0 .7em; font-size: clamp(26px, 2.6vw, 32px); line-height: 1.18; font-weight: 500; letter-spacing: -.025em; color: var(--db-fg); text-wrap: balance; }
.db-prose h3 { margin: 1.8em 0 .6em; font-size: 22px; line-height: 1.25; font-weight: 500; color: var(--db-fg); }
.db-prose b, .db-prose strong { font-weight: 600; color: var(--db-fg); }
.db-prose a { color: var(--db-fg); text-decoration: underline; text-decoration-color: rgba(245, 245, 245, .4); text-underline-offset: .18em; text-decoration-thickness: 1px; transition: text-decoration-color .2s ease, color .2s ease; }
.db-prose a:hover { color: var(--db-red); text-decoration-color: var(--db-red); }
.db-prose ul, .db-prose ol { padding-left: 1.3em; }
.db-prose li { margin: .35em 0; padding-left: .2em; }
.db-prose li::marker { color: var(--db-faint); }
.db-prose blockquote { margin: 1.6em 0; padding-left: 1em; border-left: 2px solid var(--db-red); color: var(--db-fg); }
/* картинки и видео — по ширине текста */
.db-prose figure { margin: 1.6em 0; }
.db-prose figure img, .db-prose figure video { width: 100%; border-radius: 4px; background: #1b1b1b; }
.db-prose figure.video { position: relative; aspect-ratio: 16 / 9; }
.db-prose figure.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 4px; background: #000; }
.db-prose > :first-child { margin-top: 0; }

/* ——— ещё статьи */
.db-more { padding: 88px 0 96px; border-top: 1px solid var(--db-line); }
.db-more__title { margin: 0 0 40px; font-size: 12px; font-weight: 400; letter-spacing: .14em; text-transform: uppercase; color: #9a9a9a; }
.db-list--grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 32px; }
.db-list--grid > li, .db-list--grid > li:last-child { border: 0; }
.db-list--grid .db-card { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 0; align-items: start; }
.db-list--grid .db-card__title { font-size: 22px; line-height: 1.2; }
.db-list--grid .db-card__text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 15px; }

/* ——— призыв */
.db-cta { padding: 96px 0; border-top: 1px solid var(--db-line); }
.db-cta__title { margin: 0; font-size: clamp(38px, 6vw, 88px); line-height: 1.02; font-weight: 400; letter-spacing: -.04em; }
.db-cta__text { max-width: 46ch; margin: 24px 0 40px; font-size: 18px; line-height: 1.5; color: var(--db-muted); }
.db-cta__row { display: flex; align-items: center; flex-wrap: wrap; gap: 20px 32px; }
.db-cta__mail { font-size: 18px; text-decoration: none; border-bottom: 1px solid rgba(245, 245, 245, .4); padding-bottom: 2px; transition: border-color .2s ease; }
.db-cta__mail:hover { border-color: var(--db-fg); }

/* ——— подвал */
.db-footer { padding: 28px 0 36px; border-top: 1px solid var(--db-line); font-size: 14px; color: var(--db-faint); }
.db-footer__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
.db-footer nav { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.db-footer a { color: var(--db-muted); text-decoration: none; transition: color .2s ease; }
.db-footer a:hover { color: var(--db-fg); }

/* ——— планшет и телефон */
@media (max-width: 1023px) {
  .db-list--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .db-list--grid > li:nth-child(3) { display: none; }
}
@media (max-width: 959px) {
  :root { --db-side: 20px; }
  .db-index { padding-top: 64px; }
  .db-index__lead { margin-bottom: 48px; }
  .db-card { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 28px 0; }
  .db-article__head { padding-top: 48px; padding-bottom: 36px; }
  .db-prose { font-size: 18px; padding-bottom: 72px; }
  .db-more, .db-cta { padding: 72px 0; }
}
@media (max-width: 640px) {
  .db-header__in { height: 60px; gap: 16px; }
  .db-logo__img { width: 150px; }
  .db-byline__role { display: none; }
  .db-nav { gap: 18px; }
  .db-nav a:first-child { display: none; }
  .db-header__cta { display: none; }
  .db-list--grid { grid-template-columns: minmax(0, 1fr); }
  .db-list--grid > li:nth-child(3) { display: block; }
  .db-prose { font-size: 17px; }
  .db-cta__row { flex-direction: column; align-items: stretch; }
  .db-cta__mail { align-self: flex-start; }
}
@media (max-width: 480px) {
  :root { --db-side: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .db-card__img img { transition: none; }
}
