/*
 * ANPS Agency: cards.css (style handle `anps-cards`, registered in inc/blog.php)
 * =============================================================================
 * Post cards printed by \AnpsAgency\post_card(): grid / related cards (`.post`) and the blog's
 * featured post (`.post-feat`), plus the three-column `.cards-grid`. Ported from design/html
 * blog-*.html and single-post-*.html. Blocks that print cards list `anps-cards` in block.json `style`.
 */

.post {
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
}

.pthumb {
	display: block;
	aspect-ratio: 5 / 3;
	border-radius: 2px;
	overflow: hidden;
	padding: 18px;
}

.pthumb .zoom {
	display: block;
	width: 100%;
	height: 100%;
}

.post:hover .pthumb .zoom {
	transform: scale(1.04);
}

.pthumb svg,
.pthumb img {
	display: block;
	width: 100%;
	height: 100%;
}

.pthumb.is-img {
	padding: 0;
}

.pthumb img {
	object-fit: cover;
}

.pmeta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: var(--ink2);
}

.pcat {
	font-weight: 500;
	color: var(--ink);
}

.pcat:hover {
	color: var(--ink);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.pbadge {
	padding: 5px 9px;
	border-radius: 3px;
	background: var(--yfill);
	color: var(--ink);
	font-size: 14px;
	font-weight: 500;
}

.ptitle {
	margin: 0;
	font-size: clamp(22px, 1.45vw, 28px);
	line-height: 1.18;
	font-weight: 400;
	letter-spacing: -0.03em;
	text-wrap: balance;
}

.ptitle a {
	color: inherit;
	background: linear-gradient(currentcolor, currentcolor) 0 100% / 0 1px no-repeat;
	transition: background-size 0.5s var(--ease);
}

.post:hover .ptitle a,
.ptitle a:focus-visible {
	background-size: 100% 1px;
}

.pexc {
	margin: 0;
	font-size: 17px;
	line-height: 1.5;
	color: var(--ink2);
}

.pauth {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	font-weight: 500;
}

/* ------------------------------------------------------------- grid -- */

.cards-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 64px 24px;
}

/* ---------------------------------------------------- featured post -- */

.post.post-feat {
	display: grid;
	gap: 0 24px;
	align-items: center;
	padding-bottom: 72px;
	margin-bottom: 72px;
	border-bottom: 1px solid var(--line);
}

.post-feat .pthumb {
	grid-column: 1 / span 7;
	aspect-ratio: 16 / 9;
	padding: 40px;
}

.post-feat .pthumb.is-img {
	padding: 0;
}

.pf-body {
	grid-column: 9 / span 4;
	display: flex;
	flex-direction: column;
	gap: 22px;
}

.pf-title.ptitle {
	font-size: clamp(34px, 2.6vw, 50px);
	line-height: 1.06;
	letter-spacing: -0.045em;
	text-wrap: balance;
}

.post-feat .pexc {
	font-size: 18px;
	line-height: 1.45;
	letter-spacing: -0.01em;
}

.pf-m {
	display: none;
}

@media (max-width: 900px) {

	.cards-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 48px 24px;
	}

	.post-feat {
		row-gap: 32px;
	}

	.post-feat .pthumb,
	.pf-body {
		grid-column: 1 / -1;
	}
}

@media (max-width: 600px) {

	.cards-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 48px;
	}

	.ptitle {
		font-size: 22px;
	}

	/* Mobile: the featured post is a regular stacked card (design/html/blog-mobile.html). */
	.post.post-feat {
		display: flex;
		align-items: stretch;
		gap: 16px;
		padding-bottom: 0;
		margin-bottom: 48px;
		border-bottom: 0;
	}

	.post-feat .pthumb {
		aspect-ratio: 5 / 3;
		padding: 18px;
	}

	.pf-body {
		display: contents;
	}

	.pbadge {
		padding: 4px 8px;
		font-size: 13px;
	}

	.pf-title.ptitle {
		font-size: 30px;
		line-height: 1.1;
		letter-spacing: -0.04em;
	}

	.post-feat .pexc {
		font-size: 17px;
		line-height: 1.5;
		letter-spacing: inherit;
	}

	.pf-d,
	.pf-role,
	.pf-more {
		display: none;
	}

	.pf-m {
		display: inline;
	}
}
