/* Midgard — 暗黑 · 极简基础版
   只保留当前页面实际用到的样式。 */

:root {
	/* 近单色中性灰（去掉冷蓝紫调），stone 为唯一暖调点缀 */
	--bg: #101010;
	--border: #2a2a28;
	--text: #f0efec;
	--muted: #96968f;
	--faint: #74746e;
	--stone: #d8d5ce;
	--radius: 0px;

	/* 版式基线：8px 网格；1140px 为主流内容净宽，三页共用同一套左右对齐 */
	--content: 1140px;
	--gutter: 32px;
	--container: calc(var(--content) + var(--gutter) * 2);

	--mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
	--sans: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB",
		"Microsoft YaHei", sans-serif;
}

* {
	box-sizing: border-box;
}

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--sans);
	font-size: 15.5px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}

::selection {
	background: #2c2c2a;
}

/* 唯一的内容容器：净宽 = --content，两侧安全边距 = --gutter */
.wrap {
	width: 100%;
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 var(--gutter);
}

@media (max-width: 1024px) {
	:root {
		--gutter: 24px;
	}
}

@media (max-width: 600px) {
	:root {
		--gutter: 20px;
	}
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--text);
	color: var(--bg);
	padding: 10px 16px;
	border-radius: 0;
	z-index: 10;
}
.skip-link:focus {
	left: 0;
}

/* ---------- topbar ---------- */
.topbar {
	position: sticky;
	top: 0;
	z-index: 5;
	background: var(--bg);
	border-bottom: 1px solid var(--border);
}

.topbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	height: 58px;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

/* spaced 大写无衬线字标：层级靠字距与尺度，不靠装饰 */
.brand__name {
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.24em;
	text-transform: uppercase;
}

.login {
	display: inline-flex;
	align-items: center;
}

/* 矢量 logo 自带浅色线条，无需反色；进入后台页时播放一次揭示式绘制 */
.brand__logo {
	display: block;
	width: 44px;
	height: 44px;
	object-fit: contain;
}

.brand__logo.is-drawing {
	animation: logo-draw 1.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes logo-draw {
	from {
		clip-path: inset(0 0 100% 0);
	}
	to {
		clip-path: inset(0 0 0 0);
	}
}

/* ---------- hero ---------- */
.hero {
	padding: 110px 0 40px;
}

h1 {
	margin: 0;
	font-size: clamp(1.9rem, 5vw, 2.7rem);
	line-height: 1.22;
	letter-spacing: -0.028em;
	font-weight: 640;
}

.accent {
	color: var(--faint);
}

.lede {
	max-width: 58ch;
	margin: 22px 0 0;
	font-size: 15.5px;
	color: var(--muted);
}

.actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 34px;
}

/* ---------- button ---------- */
.btn {
	appearance: none;
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	cursor: pointer;
	font-family: inherit;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	padding: 12px 22px;
	border-radius: var(--radius);
	border: 1px solid var(--border);
	background: transparent;
	color: var(--text);
	transition: border-color 0.14s ease;
}

.btn--ghost:hover {
	border-color: var(--faint);
}

.btn:focus-visible {
	outline: 2px solid var(--faint);
	outline-offset: 2px;
}

/* ---------- footer ---------- */
.footer {
	margin-top: 120px;
	border-top: 1px solid var(--border);
}

.footer__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	/* 只写上下：左右沿用 .wrap 的 --gutter，保证与顶栏 logo 同一左基线 */
	padding-top: 24px;
	padding-bottom: 24px;
	font-size: 10px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--faint);
}

@media (max-width: 600px) {
	.hero {
		padding-top: 72px;
	}
	.footer {
		margin-top: 88px;
	}
}

@media (prefers-reduced-motion: reduce) {
	* {
		transition: none !important;
	}
	.brand__logo.is-drawing {
		animation: none;
	}
}
