/* Heavensteel web: shared tokens. Palette v3 (docs/canon/style.json):
   Caelis white / cobalt / signal red, Dominion crimson / satin black / gold,
   over machined gunmetal. Polished and precise: crisp blocks, engraved lines,
   small model-kit markings, clean glow. No grime, no arrows, no chevrons. */

@font-face {
	font-family: "Saira";
	font-style: normal;
	font-display: swap;
	font-weight: 100 900;
	font-stretch: 50% 125%;
	src: url("/fonts/saira-latin-wdth-normal.woff2") format("woff2-variations");
}
@font-face {
	font-family: "Inter";
	font-style: normal;
	font-display: swap;
	font-weight: 100 900;
	src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
}

:root {
	color-scheme: dark;
	--bg: #0a0e16;
	--bg-2: #0f1520;
	--panel: #141b27;
	--panel-2: #1a2230;
	--line: rgb(196 201 208 / 0.1);
	--line-2: rgb(196 201 208 / 0.18);
	--ink: #e8ecf2;
	--ink-2: #a9b1bd;
	--ink-3: #6f7a89;

	--caelis-white: #c4c9d0;
	--caelis-cobalt: #214cb0;
	--caelis-cobalt-2: #3a6ae0;
	--caelis-red: #c8242c;
	--dominion-crimson: #68121b;
	--dominion-crimson-2: #9e1d2b;
	--dominion-black: #26272b;
	--dominion-gold: #d3a93f;
	--gunmetal: #464a51;
	--steel-edge: #a7afba;
	--visor: #8ce6ff;
	--sun: #ffd9a0;

	--display:
		"Saira", "Avenir Next Condensed", "Arial Narrow", system-ui, sans-serif;
	--body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
	--chamfer: 10px;
	--gutter: clamp(16px, 4vw, 48px);
	--max: 1200px;
}

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--body);
	font-size: 16px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

img {
	max-width: 100%;
	display: block;
}

a {
	color: inherit;
}

:focus-visible {
	outline: 2px solid var(--visor);
	outline-offset: 3px;
}

.wordmark {
	font-family: var(--display);
	font-weight: 800;
	font-stretch: 78%;
	letter-spacing: 0.04em;
	line-height: 0.9;
	white-space: nowrap;
}
.wordmark .wm-heaven {
	color: var(--ink);
}
.wordmark .wm-steel {
	color: var(--caelis-cobalt-2);
}

/* Buttons: chamfered corners like a kit's plate edges. */
.btn {
	--btn-bg: var(--panel-2);
	--btn-ink: var(--ink);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	min-height: 48px;
	padding: 0 1.5em;
	border: 0;
	background: var(--btn-bg);
	color: var(--btn-ink);
	font-family: var(--display);
	font-size: 1.05rem;
	font-weight: 700;
	font-stretch: 85%;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	clip-path: polygon(
		var(--chamfer) 0,
		100% 0,
		100% calc(100% - var(--chamfer)),
		calc(100% - var(--chamfer)) 100%,
		0 100%,
		0 var(--chamfer)
	);
	transition:
		background 0.15s ease,
		transform 0.15s ease;
	box-shadow: inset 0 0 0 1px var(--line-2);
}
.btn:hover {
	background: #222c3d;
}
.btn:active {
	transform: translateY(1px);
}
.btn.primary {
	--btn-bg: var(--caelis-cobalt);
	--btn-ink: #fff;
	box-shadow:
		inset 0 1px 0 rgb(255 255 255 / 0.18),
		inset 0 -2px 0 rgb(0 0 0 / 0.25);
}
.btn.primary:hover {
	background: #2a5bcc;
}
.btn.gold {
	--btn-bg: var(--dominion-gold);
	--btn-ink: #1a1408;
}

/* Landing page (and 404). Tokens come from tokens.css. */

body {
	overflow-x: hidden;
}

.btn.big {
	min-height: 56px;
	padding: 0 2em;
	font-size: 1.15rem;
}
.btn.small {
	min-height: 38px;
	padding: 0 1.2em;
	font-size: 0.95rem;
	--chamfer: 7px;
}

.kicker {
	margin: 0 0 12px;
	color: var(--kicker);
	font-family: var(--display);
	font-weight: 600;
	font-stretch: 85%;
	font-size: 0.95rem;
	letter-spacing: 0.22em;
	text-transform: uppercase;
}

.decal {
	margin: 0;
	color: var(--ink-3);
	font-family: var(--display);
	font-weight: 600;
	font-stretch: 70%;
	font-size: 0.72rem;
	letter-spacing: 0.24em;
	text-transform: uppercase;
}
.decal::before {
	content: "";
	display: inline-block;
	width: 14px;
	height: 2px;
	margin-right: 8px;
	vertical-align: middle;
	background: var(--caelis-red);
}
.decal.gold::before {
	background: var(--dominion-gold);
}

/* ── top bar ───────────────────────────────────────────────────────── */

