/* Shared worker layout. Buttons, card typography and navigation transitions
   continue to use the existing site styles. */
.pageWrapper {
	min-height: 100vh;
}

.pageWrapper::after {
	content: '';
	position: fixed;
	inset: 0 0 auto;
	height: 100vh;
	height: 100lvh;
	z-index: -1;
	pointer-events: none;
	/* The opaque base covers the team tiles as the profile slides over them. */
	background-color: rgb(255, 249, 240);
	background-image: linear-gradient(rgba(255, 249, 240, .9), rgba(255, 249, 240, .9)),
		var(--team-flower-image);
	background-size: cover;
	background-position: 28% 76%;
}

.team-transition .pageWrapper::after {
	view-transition-name: team-profile-surface;
}

.profileHeader .introductionContainer {
	padding-block: 1.5rem 2rem;
}

.profileEditorial {
	display: grid;
	grid-template-columns: calc(25rem * 2 / 3) minmax(0, 1fr);
	align-items: start;
	gap: clamp(2.5rem, 6vw, 5.75rem);
	width: min(calc(100% - 3rem), 70rem);
	margin: 0 auto;
	padding-bottom: 3rem;
}

.profileSidebar {
	position: sticky;
	top: 2rem;
}

.profileSidebar .profiiliCTAButton {
	margin-top: 1.5rem;
}

/* Profiles using the Meistä tile crop inherit the shared portrait sizing. */
.profileEditorial .profiiliCard .portrait:not(.teamTileCrop) {
	height: auto;
	aspect-ratio: auto;
	max-height: none;
}

.profileEditorial .profiiliContent {
	min-width: 0;
	box-sizing: border-box;
	padding: clamp(1.25rem, 2.5vw, 2rem);
	padding-top: 0;
	background: transparent;
	font-size: 1.125rem;
	line-height: 1.5;
}

.profileStory h1 {
	margin: 0 0 1.5rem;
	font-size: clamp(3rem, 4.1vw, 4rem);
	font-weight: normal;
	line-height: 1.08;
}

.profileStory p {
	margin: 0;
}

.profileStory p + p {
	margin-top: 1rem;
}

.profileWork {
	margin-top: 2rem;
	padding-top: 1.25rem;
	border-top: 1px solid rgba(100, 70, 40, .24);
}

.profileWorkHeading {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: .75rem 2rem;
	margin-bottom: 1.25rem;
}

.profileWorkHeading h2 {
	margin: 0;
	font-size: 2.7rem;
	font-weight: normal;
	line-height: 1.08;
}

.profileSpecialties {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem 1.5rem;
	list-style: none;
	padding: 0;
	margin: 0;
	font-size: 1rem;
}

.profileEditorial .profiiliGallery {
	align-items: start;
	margin-top: 0;
}

/* These are photographs, not interactive tiles. Show each complete image. */
.profileEditorial .profiiliGallery img {
	height: auto;
	aspect-ratio: auto;
	transition: none;
}

.profileEditorial .profiiliGallery img:hover {
	transform: none;
	box-shadow: 0 0 4px rgba(100, 70, 40, .3);
}

@media (max-width: 900px) {
	.pageWrapper {
		display: flex;
		flex-direction: column;
	}
	.pageWrapper::after {
		content: none;
	}
	.pageWrapper > .profileHeader {
		background-color: rgb(255, 249, 240);
	}

	.profileEditorial {
		flex: 1;
		width: 100%;
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: auto 1fr;
		gap: 0;
		padding-bottom: 0;
	}

	.profileSidebar {
		position: static;
		display: grid;
		grid-template-columns: calc(25rem * 2 / 3);
		justify-content: center;
		padding-block: 0 1.5rem;
	}

	.profileEditorial .profiiliContent {
		align-self: stretch;
		background-color: rgb(255, 249, 240);
		padding-top: 2rem;
		padding-bottom: calc(3rem + clamp(1.25rem, 2.5vw, 2rem));
		padding-inline: calc(1.5rem + clamp(1.25rem, 2.5vw, 2rem));
	}

	.profileEditorial .profiiliGallery {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Keep the booking button reachable on short landscape screens. */
@media (max-height: 600px) {
	.profileSidebar { position: static; }
}
