/*
 * Section: Models — Figma 2219:1896, cards from Container 2217:1602.
 *
 * Two 562-wide cards, 78 apart, in the 1202 column (562 + 78 + 562 = 1202), so
 * the pair fills the column exactly and needs no max-width of its own. The
 * card measurements — 32 padding, 14 radius, 66-tall feature rows, the 180-wide
 * description column — are expressed as their share of the 1676 frame, the
 * same way the rest of the theme scales.
 *
 * The two cards are the same object in two tones: "filled" is Harbor with
 * Ivory ticks and a white-outlined button; "outline" is a Cement hairline on
 * paper with Verdigris ticks and a Harbor button.
 */

.section-models__container {
	width: var(--content);
	max-width: 100%;
	margin-inline: auto;
	padding: 75px 0 90px;
}

.section-models__heading {
	max-width: 93.3%; /* 1120 / 1200 */
	margin: calc(48px * var(--label-gap-scale)) auto 40px;
	color: var(--night);
	font-size: var(--fs-28);
	font-weight: 800;
	line-height: 1.143;
	letter-spacing: -0.025em;
	text-align: center;
	text-wrap: balance;
}

.section-models__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 4.654vw; /* 78 */
	margin: 0;
	padding: 2.804vw 0 0; /* 47 above the cards */
	list-style: none;
}

.model-card {
	display: flex;
	flex-direction: column;
	padding: 1.909vw; /* 32 */
	border: 1px solid transparent;
	border-radius: 0.835vw; /* 14 */
	overflow: hidden;
}

/* Figma draws the filled card without a border; the transparent one above
   keeps both cards the same width so the pair still sums to the column. */
.model-card--filled {
	background: var(--harbor);
	color: #fff;
}

.model-card--outline {
	border-color: var(--cement);
	color: var(--ink);
}

/* Capital Solutions (6044:6893) sets the heading in Mars on the left with a
   Steel counter-statement beside it, in a 1200 column padded 50 above and 52
   below. HOME keeps the centred single heading above. */
/* On Capital Solutions the section opens straight under the sub-nav, so it
   drops the 75 of top padding and the 47 the cards carry on HOME; the frame's
   own 52 under the title and 75 under the cards do the spacing. */
.section-models--split .section-models__container {
	padding: 0 0 75px;
}

.section-models--split .section-models__grid {
	padding-top: 0;
}

.section-models--split .section-models__title {
	display: flex;
	align-items: center;
	gap: 5.333%; /* 64 / 1200 */
	padding: 50px 0 52px;
}

.section-models--split .section-models__heading {
	flex: 0 0 51.75%; /* 621 / 1200 */
	max-width: 51.75%;
	margin: 0;
	/* The frame's 621 heading column holds a 525-wide text box that overhangs
	   its own 147 of right padding; 96 of padding here wraps the text at the
	   same 525 and keeps the column 621 wide. */
	padding-right: 15.459%; /* 621 - 525 = 96, over 621 */
	color: var(--mars);
	font-size: var(--wp--preset--font-size--heading-xl); /* 58 */
	line-height: 1.19; /* 69 */
	letter-spacing: -0.026em; /* -1.52 */
	text-align: left;
}

.section-models--split .section-models__secondary {
	flex: 0 0 46.667%; /* 560 / 1200 */
	max-width: 46.667%;
	margin: 0;
	color: var(--steel);
	font-size: var(--fs-28); /* 28 */
	font-weight: 800;
	line-height: 1.143; /* 32 */
	letter-spacing: -0.021em; /* -0.6 */
}

/* Opening straight under a sub-nav, the section drops its 75 of top padding —
   the nav's own space above it does that work (2108:2035). */
.section-models--aside.is-under-subnav .section-models__container {
	padding-top: 0;
	padding-bottom: 75px;
}

/* The Solution band is the one section on the page that sits on Paper rather
   than white. */
.section-models--aside {
	background: var(--paper);
}

/* Multifamily's Solution (2108:2023) puts the heading, its copy and a button
   in a left column with one card beside them. Its container is 1256 rather
   than the 1200 the rest of the theme uses — the frame sets this section's
   own margins at 210 instead of 238 — so the width is given here.
   601 + 62 + 589 = 1252 inside it. */