.topbar {
	position: absolute;
	inset: 0 0 auto 0;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: calc(14px + env(safe-area-inset-top)) var(--gutter) 14px;
}
.brand {
	font-size: 1.6rem;
	text-decoration: none;
}
.nav {
	display: flex;
	align-items: center;
	gap: clamp(12px, 2.5vw, 28px);
}
.nav a:not(.btn) {
	color: var(--ink-2);
	font-family: var(--display);
	font-weight: 600;
	font-stretch: 85%;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-decoration: none;
	font-size: 0.92rem;
}
.nav a:not(.btn):hover {
	color: var(--ink);
}
@media (max-width: 640px) {
	.nav a:not(.btn) {
		display: none;
	}
}

/* ── hero ─────────────────────────────────────────────────────────── */

.hero {
	position: relative;
	min-height: max(640px, 100svh);
	display: grid;
	place-items: center;
	padding: 120px var(--gutter) 80px;
	overflow: hidden;
	isolation: isolate;
	background: var(--bg);
}
.hero-sky {
	position: absolute;
	inset: 0;
	z-index: -3;
	background:
		radial-gradient(
			42% 38% at 50% -6%,
			rgb(255 217 160 / 0.26),
			transparent 70%
		),
		radial-gradient(55% 55% at 6% 100%, rgb(33 76 176 / 0.55), transparent 72%),
		radial-gradient(55% 55% at 94% 100%, rgb(104 18 27 / 0.7), transparent 72%),
		linear-gradient(180deg, #0b111c 0%, #0a0e16 60%, #080b11 100%);
}
.hero-grid {
	position: absolute;
	inset: 0;
	z-index: -2;
	background-image:
		linear-gradient(var(--line) 1px, transparent 1px),
		linear-gradient(90deg, var(--line) 1px, transparent 1px);
	background-size: 56px 56px;
	mask-image: linear-gradient(
		180deg,
		transparent 0%,
		#000 30%,
		#000 75%,
		transparent 100%
	);
	-webkit-mask-image: linear-gradient(
		180deg,
		transparent 0%,
		#000 30%,
		#000 75%,
		transparent 100%
	);
	opacity: 0.55;
}
/* the hero's battle loop (web-footage): fades in over the sky once it plays; the cutouts step back while it does */
.hero-video {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 55%;
	opacity: 0;
	transition: opacity 0.9s ease;
	pointer-events: none;
}
.hero-shade {
	/* keeps the wordmark and buttons legible over the footage */
	position: absolute;
	inset: 0;
	z-index: -1;
	opacity: 0;
	transition: opacity 0.9s ease;
	background:
		radial-gradient(
			60% 50% at 50% 48%,
			rgb(8 11 17 / 0.62),
			rgb(8 11 17 / 0.2) 75%
		),
		linear-gradient(
			180deg,
			rgb(8 11 17 / 0.55) 0%,
			transparent 22%,
			transparent 70%,
			rgb(8 11 17 / 0.85) 100%
		);
	pointer-events: none;
}
.hero.playing .hero-video,
.hero.playing .hero-shade {
	opacity: 1;
}
.hero-unit {
	transition: opacity 0.9s ease;
}
.hero.playing .hero-unit,
.hero.playing .hero-grid {
	opacity: 0;
}
.hero::after {
	/* the horizon: a single engraved line with a warm glint */
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 14%;
	z-index: -1;
	height: 1px;
	background: linear-gradient(
		90deg,
		transparent,
		rgb(255 217 160 / 0.35),
		transparent
	);
}

.hero-unit {
	position: absolute;
	bottom: 6%;
	margin: 0;
	z-index: -1;
	pointer-events: none;
}
.hero-unit img {
	display: block;
	width: 100%;
	height: auto;
	filter: drop-shadow(0 30px 30px rgb(0 0 0 / 0.55));
}
/* a soft spotlight in the livery's colour behind each hero unit */
.hero-unit picture {
	position: relative;
	display: block;
}
.hero-unit picture::before {
	content: "";
	position: absolute;
	inset: -18% -30% -6%;
	z-index: -1;
	background: radial-gradient(
		closest-side,
		var(--glow, rgb(58 106 224 / 0.42)),
		transparent
	);
	filter: blur(6px);
}
.hero-unit.right picture::before {
	--glow: rgb(158 29 43 / 0.5);
	inset: -30% -12% -10%;
}
/* a slow light sweep across the unit, clipped to its silhouette */
.hero-unit picture::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(
		105deg,
		transparent 35%,
		rgb(255 236 210 / 0.38) 48%,
		transparent 61%
	);
	background-size: 300% 100%;
	background-position: 120% 0;
	mix-blend-mode: soft-light;
	-webkit-mask: var(--cut) center / contain no-repeat;
	mask: var(--cut) center / contain no-repeat;
}
.hero-unit.left picture::after {
	--cut: url("/img/site/siren-caelis-540.webp?v=6b45085498");
}
.hero-unit.right picture::after {
	--cut: url("/img/site/aurochs-dominion-1120.webp?v=14ae5fc8fe");
}
@media (prefers-reduced-motion: no-preference) {
	.hero-unit picture::after {
		animation: hero-sweep 11s ease-in-out 1.2s infinite;
	}
	.hero-unit.right picture::after {
		animation-delay: 2.4s;
	}
	@supports (animation-timeline: scroll()) {
		.hero-unit.left {
			animation: hero-drift linear both;
			animation-timeline: scroll(root);
			animation-range: 0 100svh;
		}
		.hero-unit.right {
			animation: hero-drift-far linear both;
			animation-timeline: scroll(root);
			animation-range: 0 100svh;
		}
	}
}
@keyframes hero-sweep {
	0% {
		background-position: 120% 0;
	}
	28%,
	100% {
		background-position: -20% 0;
	}
}
@keyframes hero-drift {
	to {
		transform: translateY(-7%);
	}
}
@keyframes hero-drift-far {
	to {
		transform: translateY(-3%);
	}
}
.hero-unit::before {
	/* contact shadow on the ground */
	content: "";
	position: absolute;
	left: 8%;
	right: 8%;
	bottom: -10px;
	height: 34px;
	border-radius: 50%;
	background: radial-gradient(closest-side, rgb(0 0 0 / 0.7), transparent);
}
.hero-unit.left {
	left: max(2vw, calc(50% - 640px));
	width: clamp(131px, 17.5vw, 262px);
}
.hero-unit.right {
	right: max(0vw, calc(50% - 680px));
	width: clamp(240px, 36vw, 560px);
	bottom: 9%;
}
.hero-unit .decal {
	position: absolute;
	white-space: nowrap;
	top: -6px;
}
.hero-unit.left .decal {
	left: 0;
}
.hero-unit.right .decal {
	right: 4%;
	top: -8%;
}

