/* Journal cards, the archive grid, and the rows that reuse them. */

.journal__body {
	background: var(--sr-cream);
}

.postgrid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(1.25rem, 3vw, 1.875rem);
	margin: 0 auto;
	padding: 0;
	list-style: none;
}

@media (max-width: 899px) {
	.postgrid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 599px) {
	.postgrid {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* The newest piece takes the full width of the grid. */
.postcard--featured {
	grid-column: 1 / -1;
}

.postcard {
	display: flex;
}

.postcard__link {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	width: 100%;
	height: 100%;
	padding: 26px 28px 28px;
	border: 1.5px solid rgb(58 58 54 / 9%);
	border-radius: 28px;
	background: var(--sr-white);
	color: inherit;
	text-decoration: none;
	transition: border-color 140ms ease, box-shadow 140ms ease;
}

.postcard__link:hover {
	border-color: rgb(58 58 54 / 26%);
	box-shadow: 0 10px 28px rgb(58 58 54 / 8%);
}

.postcard--featured .postcard__link {
	gap: 1rem;
	padding: clamp(1.75rem, 4vw, 2.75rem);
	background: var(--sr-beige);
	border-color: transparent;
}

.postcard__topic {
	font-size: 12.5px;
	font-weight: 800;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: #00756c;
}

.postcard__title {
	font-size: 1.3125rem;
	font-weight: 900;
	line-height: 1.22;
	letter-spacing: -0.014em;
	text-wrap: balance;
}

.postcard--featured .postcard__title {
	font-size: clamp(1.625rem, 3.2vw, 2.25rem);
	line-height: 1.12;
	max-width: 22ch;
}

.postcard__text {
	font-size: 15.5px;
	line-height: 1.6;
	color: rgb(58 58 54 / 78%);
}

.postcard--featured .postcard__text {
	font-size: 1.0625rem;
	max-width: 62ch;
}

/* Pushed to the bottom so cards in a row line their feet up. */
.postcard__foot {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	align-items: baseline;
	justify-content: space-between;
	margin-top: auto;
	padding-top: 0.5rem;
}

.postcard__meta {
	font-size: 13.5px;
	font-weight: 600;
	color: rgb(58 58 54 / 66%);
}

.postcard__more {
	font-size: 14.5px;
	font-weight: 800;
	color: #00857c;
}

.postcard__link:hover .postcard__more {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.journal__empty {
	margin: 0;
	text-align: center;
	color: rgb(58 58 54 / 72%);
}

/* ------------------------------------------------- rows of the same cards */

/* Used on pack pages and the home page: three across, sideways below that. */
.postgrid--row {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 899px) {
	.postgrid--row {
		display: flex;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
		padding-bottom: 0.5rem;
	}

	.postgrid--row::-webkit-scrollbar {
		display: none;
	}

	.postgrid--row .postcard {
		flex: 0 0 min(78vw, 340px);
		scroll-snap-align: start;
	}
}

.journal__foot {
	position: relative;
	margin: 2rem auto 0;
	text-align: center;
}

/* The journal row follows a beige section, so it returns to cream. */
.journal-row {
	background: var(--sr-cream);
}
