/**
 * HTG Founder Bio — styles
 *
 * Three-column full-bleed section on red. Portrait fills its column
 * top-to-bottom; content + book have their own padding-block.
 */

.htg-founder-bio {
	/* Vertical gradient — dark crimson at top to a more saturated red at
	   the bottom. CSS approximation of the reference image; tweak the
	   two stops to dial the tone in. */
	background: linear-gradient(180deg, #3F1010 0%, #B22A2A 100%);
	color: var(--c-white);
	position: relative;
	overflow: hidden;
}

.htg-founder-bio--about {
	background: #f1f1f1;
	color: var(--c-ink);
}

/* --- Optional decorative background overlay --------------------- */

.htg-founder-bio__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
}

.htg-founder-bio__bg img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
}

.htg-founder-bio__bg--preset img {
	mix-blend-mode: screen;
	filter: saturate(0.8);
}

/* --- Inner constrained container -------------------------------- */

.htg-founder-bio__inner {
	position: relative;
	z-index: 1;
	max-width: 1280px;
	margin-inline: auto;
	padding-inline: var(--container-pad-x);
	display: grid;
	grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.55fr) minmax(160px, 0.55fr);
	grid-template-rows: 1fr;
	gap: var(--sp-xl);
	/* Default-align all grid children to the row's bottom edge so the
	   portrait can sit flush with the section's bottom. Content + book
	   columns override this with align-self below. */
	align-items: end;
	min-height: 600px;
}

/* --- Portrait column (fills top-to-bottom) --------------------- */

.htg-founder-bio__photo {
	position: relative;
	z-index: 2;
	width: 100%;
	height: 90%;
	overflow: visible;
	/* align-self: end inherited from .htg-founder-bio__inner — anchors
	   the bottom of the photo to the section's bottom edge. */
}

.htg-founder-bio__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: bottom;
	display: block;
}

.htg-founder-bio:not(.htg-founder-bio--about) .htg-founder-bio__photo img {
	width: 100%;
	max-width: none;
	object-fit: contain;
	object-position: bottom left;
}

.htg-founder-bio__photo--empty {
	background: rgba(0, 0, 0, 0.08);
}

.htg-founder-bio__mobile-photo {
	position: relative;
	z-index: 2;
	display: none;
}

.htg-founder-bio__mobile-photo img {
	width: 100%;
	height: auto;
	object-fit: contain;
	object-position: bottom center;
	display: block;
}

/* --- Content column -------------------------------------------- */

.htg-founder-bio__content {
	align-self: stretch;
	padding-block: var(--sp-3xl);
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: var(--sp-md);
}

.htg-founder-bio__heading {
	margin: 0 0 var(--sp-sm);
}

.htg-founder-bio__eyebrow {
	margin: 0 0 24px;
	font-family: var(--ff-mono);
	font-size: 10px;
	font-weight: var(--fw-medium);
	line-height: 1.2;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--c-red);
}

.htg-founder-bio__bio {
	font-family: var(--ff-sans);
	font-weight: var(--fw-regular);
	font-size: 13px;
	line-height: 1.6;
}

.htg-founder-bio__bio p {
	margin: 0 0 var(--sp-sm);
	max-width: 90ch;
}
.htg-founder-bio__bio p:last-child {
	margin-bottom: 0;
}

/* Pull quote — italic serif with a thin white left rule */
.htg-founder-bio__quote {
	margin: var(--sp-md) 0 0;
	padding-left: var(--sp-md);
	border-left: 1px solid rgba(255, 255, 255, 0.6);
	font-family: var(--ff-serif);
	font-style: italic;
	font-weight: 400;
	font-size: clamp(1.125rem, 1.5vw, 1.375rem);
	line-height: 1.4;
	color: var(--c-white);
}

.htg-founder-bio__quote p {
	margin: 0;
}

.htg-founder-bio__button {
	align-self: flex-start;
	margin-top: var(--sp-sm);
}

/* --- Book column ----------------------------------------------- */

.htg-founder-bio__book {
	align-self: center;
	padding-block: var(--sp-3xl);
	display: flex;
	align-items: center;
	justify-content: center;
}

