/* Page sections (home page and other section pages). Mobile first; desktop values from frame 7:232 at 1200px+. */

.section {
	padding-block: 56px;
}

.section__inner {
	display: flex;
	flex-direction: column;
	gap: var(--space-32);
}

.section__actions {
	display: flex;
	justify-content: center;
}

@media (min-width: 1200px) {
	.section {
		padding-block: var(--space-100);
	}

	.section__inner {
		gap: 60px;
	}
}

/* Hero. */

/*
 * The hero and its button fit the first screen under the header: the frame heights (662px mobile, 1900 / 850 desktop)
 * shrink to the visible height of the window, but not below 400px.
 */
.hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: min(662px, max(400px, 100svh - var(--header-height)));
	overflow: hidden;
	background: var(--color-primary);
}

.hero__media,
.hero__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Video over the image (hero-video change): faded in once it plays, so the image stays the first paint. */
.hero__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity 0.6s ease;
}

.hero__video.is-playing {
	opacity: 1;
}

/* Keeps the light button readable on bright video frames. */
.hero.has-video::after {
	content: "";
	position: absolute;
	inset: auto 0 0;
	height: 45%;
	background: linear-gradient(to top, var(--color-scrim-video), transparent);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.6s ease;
}

.hero.has-video.is-video-playing::after {
	opacity: 1;
}

/* Top right on phones, where the button row is full width; bottom right from 768px. */
.hero__toggle {
	position: absolute;
	top: var(--space-16);
	right: var(--space-16);
	z-index: 2; /* above the button row */
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid color-mix(in srgb, var(--color-white) 60%, transparent);
	border-radius: 50%;
	background: var(--color-scrim-photo);
	color: var(--color-white);
	cursor: pointer;
	transition: border-color var(--transition), background-color var(--transition);
}

.hero__toggle[hidden] {
	display: none;
}

.hero__toggle:hover {
	border-color: var(--color-white);
	background: var(--color-scrim);
}

.hero__toggle .icon {
	width: 16px;
	height: 16px;
	stroke-width: 1.5;
}

.hero__toggle .icon--play,
.hero__toggle.is-paused .icon--pause {
	display: none;
}

.hero__toggle.is-paused .icon--play {
	display: block;
}

.hero__content {
	position: relative;
	z-index: 1; /* above the video scrim */
	display: flex;
	justify-content: center;
	padding-block: 120px 17px;
}

.hero__button {
	width: 100%;
	padding: 12px 24px;
}

@media (min-width: 768px) {
	.hero {
		width: 100%; /* with the height capped, the aspect ratio would otherwise narrow the box */
		min-height: 0;
		max-height: max(400px, 100svh - var(--header-height));
		aspect-ratio: 1900 / 850;
	}

	.hero__content {
		padding-bottom: 30px;
	}

	.hero__toggle {
		top: auto;
		right: var(--space-24);
		bottom: var(--space-24);
	}

	.hero__button {
		width: 370px;
	}
}

/* Product grid. */

.product-grid__items {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--space-16);
}

@media (min-width: 1024px) {
	.product-grid__items {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: var(--space-24);
	}
}

@media (min-width: 1200px) {
	.product-grid__items {
		gap: var(--space-40);
	}
}

/* Two tiles. */

.tiles {
	padding-top: var(--space-16);
}

.tiles__items {
	display: grid;
	gap: 48px;
}

.tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	color: var(--color-text);
}

.tile:hover {
	color: var(--color-text);
}

.tile__image {
	display: block;
	width: 100%;
	overflow: hidden;
	aspect-ratio: 370 / 280;
	background: var(--color-surface);
}

.tile__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s ease;
}

.tile:hover .tile__image img {
	transform: scale(1.03);
}

.tile__text {
	display: flex;
	flex-direction: column;
	gap: var(--space-12);
	max-width: 600px;
	text-align: center;
}

.tile__title {
	font-family: var(--font-serif);
	font-size: 22px;
	line-height: 1.2;
	text-transform: uppercase;
}

.tile__description {
	color: var(--color-text-body);
	font-size: 13px;
	line-height: 1.5;
}

@media (min-width: 768px) {
	.tiles__items {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: var(--space-40);
	}

	.tile__image {
		aspect-ratio: 850 / 700;
	}
}

@media (min-width: 1200px) {
	.tiles {
		padding-top: 0;
	}

	.tile {
		gap: var(--space-32);
	}

	.tile__text {
		gap: var(--space-16);
	}

	.tile__title {
		font-size: 28px;
		text-transform: none;
	}

	.tile__description {
		font-size: 14px;
	}
}

