/* Блог: список статей и страница статьи */

/* ── Главная статья в списке ─────────────────────────── */

.feature {
	position: relative;
	display: grid;
	gap: 14px;
	margin-top: clamp(32px, 5vw, 56px);
}

.feature__frame {
	padding: 10px;
	border-radius: var(--r-lg);
	background: var(--card);
}

.feature__frame img {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: calc(var(--r-lg) - 8px);
}

.feature__card {
	position: relative;
	padding: 24px 22px 80px;
	border-radius: var(--r-lg);
	background: var(--card);
}

.feature__title {
	margin: 14px 0 0;
	font-family: var(--font-display);
	font-weight: 900;
	font-stretch: 87%;
	font-size: clamp(26px, 3.4vw, 42px);
	line-height: 1.05;
	text-transform: uppercase;
	text-wrap: balance;
}

.feature__title a {
	text-decoration: none;
}

.feature__title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.feature__card p:not(.meta) {
	margin: 16px 0 0;
	font-family: var(--font-serif);
	font-size: 18px;
	line-height: 1.7;
	color: var(--ink-2);
}

.feature:hover .arrow {
	transform: rotate(45deg);
}

@media (min-width: 860px) {
	.feature {
		grid-template-columns: 7fr 5fr;
		gap: 28px;
		align-items: center;
	}

	.feature__frame {
		padding: 14px;
	}

	.feature__frame img {
		aspect-ratio: 16 / 11;
	}

	.feature__card {
		padding: 36px 34px 100px;
	}
}

.meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
	font: 700 12px/1.3 var(--font-ui);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ink-3);
}

.meta {
	margin: 0;
}

.meta span {
	white-space: nowrap;
}

.meta span + span::before {
	content: "·";
	margin-right: 14px;
}

/* ── Карточки статей ─────────────────────────────────── */

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

.post-card {
	position: relative;
	padding: 10px 10px 74px;
	border-radius: var(--r-lg);
	background: var(--card);
	transition: transform 0.35s var(--ease);
}

.post-card:hover {
	transform: translateY(-4px);
}

.post-card:hover .arrow {
	transform: rotate(45deg);
}

.post-card__ph {
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	border-radius: var(--r-md);
}

.post-card__ph img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.post-card__ph.poster::after {
	content: none;
}

.post-card__body {
	padding: 16px 10px 0;
}

.post-card__title {
	margin: 10px 0 0;
	font-family: var(--font-display);
	font-weight: 900;
	font-stretch: 87%;
	font-size: 22px;
	line-height: 1.12;
}

.post-card__title a {
	text-decoration: none;
}

.post-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.post-card__excerpt {
	margin: 10px 0 0;
	font-size: 15px;
	color: var(--ink-2);
}

/* ── Страница статьи ─────────────────────────────────── */

.post__tags {
	margin: 0 0 16px;
	padding: 0;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.post__tags a {
	min-height: 32px;
	display: inline-flex;
	align-items: center;
	padding: 0 12px;
	border-radius: 99px;
	background: var(--amber);
	color: var(--amber-ink);
	font: 700 12px/1 var(--font-ui);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
}

.post__tags span {
	min-height: 32px;
	display: inline-flex;
	align-items: center;
	padding: 0 12px;
	border-radius: 99px;
	border: 1.5px solid var(--line);
	font: 700 12px/1 var(--font-ui);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ink-2);
}

.post__h1 {
	max-width: 22ch;
	font-size: clamp(30px, 5.4vw, 68px);
}

.post .meta {
	margin-top: 18px;
}

.post__cover {
	margin: clamp(24px, 4vw, 40px) 0 0;
	padding: 10px;
	border-radius: var(--r-lg);
	background: var(--card);
}

.post__cover img {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: calc(var(--r-lg) - 8px);
}

@media (min-width: 860px) {
	.post__cover {
		padding: 14px;
	}

	.post__cover img {
		aspect-ratio: 21 / 9;
	}
}