.htg-founder-bio__book img {
	width: 100%;
	max-width: 220px;
	height: auto;
	display: block;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.htg-founder-bio__book--empty {
	min-height: 1px;
}

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

@media (max-width: 1024px) {
	.htg-founder-bio__inner {
		grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr);
		gap: var(--sp-lg);
	}
	.htg-founder-bio:not(.htg-founder-bio--about) .htg-founder-bio__photo {
		max-width: 320px;
		height: auto;
		min-height: 0;
		justify-self: center;
	}
	.htg-founder-bio:not(.htg-founder-bio--about) .htg-founder-bio__photo img {
		height: auto;
	}
	.htg-founder-bio--has-mobile-portrait .htg-founder-bio__photo {
		display: none;
	}
	.htg-founder-bio--has-mobile-portrait:not(.htg-founder-bio--about) .htg-founder-bio__inner {
		max-width: none;
		padding-inline: 0;
		grid-template-columns: 1fr 1fr;
		grid-template-areas:
			"photo   photo"
			"heading heading"
			"bio     bio"
			"quote   quote"
			"book    button";
		gap: 0;
		min-height: 0;
	}
	.htg-founder-bio--has-mobile-portrait .htg-founder-bio__mobile-photo {
		display: flex;
		grid-area: photo;
		align-self: end;
		justify-self: center;
		align-items: flex-end;
		justify-content: center;
		width: 100%;
		padding-inline: var(--container-pad-x);
	}
	.htg-founder-bio--has-mobile-portrait:not(.htg-founder-bio--about) .htg-founder-bio__mobile-photo {
		background: #DCDCDC;
	}
	.htg-founder-bio--has-mobile-portrait .htg-founder-bio__mobile-photo img {
		width: min(320px, 100%);
	}
	.htg-founder-bio--has-mobile-portrait:not(.htg-founder-bio--about) .htg-founder-bio__content {
		display: contents;
		padding-inline: var(--container-pad-x);
	}
	.htg-founder-bio--has-mobile-portrait:not(.htg-founder-bio--about) .htg-founder-bio__book {
		padding-inline: var(--container-pad-x);
	}
	.htg-founder-bio__book {
		grid-column: 1 / -1;
		padding-block: 0 var(--sp-2xl);
	}
	.htg-founder-bio__book img {
		max-width: 180px;
	}
	.htg-founder-bio--has-mobile-portrait:not(.htg-founder-bio--about) .htg-founder-bio__heading {
		grid-area: heading;
		margin: 0 var(--container-pad-x) var(--sp-md);
		padding-top: var(--sp-xl);
	}
	.htg-founder-bio--has-mobile-portrait:not(.htg-founder-bio--about) .htg-founder-bio__bio {
		grid-area: bio;
		margin: 0 var(--container-pad-x) var(--sp-md);
	}
	.htg-founder-bio--has-mobile-portrait:not(.htg-founder-bio--about) .htg-founder-bio__quote {
		grid-area: quote;
		margin: 0 var(--container-pad-x) var(--sp-lg);
	}
	.htg-founder-bio--has-mobile-portrait:not(.htg-founder-bio--about) .htg-founder-bio__book {
		grid-area: book;
		align-self: center;
		justify-self: center;
		padding-block: var(--sp-sm) var(--sp-xl);
	}
	.htg-founder-bio--has-mobile-portrait:not(.htg-founder-bio--about) .htg-founder-bio__book img {
		max-width: 125px;
	}
	.htg-founder-bio--has-mobile-portrait:not(.htg-founder-bio--about) .htg-founder-bio__button {
		grid-area: button;
		align-self: center;
		justify-self: center;
		margin: var(--sp-sm) var(--container-pad-x) var(--sp-xl) 0;
	}
}

