/* Hero */
.cmath-book-hero {
	position: relative;
	overflow: hidden;
	background: var(--color-brand-teal-darker);
	padding: var(--block-padding-m) var(--grid-margins);
}

.cmath-book-hero__deco {
	position: absolute;
	z-index: -1;
	top: -2.5%;
	left: -74.4%;
	width: 162%;
	aspect-ratio: 1 / 1;
	background: url("../img/mandala-the-book-left.webp") center / contain no-repeat;
	pointer-events: none;
}

.cmath-book-hero__elipses {
	position: absolute;
	z-index: 0;
	top: 0;
	right: 0;
	width: 285px;
	height: 190px;
	background: url("../img/elipses.webp") top right / contain no-repeat;
	pointer-events: none;
}

.cmath-book-hero__inner {
	position: relative;
	z-index: 1;
	max-width: var(--max-width-content);
	margin-inline: auto;
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
	gap: var(--grid-gutter);
	align-items: start;
}

.cmath-book-hero__cover {
	position: relative;
}

.cmath-book-hero__cover img {
	position: relative;
	z-index: 1;
	display: block;
	width: 100%;
	height: auto;
}

.cmath-book-hero__text {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-200);
	color: var(--color-text-inverse);
}

.cmath-book-hero__head {
	display: flex;
	flex-direction: column;
	gap: var(--space-75);
}

.cmath-book-hero__title {
	margin: 0;
	max-width: 100%;
	overflow-wrap: break-word;
	font-family: var(--font-family-headers);
	font-weight: var(--font-h1-weight);
	font-size: var(--font-h1-size);
	line-height: 1.2;
	color: var(--color-text-inverse);
}

.cmath-book-hero__subtitle {
	margin: 0;
	font-family: var(--font-family-paragraph);
	font-weight: 500;
	font-size: var(--space-113);
	line-height: 1.3;
}

.cmath-book-hero__body {
	font-family: var(--font-family-paragraph);
	font-size: var(--font-body-size);
	line-height: 1.3;
}

.cmath-book-hero__body > * + * {
	margin-top: var(--space-100);
}

.cmath-book-hero__cta {
	display: inline-flex;
	align-items: center;
	padding: var(--space-50) var(--space-100);
	border-radius: var(--radius-full);
	background: var(--color-brand-blue);
	color: var(--color-text-default);
	font-family: var(--font-family-paragraph);
	font-size: var(--font-body-size);
	line-height: 1.3;
	text-decoration: none;
}

.cmath-book-hero__cta:hover,
.cmath-book-hero__cta:focus-visible {
	background: var(--color-brand-light-blue);
	color: var(--color-text-default);
}

/* Reviews */
.cmath-book-reviews {
	background: var(--color-brand-light-blue);
	padding: var(--block-padding-s) var(--grid-margins);
}

.cmath-book-reviews__inner {
	max-width: var(--max-width-content);
	margin-inline: auto;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: var(--space-300) var(--grid-gutter);
}

.cmath-book-review {
	flex: 0 1 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-100);
	text-align: center;
}

.cmath-book-stars {
	display: flex;
	align-items: center;
	gap: var(--space-75);
}

.cmath-book-stars__star {
	display: block;
	height: 40px;
	width: auto;
}

.cmath-book-review__platform {
	margin: 0;
	font-family: var(--font-family-headers);
	font-weight: 700;
	font-size: var(--font-h2-size);
	line-height: 1.2;
	color: var(--color-text-alt);
}

/* A holistic approach */
.cmath-book-holistic {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background: var(--color-brand-blue);
	padding: var(--block-padding-m) var(--grid-margins);
}

.cmath-book-holistic__deco {
	position: absolute;
	z-index: 0;
	background-size: contain;
	background-repeat: no-repeat;
	pointer-events: none;
}

.cmath-book-holistic__deco--left {
	top: 0;
	left: 0;
	width: 264px;
	height: 228px;
	background-image: url("../img/mandala-holistic-left.webp");
}

.cmath-book-holistic__deco--right {
	bottom: 0;
	right: 0;
	width: 278px;
	height: 166px;
	background-image: url("../img/mandala-holistic-right.webp");
}

.cmath-book-holistic__inner {
	position: relative;
	z-index: 1;
	max-width: var(--max-width-content);
	margin-inline: auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-200);
	text-align: center;
}

