/* Блог и статья */

.crumbs { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 14px; color: var(--dim); }
.crumbs a { color: var(--dim); }
.crumbs a:hover { color: var(--accent-light); }
.crumbs > span:last-child { color: #c9c5be; }

.post-meta { font-family: var(--font-mono); font-size: 12px; color: var(--accent); }

/* Обложка */
.cover { position: relative; overflow: hidden; background: #16171c; }

.cover__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease);
}

.card--link:hover .cover__img { transform: scale(1.04); }

.cover__empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at 30% 30%, rgba(240, 122, 95, .45), rgba(240, 122, 95, 0) 60%), #16171c;
}

.cover__empty span {
  font-family: var(--font-display);
  font-size: clamp(40px, 7vw, 96px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.05em;
  color: rgba(255, 255, 255, .1);
  text-align: center;
}

/* Шапка блога */
.blog-head {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: clamp(48px, 7vw, 72px);
  padding-bottom: 40px;
}

.blog-head__title {
  max-width: 900px;
  font-family: var(--font-display);
  font-size: clamp(38px, 5.4vw, 72px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.blog-head__lead { max-width: 640px; font-size: clamp(16px, 1.5vw, 19px); color: var(--muted); }

.blog-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.blog-chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 14px;
  color: #c9c5be;
  transition: border-color .25s, color .25s;
}

.blog-chip:hover { border-color: var(--accent); color: var(--accent-light); }
.blog-chip.is-active { border-color: var(--accent); background: rgba(240, 122, 95, .08); color: var(--accent); }

/* Главная статья */
.blog-featured-wrap { padding-bottom: 40px; }

.blog-featured {
  position: relative;
  display: grid;
  overflow: hidden;
  border-radius: 32px;
}

.blog-featured__media { aspect-ratio: 16 / 9; }

.blog-featured__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(28px, 4vw, 48px) clamp(24px, 3.5vw, 44px);
}

.blog-featured__badge {
  align-self: flex-start;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 12px;
  font-weight: 600;
}

.blog-featured__title {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.3vw, 30px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.03em;
}

.blog-featured__title a::after,
.post-card__title a::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }

.blog-featured__excerpt { font-size: 16px; line-height: 1.65; color: var(--muted); }
.blog-featured__more { margin-top: auto; padding-top: 8px; font-weight: 600; }

@media (min-width: 960px) {
  .blog-featured { grid-template-columns: 1.45fr 1fr; align-items: center; }
  .blog-featured__body { gap: 14px; padding: 28px 36px; }
}

/* Сетка статей */
.blog-grid-wrap { padding-bottom: 20px; }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 20px;
}

@media (min-width: 760px) {
  .blog-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .blog-grid--two .post-card__body { padding: 30px 34px 34px; }
  .blog-grid--two .post-card__title { font-size: clamp(24px, 2.2vw, 28px); }
}

.post-card { position: relative; display: flex; flex-direction: column; overflow: hidden; }
.post-card__media { aspect-ratio: 16 / 9; border-bottom: 1px solid var(--line); }

.post-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  padding: 26px 28px 30px;
}

.post-card__title {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -.025em;
}

.post-card__excerpt { font-size: 15px; line-height: 1.6; color: var(--muted); }
.post-card__more { margin-top: auto; font-size: 14px; color: var(--dim); transition: color .25s; }
.post-card:hover .post-card__more { color: var(--accent); }

.blog-more { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; padding-top: 40px; }

/* Telegram-канал */
.blog-channel-wrap { padding-top: 60px; padding-bottom: clamp(70px, 9vw, 100px); }

.blog-channel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: clamp(28px, 5vw, 56px);
  border-radius: 40px;
}

.blog-channel__text { display: flex; flex: 1 1 520px; flex-direction: column; gap: 14px; }

/* Статья, шапка */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  height: 3px;
  pointer-events: none;
}

.read-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #ffc2a8);
  transform: scaleX(0);
  transform-origin: left;
}

.post-head {
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 1200px;
  margin-inline: auto;
  padding-top: clamp(40px, 6vw, 64px);
  padding-bottom: 40px;
}

.post-head__meta { font-size: 13px; }

.post-head__title {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.6vw, 58px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -.04em;
  text-wrap: balance;
}

.post-head__lead { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.6; color: var(--muted); }

.post-author { display: flex; align-items: center; gap: 14px; }

.post-author__photo {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 15%;
}

.post-author__name { font-weight: 600; }
.post-author__role { font-size: 13px; color: var(--dim); }

.post-cover {
  aspect-ratio: 16 / 9;
  width: 100%;
  margin-bottom: 56px;
  border: 1px solid var(--line);
  border-radius: 36px;
}

/* Статья, колонки */
.post-layout {
  display: grid;
  gap: 32px;
  padding-bottom: 60px;
}

.post-aside { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.post-main { min-width: 0; max-width: 740px; }
.post-prose { margin-top: 0; }
.post-prose > h2:first-child { margin-top: 0; }

.post-toc { margin-bottom: 40px; padding: 0; border-radius: 22px; }

.post-toc__label {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 60px;
  padding: 0 24px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.post-toc__label::-webkit-details-marker { display: none; }

.post-toc__count {
  margin-right: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--dim);
}

.post-toc__label::after {
  content: '+';
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: 400;
  color: var(--accent);
  transition: transform .3s var(--ease);
}

.post-toc[open] .post-toc__label::after { transform: rotate(45deg); }
.post-toc[open] { border-color: rgba(240, 122, 95, .3); }

.post-toc__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 24px 22px;
  border-top: 1px solid var(--line);
  counter-reset: toc;
}

.post-toc__list li { counter-increment: toc; }

.post-toc__list a {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: baseline;
  padding: 9px 0;
  font-size: 15px;
  line-height: 1.45;
  color: #b4b0a8;
}

.post-toc__list a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--dim);
}

.post-toc__list a:hover { color: var(--text); }
.post-toc__list a:hover::before { color: var(--accent); }

.post-side-cta { display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: 22px; }
.post-side-cta__title { font-weight: 600; line-height: 1.35; }
.post-side-cta__text { font-size: 14px; line-height: 1.5; color: var(--muted); }
.post-side-cta__link { min-height: 32px; font-size: 14px; font-weight: 600; color: var(--accent); }
.post-side-cta__link:hover { color: var(--accent-light); }

@media (max-width: 959px) {
  .post-aside { display: none; }
}

@media (min-width: 960px) {
  .post-layout { grid-template-columns: 260px minmax(0, 1fr); gap: 64px; align-items: start; }
  .post-aside { position: sticky; top: 110px; }
}

/* FAQ в статье */
.post-faq { margin-top: 56px; }

.post-faq__title {
  margin-bottom: 20px;
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.025em;
}

.post-faq__answer > * { padding: 0 clamp(20px, 2.6vw, 28px); font-size: 16px; line-height: 1.7; color: var(--muted); }
.post-faq__answer > *:last-child { padding-bottom: 24px; }
.post-faq__answer > * + * { margin-top: .8em; }

/* CTA в конце статьи */
.post-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 56px;
  padding: 32px;
  border-color: rgba(240, 122, 95, .3);
  border-radius: 26px;
}

.post-cta__text { flex: 1 1 320px; }

.post-cta__title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.post-cta__lead { margin-top: 6px; font-size: 15px; color: var(--muted); }

/* Похожие статьи */
.post-related { padding-top: 40px; padding-bottom: clamp(70px, 9vw, 100px); }
.post-related .section__head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 36px; }

@media (prefers-reduced-motion: reduce) {
  .cover__img { transition: none; }
}
