/* ---------------------------------------------------------------------------
	 Grounded Counselling Vancouver — profile page
	 --------------------------------------------------------------------------- */

:root {
	--bg: #faf9f6;						/* warm off-white page background */
	--surface: #ffffff;				/* cards */
	--ink: #2b3530;						/* near-black green for body text */
	--ink-soft: #5a6660;			/* secondary text */
	--accent: #3e6b52;				/* forest green */
	--accent-dark: #325741;
	--border: #e3e1da;
	--header-bg: #eceae4;

	--font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: var(--font-display);
	font-size: 1.0625rem;
	line-height: 1.65;
	color: var(--ink);
	background-color: var(--bg);
	-webkit-font-smoothing: antialiased;
}

/* Shared centered column: sensible desktop width, side padding on phones */
.container {
	max-width: 960px;
	margin: 0 auto;
	padding-left: 24px;
	padding-right: 24px;
}

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

.site-header {
	background-color: var(--header-bg);
	border-bottom: 1px solid var(--border);
	padding: 20px 0;
}

.site-header h1 {
	font-family: var(--font-display);
	font-size: 1.375rem;
	font-weight: 600;
	color: var(--ink);
	text-decoration: none;
	letter-spacing: 0.01em;
}

/* --- Profile layout -------------------------------------------------------- */

main {
	padding: 56px 0 80px;
}

.profile {
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 48px;
	align-items: start;
}

/* On desktop, flatten both columns into the shared grid so the photo and the
	 bio share the first row, and the name and the Testimonials heading share
	 the second — their tops align regardless of how tall the bio runs. */
@media (min-width: 721px) {
	.profile {
		row-gap: 0; /* vertical rhythm comes from the elements' own margins */
	}

	.profile-sidebar,
	.profile-main {
		display: contents;
	}

	.profile-photo {
		grid-column: 1;
		grid-row: 1;
	}

	#bio-and-buttons {
		grid-column: 2;
		grid-row: 1;
	}

	.profile-name {
		grid-column: 1;
		grid-row: 2;
	}

	.info-card {
		grid-column: 1;
	}

	#testimonials {
		grid-column: 2;
		/* span the name + four info cards so long testimonial content
			 doesn't push the cards down */
		grid-row: 2 / span 5;
		margin-top: 16px; /* same offset as .profile-name below the photo */
	}
}

/* --- Sidebar: photo, name, info cards -------------------------------------- */

.profile-photo {
	display: block;
	width: 100%;
	aspect-ratio: 5 / 6;
	object-fit: cover;
	border-radius: 10px;
	background-color: var(--border); /* graceful placeholder until photo.jpg exists */
}

.profile-name {
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-weight: 600;
	margin-top: 16px;
	line-height: 1.3;
}

.registration {
	text-decoration: none;
	cursor: help;
}

.info-card {
	background-color: var(--surface);
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 16px 18px;
	margin-top: 16px;
	color: var(--ink-soft);
	font-size: 0.9375rem;
	display: flex;
	align-items: flex-start;
	gap: 12px;
	width: 100%;
}

.emoji-label i {
	display: block;
	font-size: 14px;
	line-height: 1;
	/* offset the card-text's half-leading so the icon top meets the glyph tops */
	margin-top: 5px;
}

/* each Font Awesome glyph has a different ascent, so nudge each icon
	 individually until its painted top sits on the card-text cap line */
.emoji-label .fa-graduation-cap { transform: translateY(1.3px); }
.emoji-label .fa-money-bill-1 { transform: translateY(0.45px); }
.emoji-label .fa-map-pin { transform: translateY(2.2px); }
.emoji-label .fa-award { transform: translateY(2.35px); }

/* A clickable phrase inside card text: looks like the surrounding words,
	 underlines on hover, opens the info overlay */
.text-trigger {
	font: inherit;
	color: inherit;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	text-decoration: underline transparent;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
	transition: text-decoration-color 0.15s ease, color 0.15s ease;
}

.text-trigger:hover,
.text-trigger:focus-visible {
	color: var(--accent);
	text-decoration-color: currentColor;
}

/* --- Info overlay ----------------------------------------------------------- */

.overlay {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: grid;
	place-items: center;
	padding: 24px;
	/* closed state: invisible and click-through; visibility flips after the
		 children's 0.25s fade-out so the close animation can play */
	visibility: hidden;
	pointer-events: none;
	transition: visibility 0s linear 0.25s;
}

