/* Purpose: home_signoff – closing note on Home: cream band, round photo, large gold quote mark, quote set in the heading face
   (second line gold via <span>), signature with a gold rule and a role line.
   Grid layout keeps the quote mark level with the quote; .home-signoff__text is display:contents so its children are grid items.
   Mobile/tablet: photo on top, then [mark | quote] with the signature under the quote. Desktop: [photo | mark | quote]. */

.home-signoff {
	display: grid;
	grid-template-columns: auto minmax(0, auto);
	justify-content: center;
	align-items: center;
	column-gap: var(--space-14);
	row-gap: 0;
	width: 100%;
	padding: var(--space-48) var(--space-16);
	background-color: var(--color-cream);
	border-top: 1px solid var(--color-border-cream);
	border-bottom: 1px solid var(--color-border-cream);
}

.home-signoff__photo {
	grid-column: 1 / -1;
	grid-row: 1;
	margin-bottom: var(--space-28);
}

.home-signoff__img {
	display: block;
	width: 100%;
	max-width: 200px;
	height: auto;
	margin: 0 auto;
}

.home-signoff__mark {
	grid-column: 1;
	grid-row: 2;
	align-self: start;
	width: 40px;
}

.home-signoff__mark-img {
	display: block;
	width: 100%;
	height: auto;
}

.home-signoff__text {
	display: contents;
}

.home-signoff__quote {
	grid-column: 2;
	grid-row: 2;
	margin: 0;
	color: var(--color-secondary);
	font-family: var(--font-heading);
	font-size: var(--text-26);
	font-weight: var(--weight-semibold);
	line-height: 1.15;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

/* Second line of the quote (wrapped in <span> in the field) in gold. */
.home-signoff__quote span {
	color: var(--color-gold-deep);
}

.home-signoff__ps {
	grid-column: 2;
	grid-row: 3;
	margin: var(--space-16) 0 0;
	color: var(--color-body);
	font-family: var(--font-body);
	font-size: var(--text-16);
	line-height: var(--leading-normal);
}

.home-signoff__sign {
	display: flex;
	align-items: flex-start; /* rule sits level with the name, not centred on name + role */
	gap: var(--space-14);
	grid-column: 2;
	grid-row: 4;
	margin-top: var(--space-24);
}

.home-signoff__line {
	flex: 0 0 48px;
	margin-top: 11px;
	border-top: 2px solid var(--color-gold);
}

.home-signoff__who {
	display: flex;
	flex-direction: column;
	margin: 0;
}

.home-signoff__name {
	color: var(--color-secondary);
	font-family: var(--font-body);
	font-size: var(--text-17);
	font-weight: var(--weight-semibold);
	line-height: 1.3;
}

.home-signoff__role {
	color: var(--color-muted);
	font-family: var(--font-body);
	font-size: var(--text-13);
	line-height: 1.4;
}

/* Parts of a "A · B" role stay whole on tablet/desktop; on phones the line wraps freely (balanced) so it never overflows. */
.home-signoff__role {
	text-wrap: balance;
}

@media (min-width: 768px) {
	.home-signoff__role-part {
		white-space: nowrap;
	}
}

@media (min-width: 768px) {
	.home-signoff {
		column-gap: var(--space-20);
		padding: var(--space-60) var(--space-40);
	}

	.home-signoff__img {
		max-width: 220px;
	}

	.home-signoff__mark {
		width: 56px;
	}

	.home-signoff__quote {
		font-size: var(--text-36);
	}

	.home-signoff__sign {
		margin-top: var(--space-28);
	}

	.home-signoff__line {
		flex-basis: 64px;
		margin-top: 13px;
	}

	.home-signoff__name {
		font-size: var(--text-20);
	}

	.home-signoff__role {
		font-size: var(--text-14);
	}
}

@media (min-width: 1025px) {
	.home-signoff {
		grid-template-columns: 300px auto minmax(0, auto); /* 260px photo + 40px gap before the mark */
		grid-template-rows: 1fr auto auto auto 1fr;
		column-gap: var(--space-24);
		padding: var(--space-80) var(--gutter);
	}

	.home-signoff__photo {
		grid-column: 1;
		grid-row: 1 / -1;
		margin: 0 var(--space-40) 0 0;
	}

	.home-signoff__img {
		max-width: 260px;
	}

	.home-signoff__mark {
		grid-column: 2;
		width: 72px;
	}

	.home-signoff__quote,
	.home-signoff__ps,
	.home-signoff__sign {
		grid-column: 3;
	}

	.home-signoff__quote {
		font-size: var(--text-48);
	}

	.home-signoff__sign {
		margin-top: var(--space-32);
	}
}