.hero-copy {
	position: relative;
	max-width: 760px;
	text-align: center;
	transform: translateY(-6vh);
}
.hero-title {
	margin: 0;
	font-size: clamp(3.6rem, 13vw, 9.5rem);
	text-shadow: 0 6px 40px rgb(0 0 0 / 0.55);
}
.tagline {
	margin: 18px auto 30px;
	color: var(--ink);
	font-size: clamp(1.05rem, 2.3vw, 1.35rem);
	line-height: 1.5;
	text-shadow: 0 2px 20px rgb(0 0 0 / 0.6);
}
.cta {
	display: flex;
	gap: 14px;
	justify-content: center;
	flex-wrap: wrap;
}
.server-status {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 26px 0 0;
	padding: 6px 14px;
	background: rgb(10 14 22 / 0.6);
	box-shadow: inset 0 0 0 1px var(--line-2);
	color: var(--ink-2);
	font-family: var(--display);
	font-stretch: 85%;
	font-size: 0.9rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}
.server-status[hidden] {
	display: none;
}
.server-status .dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #3ddc84;
	box-shadow: 0 0 10px #3ddc84;
}
.server-status.down .dot {
	background: var(--ink-3);
	box-shadow: none;
}
.fineprint {
	margin: 14px 0 0;
	color: var(--ink-3);
	font-size: 0.92rem;
}

@media (max-width: 720px) {
	.hero {
		place-items: start center;
		padding-top: 110px;
		min-height: max(700px, 100svh);
	}
	.hero-copy {
		transform: none;
	}
	.hero-unit.left {
		left: 2vw;
		width: 30vw;
		bottom: 3%;
	}
	.hero-unit.right {
		right: -6vw;
		width: 62vw;
		bottom: 5%;
	}
	.hero-unit .decal {
		display: none;
	}
}

/* ── sections ─────────────────────────────────────────────────────── */

.section {
	position: relative;
	max-width: var(--max);
	margin: 0 auto;
	padding: clamp(64px, 10vw, 120px) var(--gutter);
}
.section-head {
	max-width: 680px;
	margin-bottom: clamp(32px, 5vw, 56px);
}
.section h2 {
	margin: 0 0 14px;
	font-family: var(--display);
	font-weight: 750;
	font-stretch: 80%;
	font-size: clamp(2rem, 5vw, 3.2rem);
	line-height: 1.02;
	letter-spacing: 0.01em;
}
.lede {
	margin: 0;
	color: var(--ink-2);
	font-size: 1.08rem;
}

.how-film {
	margin: 0 0 clamp(32px, 5vw, 56px);
}
.how-film video {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	background: var(--bg-2);
	box-shadow: 0 0 0 1px var(--line);
}
.how-film figcaption {
	margin-top: 10px;
	color: var(--ink-3);
	font-size: 0.9rem;
}