/* Image banner with card. */

.banner {
	position: relative;
	display: flex;
	flex-direction: column;
}

.banner__media {
	aspect-ratio: 402 / 305;
	overflow: hidden;
	background: var(--color-surface);
}

.banner--light .banner__media {
	aspect-ratio: 402 / 250;
}

.banner__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.banner__inner {
	padding-inline: 0;
}

.banner__card {
	display: flex;
	flex-direction: column;
	gap: var(--space-24);
	padding: var(--space-32);
}

.banner--dark .banner__card {
	gap: var(--space-16);
	background: var(--color-primary);
	color: var(--color-border);
}

.banner--light .banner__card {
	background: var(--color-white);
	color: var(--color-text-body);
}

.banner__text {
	font-size: 13px;
	line-height: 1.55;
}

@media (min-width: 768px) {
	.banner {
		display: block;
		min-height: 700px;
	}

	.banner--light {
		min-height: 750px;
	}

	.banner__media,
	.banner--light .banner__media {
		position: absolute;
		inset: 0;
		aspect-ratio: auto;
	}

	.banner__inner {
		position: relative;
		display: flex;
		align-items: center;
		min-height: inherit;
		padding-block: var(--space-80);
		padding-inline: var(--page-padding);
	}

	.banner__card {
		gap: var(--space-24);
		width: 480px;
		max-width: 100%;
		padding: 48px;
		border-radius: 4px;
	}

	.banner--light .banner__card {
		width: 450px;
		box-shadow: 0 8px 12px rgb(0 0 0 / 4%);
	}

	.banner__text {
		font-size: 14px;
		line-height: 1.5;
	}

	.banner__card .button {
		align-self: flex-start;
	}
}

/* Image and text. */

.split__inner {
	display: grid;
	gap: var(--space-24);
}

.split__heading .section-heading {
	align-items: center;
	text-align: center;
}

.split__image {
	overflow: hidden;
	aspect-ratio: 370 / 320;
	background: var(--color-surface);
}

.split__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.split__body {
	display: flex;
	flex-direction: column;
	gap: var(--space-24);
}

.split__text {
	color: var(--color-text-body);
	font-size: 15px;
	line-height: 1.6;
}

@media (min-width: 768px) {
	.split {
		padding-top: 0;
	}

	.split__inner {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-template-areas:
			"image heading"
			"image body";
		grid-template-rows: 1fr 1fr;
		column-gap: var(--space-40);
		row-gap: var(--space-24);
	}

	.split--image-right .split__inner {
		grid-template-areas:
			"heading image"
			"body image";
	}

	.split__image {
		grid-area: image;
		aspect-ratio: 850 / 650;
	}

	.split__heading {
		grid-area: heading;
		align-self: end;
		padding-inline: clamp(0px, 4vw, 80px);
	}

	.split__heading .section-heading {
		align-items: flex-start;
		text-align: left;
	}

	.split__body {
		grid-area: body;
		align-self: start;
		align-items: flex-start;
		padding-inline: clamp(0px, 4vw, 80px);
	}
}

/* Latest news. */

.news {
	background: var(--color-surface);
}

.news__items {
	display: grid;
	gap: var(--space-16);
}

@media (min-width: 768px) {
	.news__items {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: var(--space-24);
	}
}

@media (min-width: 1200px) {
	.news__items {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: var(--space-40);
	}
}

/*
 * Content page sections (content-pages change): "Image and text" with a light background, a quote and a serif
 * heading, design pillars, team and call to action. Desktop values from the about-us frame (3:1162), mobile from 3:5427.
 */

.split--light {
	background: var(--color-surface);
}

.split--display .split__inner {
	padding-inline: var(--page-padding-wide);
}

.split--display .split__heading .section-heading {
	align-items: flex-start;
	text-align: left;
}

.split--display .split__text {
	font-size: 14px;
}

.split__quote {
	margin: 0;
	color: var(--color-text);
	font-family: var(--font-serif);
	font-size: 16px;
	font-style: italic;
	line-height: 1.5;
}

.split__quote p {
	margin: 0;
}

/* Banner with the serif heading (about-us hero: 650px photo, 500px card at the bottom, Cormorant Bold 32). */
@media (min-width: 768px) {
	.banner--display,
	.banner--display.banner--light {
		min-height: clamp(450px, 34.2vw, 650px);
	}

	.banner--display .banner__inner {
		align-items: flex-end;
	}

	.banner--display.banner--light .banner__card {
		width: 500px;
		box-shadow: none;
	}
}

