/**
 * LOB Theme — 设计令牌（tokens）
 * 依据 docs/02_独立站设计与执行方案.md §5.2/§5.3。
 * 所有组件样式只允许引用这里的变量，不允许散落魔法值。
 */

@font-face {
	font-family: "Inter";
	src: url("../fonts/Inter-Variable.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "JetBrains Mono";
	src: url("../fonts/JetBrainsMono-Regular.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

:root {
	/* ---- 色彩 ---- */
	--color-ink-900: #132536;
	--color-ink-700: #29465c;
	--color-brand-600: #0e7490;
	--color-brand-700: #0b5e75;
	--color-signal-500: #f59e0b;
	--color-surface-0: #ffffff;
	--color-surface-50: #f6f9fc;
	--color-surface-100: #edf2f7;
	--color-border: #d7e1ea;
	--color-success: #178257;
	--color-danger: #b93838;
	--color-muted: #607386;

	/* ---- 字体 ---- */
	--font-sans: "Inter", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
		"Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
	--font-mono: "JetBrains Mono", Consolas, "Courier New", monospace;

	--text-xs: 0.75rem;    /* 12px */
	--text-sm: 0.875rem;   /* 14px */
	--text-md: 1rem;       /* 16px */
	--text-lg: 1.125rem;   /* 18px */
	--text-xl: 1.375rem;   /* 22px */
	--text-2xl: 1.75rem;   /* 28px */
	--text-3xl: 2.25rem;   /* 36px */

	--leading-tight: 1.25;
	--leading-normal: 1.6;

	/* ---- 间距（4 的倍数） ---- */
	--space-1: 4px;
	--space-2: 8px;
	--space-3: 12px;
	--space-4: 16px;
	--space-6: 24px;
	--space-8: 32px;
	--space-12: 48px;
	--space-16: 64px;

	/* ---- 布局 ---- */
	--container-max: 1240px;
	--radius-card: 12px;
	--radius-button: 8px;
	--shadow-card: 0 1px 3px rgba(19, 37, 54, 0.08), 0 1px 2px rgba(19, 37, 54, 0.04);
	--shadow-pop: 0 8px 24px rgba(19, 37, 54, 0.16);

	/* ---- 触控目标 ---- */
	--tap-min: 44px;
}

/* ---- 状态与可访问性 ---- */

:focus-visible {
	outline: 3px solid var(--color-brand-600);
	outline-offset: 2px;
	border-radius: 2px;
}

/* 键盘用户跳转到正文。 */
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--color-surface-0);
	color: var(--color-ink-900);
	padding: var(--space-3) var(--space-4);
	z-index: 100;
}
.skip-link:focus-visible {
	left: var(--space-2);
	top: var(--space-2);
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* 保证系统缩放/400% 放大时布局可读。 */
html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}
