/*!
 * All-In-One-Coach — Coach About
 * Long-form bio beside a portrait, with a pill badge that fills on hover.
 */

.aioc-about {
	--aioc-about-bg: #eae3da;
	--aioc-about-col: 54%;
	--aioc-about-gap: 80px;
	--aioc-badge-fg: #8e1d18;
	--aioc-badge-bg-hover: #8e1d18;
	--aioc-badge-fg-hover: #f7f1ea;

	position: relative;
	background-color: var(--aioc-about-bg);
	font-family: var(--aioc-font-body);
	overflow: clip;
}

.aioc-about__inner {
	display: grid;
	grid-template-columns: var(--aioc-about-col) 1fr;
	align-items: start;
	gap: var(--aioc-about-gap);
	width: 100%;
	max-width: var(--aioc-shell-max);
	margin-inline: auto;
	padding: 140px 80px;
}

.aioc-about-media-start .aioc-about__inner {
	grid-template-columns: 1fr var(--aioc-about-col);
}

.aioc-about-media-start .aioc-about__col--text {
	order: 2;
}

.aioc-about-media-start .aioc-about__col--media {
	order: 1;
}

.aioc-about__col {
	min-width: 0;
}

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

.aioc-about__eyebrow {
	margin: 0 0 26px;
	color: #6e140f;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.15em;
	line-height: 1.5;
	text-transform: uppercase;
}

.aioc-about__heading {
	margin: 0 0 34px;
	color: #171313;
	font-family: var(--aioc-font-display);
	font-size: clamp(2.1rem, 3.4vw, 3.25rem);
	font-weight: 400;
	line-height: 1.08;
	letter-spacing: -0.022em;
}

.aioc-about__sub {
	margin: 0 0 38px;
	color: #8e1d18;
	font-size: clamp(1.15rem, 1.7vw, 1.6rem);
	font-weight: 500;
	line-height: 1.35;
	letter-spacing: -0.012em;
}

.aioc-about__body {
	max-width: 62ch;
	color: #2f2a28;
	font-size: clamp(0.98rem, 1.1vw, 1.05rem);
	line-height: 1.72;
}

.aioc-about__body p {
	margin: 0;
}

.aioc-about__body p + p {
	margin-top: 1.5em;
}

/* --------------------------------------------------------------- Badge */

.aioc-about__badge-wrap {
	display: flex;
	align-items: center;
	/* Wraps rather than squeezing the pill when the two do not fit side by
	   side — a narrow column or a wide credential image. */
	flex-wrap: wrap;
	gap: var(--aioc-cert-gap, 24px);
	margin-top: 72px;
}

/* ------------------------------------------------- Certification badge */

.aioc-about__cert {
	display: flex;
	flex: none;
	align-items: center;
}

.aioc-about__cert-link {
	display: block;
	line-height: 0;
	transition: opacity 0.35s var(--aioc-ease-out);
}

/* Height-driven: whatever the artwork's proportions, it keeps them and sits
   on the same line as the pill. */
/* Specific enough to survive a theme or Elementor image reset. The ceiling is
   also inlined on the tag, so a stylesheet that has not been uploaded yet
   cannot leave the badge at its natural size. */
.aioc-about .aioc-about__cert .aioc-about__cert-img {
	display: block;
	width: auto;
	height: auto;
	max-height: var(--aioc-cert-h, 72px);
	max-width: 100%;
	object-fit: contain;
}

@media (hover: hover) and (pointer: fine) {
	a.aioc-about__cert-link:hover,
	a.aioc-about__cert-link:focus-visible {
		opacity: 0.78;
	}
}

.aioc-about__cert-link:focus-visible {
	outline: 2px solid var(--aioc-badge-fg);
	outline-offset: 4px;
}

.aioc-about__badge {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 320px;
	padding: 17px 28px;
	isolation: isolate;
	overflow: hidden;
	border: 1px solid var(--aioc-badge-fg);
	border-radius: 999px;
	background-color: transparent;
	color: var(--aioc-badge-fg);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.14em;
	line-height: 1;
	text-align: center;
	text-transform: uppercase;
	text-decoration: none;
	transition: color 0.45s var(--aioc-ease-inout);
}