.banner .section-heading--display .section-heading__title {
	font-size: clamp(26px, 24.4px + 0.4vw, 32px);
	font-weight: 700;
	letter-spacing: 0;
}

@media (min-width: 768px) {
	.split--light {
		padding-block: var(--space-80);
	}

	.split--display .split__text {
		font-size: 16px;
		line-height: 1.7;
	}

	.split--display .split__image {
		aspect-ratio: 750 / 550;
		border-radius: var(--radius-image);
	}

	.split--display .split__heading,
	.split--display .split__body {
		padding-inline: 0;
	}

	.split--display .split__inner {
		column-gap: clamp(var(--space-40), 4.2vw, var(--space-80));
	}

	.split--display .split__body {
		gap: var(--space-32);
	}

	.split--display .split__quote {
		color: var(--color-text-body);
		font-style: normal;
		line-height: 1.7;
	}
}

@media (min-width: 1200px) {
	.split--light {
		padding-block: var(--space-120);
	}
}

/* Design pillars. */

.pillars__items {
	display: grid;
	gap: var(--space-16);
	margin: 0;
	padding: 0;
	list-style: none;
}

.pillar {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-16);
	padding: 20px;
	background: var(--color-surface);
}

.pillar__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	background: var(--color-primary);
	color: var(--color-accent);
}

.pillar__icon .icon {
	width: 20px;
	height: 20px;
	stroke-width: 2;
}

.pillar__title {
	margin: 0;
	color: var(--color-text);
	font-family: var(--font-serif);
	font-size: 20px;
	font-weight: 400;
	line-height: 1.2;
}

.pillar__text {
	margin: 0;
	color: var(--color-text-body);
	font-size: 13px;
	line-height: 1.5;
}

@media (min-width: 768px) {
	.pillars__items {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: var(--space-24);
	}
}

@media (min-width: 1200px) {
	.pillars__items {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: var(--space-40);
	}

	.pillar {
		gap: 20px;
		padding: var(--space-40);
		border-radius: 8px;
	}

	.pillar__icon {
		width: 48px;
		height: 48px;
		border-radius: 50%;
	}

	.pillar__icon .icon {
		width: 24px;
		height: 24px;
	}

	.pillar__title {
		font-size: 24px;
	}

	.pillar__text {
		font-size: 14px;
		line-height: 1.6;
	}
}

/* Team. */

.team {
	background: var(--color-surface);
}

.team__members {
	display: grid;
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.team-member {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: var(--space-16);
	background: var(--color-white);
	box-shadow: 0 4px 8px rgb(0 0 0 / 2%);
	text-align: center;
}

.team-member__photo {
	overflow: hidden;
	aspect-ratio: 322 / 260;
	background: var(--color-surface);
}

.team-member__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.team-member__text {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-8);
}

.team-member__name {
	margin: 0;
	color: var(--color-text);
	font-family: var(--font-serif);
	font-size: 22px;
	font-weight: 400;
	line-height: 1.2;
}

.team-member__role {
	margin: 0;
	color: var(--color-accent);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 1px;
	text-transform: uppercase;
}

.team-member__bio {
	margin: 0;
	color: var(--color-text-body);
	font-size: 13px;
	line-height: 1.5;
}

@media (min-width: 768px) {
	.team__members {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: var(--space-24);
	}
}

@media (min-width: 1200px) {
	.team {
		padding-top: var(--space-120);
	}

	.team__members {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: var(--space-40);
	}

	.team-member {
		gap: var(--space-24);
		padding: var(--space-24);
		border-radius: var(--radius-image);
	}

	.team-member__photo {
		aspect-ratio: 452 / 400;
		border-radius: var(--radius-image);
	}

	.team-member__name {
		font-size: 24px;
	}
}

/* Call to action (follows the team on a light background). */

.cta {
	background: var(--color-surface);
}

.cta__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-24);
	text-align: center;
}

.cta__title {
	margin: 0;
	color: var(--color-accent);
	font-family: var(--font-serif);
	font-size: clamp(28px, 24.78px + 0.8011vw, 40px);
	font-weight: 400;
	line-height: 1.2;
}

.cta__text {
	max-width: 800px;
	margin: calc(var(--space-8) * -1) 0 0;
	color: var(--color-text);
	font-size: 14px;
	line-height: 1.6;
}

@media (min-width: 1200px) {
	.cta__inner {
		gap: var(--space-32);
	}

	.cta__text {
		margin-top: calc(var(--space-16) * -1);
		font-size: 15px;
	}
}

/* The call to action continues the team's light background without a second gap. */
.team + .cta {
	padding-top: 0;
}
