/* ==========================================================================
   Product applications
   Three entries in one row from tablet up, stacked on mobile (a 2-column
   step would leave the third entry alone on its row). Every entry is always fully visible: a square photo, a hairline,
   the name and one line of description. No boxes, no shadows, nothing
   hidden. Photos are 370px sources, so columns never grow past 370px.
   ========================================================================== */

.ph-apps {
	--ph-sec-muted: rgb(var(--ph-deep-rgb) / 0.78);
	--ph-sec-line: rgb(var(--ph-deep-rgb) / 0.14);
	--ph-apps-col: 23.125rem; /* 370px, the photo source width */

	padding-block: var(--ph-section-space);
	background: var(--ph-cream); /* alternates with the ivory portfolio above */
	color: var(--ph-deep);
}

/* Head
   ========================================================================== */

.ph-apps__head {
	display: grid;
	gap: var(--ph-stack-space);
	justify-items: center; /* section heads are centred on the page */
	text-align: center;
	margin-bottom: var(--ph-block-space);
}

.ph-apps__title {
	font-size: var(--ph-fs-h2);
	font-weight: var(--ph-fw-display);
	letter-spacing: -0.022em;
	line-height: 1.08;
	text-wrap: balance;
}

.ph-apps__intro {
	max-width: 58ch;
	font-size: var(--ph-fs-lead);
	line-height: 1.6;
	color: var(--ph-sec-muted);
	text-wrap: balance;
}

/* Grid
   ========================================================================== */

.ph-apps__grid {
	display: grid;
	grid-template-columns: minmax(0, var(--ph-apps-col));
	align-content: start;
	justify-content: center; /* the capped columns sit centred under the head */
	gap: var(--ph-space-l) var(--ph-space-m);
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 40rem) {
	.ph-apps__grid {
		grid-template-columns: repeat(3, minmax(0, var(--ph-apps-col)));
	}
}

@media (min-width: 64rem) {
	.ph-apps__grid {
		column-gap: var(--ph-space-l);
	}
}

.ph-apps__item {
	display: grid;
	align-content: start;
	gap: var(--ph-space-s);
}

/* Photo: one square crop for all six, so the 370px sources never upscale. */
.ph-apps__media {
	aspect-ratio: 1;
	overflow: hidden;
	background: rgb(var(--ph-deep-rgb) / 0.05); /* also the neutral placeholder */
}

.ph-apps__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: saturate(0.8);
	transition: transform 1.2s var(--ph-ease-out);
}

@media (hover: hover) {
	.ph-apps__item:hover .ph-apps__media img {
		transform: scale(1.025);
	}
}

.ph-apps__body {
	display: grid;
	gap: var(--ph-space-2xs);
	padding-top: var(--ph-space-s);
	border-top: 1px solid var(--ph-sec-line);
}

.ph-apps__name {
	font-size: var(--ph-fs-h3);
	font-weight: var(--ph-fw-heading);
	letter-spacing: -0.01em;
	line-height: 1.2;
}

.ph-apps__text {
	font-size: var(--ph-fs-text);
	line-height: 1.6;
	color: var(--ph-sec-muted);
}

@media (prefers-reduced-motion: reduce) {
	.ph-apps__media img {
		transition: none;
	}

	.ph-apps__item:hover .ph-apps__media img {
		transform: none;
	}
}
