:root {
	--very-dark-magenta: hsl(300, 43%, 22%);
	--soft-pink: hsl(333, 80%, 67%);
	--dark-grayish-magenta: hsl(303, 10%, 53%);
	--light-grayish-magenta: hsl(300, 24%, 96%);
	--white: hsl(0, 0%, 100%);
}

* {
	padding: 0;
	margin: 0;
}

html {
	background-image: url(./images/bg-pattern-top-desktop.svg),
		url(./images/bg-pattern-bottom-desktop.svg);
	background-repeat: no-repeat;
	background-position: top left, bottom right;
}

body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 0 28px;
	font-family: 'League Spartan', sans-serif;
	font-optical-sizing: auto;
	font-style: normal;
	height: 100vh;
}

main {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	margin: 48px;
}

.main-description {
	display: flex;
	flex-direction: column;
	gap: 24px;
	max-width: 460px;
}

.main-description h1 {
	font-size: 4rem;
	color: var(--very-dark-magenta);
}

.main-description p {
	color: var(--dark-grayish-magenta);
	font-size: 1.2rem;
	line-height: 1.2;
	font-weight: 500;
}

.wrapper {
	display: flex;
	justify-content: space-between;
	margin: 38px 0;
}

.rating-container {
	display: flex;
	flex-direction: column;
	color: var(--very-dark-magenta);
	gap: 22px;
	padding: 12px;
	font-weight: 700;
	width: 550px;
}

.stars-container {
	display: flex;
	gap: 34px;
	width: 400px;
	padding: 26px 24px;
	background-color: var(--light-grayish-magenta);
	border-radius: 12px;
	align-items: center;
}

.stars-container.right {
	align-self: flex-end;
}
.stars-container.center {
	align-self: center;
}
.stars-container.left {
	align-self: flex-start;
}

.star-rating {
	display: flex;
	width: 110px;
	height: 20px;
	background-image: url(./images/icon-star.svg);
	background-repeat: space;
	background-size: contain;
}

.reviews-container {
	display: flex;
	justify-content: space-between;
	gap: 30px;
	min-height: 230px;
}

.review {
	display: flex;
	flex-direction: column;
	gap: 24px;
	color: #fff;
	padding: 28px;
	border-radius: 12px;
	background-color: var(--very-dark-magenta);
	line-height: 1.2;
}

.reviewer {
	display: flex;
	gap: 18px;
}

.reviewer p {
	color: var(--soft-pink);
}

.review img {
	border-radius: 100px;
	width: 42px;
	height: min-content;
}

.review.top {
	align-self: flex-start;
}

.review.center {
	align-self: center;
}

.review.bottom {
	align-self: flex-end;
}

/* Feel free to remove these styles or customise in your own stylesheet 👍 */

.attribution {
	font-size: 15px;
	text-align: center;
	margin: 40px 0;
}
.attribution a {
	color: hsl(228, 45%, 44%);
}

/* * RESPONSIVE */

@media (width <= 840px) {
	* {
		padding: 0;
		margin: 0;
		box-sizing: border-box;
	}

	body {
		height: 100%;
	}

	main {
		margin: 0;
	}

	.wrapper {
		justify-content: center;
		flex-wrap: wrap;
		flex-basis: 100%;
		margin-bottom: 50px;
	}

	.main-description {
		justify-content: center;
		text-align: center;
		margin: 48px 0;
		max-width: 430px;
	}

	.rating-container {
		padding: 0;
		flex-basis: 100%;
	}

	.reviews-container {
		flex-wrap: wrap;
		gap: 12px;
	}

	.stars-container {
		width: 100%;
		flex-flow: column;
		gap: 18px;
	}
}
