:root {
	--ink: #141816;
	--muted: #5a635e;
	--line: rgba(20, 24, 22, 0.1);
	--surface: #f4f7f5;
	--emerald: #059669;
	--emerald-deep: #047857;
	--ring: 264; /* circumference ≈ 2πr with r=42 */
	--countdown: 8;
	font-synthesis: none;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	min-height: 100%;
}

body {
	color: var(--ink);
	background: var(--surface);
	font-family: 'DM Sans', system-ui, sans-serif;
	font-optical-sizing: auto;
	-webkit-font-smoothing: antialiased;
}

a {
	color: inherit;
}

.shell {
	position: relative;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	padding: clamp(1.25rem, 4vw, 2.5rem);
	overflow: hidden;
}

.atmosphere {
	position: absolute;
	inset: -20% -10% auto;
	height: 70vh;
	background:
		radial-gradient(ellipse 70% 55% at 50% 0%, rgba(5, 150, 105, 0.18), transparent 70%),
		radial-gradient(ellipse 45% 40% at 85% 20%, rgba(4, 120, 87, 0.12), transparent 65%),
		radial-gradient(ellipse 40% 35% at 10% 30%, rgba(16, 185, 129, 0.1), transparent 60%);
	pointer-events: none;
	animation: drift 18s ease-in-out infinite alternate;
}

@keyframes drift {
	from {
		transform: translate3d(0, 0, 0) scale(1);
	}
	to {
		transform: translate3d(0, 2.5%, 0) scale(1.04);
	}
}

.brand {
	position: relative;
	z-index: 1;
	opacity: 0;
	animation: rise 0.7s ease forwards 0.05s;
}

.wordmark {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	color: var(--ink);
}

.wordmark svg {
	display: block;
	height: clamp(1.35rem, 3.2vw, 1.75rem);
	width: auto;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.hero {
	position: relative;
	z-index: 1;
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	max-width: 36rem;
	margin: 0 auto;
	text-align: center;
	opacity: 0;
	animation: rise 0.8s ease forwards 0.18s;
}

.eyebrow {
	margin: 0 0 0.75rem;
	font-size: 0.8125rem;
	font-weight: 500;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--muted);
}

h1 {
	margin: 0 0 0.85rem;
	font-family: 'Source Serif 4', Georgia, serif;
	font-weight: 600;
	font-size: clamp(2rem, 6vw, 3rem);
	letter-spacing: -0.03em;
	line-height: 1.15;
}

.lede {
	margin: 0 auto 2rem;
	max-width: 28rem;
	font-size: 1.0625rem;
	line-height: 1.55;
	color: var(--muted);
}

.countdown {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.85rem;
	margin-bottom: 1.75rem;
}

.ring {
	position: relative;
	width: 5.5rem;
	height: 5.5rem;
}

.ring svg {
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
}

.ring circle {
	fill: none;
	stroke-width: 4;
}

.ring .track {
	stroke: var(--line);
}

.ring .progress {
	stroke: var(--emerald);
	stroke-linecap: round;
	stroke-dasharray: var(--ring);
	stroke-dashoffset: 0;
	transition: stroke-dashoffset 0.9s linear;
}

.seconds {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	font-family: 'Source Serif 4', Georgia, serif;
	font-size: 1.75rem;
	font-weight: 600;
	letter-spacing: -0.02em;
}

.hint {
	margin: 0;
	font-size: 0.9375rem;
	color: var(--muted);
}

.hint a {
	color: var(--emerald-deep);
	font-weight: 500;
}

.actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	justify-content: center;
}

.cta,
.ghost {
	appearance: none;
	border-radius: 0.5rem;
	font: inherit;
	font-weight: 600;
	font-size: 0.9375rem;
	padding: 0.8rem 1.25rem;
	cursor: pointer;
	text-decoration: none;
	transition:
		transform 0.15s ease,
		background 0.15s ease,
		border-color 0.15s ease;
}

.cta {
	background: var(--ink);
	color: #fff;
	border: 1px solid var(--ink);
}

.cta:hover {
	background: #000;
	transform: translateY(-1px);
}

.ghost {
	background: transparent;
	color: var(--muted);
	border: 1px solid var(--line);
}

.ghost:hover {
	border-color: rgba(20, 24, 22, 0.25);
	color: var(--ink);
}

.ghost[hidden] {
	display: none;
}

.footer {
	position: relative;
	z-index: 1;
	padding-top: 2rem;
	text-align: center;
	font-size: 0.8125rem;
	color: var(--muted);
	opacity: 0;
	animation: rise 0.7s ease forwards 0.35s;
}

.footer a {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.footer .legal {
	margin: 0.4rem 0 0;
	opacity: 0.85;
}

body.paused .progress {
	transition: none;
}

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

@media (prefers-reduced-motion: reduce) {
	.atmosphere,
	.brand,
	.hero,
	.footer {
		animation: none;
		opacity: 1;
	}

	.ring .progress {
		transition: none;
	}
}