.steps {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 2px;
	background: var(--line);
	box-shadow: 0 0 0 1px var(--line);
}
.step {
	position: relative;
	padding: 28px 24px 30px;
	background: var(--bg-2);
}
.step::after {
	/* a kit-plate corner notch */
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	width: 18px;
	height: 18px;
	background: linear-gradient(225deg, var(--bg) 50%, transparent 50%);
}
.step-no {
	display: inline-block;
	margin-bottom: 18px;
	padding: 2px 8px;
	background: var(--caelis-cobalt);
	color: #fff;
	font-family: var(--display);
	font-weight: 700;
	font-stretch: 80%;
	letter-spacing: 0.12em;
	font-size: 0.9rem;
}
.step h3,
.mode h3 {
	margin: 0 0 8px;
	font-family: var(--display);
	font-weight: 700;
	font-stretch: 85%;
	font-size: 1.45rem;
	letter-spacing: 0.02em;
}
.step p,
.mode p {
	margin: 0;
	color: var(--ink-2);
}
.modes {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(16px, 3vw, 32px);
	margin-top: clamp(32px, 5vw, 56px);
}
.mode {
	padding-left: 18px;
	border-left: 2px solid var(--dominion-gold);
}
.mode code {
	color: var(--ink);
	font-family: var(--display);
	font-stretch: 85%;
	letter-spacing: 0.04em;
	overflow-wrap: anywhere;
}
@media (max-width: 960px) {
	.steps {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.modes {
		grid-template-columns: 1fr;
	}
}
@media (max-width: 560px) {
	.steps {
		grid-template-columns: 1fr;
	}
}

/* ── armies ───────────────────────────────────────────────────────── */

.army-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(16px, 3vw, 28px);
}
.army {
	position: relative;
	display: grid;
	grid-template-rows: 300px auto;
	overflow: hidden;
	background: var(--bg-2);
	box-shadow: inset 0 0 0 1px var(--line);
	clip-path: polygon(
		0 0,
		calc(100% - 22px) 0,
		100% 22px,
		100% 100%,
		22px 100%,
		0 calc(100% - 22px)
	);
}
.army::before {
	/* the livery's color block along the top edge */
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 6px;
	z-index: 1;
}
.army.caelis::before {
	background: linear-gradient(
		90deg,
		var(--caelis-white) 0 55%,
		var(--caelis-cobalt) 55% 92%,
		var(--caelis-red) 92%
	);
}
.army.dominion::before {
	background: linear-gradient(
		90deg,
		var(--dominion-crimson-2) 0 55%,
		var(--dominion-black) 55% 92%,
		var(--dominion-gold) 92%
	);
}
.army-art {
	display: grid;
	place-items: center;
	padding: 28px 24px 0;
}
.army.caelis .army-art {
	background: radial-gradient(
		70% 80% at 50% 100%,
		rgb(33 76 176 / 0.45),
		transparent 70%
	);
}
.army.dominion .army-art {
	background: radial-gradient(
		70% 80% at 50% 100%,
		rgb(158 29 43 / 0.45),
		transparent 70%
	);
}
.army-art img {
	max-height: 260px;
	width: auto;
	filter: drop-shadow(0 18px 18px rgb(0 0 0 / 0.5));
}
/* a hero whose model is still in development: its approved concept sheet, framed as one */
.army-art.sheet {
	position: relative;
	padding-bottom: 18px;
}
.army-art.sheet img {
	max-height: 250px;
	filter: none;
	box-shadow:
		0 0 0 1px var(--line-2),
		0 14px 28px rgb(0 0 0 / 0.45);
}
.sheet-tag,
.dev-stamp {
	margin: 0;
	font-family: var(--display);
	font-stretch: 85%;
	letter-spacing: 0.12em;
	font-size: 0.72rem;
	text-transform: uppercase;
	color: var(--ink-3);
}
.army-art.sheet .sheet-tag {
	position: absolute;
	right: 26px;
	bottom: 0;
}
/* no approved art yet: a blueprint panel, never a stand-in model */
.army-art.dev {
	align-content: center;
	gap: 12px;
	padding: 28px clamp(24px, 4vw, 48px) 0;
	text-align: center;
	background:
		linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 24px 24px,
		linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 24px 24px,
		radial-gradient(70% 80% at 50% 100%, rgb(33 76 176 / 0.4), transparent 70%);
}
.dev-stamp {
	justify-self: center;
	padding: 6px 14px;
	color: var(--ink);
	box-shadow: inset 0 0 0 1px var(--line-2);
}
.dev-note {
	margin: 0;
	max-width: 34ch;
	color: var(--ink-2);
	font-size: 0.95rem;
}
.army-copy {
	padding: 22px 26px 28px;
}
.army-copy h3 {
	margin: 8px 0 8px;
	font-family: var(--display);
	font-weight: 750;
	font-stretch: 80%;
	font-size: 2rem;
	letter-spacing: 0.03em;
}
.army-copy > p:not(.decal) {
	margin: 0 0 18px;
	color: var(--ink-2);
}
.swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	list-style: none;
	margin: 0;
	padding: 0;
	color: var(--ink-3);
	font-family: var(--display);
	font-stretch: 85%;
	letter-spacing: 0.1em;
	font-size: 0.8rem;
	text-transform: uppercase;
}
.swatches li {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}
.swatches li::before {
	content: "";
	width: 18px;
	height: 12px;
	background: var(--c);
	box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.15);
}
@media (max-width: 760px) {
	.army-grid {
		grid-template-columns: 1fr;
	}
	.army {
		grid-template-rows: 240px auto;
	}
	.army-art img {
		max-height: 210px;
	}
}

