/*
 * Team — Meet the Team page template (template-team.php).
 * Circular photo cards centred in a responsive grid, with emblem watermark.
 *
 * Depends on foundation.css + project.css (hero banner + title strip).
 */

/* ── Section wrapper ─────────────────────────────────────────────────── */
.team-section {
	padding: 4rem 0 5rem;
	position: relative;
	overflow: hidden;
}

/* ── Emblem watermark ─────────────────────────────────────────────────── */
.team-watermark {
	position: absolute;
	left: -6%;
	top: 50%;
	transform: translateY(-50%) rotate(12deg);
	width: min(80vw, 680px);
	pointer-events: none;
	z-index: 0;
}

.team-watermark img {
	width: 100%;
	height: auto;
	display: block;
	filter: brightness(0);
	opacity: 0.045;
}

/* ── Grid ─────────────────────────────────────────────────────────────── */
.team-grid {
	list-style: none;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 2rem;
	position: relative;
	z-index: 1;
}

/* ── Card ─────────────────────────────────────────────────────────────── */
.team-card {
	background: var(--colour-white);
	border: 1px solid var(--colour-border);
	border-radius: 8px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding-bottom: 1.5rem;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.team-card:hover {
	box-shadow: 0 8px 28px rgba(10, 75, 44, 0.12);
	transform: translateY(-4px);
}

/* ── Heritage-green header strip with image bleeding through ─────────── */
.team-card__header {
	width: 100%;
	background-color: var(--heritage-green);
	background-size: cover;
	background-position: center;
	padding: 1.5rem 1rem 0;
	display: flex;
	justify-content: center;
	position: relative;
	/* No overflow:hidden here — that would clip the circle photo that
	   overhangs below the strip. The outer .team-card handles border-radius. */
}

/* Semi-transparent green overlay so the image bleeds through softly */
.team-card__header::before {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(10, 75, 44, 0.72);
	z-index: 0;
}

/* ── Circular photo ───────────────────────────────────────────────────── */
.team-card__photo {
	width: 110px;
	height: 110px;
	border-radius: 50%;
	overflow: hidden;
	border: 4px solid var(--colour-white);
	box-shadow: 0 2px 12px rgba(10, 75, 44, 0.18);
	flex-shrink: 0;
	/* Pull the circle halfway down to overlap the green strip */
	transform: translateY(50%);
	background: var(--colour-border);
	/* Sit above the ::before overlay */
	position: relative;
	z-index: 1;
}

.team-card__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	display: block;
	transition: transform 0.4s ease;
}

.team-card:hover .team-card__photo img {
	transform: scale(1.06);
}

/* ── Body ─────────────────────────────────────────────────────────────── */
.team-card__body {
	/* Extra top padding to clear the overlapping circle */
	padding: calc(55px + 1rem) 1.25rem 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.3rem;
	flex: 1;
	width: 100%;
	box-sizing: border-box;
}

.team-card__name {
	font-family: var(--font-heading);
	font-size: clamp(0.88rem, 1.5vw, 1rem);
	font-weight: 700;
	color: var(--heritage-green);
	letter-spacing: -0.01em;
	text-transform: uppercase;
	margin: 0;
	line-height: 1.2;
}

.team-card__job {
	font-size: 0.76rem;
	color: var(--urban-grey);
	text-transform: uppercase;
	letter-spacing: 0.07em;
	font-weight: 600;
	margin: 0;
	line-height: 1.4;
}

/* ── Contact links ────────────────────────────────────────────────────── */
.team-card__contact {
	list-style: none;
	margin: 0.75rem 0 0;
	padding: 0.65rem 0 0;
	border-top: 1px solid var(--colour-border);
	display: flex;
	justify-content: center;
	gap: 0.6rem;
	width: 100%;
}

.team-card__contact-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: rgba(10, 75, 44, 0.08);
	color: var(--heritage-green);
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
}

.team-card__contact-link:hover {
	background: var(--heritage-green);
	color: var(--colour-white);
}

.team-card__contact-link svg {
	flex-shrink: 0;
	fill: currentColor;
}

/* ── Empty state ──────────────────────────────────────────────────────── */
.team-empty {
	color: var(--colour-text-light);
	font-size: 1rem;
	text-align: center;
	padding: 3rem 0;
}

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 900px) {
	.team-grid {
		grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
		gap: 1.5rem;
	}

	.team-watermark {
		left: auto;
		right: -10%;
		transform: translateY(-50%) rotate(-12deg);
		width: min(90vw, 500px);
	}
}

@media (max-width: 600px) {
	.team-section {
		padding: 2.5rem 0 3.5rem;
	}

	.team-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 1rem;
	}

	.team-card__photo {
		width: 90px;
		height: 90px;
	}

	.team-card__body {
		padding-top: calc(45px + 0.85rem);
		padding-left: 0.85rem;
		padding-right: 0.85rem;
	}
}

@media (max-width: 380px) {
	.team-grid {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	.team-card { transition: none; }
	.team-card__photo img { transition: none; }
}