@media (max-width: 768px) {
	/* Mobile layout: photo full-width, then heading/bio/quote stacked
	   full-width, then the book + button as a side-by-side row at the
	   bottom. Achieved by giving the inner grid named template areas
	   and using display: contents on .htg-founder-bio__content so its
	   children (heading, bio, quote, button) become direct grid items
	   and can be placed independently of the desktop content column. */
	.htg-founder-bio__inner {
		grid-template-columns: 1fr 1fr;
		grid-template-rows: auto;
		grid-template-areas:
			"photo   photo"
			"heading heading"
			"bio     bio"
			"quote   quote"
			"book    button";
		gap: var(--sp-md);
		min-height: 0;
		align-items: end;
	}
	.htg-founder-bio--has-mobile-portrait:not(.htg-founder-bio--about) .htg-founder-bio__inner {
		grid-template-columns: 1fr 1fr;
		grid-template-areas:
			"photo   photo"
			"heading heading"
			"bio     bio"
			"quote   quote"
			"book    button";
		gap: 0;
	}
	.htg-founder-bio__photo {
		grid-area: photo;
		height: auto;
		min-height: 360px;
	}
	.htg-founder-bio__mobile-photo {
		grid-area: photo;
	}
	.htg-founder-bio:not(.htg-founder-bio--about) .htg-founder-bio__photo {
		max-width: 280px;
		min-height: 0;
		margin-inline: auto;
	}
	.htg-founder-bio--has-mobile-portrait .htg-founder-bio__mobile-photo {
		width: 100%;
		margin-inline: auto;
	}
	.htg-founder-bio--has-mobile-portrait .htg-founder-bio__mobile-photo img {
		width: min(280px, 100%);
	}
	.htg-founder-bio:not(.htg-founder-bio--about) .htg-founder-bio__photo img {
		width: 100%;
		max-width: 100%;
		height: auto;
	}
	.htg-founder-bio__content {
		display: contents;
	}
	.htg-founder-bio__heading {
		grid-area: heading;
		margin: 0;
		padding-top: var(--sp-xl);
	}
	.htg-founder-bio__bio   { grid-area: bio; }
	.htg-founder-bio__quote { grid-area: quote; }
	.htg-founder-bio--has-mobile-portrait:not(.htg-founder-bio--about) .htg-founder-bio__heading,
	.htg-founder-bio--has-mobile-portrait:not(.htg-founder-bio--about) .htg-founder-bio__bio,
	.htg-founder-bio--has-mobile-portrait:not(.htg-founder-bio--about) .htg-founder-bio__quote {
		margin-inline: var(--container-pad-x);
	}
	.htg-founder-bio--has-mobile-portrait:not(.htg-founder-bio--about) .htg-founder-bio__heading {
		margin-bottom: var(--sp-md);
	}
	.htg-founder-bio--has-mobile-portrait:not(.htg-founder-bio--about) .htg-founder-bio__bio {
		margin-bottom: var(--sp-md);
	}
	.htg-founder-bio--has-mobile-portrait:not(.htg-founder-bio--about) .htg-founder-bio__quote {
		margin-top: 0;
		margin-bottom: var(--sp-lg);
	}
	.htg-founder-bio__button {
		grid-area: button;
		align-self: center;
		justify-self: center;
		margin: 0 0 var(--sp-xl) 0;
	}
	.htg-founder-bio--has-mobile-portrait:not(.htg-founder-bio--about) .htg-founder-bio__button {
		margin-top: var(--sp-sm);
	}
	.htg-founder-bio__book {
		grid-area: book;
		align-self: center;
		justify-self: center;
		padding-block: 0 var(--sp-xl);
	}
	.htg-founder-bio--has-mobile-portrait:not(.htg-founder-bio--about) .htg-founder-bio__book {
		padding-block: var(--sp-sm) var(--sp-xl);
	}
	.htg-founder-bio--has-mobile-portrait:not(.htg-founder-bio--about) .htg-founder-bio__book img {
		max-width: 99px;
	}
}

/* --- Editor-specific tweaks ------------------------------------ */

.editor-styles-wrapper .htg-founder-bio {
	max-width: 100%;
}

/* --- About page variant ----------------------------------------- */

.htg-founder-bio--about .htg-founder-bio__inner {
	max-width: 1260px;
	min-height: 700px;
	grid-template-columns: 420px minmax(0, 768px);
	gap: 48px;
	align-items: end;
}

.htg-founder-bio--about .htg-founder-bio__photo {
	align-self: end;
	height: 640px;
}

.htg-founder-bio--about .htg-founder-bio__photo img {
	object-fit: contain;
	object-position: bottom left;
}

.htg-founder-bio--about .htg-founder-bio__content {
	align-self: start;
	max-width: 768px;
	padding-block: 84px 72px;
	gap: 0;
}

