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

body {
	--font-heading: 'Shantell Sans', cursive;
	font-family: system-ui, sans-serif;
	line-height: 1.5;
	color: #2c2c2c;
	padding: 3rem;

	max-width: 800px;
	margin-inline: auto;
}

/* Header */
header {
	margin-bottom: 6rem;
}

h1 {
	font-family: var(--font-heading);
	font-style: italic;
	font-weight: 600;
	font-size: 2.5rem;
	letter-spacing: -0.05em;
	text-align: center;
}

.su {
	width: 160px;
	display: block;
	margin-inline: auto;
}

.cards {
	display: flex;
	flex-direction: column;
	gap: 0;
	position: relative;
}

.card {
	background: var(--background, #fff);
	transform: rotate(var(--rotate, 0deg));
	border: 8px solid #fff;
	border-radius: 8px;
	padding: 2rem;
	margin-bottom: -2rem;
	box-shadow: 0 0 16px rgba(0, 0, 0, .2);
	cursor: pointer;
	transition: transform 0.2s;
	position: relative;
	z-index: 1;

	font-size: 1.125rem;
}

.card h2 {
	font-family: var(--font-heading);
	font-style: italic;
	font-weight: 600;
	font-size: 1.75rem;
	letter-spacing: -0.05em;
	margin-bottom: 1.5rem;
	text-align: center;
}

.card h3 {
	width: fit-content;
	margin-inline: auto;
	font-size: 1.25rem;
	text-align: center;
	border: 1px solid rgba(0, 0, 0, .1);
	padding: 1rem;
	border-radius: .5rem;
}

.card img {
	width: 50%;
	display: block;
	margin-inline: auto;
}

.card p {
	margin-bottom: 1.5rem;
}

.card__content {
	margin-top: 2rem;
	transition: max-height 0.5s;
	max-height: 0;
	overflow: hidden;
}

.card:hover {
	box-shadow: 0 0 24px rgba(0, 0, 0, .3);
}

.card--pink {
	--background: #ffe5f0;
	--rotate: 3deg;
	z-index: 1;
}

.card--yellow {
	--background: #fff9e5;
	--rotate: -3deg;
	z-index: 2;
}

.card--green {
	--background: #e8f5e9;
	--rotate: 3deg;
	z-index: 3;
}

.card--blue {
	--background: #e3f2fd;
	--rotate: -3deg;
	z-index: 4;
}

.card--active,
.card--active:hover {
	transform: rotate(0deg);
	z-index: 999;
}

.card--active .card__content {
	max-height: 500px;
}

.wheel.wheel {
	visibility: hidden;
	position: absolute;
	width: 60px;
	height: 60px;
	z-index: 1000;
	transition: none;
	pointer-events: none;
	transform-origin: center center;
}

.card--active .wheel {
	visibility: visible;
}

.card--active .wheel--left {
	animation: rollFromLeft 2.5s ease-in-out forwards;
}

.card--active .wheel--right {
	animation: rollFromRight 2.5s ease-in-out forwards;
}

@keyframes rollFromLeft {
	0% {
		top: -120px;
		left: -80px;
		transform: rotate(0deg);
	}

	25% {
		top: -60px;
		left: 0;
		transform: rotate(180deg);
	}

	80% {
		top: -60px;
		left: calc(50% - 30px);
		transform: rotate(720deg);
	}

	100% {
		top: -60px;
		left: calc(50% - 30px);
		transform: rotate(720deg);
		visibility: hidden;
	}
}

@keyframes rollFromRight {
	0% {
		top: -120px;
		right: -80px;
		transform: rotate(0deg);
	}

	25% {
		top: -60px;
		right: 0;
		transform: rotate(-180deg);
	}

	80% {
		top: -60px;
		right: calc(50% - 30px);
		transform: rotate(-720deg);
	}

	100% {
		top: -60px;
		right: calc(50% - 30px);
		transform: rotate(-720deg);
		visibility: hidden;
	}
}

button {
	position: fixed;
	bottom: 2rem;
	left: 2rem;
	padding: 1rem;
	border: none;
	background: none;
	border: 1px solid currentColor;
	border-radius: 50%;
	color: #999;
	cursor: pointer;
	transition: all 0.2s;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

button svg {
	display: inline-block;
	width: 24px;
	height: 24px;
}

button .pause {
	display: none;
}

button:hover {
	color: #333;
}

.playing .pause {
	display: inline-block;
}

.playing .play {
	display: none;
}

/* Responsive Design */
@media (max-width: 767px) {
	:root {
		font-size: 14px;
	}
}