/* ── unit cards (landing #units and /units) ─────────────────────────── */

.class-block + .class-block {
	margin-top: clamp(32px, 5vw, 56px);
}
.class-title,
.section .class-title {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin: 0 0 16px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--line-2);
	color: var(--ink-2);
	font-family: var(--display);
	font-weight: 700;
	font-stretch: 80%;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	font-size: 1rem;
	line-height: 1.3;
}
.class-title span {
	color: var(--ink-3);
	font-weight: 600;
	letter-spacing: 0.1em;
}
.class-title.titan {
	color: var(--kicker);
}
.ucards {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
	gap: clamp(14px, 2vw, 22px);
}
.ucard a {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--panel);
	color: inherit;
	text-decoration: none;
	box-shadow:
		inset 0 0 0 1px var(--line),
		inset 0 2px 0 var(--caelis-cobalt);
	clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
	transition:
		transform 0.18s ease,
		background 0.18s ease;
}
.ucard.titan a {
	box-shadow:
		inset 0 0 0 1px var(--line),
		inset 0 2px 0 var(--dominion-gold);
}
.ucard a:hover {
	background: var(--panel-2);
	transform: translateY(-2px);
}
.ucard-art {
	margin: 0;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--bg-2);
}
.ucard-art img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}
.ucard a:hover .ucard-art img {
	transform: scale(1.04);
}
/* a high-res cutout on a lit card: a glow in the livery's blue (gold for titans) and a ground shadow */
.ucard-art.cutout {
	position: relative;
	isolation: isolate;
	background:
		radial-gradient(
			58% 52% at 50% 64%,
			var(--card-glow, rgb(58 106 224 / 0.34)),
			transparent 72%
		),
		linear-gradient(180deg, var(--bg-2), var(--panel));
}
.ucard.titan .ucard-art.cutout {
	--card-glow: rgb(211 169 63 / 0.26);
}
.ucard-art.cutout::after {
	content: "";
	position: absolute;
	left: 18%;
	right: 18%;
	bottom: 4%;
	height: 9%;
	z-index: -1;
	border-radius: 50%;
	background: radial-gradient(closest-side, rgb(0 0 0 / 0.55), transparent);
}
.ucard-art.cutout img {
	object-fit: contain;
	filter: drop-shadow(0 6px 8px rgb(0 0 0 / 0.35));
}
@media (prefers-color-scheme: light) {
	.ucard-art.cutout {
		--card-glow: rgb(58 106 224 / 0.2);
	}
	.ucard.titan .ucard-art.cutout {
		--card-glow: rgb(211 169 63 / 0.22);
	}
	.ucard-art.cutout::after {
		background: radial-gradient(
			closest-side,
			rgb(16 21 31 / 0.28),
			transparent
		);
	}
}

/* a card in its livery (data-livery): the Dominion's crimson, the shared core's brushed steel; titans keep their gold */
.ucard[data-livery="dominion"]:not(.titan) a {
	box-shadow:
		inset 0 0 0 1px var(--line),
		inset 0 2px 0 var(--dominion-crimson-2);
}
.ucard[data-livery="metal"]:not(.titan) a {
	box-shadow:
		inset 0 0 0 1px var(--line),
		inset 0 2px 0 var(--steel-edge);
}
.ucard[data-livery="dominion"]:not(.titan) .ucard-art.cutout {
	--card-glow: rgb(158 29 43 / 0.34);
}
.ucard[data-livery="metal"]:not(.titan) .ucard-art.cutout {
	--card-glow: rgb(196 201 208 / 0.2);
}
@media (prefers-color-scheme: light) {
	.ucard[data-livery="dominion"]:not(.titan) .ucard-art.cutout {
		--card-glow: rgb(158 29 43 / 0.18);
	}
	.ucard[data-livery="metal"]:not(.titan) .ucard-art.cutout {
		--card-glow: rgb(70 74 81 / 0.16);
	}
}

/* the role line and the decal's dash in the livery too */
.ucard[data-livery="dominion"] {
	--accent-ink: #e5525f;
}
.ucard[data-livery="metal"] {
	--accent-ink: var(--caelis-white);
}
.ucard[data-livery="dominion"] .decal:not(.gold)::before {
	background: var(--dominion-gold);
}
.ucard[data-livery="metal"] .decal:not(.gold)::before {
	background: var(--steel-edge);
}
@media (prefers-color-scheme: light) {
	.ucard[data-livery="dominion"] {
		--accent-ink: var(--dominion-crimson-2);
	}
	.ucard[data-livery="metal"] {
		--accent-ink: var(--gunmetal);
	}
}