.post__body {
	margin-top: clamp(24px, 4vw, 40px);
	display: grid;
	gap: 18px;
	align-items: start;
}

@media (min-width: 1000px) {
	.post__body--toc {
		grid-template-columns: 280px minmax(0, 1fr);
		gap: 28px;
	}

	.toc {
		position: sticky;
		top: 96px;
	}
}

/* Оглавление */
.toc {
	padding: 20px 22px;
	border-radius: var(--r-lg);
	background: var(--frame);
	color: var(--frame-text);
}

.toc__label {
	margin: 0 0 8px;
	font: 700 12px/1.3 var(--font-ui);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--amber);
}

.toc ol {
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: toc;
}

.toc li {
	counter-increment: toc;
}

.toc a {
	min-height: 44px;
	padding: 8px 0;
	display: flex;
	gap: 12px;
	align-items: baseline;
	border-top: 1px solid var(--frame-line);
	color: var(--frame-text);
	text-decoration: none;
	font-size: 15px;
	line-height: 1.4;
}

.toc li:first-child a {
	border-top: 0;
}

.toc a::before {
	content: counter(toc, decimal-leading-zero);
	flex: none;
	font: 700 12px/1.4 var(--font-ui);
	color: var(--amber);
}

.toc a:hover {
	color: var(--amber);
}

/* Лист со статьёй — как бумага на столе */
.post__paper {
	min-width: 0;
	padding: clamp(24px, 5vw, 56px) clamp(20px, 5vw, 64px);
	border-radius: var(--r-lg);
	background: var(--card);
}

.post__text {
	max-width: 68ch;
	font-family: var(--font-serif);
	font-size: 18px;
	line-height: 1.75;
}

.post__text > * {
	margin: 0;
}

.post__text > * + * {
	margin-top: 1.1em;
}

.post__text h2 {
	margin-top: 2em;
	font-family: var(--font-display);
	font-weight: 900;
	font-stretch: 87%;
	font-size: clamp(24px, 3vw, 32px);
	line-height: 1.12;
	text-transform: uppercase;
	scroll-margin-top: 96px;
}

.post__text h2::before {
	content: "";
	display: block;
	width: 48px;
	height: 5px;
	margin-bottom: 16px;
	border-radius: 3px;
	background: var(--amber);
}

.post__text > h2:first-child {
	margin-top: 0;
}

.post__text h3 {
	margin-top: 1.6em;
	font-size: 21px;
	line-height: 1.3;
	font-weight: 700;
}

.post__text ul {
	padding-left: 0;
	list-style: none;
}

.post__text ul li {
	position: relative;
	padding-left: 28px;
}

.post__text ul li + li {
	margin-top: 0.5em;
}

.post__text ul li::before {
	content: "";
	position: absolute;
	left: 4px;
	top: 0.72em;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--amber);
}

.post__text a {
	color: inherit;
	text-decoration-color: var(--amber);
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}

.post__text a:hover {
	color: var(--amber-2);
}

.post__text strong {
	font-weight: 700;
}

.post__text blockquote {
	position: relative;
	padding: 22px 24px 22px 60px;
	border-radius: var(--r-md);
	background: var(--card-2);
	font-style: italic;
}

.post__text blockquote::before {
	content: "«";
	position: absolute;
	left: 18px;
	top: 6px;
	font-family: var(--font-display);
	font-weight: 900;
	font-style: normal;
	font-size: 56px;
	line-height: 1;
	color: var(--amber-2);
}

.post__text blockquote p {
	margin: 0;
}

.post__text figure img {
	width: 100%;
	height: auto;
	border-radius: var(--r-md);
}

.post__text figcaption {
	margin-top: 8px;
	font-family: var(--font-ui);
	font-size: 14px;
	color: var(--ink-3);
}

/* Группы из статьи и «Читайте также» */
.post-more {
	margin-top: clamp(56px, 8vw, 104px);
}

.post-more .section__head h2 {
	font-size: clamp(26px, 4vw, 44px);
}