.section-models--aside .section-models__container {
	display: grid;
	grid-template-columns: 47.85% 46.895%; /* 601 / 589 */
	column-gap: 4.934%; /* 62 */
	align-items: start;
	width: 74.94vw; /* 1256 */
	padding: 75px 0 72px;
}

.section-models--aside .section-label {
	grid-column: 1 / -1;
}

/* 20.5 under the rule, then the heading's own 53 inside its box. */
.section-models--aside .section-models__heading {
	max-width: none;
	margin: 73.5px 0 35px;
	color: var(--mars);
	font-size: var(--wp--preset--font-size--heading-xl); /* 58 */
	line-height: 1.19; /* 69 */
	letter-spacing: -0.026em; /* -1.52 */
	text-align: left;
}

.section-models--aside .section-models__body {
	max-width: 92.679%; /* 557 / 601 */
	margin: 0 0 30px;
	color: var(--slate);
	font-size: var(--wp--preset--font-size--body); /* 18 */
	font-weight: 600;
	line-height: 1.625; /* 29.25 */
}

/* The card sits 95.5 under the rule, lower than the heading beside it. */
.section-models--aside .section-models__grid {
	grid-template-columns: minmax(0, 1fr);
	margin-top: 95.5px;
	padding: 0;
}

/* Head: eyebrow left, pill right ---------------------------------------- */

.model-card__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.955vw; /* 16 */
	min-height: 1.432vw; /* 24 */
}

/* The frame insets the eyebrow row 6 from the card's own padding. */
.model-card__eyebrow {
	margin: 0;
	padding-left: 0.358vw; /* 6 */
	font-size: var(--fs-10);
	font-weight: 700;
	line-height: 1.6;
	letter-spacing: 0.12em; /* 1.2 on 10 */
	text-transform: uppercase;
}

.model-card--filled .model-card__eyebrow {
	color: var(--paper);
}

.model-card--outline .model-card__eyebrow {
	color: var(--harbor);
}

.model-card__badge {
	display: inline-flex;
	align-items: center;
	height: 1.432vw; /* 24 */
	min-height: 20px;
	margin: 0;
	padding: 0 0.835vw; /* 14 */
	border-radius: 0.358vw; /* 6 */
	color: #fff;
	font-size: var(--fs-10);
	font-weight: 600;
	line-height: 1.6;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	white-space: nowrap;
}

/* The badge colour is per card: HOME pairs Mars with Verdigris, Capital
   Solutions pairs Mars with Steel. */
.model-card__badge--mars { background: var(--mars); }
.model-card__badge--steel { background: var(--steel); }
.model-card__badge--verdigris { background: var(--verdigris); }

/* Title ------------------------------------------------------------------ */

.model-card__title {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 2.864vw; /* 48, bottom-aligned as in the frame */
	margin: 0;
	font-size: var(--wp--preset--font-size--heading-md); /* 24 */
	font-weight: 800;
	line-height: 1.333;
	letter-spacing: -0.025em;
	text-align: center;
}

.model-card--filled .model-card__title {
	color: #fff;
}

.model-card--outline .model-card__title {
	color: var(--harbor);
}

/* Feature rows ----------------------------------------------------------- */

.model-card__features {
	flex: 1 1 auto;
	margin: 0;
	padding: 0.716vw 0 1.432vw; /* 12 above, 24 below */
	list-style: none;
}

/* Every row is ruled underneath, including the last. */
.model-feature {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.432vw;
	min-height: 3.938vw; /* 66 */
	padding: 0.119vw 0 0.298vw; /* 2 / 5 */
	border-bottom: 1px solid transparent;
}

.model-card--filled .model-feature {
	border-bottom-color: var(--steel);
}

.model-card--outline .model-feature {
	border-bottom-color: rgba(11 22 40 / 0.08);
}

.model-feature__label {
	display: flex;
	align-items: center;
	flex: 1 1 auto;
	font-size: var(--wp--preset--font-size--caption); /* 14 */
	font-weight: 600;
	line-height: 1.429;
}

