/*
 * About & contact (templates/page-about.html): the About board's sections in the friendly system — two-tone
 * titles, big numbers, icon-led promise cards, photo cards for the people, and the form as a raised card.
 *
 * Every section runs the full width with the side gutter, so nothing here uses the constrained layout's 760px
 * column. Wide-screen values apply from 782px; the phone's at 781px and below.
 */

/* The sections sit edge to edge, and the flow layout's block gap would open seams between them. */
main.maxkan-about > *,
.maxkan-about .wp-block-group > *,
.maxkan-about .maxkan-about-hero__intro > * {
	margin-block: 0;
}

.maxkan-about {
	line-height: normal;
}

.maxkan-about h2 {
	margin: 0;
	color: var(--wp--preset--color--brand);
	font-size: var(--maxkan-title);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.1;
}

/* A section title sits on the left, over what it introduces, with its one line under it. */

.maxkan-about-promises__lead,
.maxkan-about-team .maxkan-people__intro {
	color: var(--wp--preset--color--slate);
	font-size: 17px;
	line-height: 1.6;
}

@media (max-width: 781px) {
	.maxkan-about h2 {
		font-size: 28px;
		line-height: 1.15;
	}

	.maxkan-about-promises__lead,
	.maxkan-about-team .maxkan-people__intro {
		font-size: 15px;
	}
}

/* Opening: the two-tone title and the page's own words beside a big rounded photo. */
.maxkan-about-hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 600px;
	gap: 64px;
	align-items: center;
	padding: var(--maxkan-section) var(--maxkan-gutter);
}

.maxkan-about-hero__text,
.maxkan-about-hero__intro {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.maxkan-about .maxkan-about-hero__title {
	margin: 0;
	color: var(--wp--preset--color--brand);
	font-size: var(--maxkan-display);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.05;
}

.maxkan-about-hero__intro p {
	color: var(--wp--preset--color--slate);
	font-size: 17px;
	line-height: 1.6;
}

.maxkan-about-hero__photo {
	margin: 0;
}

.maxkan-about-hero__photo img {
	display: block;
	width: 100%;
	height: 480px;
	object-fit: cover;
	border-radius: var(--wp--custom--radius--card-large);
}

@media (min-width: 782px) and (max-width: 1199px) {
	.maxkan-about-hero {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 40px;
	}

	.maxkan-about .maxkan-about-hero__title {
		font-size: var(--maxkan-title);
	}

	.maxkan-about-hero__photo img {
		height: auto;
		aspect-ratio: 600 / 480;
	}
}

/* A phone opens on the photo, rounded inside the gutter, with the title and the first paragraph beneath it. */
@media (max-width: 781px) {
	.maxkan-about-hero {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
		padding: 16px 16px 28px;
	}

	.maxkan-about-hero__photo {
		order: -1;
	}

	.maxkan-about-hero__photo img {
		height: 240px;
	}

	.maxkan-about-hero__text {
		gap: 12px;
	}

	.maxkan-about .maxkan-about-hero__title {
		font-size: 32px;
		line-height: 1.1;
	}

	.maxkan-about-hero__intro p {
		font-size: 15px;
	}

	.maxkan-about-hero__intro p + p {
		display: none;
	}
}

/* The numbers: big and blue on a soft blue panel, split by faint rules. */
.maxkan-about-stats {
	padding: 0 var(--maxkan-gutter) 80px;
}

.maxkan-about-stats__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	padding: 36px 0;
	border-radius: var(--wp--custom--radius--card-large);
	background: var(--wp--preset--color--brand-tint);
}

.maxkan-about-stats__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 0 20px;
	text-align: center;
}

.maxkan-about-stats__item + .maxkan-about-stats__item {
	border-left: 1px solid rgb(11 42 91 / 18%);
}

.maxkan-about-stats__value {
	color: var(--wp--preset--color--brand);
	font-size: var(--maxkan-title);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1;
}

.maxkan-about-stats__label {
	color: var(--wp--preset--color--slate);
	font-size: 15px;
	font-weight: 600;
}

@media (min-width: 782px) and (max-width: 1199px) {
	.maxkan-about-stats__value {
		font-size: var(--maxkan-title);
	}
}

