/*
 * Our Team page: alj/team-hero, alj/team-grid, alj/beliefs.
 * Every page stylesheet loads on every page, so all classes here start with .alj-team-.
 */

/* ----------------------------------------------------------- Header -- */

.alj-section.is-ink.alj-team-hero {
	overflow: hidden;
	isolation: isolate;
	padding-block: clamp(2.5rem, 5.5vw, 4.5rem) clamp(2.75rem, 6vw, 4.75rem);
	background:
		radial-gradient(48% 70% at 80% 48%, rgba(163, 49, 42, 0.34) 0%, rgba(163, 49, 42, 0) 100%),
		radial-gradient(38% 60% at 0% 100%, rgba(232, 181, 71, 0.1) 0%, rgba(232, 181, 71, 0) 100%),
		var(--alj-ink);
}

.alj-team-hero__split.alj-split {
	align-items: center;
	gap: clamp(2.5rem, 5vw, 4rem) !important;
}

.alj-team-hero .alj-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
}

.alj-team-hero .alj-eyebrow::before {
	content: "";
	width: 2.25rem;
	height: 2px;
	background: currentColor;
}

.alj-team-hero h1 {
	font-size: clamp(2.5rem, 5.2vw, 4.25rem);
	line-height: 1.03;
	letter-spacing: -0.025em;
	font-weight: 520;
	color: var(--wp--preset--color--white);
	margin-block-end: 0;
}

.alj-team-hero .alj-lead {
	margin-block-start: clamp(1.25rem, 2.4vw, 1.75rem) !important;
	max-width: 34rem;
	font-size: clamp(1.125rem, 1.7vw, 1.3rem);
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.82);
}

.alj-team-hero__buttons {
	margin-block-start: clamp(1.75rem, 3vw, 2.25rem) !important;
}

/* In-page jump to Our Beliefs: arrow points down. */
.wp-block-button.alj-team-btn-down > .wp-block-button__link::after {
	content: "\2193";
	display: inline-block;
	margin-inline-start: 0.55em;
	transition: transform 0.2s var(--alj-ease);
}

.wp-block-button.alj-team-btn-down > .wp-block-button__link:hover::after {
	transform: translateY(2px);
}

/* Honeycomb of the eleven portraits (4 · 3 · 4), gently overlapping. */
.alj-team-faces {
	--d: 26.6%;
	position: relative;
	width: 100%;
	max-width: 540px;
	aspect-ratio: 1.45;
	margin-inline: auto 0 !important;
}

.alj-team-faces::before,
.alj-team-faces::after {
	content: "";
	position: absolute;
	top: 50%;
	width: 8.5%;
	aspect-ratio: 1;
	border-radius: 50%;
	transform: translateY(-50%);
	pointer-events: none;
}

.alj-team-faces::before {
	left: 1.6%;
	background: var(--alj-gold);
}

.alj-team-faces::after {
	right: 1.6%;
	border: 2px solid rgba(232, 181, 71, 0.75);
	box-sizing: border-box;
}

.alj-team-faces > .wp-block-image {
	position: absolute;
	width: var(--d);
	aspect-ratio: 1;
	margin: 0 !important;
	border-radius: 50%;
	transition: transform 0.35s var(--alj-ease);
}

.alj-team-faces > .wp-block-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
	border: 4px solid var(--alj-ink);
	box-sizing: border-box;
	box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

.alj-team-faces > .wp-block-image:hover {
	transform: scale(1.06);
	z-index: 5;
}

/* Row 1 */
.alj-team-faces > :nth-child(1)  { left: 0;       top: 0; }
.alj-team-faces > :nth-child(2)  { left: 24.47%;  top: 0; }
.alj-team-faces > :nth-child(3)  { left: 48.94%;  top: 0; }
.alj-team-faces > :nth-child(4)  { left: 73.4%;   top: 0; }
/* Row 2 (offset half a step) */
.alj-team-faces > :nth-child(5)  { left: 12.24%;  top: 30.72%; }
.alj-team-faces > :nth-child(6)  { left: 36.7%;   top: 30.72%; }
.alj-team-faces > :nth-child(7)  { left: 61.18%;  top: 30.72%; }
/* Row 3 */
.alj-team-faces > :nth-child(8)  { left: 0;       top: 61.44%; }
.alj-team-faces > :nth-child(9)  { left: 24.47%;  top: 61.44%; }
.alj-team-faces > :nth-child(10) { left: 48.94%;  top: 61.44%; }
.alj-team-faces > :nth-child(11) { left: 73.4%;   top: 61.44%; }