.cmath-book-holistic__heading {
	margin: 0;
	max-width: 100%;
	overflow-wrap: break-word;
	font-family: var(--font-family-headers);
	font-weight: var(--font-h2-weight);
	font-size: var(--font-h2-size);
	line-height: 1.2;
	color: var(--color-text-default);
}

.cmath-book-holistic__text {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-88);
	max-width: min(600px, 100%);
	color: var(--color-text-default);
}

.cmath-book-holistic__highlight {
	margin: 0;
	font-family: var(--font-family-paragraph);
	font-weight: 500;
	font-size: var(--space-113);
	line-height: 1.3;
}

.cmath-book-holistic__body {
	font-family: var(--font-family-paragraph);
	font-size: var(--font-body-size);
	line-height: 1.3;
}

.cmath-book-holistic__body > * + * {
	margin-top: var(--space-100);
}

.cmath-book-holistic__cta {
	display: inline-flex;
	align-items: center;
	padding: var(--space-50) var(--space-100);
	border-radius: var(--radius-full);
	background: var(--color-brand-teal-darker);
	color: var(--color-text-white);
	font-family: var(--font-family-paragraph);
	font-size: var(--font-body-size);
	line-height: 1.3;
	text-decoration: none;
}

.cmath-book-holistic__cta:hover,
.cmath-book-holistic__cta:focus-visible {
	background: var(--color-brand-dark-turquoise);
	color: var(--color-text-white);
}

@media (max-width: 768px) {
	.cmath-book-hero__inner {
		grid-template-columns: 1fr;
		gap: var(--space-250);
	}

	.cmath-book-hero__cover {
		max-width: min(360px, 100%);
		margin-inline: auto;
	}

	.cmath-book-hero__elipses {
		width: 170px;
		height: 113px;
	}

	.cmath-book-reviews__inner {
		justify-content: center;
	}

	.cmath-book-review {
		flex-basis: 100%;
	}

	.cmath-book-stars__star {
		height: 32px;
	}

	.cmath-book-holistic__deco--left {
		width: 120px;
		height: 104px;
	}

	.cmath-book-holistic__deco--right {
		width: 150px;
		height: 90px;
	}
}

/* Narrower desktops: the centred heading and text reach the decorations, so
   they get smaller and move further into the corners. */
@media (max-width: 1290px) {
	/* Visible part shorter than the section's top padding (80px). */
	.cmath-book-holistic__deco--left {
		top: -36px;
		left: -36px;
		width: 130px;
		height: 112px;
	}

	.cmath-book-holistic__deco--right {
		right: -36px;
		bottom: -24px;
		width: 200px;
		height: 119px;
	}
}

/* Tablet and mobile: decorations stay in the corners and the section keeps
   room for them, so they never sit over the heading, text or button. */
@media (max-width: 1024px) {
	.cmath-book-holistic {
		padding-top: calc(var(--block-padding-m) + 48px);
		padding-bottom: calc(var(--block-padding-m) + 40px);
	}

	.cmath-book-holistic__deco--left {
		top: -36px;
		left: -36px;
		width: 150px;
		height: 130px;
	}

	.cmath-book-holistic__deco--right {
		right: -36px;
		bottom: -24px;
		width: 170px;
		height: 101px;
	}
}

@media (max-width: 768px) {
	.cmath-book-holistic__deco--left {
		top: -30px;
		left: -30px;
		width: 120px;
		height: 104px;
	}

	.cmath-book-holistic__deco--right {
		right: -30px;
		bottom: -24px;
		width: 150px;
		height: 90px;
	}
}

@media (min-width: 769px) and (max-width: 960px) {
	.cmath-book-reviews__inner {
		justify-content: center;
	}

	.cmath-book-review {
		flex: 1 1 40%;
	}
}

/* Quotes (after the testimonials). */
.cmath-book-quotes {
	padding: var(--block-padding-m) var(--grid-margins);
	background: var(--color-brand-light-blue);
}

.cmath-book-quotes__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-200);
	max-width: var(--max-width-content);
	margin-inline: auto;
}

.cmath-book-quotes__mark {
	display: block;
}

.cmath-book-quote {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-200);
	margin: 0;
}

.cmath-book-quote__text {
	max-width: 1032px;
	margin: 0;
	font-family: var(--font-family-headers);
	font-size: var(--font-h5-size);
	font-style: italic;
	font-weight: 800;
	line-height: 1.2;
	color: var(--color-text-default);
	text-align: center;
}

.cmath-book-quote__text p {
	margin: 0;
}

.cmath-book-quote__text p + p {
	margin-top: var(--space-100);
}