@media (max-width: 781px) {
	.maxkan-about-stats {
		padding: 0 16px 32px;
	}

	.maxkan-about-stats__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 20px 0;
		padding: 20px 0;
	}

	.maxkan-about-stats__item {
		gap: 4px;
		padding: 0 12px;
	}

	/* Two a row: only the second of each pair has a rule before it. */
	.maxkan-about-stats__item + .maxkan-about-stats__item:nth-child(odd) {
		border-left: 0;
	}

	.maxkan-about-stats__value {
		font-size: 30px;
	}

	.maxkan-about-stats__label {
		font-size: 13px;
	}
}

/*
 * Our promise: the strong moment of the page, white on the brand navy. The promises are a two-column list,
 * each numbered in gold, the promise, one line on what it means, with a hairline between rows, the way terms
 * are set out in the agreement they come from.
 */
.maxkan-about-promises {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: var(--maxkan-section) var(--maxkan-gutter);
	background: var(--wp--preset--color--brand);
	color: var(--wp--preset--color--white);
}

.maxkan-about .maxkan-about-promises__title {
	color: var(--wp--preset--color--white);
}

.maxkan-about .maxkan-about-promises__lead {
	color: var(--wp--preset--color--sky);
}

.maxkan-about .maxkan-about-promises__list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 56px;
	margin: var(--maxkan-title-gap) 0 0;
	width: 100%;
}

.maxkan-about-promises__item {
	display: grid;
	grid-template-columns: 44px minmax(0, 1fr);
	gap: 4px 16px;
	align-items: start;
	padding: 26px 0;
	border-top: 1px solid rgb(255 255 255 / 14%);
}

/* The first row of each column opens the list; no rule above it. */
.maxkan-about-promises__item:nth-child(-n + 2) {
	border-top: 0;
	padding-top: 8px;
}

.maxkan-about .maxkan-about-promises__number {
	grid-row: span 2;
	color: var(--wp--preset--color--mint);
	font-size: 17px;
	font-weight: 800;
	line-height: 1.4;
}

.maxkan-about .maxkan-about-promises__item h3 {
	color: var(--wp--preset--color--white);
	font-size: 19px;
	font-weight: 700;
	letter-spacing: 0;
	line-height: 1.25;
}

.maxkan-about-promises__item p {
	color: var(--wp--preset--color--sky);
	font-size: 15px;
	line-height: 1.55;
}

/* A phone lists them one under another, the number beside the words. */
@media (max-width: 781px) {
	.maxkan-about-promises {
		gap: 8px;
		padding: 40px 16px;
	}

	.maxkan-about .maxkan-about-promises__list {
		grid-template-columns: minmax(0, 1fr);
		gap: 0;
		margin-top: 16px;
	}

	.maxkan-about-promises__item {
		grid-template-columns: 36px minmax(0, 1fr);
		gap: 2px 14px;
		padding: 18px 0;
	}

	.maxkan-about-promises__item:nth-child(2) {
		border-top: 1px solid rgb(255 255 255 / 14%);
		padding-top: 18px;
	}

	.maxkan-about .maxkan-about-promises__item h3 {
		font-size: 16px;
	}

	.maxkan-about-promises__item p {
		font-size: 14px;
	}
}

/* Our leadership: the title on the left, then the people as photo cards. */
.maxkan-about-team {
	padding: var(--maxkan-section) var(--maxkan-gutter);
}

.maxkan-about-team .maxkan-people {
	gap: 12px;
}

.maxkan-about-team .maxkan-people__grid {
	margin-top: 28px;
}

@media (max-width: 781px) {
	.maxkan-about-team {
		padding: 32px 16px;
	}

	.maxkan-about-team .maxkan-people {
		gap: 8px;
	}

	.maxkan-about-team .maxkan-people__grid {
		margin-top: 12px;
	}
}

/* Check our registration: the title on the left, the numbers as a white card on the right, on the pale band. */
.maxkan-about-verify {
	padding: var(--maxkan-section) var(--maxkan-gutter);
	background: var(--wp--preset--color--mist);
}

/* Until the office enters its registration numbers there is nothing to check, and no empty band to show. */
.maxkan-about-verify:not(:has(.maxkan-registration)) {
	display: none;
}

@media (min-width: 1000px) {
	.maxkan-about-verify .maxkan-registration {
		display: grid;
		grid-template-columns: 400px minmax(0, 1fr);
		grid-template-rows: auto 1fr;
		gap: 16px 72px;
	}

	.maxkan-about-verify .maxkan-registration__rows {
		grid-column: 2;
		grid-row: 1 / span 2;
	}
}