/* commander heroes: the dominion's glow, the approved sheet framed as one, a blueprint while the art is in development */
.ucard-hero[data-livery="dominion"] .ucard-art.cutout {
	--card-glow: rgb(158 29 43 / 0.34);
}
.ucard-art.sheet,
.ucard-art.dev {
	position: relative;
	display: grid;
	place-items: center;
	background: linear-gradient(180deg, var(--bg-2), var(--panel));
}
.ucard-art.sheet picture {
	display: contents;
}
.ucard-art.sheet img {
	width: auto;
	height: 82%;
	max-width: 92%;
	object-fit: contain;
	box-shadow: 0 0 0 1px var(--line-2);
}
.ucard-art.sheet figcaption,
.ucard-art.dev figcaption {
	font-family: var(--display);
	font-stretch: 85%;
	letter-spacing: 0.12em;
	font-size: 0.66rem;
	text-transform: uppercase;
	color: var(--ink-3);
}
.ucard-art.sheet figcaption {
	position: absolute;
	right: 8px;
	bottom: 4px;
}
.ucard-art.dev {
	background:
		linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 18px 18px,
		linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 18px 18px,
		radial-gradient(60% 70% at 50% 100%, rgb(33 76 176 / 0.35), transparent 70%),
		var(--bg-2);
}
.ucard-art.dev figcaption {
	padding: 5px 12px;
	color: var(--ink);
	box-shadow: inset 0 0 0 1px var(--line-2);
}
.ucard-commander {
	margin: 0;
	color: var(--ink-3);
	font-size: 0.8rem;
}
.class-lede {
	margin: -6px 0 16px;
	color: var(--ink-2);
}
.ucard-hero a {
	box-shadow:
		inset 0 0 0 1px var(--line),
		inset 0 2px 0 var(--dominion-gold);
}