a.aioc-about__badge {
	cursor: pointer;
}

.aioc-about__badge-fill {
	position: absolute;
	inset: 0;
	z-index: -1;
	background-color: var(--aioc-badge-bg-hover);
	transform: translate3d(0, 101%, 0);
	transition: transform 0.6s var(--aioc-ease-inout);
}

a.aioc-about__badge:focus-visible {
	color: var(--aioc-badge-fg-hover);
}

a.aioc-about__badge:focus-visible .aioc-about__badge-fill {
	transform: translate3d(0, 0, 0);
}

.aioc-about__badge-label {
	position: relative;
	display: block;
	overflow: hidden;
}

.aioc-about__badge-text {
	display: block;
	transition: transform 0.55s var(--aioc-ease-inout);
}

.aioc-about__badge-text--ghost {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	transform: translate3d(0, 115%, 0);
}

a.aioc-about__badge:focus-visible .aioc-about__badge-text {
	transform: translate3d(0, -115%, 0);
}

a.aioc-about__badge:focus-visible .aioc-about__badge-text--ghost {
	transform: translate3d(0, 0, 0);
}

/* Same reason as the core button: on a touch screen :hover latches after a tap
   and leaves the badge filled. */
@media (hover: hover) and (pointer: fine) {
	a.aioc-about__badge:hover {
		color: var(--aioc-badge-fg-hover);
	}

	a.aioc-about__badge:hover .aioc-about__badge-fill {
		transform: translate3d(0, 0, 0);
	}

	a.aioc-about__badge:hover .aioc-about__badge-text {
		transform: translate3d(0, -115%, 0);
	}

	a.aioc-about__badge:hover .aioc-about__badge-text--ghost {
		transform: translate3d(0, 0, 0);
	}
}

span.aioc-about__badge .aioc-about__badge-text--ghost {
	display: none;
}

.aioc-about__badge:focus-visible {
	outline: 2px solid var(--aioc-badge-fg);
	outline-offset: 3px;
}


/* ------------------------------------------------------------ Read more */

/* Desktop never sees this: the bio shows in full, exactly as before. */
.aioc-about__more {
	display: none;
}

/* -------------------------------------------------------------- Portrait */

.aioc-about__col--media {
	position: relative;
}

.aioc-about--sticky .aioc-about__col--media {
	position: sticky;
	top: 120px;
}

.aioc-about__figure {
	position: relative;
	width: 100%;
	margin: 0;
	aspect-ratio: 3 / 4;
	border-radius: 26px;
	overflow: hidden;
	background-color: rgba(94, 17, 15, 0.06);
	will-change: transform;
}

.aioc-about__figure-mask {
	position: absolute;
	inset: 0;
	overflow: hidden;
	border-radius: inherit;
}

.aioc-about__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	will-change: transform;
}

.aioc-about__sheen {
	position: absolute;
	inset: 0;
	pointer-events: none;
	border-radius: inherit;
	background: linear-gradient(115deg, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0) 45%);
	opacity: 0;
}

/* ----------------------------------------------------------- Breakpoints */

@media (max-width: 1024px) {
	.aioc-about__inner,
	.aioc-about-media-start .aioc-about__inner {
		grid-template-columns: 1fr;
		gap: 48px;
		padding: 96px 32px;
	}

	.aioc-about-media-start .aioc-about__col--text,
	.aioc-about-media-start .aioc-about__col--media {
		order: 0;
	}

	.aioc-about--sticky .aioc-about__col--media {
		position: static;
	}

	.aioc-about__figure {
		max-width: 520px;
	}

	.aioc-about__heading,
	.aioc-about__sub {
		margin-bottom: 26px;
	}

	.aioc-about__badge-wrap {
		margin-top: 48px;
	}
}

