/* AniDream maintenance page.
   Tokens are the site's Midnight theme (src/styles.css :root), so the page
   reads as the same product while the app itself is down. */

@font-face {
	font-family: "Karla Variable";
	font-style: normal;
	font-display: swap;
	font-weight: 200 800;
	src: url("assets/fonts/karla-latin-wght-normal.woff2") format("woff2-variations");
}

:root {
	color-scheme: dark;

	--radius: 0.4rem;
	--text: oklch(0.8531 0.0001 273.04);
	--background: oklch(0.1899 0.0249 273.04);
	--background-inner: oklch(0.1699 0.0309 273.04);
	--foreground: oklch(0.985 0 273.04);
	--card: oklch(0.2199 0.0309 273.04);
	--muted: oklch(0.2839 0.0309 273.04);
	--muted-foreground: oklch(0.705 0.0399 273.04);
	--primary: oklch(0.8787 0.0426 272.28);
	--accent: oklch(0.719 0.1322 264.2);
	--border: oklch(1 0 0 / 8%);

	/* The logo's own blue, used for "Dream." and the glow. */
	--brand-light: #7bcdfc;
	--brand-mid: #5aa6fd;
	--brand-deep: #366df0;

	--ease-out-quint: cubic-bezier(0.23, 1, 0.32, 1);
	--ease-in-out-quad: cubic-bezier(0.455, 0.03, 0.515, 0.955);
}

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

html {
	background: var(--background);
}

body {
	margin: 0;
	min-height: 100dvh;
	display: grid;
	grid-template-rows: auto 1fr auto;
	font-family: "Karla Variable", system-ui, sans-serif;
	font-size: 1rem;
	line-height: 1.5;
	color: var(--text);
	background: transparent;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	padding: env(safe-area-inset-top) env(safe-area-inset-right)
		env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* Canvas ------------------------------------------------------------------ */

.backdrop {
	position: fixed;
	inset: 0;
	z-index: -1;
	background:
		radial-gradient(60rem 36rem at 50% -6%, oklch(0.5 0.17 264 / 0.34), transparent 70%),
		radial-gradient(40rem 28rem at 8% 108%, oklch(0.62 0.12 264 / 0.14), transparent 70%),
		linear-gradient(180deg, var(--background) 0%, var(--background-inner) 100%);
}

/* Header and footer -------------------------------------------------------- */

.top,
.foot {
	width: 100%;
	max-width: 72rem;
	margin-inline: auto;
	padding: 1.5rem 1.5rem;
}

.top {
	display: flex;
	align-items: center;
}

.wordmark {
	display: block;
	height: 2.25rem;
	width: auto;
	/* The artwork carries its own side padding; pull it onto the page margin. */
	margin-left: -0.55rem;
}

.foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem 1.5rem;
	font-size: 0.875rem;
	color: var(--muted-foreground);
}

.prev {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}

.old-mark {
	width: 1.1rem;
	height: 1.1rem;
	color: var(--muted-foreground);
}

/* Stage -------------------------------------------------------------------- */

.stage {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	width: 100%;
	max-width: 40rem;
	margin-inline: auto;
	padding: 2rem 1.5rem 3rem;
}

.mark {
	width: clamp(6.5rem, 22vw, 9rem);
	height: auto;
	margin-bottom: 1.75rem;
	filter: drop-shadow(0 0 2.5rem oklch(0.6 0.17 264 / 0.45));
}

/* The sparkle breathes; the rest of the mark stays still. */
.mark-star {
	transform-box: fill-box;
	transform-origin: center;
	animation: twinkle 3.4s var(--ease-in-out-quad) infinite;
}

@keyframes twinkle {
	0%,
	100% {
		transform: scale(1);
		opacity: 1;
	}
	50% {
		transform: scale(1.22);
		opacity: 0.78;
	}
}

/* Status pill: same shape as the "Online" pill in the site footer. */
.status {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0 0 1.25rem;
	padding: 0.3rem 0.85rem 0.3rem 0.7rem;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: var(--card);
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--primary);
}

.dot {
	position: relative;
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 50%;
	background: var(--accent);
}

.dot::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: var(--accent);
	animation: ping 2.2s var(--ease-out-quint) infinite;
}

@keyframes ping {
	0% {
		transform: scale(1);
		opacity: 0.7;
	}
	80%,
	100% {
		transform: scale(3);
		opacity: 0;
	}
}

h1 {
	margin: 0;
	font-size: clamp(2.4rem, 7vw, 4rem);
	font-weight: 700;
	line-height: 1.04;
	letter-spacing: -0.035em;
	color: var(--foreground);
}

.lead {
	max-width: 30rem;
	margin: 1rem 0 0;
	font-size: clamp(1.05rem, 2.6vw, 1.2rem);
	color: var(--muted-foreground);
}

/* Motto: the four verbs light up in turn (maintenance.js), ending on blue. */
.motto {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.15em 0.4em;
	margin: 2.25rem 0 0;
	font-size: clamp(1.35rem, 4.4vw, 1.9rem);
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--foreground);
}

.motto span {
	transition:
		opacity 0.6s var(--ease-out-quint),
		transform 0.6s var(--ease-out-quint);
}

.js .motto span {
	opacity: 0.22;
	transform: translateY(0.2em);
}

.js .motto span.on {
	opacity: 1;
	transform: none;
}

.dream {
	background: linear-gradient(100deg, var(--brand-light), var(--brand-mid) 50%, var(--brand-deep));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

/* Countdown: cards like the site's, hidden until a release date is set. */
.countdown {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.6rem;
	width: 100%;
	max-width: 26rem;
	margin: 2.25rem 0 0;
}

.countdown[hidden],
.back[hidden] {
	display: none;
}

.unit {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.1rem;
	padding: 0.85rem 0.25rem 0.7rem;
	border: 1px solid var(--border);
	border-radius: calc(var(--radius) * 2);
	background: var(--card);
}

.unit b {
	font-size: clamp(1.5rem, 6vw, 2rem);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.02em;
	color: var(--foreground);
	font-variant-numeric: tabular-nums;
}

.unit span {
	font-size: 0.8125rem;
	color: var(--muted-foreground);
}

.back {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	margin: 2.25rem 0 0;
	font-size: 1.15rem;
	font-weight: 600;
	color: var(--foreground);
}

/* Same pill button as "Watch Now" on the home hero. */
.button {
	display: inline-flex;
	align-items: center;
	padding: 0.6rem 1.25rem;
	border-radius: 999px;
	background: var(--foreground);
	color: var(--background);
	font-size: 0.95rem;
	font-weight: 700;
	text-decoration: none;
	transition: transform 0.2s var(--ease-out-quint);
}

.button:hover {
	transform: translateY(-1px);
}

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

.contact a {
	color: var(--primary);
	text-underline-offset: 0.2em;
}

a:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
	border-radius: 4px;
}

@media (max-width: 30rem) {
	.top,
	.foot {
		padding-inline: 1.25rem;
	}

	.foot {
		flex-direction: column;
		align-items: flex-start;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
	}

	.js .motto span {
		opacity: 1;
		transform: none;
	}
}
