/*
Theme Name: Aurora Base
Description: 轻量框架型 WordPress 父主题：模板结构、设计令牌、布局引擎、可访问性与性能基线，以及稳定且文档化的钩子 API。子主题只做设计差异与钩子扩展，父主题升级不丢定制。
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.9
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aurora-base
Domain Path: /languages
Tags: one-column, two-columns, left-sidebar, right-sidebar, custom-colors, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, full-width-template, blog, translation-ready, accessibility-ready
*/

/* ==========================================================================
   1. 设计令牌（全站唯一样式默认值来源）
   子主题覆盖这些变量即可改设计，不要重写选择器。
   注意：改这里的默认值必须同步 theme.json 的调色盘与字号。
   ========================================================================== */

:root {
	/* 颜色：浅色模式 */
	--ab-color-bg: #ffffff;
	--ab-color-surface: #f7f8fb;
	--ab-color-surface-alt: #eef1f7;
	--ab-color-text: #1d2330;
	--ab-color-text-muted: #596173;
	--ab-color-heading: #0f141f;
	--ab-color-border: #e3e7ef;
	--ab-color-border-strong: #cbd2e0;
	--ab-color-primary: #2563eb;
	--ab-color-primary-hover: #1d4ed8;
	--ab-color-on-primary: #ffffff;
	--ab-color-focus: #2563eb;
	--ab-color-success: #15803d;
	--ab-color-warning: #b45309;
	--ab-color-danger: #b91c1c;

	/* 字体 */
	--ab-font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, sans-serif;
	--ab-font-heading: var(--ab-font-body);
	--ab-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	--ab-font-size-base: 16px;
	--ab-line-height: 1.65;
	--ab-line-height-heading: 1.2;

	/* 字号阶 */
	--ab-text-xs: 0.75rem;
	--ab-text-s: 0.875rem;
	--ab-text-m: 1rem;
	--ab-text-l: 1.25rem;
	--ab-text-xl: 1.5rem;
	--ab-text-2xl: 1.875rem;
	--ab-text-3xl: clamp(2rem, 4vw, 2.75rem);
	--ab-text-4xl: clamp(2.25rem, 5vw, 3.25rem);

	/* 间距 */
	--ab-space-1: 4px;
	--ab-space-2: 8px;
	--ab-space-3: 12px;
	--ab-space-4: 16px;
	--ab-space-5: 24px;
	--ab-space-6: 32px;
	--ab-space-7: 48px;
	--ab-space-8: 64px;
	--ab-gap: clamp(1.5rem, 3vw, 2.5rem);

	/* 圆角、阴影 */
	--ab-radius-s: 4px;
	--ab-radius-m: 8px;
	--ab-radius-l: 14px;
	--ab-radius-full: 999px;
	--ab-shadow-s: 0 1px 2px rgba(15, 20, 31, 0.06);
	--ab-shadow-m: 0 8px 24px rgba(15, 20, 31, 0.1);

	/* 尺寸 */
	--ab-container: 1200px;
	--ab-container-narrow: 760px;
	--ab-sidebar-width: 300px;
	--ab-header-height: 72px;

	/* 动效 */
	--ab-transition: 180ms;
	--ab-ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* 深色模式：只覆盖颜色令牌，保证对比度 */
@media (prefers-color-scheme: dark) {
	:root {
		--ab-color-bg: #0f1115;
		--ab-color-surface: #161922;
		--ab-color-surface-alt: #1d2230;
		--ab-color-text: #e6e9f0;
		--ab-color-text-muted: #a3abbd;
		--ab-color-heading: #f4f6fa;
		--ab-color-border: #262b38;
		--ab-color-border-strong: #3a4052;
		--ab-color-primary: #60a5fa;
		--ab-color-primary-hover: #93c5fd;
		--ab-color-on-primary: #0b1020;
		--ab-color-focus: #93c5fd;
		--ab-color-success: #4ade80;
		--ab-color-warning: #fbbf24;
		--ab-color-danger: #f87171;
		--ab-shadow-s: 0 1px 2px rgba(0, 0, 0, 0.4);
		--ab-shadow-m: 0 8px 24px rgba(0, 0, 0, 0.45);
	}
}

/* ==========================================================================
   2. 极少量全局 reset（其余样式在 assets/css/main.css）
   ========================================================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: var(--ab-color-bg);
	color: var(--ab-color-text);
	font-family: var(--ab-font-body);
	font-size: var(--ab-font-size-base);
	line-height: var(--ab-line-height);
	-webkit-font-smoothing: antialiased;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* 粘性页头下的锚点补偿 */
#ab-content {
	scroll-margin-top: calc(var(--ab-header-height) + var(--ab-space-2));
}
