:root {
	color-scheme: dark;
	font-family:
		-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu",
		"Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
	color: #fff;
	background: #000;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
}

.background {
	position: fixed;
	inset: 0;
	background:
		linear-gradient(to bottom, #000, rgb(0 0 0 / 50%), #000),
		linear-gradient(rgb(0 0 0 / 70%), rgb(0 0 0 / 70%)),
		url("./background.webp") center / cover no-repeat;
	pointer-events: none;
}

.countdown-page {
	position: relative;
	display: grid;
	min-height: 100svh;
	grid-template-rows: minmax(min-content, 1fr) auto minmax(0, 1fr);
	justify-items: center;
	padding: 3rem 1rem;
}

.logo {
	grid-row: 1;
	align-self: end;
	margin-bottom: 2rem;
	display: block;
	width: auto;
	max-width: min(100%, 28rem);
	height: auto;
	max-height: 9.5rem;
	object-fit: contain;
	animation: appear 0.6s ease-out both;
}

.card {
	grid-row: 2;
	width: 100%;
	max-width: 64rem;
	padding: 2rem 1.5rem;
	text-align: center;
	border-radius: 1.5rem;
	background: rgb(255 255 255 / 4%);
	backdrop-filter: blur(18px);
	box-shadow:
		0 8px 32px 0 rgb(0 0 0 / 35%),
		inset 0 1px 0 0 rgb(255 255 255 / 8%),
		0 0 0 1px rgb(255 255 255 / 6%);
	animation: appear 0.6s 0.1s ease-out both;
}

h1 {
	margin: 0 0 1.5rem;
	color: rgb(255 255 255 / 80%);
	font-size: clamp(1.25rem, 2.4vw, 2rem);
	font-weight: 400;
	line-height: 1.5;
}

.timer {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	max-width: 52rem;
	margin-inline: auto;
	gap: clamp(1rem, 4vw, 3rem);
}

.timer:not([hidden]) {
	display: grid;
}

.time-unit {
	display: flex;
	min-width: 0;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
}

.value {
	font-size: clamp(2.5rem, 9vw, 7rem);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	line-height: 1;
	overflow-wrap: anywhere;
}

.unit {
	color: rgb(255 255 255 / 60%);
	font-size: clamp(1rem, 2vw, 1.5rem);
}

.message {
	margin: 0;
	color: rgb(255 255 255 / 80%);
	font-size: 0.875rem;
	line-height: 1.6;
}

@media (min-width: 768px) {
	.card {
		padding: 3rem 4rem;
	}

	h1 {
		margin-bottom: 2rem;
	}
}

@keyframes appear {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.logo,
	.card {
		animation: none;
	}
}