.ucard-body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 14px 16px 18px;
	flex: 1;
}
.ucard-name {
	margin: 0;
	font-family: var(--display);
	font-weight: 750;
	font-stretch: 82%;
	font-size: 1.5rem;
	line-height: 1;
	letter-spacing: 0.02em;
}
.ucard-role {
	margin: 0;
	color: var(--accent-ink);
	font-weight: 600;
	font-size: 0.92rem;
}
.ucard-stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1px;
	margin: 6px 0 4px;
	background: var(--line);
	border: 1px solid var(--line);
}
.ucard-stats div {
	padding: 6px 8px;
	background: var(--bg-2);
	min-width: 0;
}
.ucard-stats dt {
	color: var(--ink-3);
	font-size: 0.62rem;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ucard-stats dd {
	margin: 0;
	font-family: var(--display);
	font-weight: 700;
	font-stretch: 85%;
	font-size: 0.98rem;
	line-height: 1.15;
}
@media (max-width: 560px) {
	.ucard a {
		flex-direction: row;
	}
	.ucard-art {
		flex: 0 0 38%;
		aspect-ratio: auto;
	}
	.ucard-body {
		padding: 12px 14px 14px;
		gap: 4px;
	}
	.ucard-name {
		font-size: 1.3rem;
	}
	.ucard-stats div {
		padding: 4px 6px;
	}
	.ucard-line {
		display: none;
	}
}
.ucard-soon {
	margin: 6px 0 4px;
	color: var(--ink-3);
	font-size: 0.82rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.ucard-line {
	margin: 0;
	color: var(--ink-2);
	font-size: 0.92rem;
	line-height: 1.45;
}
.units-more {
	margin-top: 28px;
	text-align: center;
}

/* ── band ─────────────────────────────────────────────────────────── */

.band {
	position: relative;
	display: grid;
	place-items: center;
	min-height: 440px;
	padding: 80px var(--gutter);
	overflow: hidden;
	isolation: isolate;
	text-align: center;
}
.band-art {
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		radial-gradient(50% 60% at 50% 50%, rgb(10 14 22 / 0.72), transparent 100%),
		linear-gradient(
			180deg,
			var(--bg) 0%,
			rgb(10 14 22 / 0.5) 30%,
			rgb(10 14 22 / 0.5) 70%,
			var(--bg) 100%
		),
		url("/img/band-squad.webp?v=8b5798c313") center 40% / cover no-repeat;
}
.band-copy {
	max-width: 640px;
}
.band h2 {
	margin: 0 0 12px;
	font-family: var(--display);
	font-weight: 750;
	font-stretch: 80%;
	font-size: clamp(2rem, 5vw, 3.2rem);
	line-height: 1.05;
	text-shadow: 0 4px 24px rgb(0 0 0 / 0.7);
}
.band p {
	margin: 0 0 26px;
	color: var(--ink);
	text-shadow: 0 2px 14px rgb(0 0 0 / 0.8);
}

/* ── footer ───────────────────────────────────────────────────────── */

.footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 32px;
	max-width: var(--max);
	margin: 0 auto;
	padding: 36px var(--gutter) calc(36px + env(safe-area-inset-bottom));
	border-top: 1px solid var(--line);
	color: var(--ink-3);
	font-size: 0.9rem;
}
.footer p {
	margin: 0;
}
.footer .brand {
	font-size: 1.3rem;
}
.footer nav {
	display: flex;
	gap: 20px;
}
.footer nav a {
	color: var(--ink-2);
	text-decoration: none;
}
.footer nav a:hover {
	color: var(--ink);
}

/* ── 404 ──────────────────────────────────────────────────────────── */

.notfound {
	min-height: 100svh;
	display: grid;
	place-items: center;
	padding: 24px 16px;
	text-align: center;
	background:
		radial-gradient(50% 40% at 50% 0%, rgb(255 217 160 / 0.14), transparent 70%),
		var(--bg);
}
.notfound h1 {
	margin: 18px 0 8px;
	font-family: var(--display);
	font-stretch: 80%;
	font-size: 2.2rem;
}
.notfound p {
	color: var(--ink-2);
	margin: 0 0 24px;
}

@media (prefers-reduced-motion: reduce) {
	* {
		scroll-behavior: auto !important;
		transition: none !important;
	}
}
html {
	scroll-behavior: smooth;
}

/* ── light theme ──────────────────────────────────────────────────────
   Pages follow the viewer's scheme. The hero, the band and the topbar over
   the hero stay dark: their art is night-lit. */

:root {
	--kicker: var(--dominion-gold);
	--accent-ink: var(--caelis-cobalt-2);
}
@media (prefers-color-scheme: light) {
	:root {
		color-scheme: light;
		--bg: #f3f5f8;
		--bg-2: #e8ecf2;
		--panel: #ffffff;
		--panel-2: #f6f8fb;
		--line: rgb(20 30 48 / 0.1);
		--line-2: rgb(20 30 48 / 0.18);
		--ink: #10151f;
		--ink-2: #404a5a;
		--ink-3: #5f6a7b;
		--kicker: #8a6514;
		--accent-ink: var(--caelis-cobalt);
	}
	.wordmark .wm-heaven {
		color: var(--ink);
	}
	.btn:not(.primary):not(.gold):hover {
		background: #dfe5ee;
	}
	.hero,
	.band,
	.topbar:not(.solid) {
		color-scheme: dark;
		--bg: #0a0e16;
		--bg-2: #0f1520;
		--panel: #141b27;
		--panel-2: #1a2230;
		--line: rgb(196 201 208 / 0.1);
		--line-2: rgb(196 201 208 / 0.18);
		--ink: #e8ecf2;
		--ink-2: #a9b1bd;
		--ink-3: #6f7a89;
		--kicker: var(--dominion-gold);
		--accent-ink: var(--caelis-cobalt-2);
		color: var(--ink);
	}
	.hero .btn:not(.primary):hover,
	.band .btn:not(.primary):hover {
		background: #222c3d;
	}
}

/* ── the iPhone beta signup (src/pages/beta.ts, client/beta.ts) ───── */

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}
.beta-form {
	width: 100%;
	max-width: 560px;
	margin: 0 auto;
	text-align: left;
}
.beta-at-hero {
	margin: 0 auto 22px;
	padding: 16px 18px 14px;
	background: rgb(10 14 22 / 0.72);
	box-shadow:
		inset 0 0 0 1px var(--line-2),
		inset 0 2px 0 var(--caelis-cobalt-2);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}
.beta-kicker {
	margin: 0 0 10px;
	color: var(--kicker, var(--dominion-gold));
	font-family: var(--display);
	font-weight: 600;
	font-stretch: 85%;
	font-size: 0.85rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}