@media (max-width: 781px) {
	.maxkan-about-verify {
		padding: 32px 16px;
	}

	.maxkan-about-verify .maxkan-registration__row--memberships {
		display: none;
	}
}

/*
 * Talk to us: the ways to reach us and the office photo card on the left, the form as a raised card on the
 * right, level with the title.
 */
.maxkan-about-contact {
	display: grid;
	grid-template-columns: 440px minmax(0, 1fr);
	grid-template-rows: auto 1fr;
	gap: 40px 64px;
	align-items: start;
	padding: var(--maxkan-section) var(--maxkan-gutter);
}

.maxkan-about-contact__ways {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.maxkan-about .maxkan-about-contact__lead {
	margin-bottom: 4px;
	color: var(--wp--preset--color--slate);
	font-size: 17px;
	line-height: 1.6;
}

.maxkan-about-contact > .maxkan-contact {
	grid-column: 2;
	grid-row: 1 / span 2;
	gap: 20px;
	padding: 36px;
	border: 0;
	border-radius: var(--wp--custom--radius--card-large);
	box-shadow:
		0 24px 60px -30px rgb(11 42 91 / 45%),
		0 0 0 1px var(--wp--preset--color--line);
}

.maxkan-about-contact .maxkan-contact__heading {
	font-size: 24px;
	font-weight: 800;
	letter-spacing: -0.01em;
	line-height: 1.15;
}

.maxkan-about-office {
	grid-column: 1;
}

/* Each way is a card: a round coloured tile with the icon, then what it is over the number or address. */
.maxkan-about-contact .maxkan-action-button.maxkan-about-contact__way {
	display: grid;
	grid-template-columns: 48px minmax(0, 1fr);
	align-items: center;
	justify-items: start;
	gap: 0 14px;
	height: auto;
	padding: 14px 16px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--card);
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--ink);
	font-size: 16px;
	white-space: normal;
}

.maxkan-about-contact .maxkan-action-button.maxkan-about-contact__way:hover,
.maxkan-about-contact .maxkan-action-button.maxkan-about-contact__way:focus {
	border-color: var(--wp--preset--color--brand);
	background: var(--wp--preset--color--brand-tint);
	color: var(--wp--preset--color--ink);
}

.maxkan-about-contact__way .maxkan-icon {
	box-sizing: border-box;
	grid-row: 1 / span 2;
	width: 48px;
	height: 48px;
	padding: 12px;
	border-radius: 50%;
	background: var(--wp--preset--color--whatsapp);
	color: var(--wp--preset--color--white);
}

.maxkan-about-contact__way--email .maxkan-icon {
	padding: 13px;
	background: var(--wp--preset--color--brand-tint);
	color: var(--wp--preset--color--brand);
}

.maxkan-about-contact__way > span:not(.maxkan-action-button__value) {
	align-self: end;
}

.maxkan-about-contact__way .maxkan-action-button__value {
	align-self: start;
	color: var(--wp--preset--color--slate);
	font-size: 14px;
	font-weight: 400;
}

@media (min-width: 782px) and (max-width: 1199px) {
	.maxkan-about-contact {
		grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
		gap: 32px;
	}

	.maxkan-about-contact > .maxkan-contact {
		padding: 28px;
	}
}

/* A phone: heading, the WhatsApp card, the form, then the office. */
@media (max-width: 781px) {
	.maxkan-about-contact {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
		padding: 32px 16px;
	}

	.maxkan-about-contact > .maxkan-contact,
	.maxkan-about-office {
		grid-column: 1;
		grid-row: auto;
	}

	.maxkan-about-contact > .maxkan-contact {
		padding: 20px 16px;
	}

	.maxkan-about-contact .maxkan-contact__heading {
		font-size: 20px;
	}

	.maxkan-about-contact__ways {
		gap: 12px;
	}

	.maxkan-about-contact__lead,
	.maxkan-about-contact
		.maxkan-action-button.maxkan-about-contact__way--email {
		display: none;
	}

	.maxkan-about-contact .maxkan-action-button.maxkan-about-contact__way {
		padding: 12px 14px;
	}
}

/* With no photo chosen for the page, the words take the whole width rather than leaving a gap beside them. */
.maxkan-about-hero:not(:has(.maxkan-about-hero__photo img)) {
	grid-template-columns: minmax(0, 1fr) !important;
}

.maxkan-about-hero:not(:has(.maxkan-about-hero__photo img)) > * {
	max-width: 760px;
}
