/*
 * "Built for how you actually work" - four use-case cards.
 *
 * Measured off the 1440px frame: 1280 container, four ~311px columns with a
 * 24px gutter, cards at the design's 311x460 ratio, 20px radius. Two cards use
 * brand fills with a line icon, two sit over photography with a dark scrim.
 */

.bfw {
	padding-block: var(--section-y);
	background: var(--color-bg-default);
}

.bfw__title {
	margin: 0 0 var(--space-48);
	color: var(--color-text-primary);
}

.bfw__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--space-24);
}

.bfw-card {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: var(--space-32);
	padding: var(--space-24);
	border-radius: var(--radius-xl);
	overflow: hidden;
	color: var(--color-text-inverse);
	isolation: isolate;
	min-height: 400px;
}

/* --- Fills ---------------------------------------------------------------- */

.bfw-card--portfolio {
	background: #5a33b2;
}

.bfw-card--renewal {
	background: linear-gradient(180deg, #84377b 0%, #b64d54 100%);
}

/* --- Photos --------------------------------------------------------------- */

.bfw-card__photo {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Dark scrim so the copy at the foot stays legible over imagery. */
.bfw-card--photo::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(
		180deg,
		rgb(10 8 20 / 30%) 0%,
		rgb(10 8 20 / 82%) 100%
	);
}

/* --- Icon ----------------------------------------------------------------- */

.bfw-card__icon {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: var(--radius-md);
	background: rgb(255 255 255 / 14%);
}

.bfw-card__glyph {
	width: 22px;
	height: 22px;
}

/* --- Copy ----------------------------------------------------------------- */

/* Always sits at the card foot, whether the sibling is an icon or an image. */
.bfw-card__body {
	margin-top: auto;
	display: flex;
	flex-direction: column;
	gap: var(--space-12);
}

.bfw-card__title {
	margin: 0;
	color: #fff;
	font-family: var(--font-display);
	font-size: var(--text-h5);
	font-weight: 600;
	line-height: 1.2;
}

.bfw-card__text {
	margin: 0;
	font-family: var(--font-body);
	font-size: var(--text-body-sm);
	line-height: var(--lh-body);
	color: rgb(255 255 255 / 82%);
}

/* --- Responsive ----------------------------------------------------------- */

@media (max-width: 900px) {
	.bfw__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 560px) {
	.bfw__grid {
		grid-template-columns: 1fr;
	}

	.bfw-card {
		aspect-ratio: auto;
		min-height: 320px;
	}
}