.beta-title {
	margin: 0 0 8px;
	color: var(--ink);
	font-family: var(--display);
	font-weight: 750;
	font-stretch: 80%;
	font-size: clamp(2rem, 5vw, 3rem);
	line-height: 1.05;
	text-align: center;
}
.beta-lede {
	margin: 0 0 22px;
	color: var(--ink-2);
	text-align: center;
}
.beta-row {
	display: flex;
	gap: 10px;
}
.beta-email,
.beta-form select {
	min-width: 0;
	min-height: 48px;
	padding: 0 14px;
	border: 0;
	border-radius: 0;
	background: var(--bg);
	color: var(--ink);
	font: inherit;
	font-size: 1rem;
	box-shadow: inset 0 0 0 1px var(--line-2);
}
.beta-email {
	flex: 1 1 auto;
}
.beta-email::placeholder {
	color: var(--ink-3);
	opacity: 1;
}
.beta-email:focus-visible,
.beta-form select:focus-visible {
	outline: 2px solid var(--visor);
	outline-offset: 0;
}
.beta-email[aria-invalid="true"],
.beta-consent input[aria-invalid="true"] {
	box-shadow: inset 0 0 0 2px #ff6b6b;
}
.beta-submit {
	flex: 0 0 auto;
	white-space: nowrap;
}
.beta-options {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 22px;
	margin-top: 12px;
	color: var(--ink-2);
	font-size: 0.92rem;
}
.beta-source {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
}
.beta-form select {
	min-height: 40px;
	padding: 0 10px;
	font-size: 0.92rem;
}
.beta-optional {
	color: var(--ink-3);
}
.beta-consent {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 40px;
	color: var(--ink);
	cursor: pointer;
}
.beta-consent input {
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	margin: 0;
	accent-color: var(--caelis-cobalt-2);
}
.beta-hp {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.beta-fine {
	margin: 8px 0 0;
	color: var(--ink-3);
	font-size: 0.85rem;
}
.beta-fine a {
	color: var(--ink-2);
}
.beta-status {
	margin: 10px 0 0;
	font-size: 0.95rem;
	color: var(--ink-2);
}
.beta-status:empty {
	display: none;
}
.beta-status.error {
	color: #ff8a8a;
	font-weight: 600;
}
.beta-status.ok {
	color: #7ee2a8;
	font-weight: 600;
}
/* signed up: the fields go, the confirmation stays */
.beta-form.done .beta-fields {
	display: none;
}
.beta-form.done .beta-status {
	margin-top: 0;
	font-size: 1.02rem;
}
.beta-band {
	padding: 72px var(--gutter);
	background:
		radial-gradient(60% 80% at 50% 0%, rgb(33 76 176 / 0.28), transparent 70%),
		var(--bg-2);
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
}
.beta-band .beta-form {
	max-width: 620px;
}
.beta-band .beta-options {
	justify-content: center;
}
.beta-band .beta-fine,
.beta-band .beta-status {
	text-align: center;
}
.beta-manage,
.beta-link {
	margin: 10px 0 24px;
}
.beta-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 18px 0 0;
}
.beta-link-form {
	margin-top: 14px;
}
@media (max-width: 560px) {
	.beta-row {
		flex-direction: column;
	}
	.beta-submit {
		width: 100%;
	}
	.beta-at-hero {
		padding: 14px 14px 12px;
	}
	.beta-options {
		gap: 8px 16px;
	}
}
@media (prefers-color-scheme: light) {
	.beta-band {
		background:
			radial-gradient(60% 80% at 50% 0%, rgb(33 76 176 / 0.12), transparent 70%),
			var(--bg-2);
	}
	.beta-band .beta-status.error,
	.legal .beta-status.error {
		color: #b3261e;
	}
	.beta-band .beta-status.ok,
	.legal .beta-status.ok {
		color: #1b7a43;
	}
	.beta-band .beta-email[aria-invalid="true"] {
		box-shadow: inset 0 0 0 2px #b3261e;
	}
}

/* /privacy and /terms (src/pages/legal.ts). Tokens come from tokens.css, the
   topbar and footer from site.css. */

.legal {
	max-width: 760px;
	margin: 0 auto;
	padding: clamp(40px, 8vw, 88px) var(--gutter) 64px;
	color: var(--ink-2);
	font-size: 1rem;
	line-height: 1.65;
}
.legal h1 {
	margin: 0 0 8px;
	color: var(--ink);
	font-family: var(--display);
	font-weight: 750;
	font-stretch: 80%;
	font-size: clamp(2.2rem, 6vw, 3.2rem);
	line-height: 1.02;
}
.legal h2 {
	margin: 44px 0 10px;
	color: var(--ink);
	font-family: var(--display);
	font-weight: 700;
	font-stretch: 85%;
	font-size: 1.45rem;
	line-height: 1.15;
}
.legal h3 {
	margin: 24px 0 6px;
	color: var(--ink);
	font-size: 1.05rem;
}
.legal a {
	color: var(--caelis-cobalt-2);
}
.legal strong {
	color: var(--ink);
}
.legal ul {
	padding-left: 1.2em;
}
.legal li {
	margin: 4px 0;
}
.legal .meta {
	margin: 0 0 28px;
	color: var(--ink-3);
	font-size: 0.92rem;
}
.legal .summary {
	margin: 0 0 8px;
	padding: 16px 20px;
	border: 1px solid var(--line-2);
	background: var(--panel);
}
.legal .summary ul {
	margin: 8px 0 0;
}
.legal .table-wrap {
	overflow-x: auto;
	margin: 12px 0;
}
.legal table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.94rem;
}
.legal th,
.legal td {
	padding: 8px 10px;
	border-bottom: 1px solid var(--line);
	text-align: left;
	vertical-align: top;
}
.legal th {
	color: var(--ink);
	font-weight: 600;
}
.legal .caps {
	text-transform: uppercase;
	font-size: 0.92rem;
}
.legal-page .topbar {
	position: relative;
	border-bottom: 1px solid var(--line);
}
.legal-draft {
	padding: 10px var(--gutter);
	background: var(--dominion-crimson);
	color: #fff;
	font-size: 0.92rem;
	font-weight: 600;
	text-align: center;
}
.legal mark {
	padding: 0 3px;
	background: rgb(255 217 160 / 0.18);
	color: var(--ink);
}