.htg-founder-bio--about .htg-founder-bio__heading {
	margin-bottom: 28px;
	font-size: 48px;
	line-height: 56px;
}

.htg-founder-bio--about .htg-founder-bio__bio {
	font-size: 14px;
	line-height: 22px;
	color: #0e0d0b;
}

.htg-founder-bio--about .htg-founder-bio__bio p {
	max-width: none;
	margin-bottom: 24px;
}

.htg-founder-bio--about .htg-founder-bio__quote {
	margin-top: 22px;
	padding-left: 20px;
	border-left-color: var(--c-red);
	font-size: 20px;
	line-height: 28px;
	color: var(--c-ink);
}

.htg-founder-bio--about .htg-founder-bio__button {
	margin-top: 34px;
}

.htg-founder-bio--about .htg-founder-bio__book {
	display: none;
}

.site-main > .htg-founder-bio--about:last-child {
	margin-bottom: 0;
}

.site-main:has(> .htg-founder-bio--about:last-child) + .site-cta {
	margin-top: 0;
}

@media (max-width: 1024px) {
	.htg-founder-bio--about .htg-founder-bio__inner {
		grid-template-columns: 280px minmax(0, 1fr);
		gap: 48px;
		min-height: 0;
	}

	.htg-founder-bio--about .htg-founder-bio__photo {
		width: min(280px, 100%);
		height: auto;
		min-height: 0;
		justify-self: center;
	}

	.htg-founder-bio--about.htg-founder-bio--has-mobile-portrait .htg-founder-bio__photo {
		display: block;
	}

	.htg-founder-bio--about .htg-founder-bio__photo img {
		height: auto;
	}

	.htg-founder-bio--about.htg-founder-bio--has-mobile-portrait .htg-founder-bio__mobile-photo {
		display: none;
	}
}

@media (max-width: 768px) {
	.htg-founder-bio--about .htg-founder-bio__inner {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.htg-founder-bio--about .htg-founder-bio__photo {
		width: min(280px, 100%);
		height: auto;
		min-height: 0;
		margin-inline: auto;
	}

	.htg-founder-bio--about.htg-founder-bio--has-mobile-portrait .htg-founder-bio__photo {
		display: none;
	}

	.htg-founder-bio--about .htg-founder-bio__photo img {
		height: auto;
	}

	.htg-founder-bio--about.htg-founder-bio--has-mobile-portrait .htg-founder-bio__mobile-photo {
		display: flex;
		background: #DCDCDC;
		width: 100vw;
		margin-left: calc(50% - 50vw);
		margin-right: calc(50% - 50vw);
		padding-inline: 0;
	}

	.htg-founder-bio--about .htg-founder-bio__content {
		display: flex;
		padding-block: 48px 64px;
	}

	.htg-founder-bio--about .htg-founder-bio__heading {
		padding-top: 0;
		font-size: 38px;
		line-height: 44px;
	}

	.htg-founder-bio--about .htg-founder-bio__button {
		width: 100%;
	}
}

@media (max-width: 480px) {
	.htg-founder-bio--about .htg-founder-bio__photo {
		width: min(240px, 100%);
	}

	.htg-founder-bio--has-mobile-portrait .htg-founder-bio__mobile-photo,
	.htg-founder-bio--about.htg-founder-bio--has-mobile-portrait .htg-founder-bio__mobile-photo {
		width: 100vw;
	}

	.htg-founder-bio--has-mobile-portrait .htg-founder-bio__mobile-photo img,
	.htg-founder-bio--about.htg-founder-bio--has-mobile-portrait .htg-founder-bio__mobile-photo img {
		width: min(240px, 100%);
	}

	.htg-founder-bio--about .htg-founder-bio__content {
		padding-block: 36px 52px;
	}

	.htg-founder-bio--about .htg-founder-bio__eyebrow {
		margin-bottom: 18px;
	}

	.htg-founder-bio--about .htg-founder-bio__heading {
		margin-bottom: 22px;
		font-size: 34px;
		line-height: 39px;
	}

	.htg-founder-bio--about .htg-founder-bio__quote {
		font-size: 18px;
		line-height: 26px;
	}

	.htg-founder-bio--about .htg-founder-bio__button {
		justify-content: center;
	}
}