@media (max-width: 781px) {
	.alj-team-faces {
		max-width: 440px;
		margin-inline: 0 auto !important;
	}

	.alj-team-faces > .wp-block-image img {
		border-width: 3px;
	}
}

/* ------------------------------------------------------- Team cards -- */

/* No section heading here (the page title sits just above), so less top space. */
.alj-section.alj-team-grid {
	padding-block-start: clamp(2rem, 4.5vw, 3.5rem);
}

.alj-team-grid__list {
	--alj-team-gap: clamp(1.25rem, 2.5vw, 2rem);
	gap: var(--alj-team-gap);
}

.alj-team-card.alj-card {
	display: flex;
	flex-direction: column;
	padding: clamp(1.5rem, 3vw, 2.25rem);
	border-radius: var(--alj-radius-l);
	box-shadow: 0 1px 2px rgba(28, 24, 21, 0.04), 0 10px 30px rgba(28, 24, 21, 0.06);
}

.alj-team-card > * {
	margin: 0 !important;
}

.alj-team-card__head {
	display: flex;
	align-items: center;
	gap: clamp(1rem, 2vw, 1.4rem);
	padding-block-end: clamp(1.1rem, 2vw, 1.4rem);
	border-bottom: 1px solid var(--alj-line);
}

.alj-team-card__head > * {
	margin: 0 !important;
}

/* Round portrait with a thin gold-to-clay ring. */
.alj-team-card__photo.wp-block-image {
	flex: 0 0 auto;
	width: clamp(84px, 8vw, 104px);
	padding: 3px;
	border-radius: 50%;
	background: linear-gradient(140deg, var(--alj-gold) 0%, var(--alj-clay) 100%);
	box-shadow: 0 8px 20px rgba(28, 24, 21, 0.12);
}

.alj-team-card__photo.wp-block-image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 50%;
	border: 3px solid var(--wp--preset--color--white);
	box-sizing: border-box;
}

/* Names are H2: the page title (H1) is the heading for this list. */
.alj-team-card h2 {
	font-size: clamp(1.3rem, 1.9vw, 1.55rem);
	line-height: 1.2;
	letter-spacing: -0.01em;
	margin: 0;
}

.alj-team-card > p {
	margin-block-start: clamp(1.1rem, 2vw, 1.4rem) !important;
	font-size: 1rem;
	line-height: 1.72;
	color: var(--wp--preset--color--text);
}

@media (max-width: 480px) {
	.alj-team-card__photo.wp-block-image {
		width: 76px;
	}

	.alj-team-card h2 {
		font-size: 1.3rem;
	}
}

/* Odd number of people: centre the last card on its own row. */
@media (min-width: 681px) {
	.alj-team-grid__list > :last-child:nth-child(odd) {
		grid-column: 1 / -1;
		justify-self: center;
		width: calc((100% - var(--alj-team-gap)) / 2);
	}
}

/* ---------------------------------------------------------- Beliefs -- */

.alj-section.alj-team-beliefs {
	padding-block-start: 0;
}

.alj-team-beliefs__band.wp-block-cover {
	isolation: isolate;
	min-height: 0;
	padding-block: clamp(3rem, 6vw, 4.5rem) clamp(6.5rem, 11vw, 8.5rem);
	padding-inline: var(--wp--style--root--padding-left, 1.5rem) var(--wp--style--root--padding-right, 1.5rem);
	text-align: center;
	color: var(--wp--preset--color--white);
}

.alj-team-beliefs__band::before {
	/* Keep the heading readable whatever the photo does. */
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(180deg, rgba(28, 24, 21, 0.15) 0%, rgba(28, 24, 21, 0.55) 100%);
	pointer-events: none;
}

.alj-team-beliefs__band .wp-block-cover__inner-container {
	z-index: 2;
	width: 100%;
	/* The editor sets cover content to text-align: left; keep it centred there too. */
	text-align: center;
}