.model-card--filled .model-feature__label {
	color: #fff;
}

.model-card--outline .model-feature__label {
	color: var(--ink);
}

/* The icon file is 39.5x22 with the 12.5px glyph inset inside it — that
   built-in padding is the gap to the label, so the box keeps its own ratio
   rather than being trimmed to the glyph. */
.model-feature__check {
	display: block;
	flex: 0 0 auto;
	width: 2.358vw; /* 39.5 */
	min-width: 28px;
}

.model-feature__check svg {
	display: block;
	width: 100%;
	height: auto;
}

.model-card--filled .model-feature__check {
	color: var(--ivory);
}

/* Client review 2219:1924 — green checks read as a status colour; use the
   brand red instead. */
.model-card--outline .model-feature__check {
	color: var(--mars);
}

.model-feature__description {
	flex: 0 1 auto;
	width: 10.740vw; /* 180 */
	max-width: 10.740vw;
	font-size: var(--fs-12); /* 12 */
	font-weight: 400;
	line-height: 1.333;
	text-align: right;
}

.model-card--filled .model-feature__description {
	color: #fff;
}

.model-card--outline .model-feature__description {
	color: var(--slate);
}

/* Button ----------------------------------------------------------------- */

.model-card__foot {
	display: flex;
	justify-content: flex-end;
}

.model-card .btn--model {
	height: 2.148vw; /* 36 */
	min-height: 34px;
	padding: 0 1.492vw; /* 25 */
	/* main.css sets `border: 0` on .btn and loads after this file, so the
	   selector above carries .model-card to outrank it. */
	border: 1px solid transparent;
	border-radius: 0.43vw; /* 7.2 */
	font-size: var(--fs-12); /* 12 */
	font-weight: 700;
	line-height: 2;
}

.model-card--filled .btn--model {
	border-color: #fff;
	background: transparent;
	color: #fff;
}

.model-card--outline .btn--model {
	background: var(--harbor);
	color: #fff;
}

.model-card--filled .btn--model:hover,
.model-card--filled .btn--model:focus-visible {
	background: #fff;
	color: var(--harbor);
	text-decoration: none;
}

.model-card--outline .btn--model:hover,
.model-card--outline .btn--model:focus-visible {
	background: var(--night);
	color: #fff;
	text-decoration: none;
}

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

@media (max-width: 1024px) {
	.section-models--aside .section-models__container {
		grid-template-columns: minmax(0, 1fr);
		width: var(--content);
		padding-block: 56px;
	}

	.section-models--aside .section-models__heading {
		margin: 32px 0 20px;
	}

	.section-models--aside .section-models__grid {
		margin-top: 32px;
	}

	/* The frame's 621 + 64 + 560 sums past the column, which is fine at full
	   width where the heading overhangs its own padding, but overflows once the
	   column narrows. Stack it instead. */
	.section-models--split .section-models__title {
		flex-direction: column;
		align-items: flex-start;
		gap: 20px;
		padding: 40px 0 32px;
	}

	.section-models--split .section-models__heading,
	.section-models--split .section-models__secondary {
		flex: 0 0 auto;
		max-width: none;
		padding-right: 0;
	}

	.section-models--split .section-models__container {
		padding-bottom: 56px;
	}

	.section-models__grid {
		grid-template-columns: 1fr;
		gap: 24px;
		padding-top: 32px;
	}

	.model-card {
		padding: 24px;
		border-radius: 12px;
	}

	.model-card__head {
		gap: 12px;
	}

	.model-feature {
		min-height: 0;
		padding: 14px 0;
	}

	.model-feature__description {
		width: 40%;
		max-width: 40%;
	}

	.model-feature__check {
		width: 32px;
	}

	.btn--model {
		height: 36px;
		padding: 0 20px;
		border-radius: 6px;
	}
}

@media (max-width: 782px) {
	.section-models__container {
		padding-block: 56px 64px;
	}

	.model-feature {
		align-items: flex-start;
		flex-direction: column;
		gap: 6px;
	}

	.model-feature__description {
		width: auto;
		max-width: none;
		padding-left: 32px;
		text-align: left;
	}
}
