/* Homepage, cards and long-form reading components */
.ygs-hero {
	display: grid;
	min-height: min(680px, 78vh);
	align-items: center;
	background:
		linear-gradient(120deg, rgba(33, 26, 21, 0.92), rgba(64, 34, 31, 0.8)),
		radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.14), transparent 35%),
		#3f2723;
	color: #fff;
}

.ygs-hero__inner {
	padding-block: clamp(4rem, 10vw, 8rem);
}

.ygs-hero .ygs-eyebrow {
	color: #f2c9a8;
}

.ygs-hero h1 {
	max-width: 11ch;
	margin: 0;
	font-family: var(--ygs-font-serif);
	font-size: clamp(3rem, 9vw, 7.5rem);
	font-weight: 700;
	letter-spacing: -0.04em;
	line-height: 1;
}

.ygs-hero__description {
	max-width: 680px;
	margin: 1.5rem 0 2rem;
	color: rgba(255, 255, 255, 0.88);
	font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.ygs-button {
	display: inline-flex;
	min-height: 48px;
	align-items: center;
	justify-content: center;
	padding: 0.72rem 1.25rem;
	border: 2px solid #fff;
	border-radius: 999px;
	background: #fff;
	color: #2d211e;
	font-weight: 700;
	text-decoration: none;
	transition: transform 160ms ease, background-color 160ms ease, color 160ms ease;
}

.ygs-button:hover {
	background: transparent;
	color: #fff;
	transform: translateY(-2px);
}

.ygs-topic-grid,
.ygs-card-grid {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: 1.25rem;
}

.ygs-topic-card {
	grid-column: span 3;
	padding: 1.35rem;
	border: 1px solid rgba(30, 37, 40, 0.1);
	border-radius: var(--ygs-radius);
	background: rgba(255, 255, 255, 0.75);
	box-shadow: 0 8px 22px rgba(30, 37, 40, 0.04);
	color: var(--ygs-ink);
	text-decoration: none;
}

.ygs-topic-card:hover {
	border-color: var(--ygs-accent);
}

.ygs-topic-card__name,
.ygs-topic-card__count {
	display: block;
}

.ygs-topic-card__name {
	font-family: var(--ygs-font-serif);
	font-size: 1.2rem;
	font-weight: 700;
}

.ygs-topic-card__count {
	margin-top: 0.35rem;
	color: var(--ygs-muted);
	font-size: 0.9rem;
}

.ygs-card {
	display: flex;
	grid-column: span 4;
	overflow: hidden;
	min-width: 0;
	flex-direction: column;
	border: 1px solid var(--ygs-border);
	border-radius: var(--ygs-radius);
	background: var(--ygs-surface);
	box-shadow: 0 8px 24px rgba(30, 37, 40, 0.05);
}

.ygs-card__media {
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--ygs-surface-muted);
}

.ygs-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 240ms ease;
}

.ygs-card:hover .ygs-card__media img {
	transform: scale(1.025);
}

.ygs-card__body {
	display: flex;
	height: 100%;
	flex-direction: column;
	padding: 1.4rem;
}

.ygs-entry-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
	color: var(--ygs-muted);
	font-size: 0.82rem;
}

.ygs-entry-meta a {
	color: inherit;
}

.ygs-card__title {
	margin: 0.7rem 0;
	font-family: var(--ygs-font-serif);
	font-size: 1.35rem;
	line-height: 1.4;
}

.ygs-card__title a {
	color: var(--ygs-ink);
	text-decoration: none;
}

.ygs-card__title a:hover {
	color: var(--ygs-accent);
}

.ygs-card__excerpt {
	color: var(--ygs-muted);
}

.ygs-card__excerpt p {
	margin-top: 0;
}

.ygs-text-link {
	display: inline-block;
	margin-top: auto;
	color: var(--ygs-accent);
	font-weight: 700;
}

.ygs-single {
	max-width: var(--ygs-reading);
	margin-inline: auto;
}

.ygs-single__header {
	margin-bottom: 2rem;
}

.ygs-single__title {
	margin: 0.7rem 0 1rem;
	font-size: clamp(2.2rem, 6vw, 4.6rem);
}

.ygs-single__lead {
	color: var(--ygs-muted);
	font-size: 1.18rem;
}

.ygs-single__featured-image {
	margin: 0 0 2.5rem;
}

.ygs-single__featured-image img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--ygs-radius);
}

.ygs-prose {
	font-family: var(--ygs-font-serif);
	font-size: clamp(1.05rem, 1.2vw, 1.15rem);
	line-height: 1.95;
}

.ygs-prose h2,
.ygs-prose h3,
.ygs-prose h4 {
	margin-top: 2.2em;
	font-family: var(--ygs-font-sans);
	line-height: 1.4;
}

.ygs-prose blockquote {
	margin: 2rem 0;
	padding: 0.2rem 0 0.2rem 1.35rem;
	border-left: 4px solid var(--ygs-accent);
	color: var(--ygs-muted);
}

.ygs-prose img,
.ygs-prose iframe,
.ygs-prose video {
	max-width: 100%;
}

.ygs-prose table {
	display: block;
	overflow-x: auto;
	width: 100%;
	border-collapse: collapse;
}

.ygs-prose th,
.ygs-prose td {
	padding: 0.7rem;
	border: 1px solid var(--ygs-border);
	text-align: left;
}

.ygs-single__footer {
	margin-top: 2.5rem;
	padding-top: 1.2rem;
	border-top: 1px solid var(--ygs-border);
}

.ygs-tags span {
	font-weight: 700;
}

.ygs-post-navigation {
	display: grid;
	max-width: var(--ygs-reading);
	margin: 2.5rem auto 0;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--ygs-border);
}

.ygs-post-navigation > :last-child {
	text-align: right;
}

.ygs-empty-state {
	padding: 2rem;
	border: 1px dashed var(--ygs-border);
	border-radius: var(--ygs-radius);
	background: var(--ygs-surface-muted);
}

.navigation.pagination {
	margin-top: 2rem;
}

@media (max-width: 920px) {
	.ygs-topic-card,
	.ygs-card {
		grid-column: span 6;
	}
}

@media (max-width: 620px) {
	.ygs-topic-card,
	.ygs-card {
		grid-column: 1 / -1;
	}

	.ygs-post-navigation {
		grid-template-columns: 1fr;
	}

	.ygs-post-navigation > :last-child {
		text-align: left;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ygs-button,
	.ygs-card__media img {
		transition: none;
	}
}
