/* ==========================================================================
   card.css — recipe card, the nutrition chip rail, generic content card
   ========================================================================== */

/* --- the chip rail -------------------------------------------------------
   The site's distinguishing content is its nutrition data, so it gets a
   recurring device: a mint pill rail that appears on every recipe card and
   again, expanded, on the recipe page. */

.chips {
	display: flex;
	flex-wrap: wrap;
	gap: .4rem;
	list-style: none;
}

.chip {
	display: inline-flex;
	align-items: center;
	gap: .35em;
	padding: .28rem .6rem;
	border-radius: var(--r-pill);
	background: var(--mint);
	color: var(--ink);
	font-size: var(--t-xs);
	font-weight: 600;
	letter-spacing: .01em;
	line-height: 1.4;
	white-space: nowrap;
}

.chip .icon {
	font-size: .95em;
	color: var(--ink-muted);
}

.chip--quiet {
	background: var(--mint-soft);
	color: var(--ink-muted);
}

/* --- recipe card --------------------------------------------------------- */

.recipe-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--surface);
	border-radius: var(--r-lg);
	box-shadow: var(--shadow-sm);
	overflow: hidden;
	transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.recipe-card:hover,
.recipe-card:focus-within {
	transform: translateY(-4px);
	box-shadow: var(--shadow-lg);
}

.recipe-card__media {
	position: relative;
	aspect-ratio: 4 / 3;
	background: var(--mint-soft);
	overflow: hidden;
}

.recipe-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 320ms var(--ease);
}

.recipe-card:hover .recipe-card__media img {
	transform: scale(1.045);
}

.recipe-card__body {
	display: flex;
	flex-direction: column;
	gap: var(--s-3);
	flex: 1;
	padding: var(--s-4) var(--s-4) var(--s-5);
}

.recipe-card__title {
	font-size: var(--t-lg);
	line-height: var(--lh-snug);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* The title link covers the whole card, so the card is one hit target
   while the accessible name stays the recipe title. */
.recipe-card__link::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.recipe-card__link:hover {
	text-decoration: none;
}

.recipe-card__desc {
	font-size: var(--t-md);
	line-height: var(--lh-snug);
	color: var(--ink-muted);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Pinned to the bottom so the rails line up across a row of cards. */
.recipe-card__meta {
	margin-top: auto;
	padding-top: var(--s-1);
}

/* One equal-width track per chip, so the rail is always a single row no
   matter how long "Serves 12" or "120 min" happens to be. */
.recipe-card__meta .chips {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(0, 1fr);
	flex-wrap: nowrap;
}

.recipe-card__meta .chip {
	justify-content: center;
	min-width: 0;
	padding-inline: .45rem;
	font-size: .6875rem;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* --- generic content card (services, about) ------------------------------ */

.card {
	display: flex;
	flex-direction: column;
	gap: var(--s-3);
	height: 100%;
	padding: var(--s-5);
	background: var(--surface);
	border-radius: var(--r-lg);
	box-shadow: var(--shadow-sm);
	transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.card--raised:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-lg);
}

.card__title {
	font-size: var(--t-xl);
}

.card p {
	color: var(--ink-muted);
	font-size: var(--t-md);
}

.card__foot {
	margin-top: auto;
	padding-top: var(--s-2);
}