@media (max-width: 767px) {
	.aioc-about__inner {
		padding: 10px;
		gap: 28px;
	}

	/* Four paragraphs is a long scroll on a phone, so the bio is collapsed to
	   a readable opening and expands on demand. The clamp is a max-height in
	   em rather than line-clamp so the change can animate. */
	.aioc-about__body {
		position: relative;
		max-height: 16.5em;
		overflow: hidden;
		transition: max-height 0.5s var(--aioc-ease-inout);
	}

	/* The fade signals there is more, without a hard cut. */
	.aioc-about__body::after {
		content: "";
		position: absolute;
		inset-inline: 0;
		inset-block-end: 0;
		height: 4.5em;
		pointer-events: none;
		background: linear-gradient(to bottom, rgba(234, 227, 218, 0), var(--aioc-about-bg));
		transition: opacity 0.35s var(--aioc-ease-inout);
	}

	.aioc-about__body.is-open {
		/* Animating to a number keeps the transition, which `none` would not. */
		max-height: 200em;
	}

	.aioc-about__body.is-open::after {
		opacity: 0;
	}

	.aioc-about__more {
		display: inline-flex;
		align-items: center;
		gap: 0.5em;
		margin-block-start: 1.1em;
		padding: 0;
		border: 0;
		background: none;
		color: var(--aioc-badge-fg);
		font-family: inherit;
		font-size: 0.86rem;
		font-weight: 600;
		letter-spacing: 0.08em;
		line-height: 1;
		text-transform: uppercase;
		cursor: pointer;
	}

	.aioc-about__more-chev {
		display: block;
		width: 0.5em;
		height: 0.5em;
		border-inline-end: 1.5px solid currentColor;
		border-block-end: 1.5px solid currentColor;
		transform: translateY(-0.15em) rotate(45deg);
		transition: transform 0.35s var(--aioc-ease-inout);
	}

	.aioc-about__more[aria-expanded="true"] .aioc-about__more-chev {
		transform: translateY(0.1em) rotate(-135deg);
	}

	.aioc-about__more:focus-visible {
		outline: 2px solid var(--aioc-badge-fg);
		outline-offset: 4px;
	}

	/* The portrait was a 3:4 column 447px tall on a 375px screen, which pushed
	   everything under it well off the fold. A gentler ratio, capped to the
	   screen height. */
	.aioc-about__figure {
		/* 3:4 made a 447px column on a 375px screen, which pushed everything
		   below it off the fold. Square sits better next to the copy. */
		aspect-ratio: 1 / 1;
		max-height: 58vh;
		border-radius: 18px;
	}

	.aioc-about__heading {
		font-size: clamp(1.85rem, 8vw, 2.4rem);
	}

	.aioc-about__sub {
		font-size: clamp(1.1rem, 5vw, 1.35rem);
	}

	/* A label, not a call to action, so it sits centred at its natural width
	   instead of taking the full-width button treatment. The credential sits
	   beside it, and the pair centre together.
	   nowrap keeps them on one line: the two together are wider than a phone,
	   and both are allowed to shrink to share the row rather than the badge
	   dropping underneath. */
	.aioc-about__badge-wrap {
		justify-content: center;
		flex-wrap: nowrap;
		gap: var(--aioc-cert-gap, 12px);
	}

	/* The pill holds its natural width and its label stays on one line; the
	   badge is the one that gives, since scaling artwork reads better than a
	   two-line label in a pill. */
	.aioc-about .aioc-about__badge {
		flex: 0 0 auto;
		white-space: nowrap;
	}

	.aioc-about .aioc-about__cert {
		flex: 0 1 auto;
		min-width: 0;
	}

	.aioc-about__badge,
	.aioc-about__badge.aioc-btn {
		width: auto;
		min-width: 0;
		max-width: 100%;
		padding: 15px 20px;
	}

	.aioc-about__figure {
		max-width: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.aioc-about__badge,
	.aioc-about__badge-fill,
	.aioc-about__badge-text {
		transition-duration: 0.01ms !important;
	}
}