.alj-team-beliefs__band h2 {
	color: var(--wp--preset--color--white);
	font-size: clamp(2.5rem, 5.2vw, 4rem);
	letter-spacing: -0.02em;
	margin-inline: auto;
	text-shadow: 0 2px 30px rgba(0, 0, 0, 0.3);
}

.alj-team-beliefs__band h2::before {
	content: "";
	display: block;
	width: 2.75rem;
	height: 2px;
	margin: 0 auto 1.4rem;
	background: var(--alj-gold);
}

.alj-team-beliefs__intro {
	margin-block-start: 0.85rem !important;
	font-family: var(--wp--preset--font-family--accent);
	font-style: italic;
	font-synthesis: none; /* brand script has no italic: use it upright, never slanted */
	font-weight: 400;
	font-size: clamp(1.25rem, 2.2vw, 1.6rem);
	line-height: 1.3;
	color: var(--alj-gold);
}

.alj-team-beliefs .alj-team-beliefs__grid.alignwide {
	max-width: 1080px;
}

/* Two balanced columns (01–04 left, 05–08 right) so short and long statements
   sit without gaps; one column on phones. */
.alj-team-beliefs__grid {
	--alj-belief-gap: clamp(1.25rem, 2.5vw, 2rem);
	position: relative;
	z-index: 2;
	columns: 2;
	column-gap: var(--alj-belief-gap);
	margin-inline: auto !important;
	margin-block-start: calc(-1 * clamp(5.5rem, 10vw, 7.5rem)) !important;
	/* The last card in each column carries a gap below it; pull the section end back up. */
	margin-block-end: calc(-1 * var(--alj-belief-gap)) !important;
	counter-reset: alj-belief;
}

.alj-team-beliefs__grid > * {
	margin: 0 0 var(--alj-belief-gap) !important;
	break-inside: avoid;
	page-break-inside: avoid;
}

.alj-team-belief.alj-card {
	display: block;
	height: auto;
	counter-increment: alj-belief;
	padding: clamp(1.6rem, 3vw, 2.4rem);
	border-radius: var(--alj-radius-l);
	box-shadow: 0 1px 2px rgba(28, 24, 21, 0.05), 0 16px 40px rgba(28, 24, 21, 0.09);
}

/* Small decorative counter: 01, 02 … (CSS only, not page text). */
.alj-team-belief::before {
	content: counter(alj-belief, decimal-leading-zero);
	display: flex;
	align-items: center;
	gap: 0.7rem;
	margin-block-end: 1rem;
	font-family: var(--wp--preset--font-family--display);
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	color: var(--alj-clay);
	font-variant-numeric: lining-nums;
}

.alj-team-belief > * {
	margin: 0 !important;
}

.alj-team-belief h3 {
	font-size: clamp(1.35rem, 2vw, 1.6rem);
	line-height: 1.2;
	margin-block-end: 0.75rem !important;
}

.alj-team-belief > p:not(.alj-ref) {
	font-size: 1rem;
	line-height: 1.72;
	margin-block-end: 1.4rem !important;
}

/* Scripture references, set off by a hairline. */
.alj-team-belief > .alj-ref {
	padding-block-start: 1rem;
	padding-inline-start: 1.6rem;
	border-top: 1px solid var(--alj-line);
	position: relative;
	font-size: 0.84rem;
	line-height: 1.6;
}

.alj-team-belief > .alj-ref::before {
	content: "";
	position: absolute;
	left: 0;
	top: calc(1rem + 0.15em);
	width: 1.05rem;
	height: 1.05rem;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A3312A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 6.5C10.2 5.2 7.6 4.6 4 4.75V18.5c3.6-.15 6.2.45 8 1.75 1.8-1.3 4.4-1.9 8-1.75V4.75c-3.6-.15-6.2.45-8 1.75z'/%3E%3Cpath d='M12 6.5v13.75'/%3E%3C/svg%3E") center / contain no-repeat;
}

@media (max-width: 781px) {
	.alj-team-beliefs__grid {
		columns: 1;
	}
}

@media (max-width: 680px) {
	.alj-team-beliefs__grid {
		margin-block-start: -5rem !important;
	}
}