.overlay.is-open {
	visibility: visible;
	pointer-events: auto;
	transition-delay: 0s;
}

.overlay-backdrop {
	position: absolute;
	inset: 0;
	/* dim with the page's own ink colour so the tint stays warm, not grey */
	background-color: rgba(43, 53, 48, 0.4);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.overlay-box {
	position: relative;
	max-width: 420px;
	background-color: var(--surface);
	border: 1px solid var(--border);
	border-radius: 14px;
	padding: 36px 36px 32px;
	box-shadow:
		0 1px 2px rgba(43, 53, 48, 0.06),
		0 12px 40px rgba(43, 53, 48, 0.18);
	opacity: 0;
	transform: translateY(10px) scale(0.98);
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.overlay.is-open .overlay-backdrop {
	opacity: 1;
}

.overlay.is-open .overlay-box {
	opacity: 1;
	transform: none;
}

.overlay-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 32px;
	height: 32px;
	display: grid;
	place-items: center;
	background: none;
	border: none;
	border-radius: 50%;
	color: var(--ink-soft);
	font-size: 15px;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.overlay-close:hover,
.overlay-close:focus-visible {
	background-color: var(--header-bg);
	color: var(--ink);
}

.overlay-text {
	margin: 0;
	padding-right: 12px;
	font-size: 0.9375rem;
	line-height: 1.65;
	color: var(--ink-soft);
	font-family: var(--font-body);
}

@media (prefers-reduced-motion: reduce) {
	.overlay-backdrop,
	.overlay-box,
	.text-trigger {
		transition: none;
	}
}

/* --- Main column: bio and call to action ----------------------------------- */

.bio {
	font-size: 1.125rem;
	color: var(--ink);
}

/* Match the profile name's metrics so the two headings' text tops align */
#testimonials h2 {
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-weight: 600;
	line-height: 1.3;
}

.button-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 24px;
	margin-top: 36px;
}

.button {
	display: inline-block;
	padding: 13px 26px;
	background-color: var(--accent);
	color: #ffffff;
	font-weight: 600;
	font-size: 1rem;
	text-decoration: none;
	text-align: center;
	border-radius: 8px;
	transition: background-color 0.15s ease;
}

.button:hover,
.button:focus-visible {
	background-color: var(--accent-dark);
}

/* --- Testimonials ---------------------------------------------------------- */

#testimonials h2 {
	text-align: center;
}

/* Unboxed editorial quotes: italic serif with a large quotation mark hanging
	 in the left margin, so the client voices read as speech, not UI */
.testimonial {
	position: relative;
	margin-top: 32px;
	padding-left: 48px;
}

.testimonial::before {
	content: "\201C";
	position: absolute;
	left: 0;
	top: 3px; /* puts the glyph's ink top level with the first line's cap top */
	font-family: var(--font-display);
	font-size: 3.25rem;
	line-height: 1;
	color: var(--accent);
}

.testimonial p {
	font-style: italic;
	font-size: 1.0625rem;
	line-height: 1.75;
	color: var(--ink);
}

.quote-divider {
	width: 56px;
	height: 1px;
	background-color: var(--border);
	margin: 36px auto 0;
}

/* --- Mobile ---------------------------------------------------------------- */

@media (max-width: 720px) {
	main {
		padding: 32px 0 56px;
	}

	.profile {
		grid-template-columns: 1fr;
		gap: 32px;
	}

	/* Photo first, then name, then bio + button, then the info cards */
	.profile-sidebar {
		display: contents;
	}

	.profile-photo {
		max-width: 320px;
		order: 1;
	}

	.profile-name {
		order: 2;
		margin-top: 0;
	}

	.profile-main {
		order: 3;
	}

	.info-card {
		order: 4;
		margin-top: 0;
	}

	/* the grid gap already separates the cards; pull them a little closer */
	.info-card + .info-card {
		margin-top: -16px;
	}

	.bio {
		font-size: 1.0625rem;
	}

	/* narrower phones need the quote's hanging margin trimmed */
	.testimonial {
		padding-left: 38px;
	}

	.testimonial::before {
		font-size: 2.75rem;
		top: 4px;
	}

	.button-row {
		/* On phones the buttons stack and share one width — the widest
			 one's — so the pair reads as a tidy block, full-width like
			 the info cards. */
		flex-direction: column;
		align-items: stretch;
		width: 100%;
		gap: 12px;
		margin-top: 28px;
	}
}
