/* =========================================================================
   首页 v2 · 双主题 + 动效（落地自 ui-style-boards/A-motion-themes.html）
   - 只被 index.php 引用；不依赖、也不修改 design-tokens.css / base.css / components.css
   - 色彩只取 Tailwind v3 Zinc / Blue（状态色 Green / Amber / Red）
   - 组件类统一 hm- 前缀，避免与 Bootstrap / 旧 components.css 冲突
   - 动画只动 transform / opacity；减弱动效与触屏统一降级
   ========================================================================= */

/* ---------- 1. 基础 Token ---------- */
:root {
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
               -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;

  --fs-xs: 12px;  --lh-xs: 18px;
  --fs-sm: 14px;  --lh-sm: 22px;
  --fs-base: 16px; --lh-base: 28px;
  --fs-lg: 18px;  --lh-lg: 28px;
  --fs-xl: 20px;  --lh-xl: 30px;
  --fs-2xl: 24px; --lh-2xl: 34px;
  --fs-3xl: 30px; --lh-3xl: 40px;
  --fs-4xl: 36px; --lh-4xl: 46px;
  --fs-5xl: 48px; --lh-5xl: 58px;

  --r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px; --r-full: 9999px;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px;
  --space-6: 24px; --space-8: 32px; --space-12: 48px; --space-16: 64px; --space-24: 96px;

  --container: 1200px;
  --gutter: var(--space-6);
  --nav-h: 64px;
  --section-y: var(--space-24);
  --card-pad: var(--space-6);

  /* Motion Tokens（与样板「七、4」一致） */
  --dur-instant: 100ms; --dur-fast: 160ms; --dur-base: 240ms; --dur-slow: 420ms;
  --dur-reveal: 800ms; --dur-emphasis: 1600ms; --dur-theme: 640ms;
  --ease-standard: cubic-bezier(.2, 0, 0, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --stagger: 80ms; --stagger-char: 36ms;
  --reveal-distance: 28px; --lift-btn: -2px; --lift-card: -6px; --press-scale: .96;
}

/* 减弱动效：只改 token，组件不写分支 */
[data-motion="reduce"] {
  --dur-base: 120ms; --dur-slow: 160ms; --dur-reveal: 200ms; --dur-emphasis: 0ms; --dur-theme: 0ms;
  --stagger: 0ms; --stagger-char: 0ms; --reveal-distance: 0px; --lift-btn: 0px; --lift-card: 0px; --press-scale: 1;
}

/* ---------- 2. 语义 Token：亮色 ---------- */
:root, :root[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;               /* white */
  --bg-subtle: #fafafa;        /* zinc-50 */
  --surface: #ffffff;
  --elevated: #ffffff;
  --muted: #f4f4f5;            /* zinc-100 */
  --border: #e4e4e7;           /* zinc-200 */
  --border-strong: #d4d4d8;    /* zinc-300 */
  --text: #18181b;             /* zinc-900 · 17.7:1 */
  --text-2: #3f3f46;           /* zinc-700 · 10.4:1 */
  --text-3: #71717a;           /* zinc-500 · 4.8:1 / 4.6:1 on zinc-50 */
  --text-disabled: #a1a1aa;
  --accent: #2563eb;           /* blue-600 · 白字 5.2:1 */
  --accent-hover: #1d4ed8;     /* blue-700 */
  --accent-text: #2563eb;
  --on-accent: #ffffff;
  --accent-subtle: #eff6ff;    /* blue-50 */
  --accent-subtle-fg: #1d4ed8; /* blue-700 · 6.2:1 */
  --accent-border: #bfdbfe;    /* blue-200 */
  --focus: #2563eb;
  --focus-halo: rgba(37, 99, 235, .22);
  --success: #15803d; --success-bg: #f0fdf4; --success-border: #bbf7d0;
  --warning: #b45309; --warning-bg: #fffbeb; --warning-border: #fde68a;
  --danger:  #b91c1c; --danger-bg:  #fef2f2; --danger-border: #fecaca;

  --shadow-xs: 0 1px 2px rgba(24, 24, 27, .05);
  --shadow-sm: 0 1px 3px rgba(24, 24, 27, .07), 0 1px 2px rgba(24, 24, 27, .04);
  --shadow-md: 0 4px 12px -2px rgba(24, 24, 27, .08), 0 2px 4px -2px rgba(24, 24, 27, .04);
  --shadow-lg: 0 18px 44px -16px rgba(24, 24, 27, .16), 0 2px 6px -2px rgba(24, 24, 27, .05);
  --card-lift-fx: 0 26px 50px -22px rgba(37, 99, 235, .28), 0 12px 24px -14px rgba(24, 24, 27, .16);
  --card-ring: inset 0 0 0 1px rgba(147, 197, 253, .9);
  --btn-primary-shadow: var(--shadow-xs);
  --btn-primary-shadow-hover: 0 8px 20px -8px rgba(37, 99, 235, .6);
  --nav-bg: rgba(255, 255, 255, .72);
  --nav-bg-scrolled: rgba(255, 255, 255, .9);

  --glow: rgba(59, 130, 246, .14);
  --mesh-1: rgba(96, 165, 250, .30);
  --mesh-2: rgba(147, 197, 253, .38);
  --mesh-3: rgba(59, 130, 246, .16);
  --mesh-4: rgba(219, 234, 254, .85);
  --grid-line: rgba(24, 24, 27, .05);
  --hero-grid: rgba(37, 99, 235, .07);
  --particle: rgba(59, 130, 246, .60);
  --particle-glow: 0 0 0 0 transparent;
  --sweep: rgba(96, 165, 250, .18);
  --sweep-core: rgba(255, 255, 255, .80);
  --spot: rgba(59, 130, 246, .10);
  --cover-bg: linear-gradient(180deg, #fafafa, #f4f4f5);
  --cover-tint: rgba(239, 246, 255, .9);
  --cover-fg: #52525b;         /* zinc-600 · 7.0:1 on zinc-100 */
  --brand-ring: 0 0 0 0 transparent;
  --frame-dot: #d4d4d8;
  --scrollbar: #d4d4d8;
}

/* ---------- 3. 语义 Token：暗色 ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #09090b;               /* zinc-950 */
  --bg-subtle: rgba(24, 24, 27, .55);
  --surface: #18181b;          /* zinc-900 */
  --elevated: #27272a;         /* zinc-800 */
  --muted: #27272a;
  --border: #27272a;
  --border-strong: #3f3f46;    /* zinc-700 */
  --text: #fafafa;             /* zinc-50 · 19.1:1 */
  --text-2: #d4d4d8;           /* zinc-300 · 13.5:1 */
  --text-3: #a1a1aa;           /* zinc-400 · 7.8:1 / 6.9:1 on zinc-900 / 5.8:1 on zinc-800 */
  --text-disabled: #52525b;
  --accent: #2563eb;           /* 仍用 blue-600：白字 5.2:1（blue-500 仅 3.7:1） */
  --accent-hover: #1d4ed8;
  --accent-text: #60a5fa;      /* blue-400 · 7.8:1 */
  --on-accent: #ffffff;
  --accent-subtle: #172554;    /* blue-950 */
  --accent-subtle-fg: #93c5fd; /* blue-300 · 8.9:1 */
  --accent-border: #1e3a8a;    /* blue-900 */
  --focus: #60a5fa;
  --focus-halo: rgba(59, 130, 246, .35);
  --success: #4ade80; --success-bg: #052e16; --success-border: #14532d;
  --warning: #fbbf24; --warning-bg: #451a03; --warning-border: #78350f;
  --danger:  #f87171; --danger-bg:  #450a0a; --danger-border: #7f1d1d;

  --shadow-xs: 0 0 0 1px rgba(250, 250, 250, .02);
  --shadow-sm: 0 1px 0 0 rgba(250, 250, 250, .04) inset, 0 1px 2px rgba(0, 0, 0, .6);
  --shadow-md: 0 0 0 1px rgba(250, 250, 250, .05), 0 8px 20px -8px rgba(0, 0, 0, .7);
  --shadow-lg: 0 1px 0 0 rgba(250, 250, 250, .06) inset, 0 0 0 1px rgba(250, 250, 250, .04), 0 24px 48px -18px rgba(0, 0, 0, .8);
  --card-lift-fx: 0 0 0 1px rgba(59, 130, 246, .55), 0 0 28px -2px rgba(59, 130, 246, .35), 0 20px 40px -20px rgba(0, 0, 0, .9);
  --card-ring: inset 0 1px 0 0 rgba(147, 197, 253, .35), inset 0 0 0 1px rgba(96, 165, 250, .55);
  --btn-primary-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 0 0 1px rgba(59, 130, 246, .5);
  --btn-primary-shadow-hover: inset 0 1px 0 rgba(255, 255, 255, .18), 0 0 0 1px rgba(96, 165, 250, .6), 0 0 22px -2px rgba(59, 130, 246, .65);
  --nav-bg: rgba(9, 9, 11, .62);
  --nav-bg-scrolled: rgba(9, 9, 11, .88);

  --glow: rgba(59, 130, 246, .28);
  --mesh-1: rgba(37, 99, 235, .42);
  --mesh-2: rgba(59, 130, 246, .26);
  --mesh-3: rgba(30, 64, 175, .45);
  --mesh-4: rgba(96, 165, 250, .14);
  --grid-line: rgba(250, 250, 250, .05);
  --hero-grid: rgba(147, 197, 253, .07);
  --particle: rgba(191, 219, 254, .85);
  --particle-glow: 0 0 6px 1px rgba(96, 165, 250, .7);
  --sweep: rgba(96, 165, 250, .14);
  --sweep-core: rgba(191, 219, 254, .30);
  --spot: rgba(96, 165, 250, .16);
  --cover-bg: linear-gradient(180deg, #18181b, #09090b);
  --cover-tint: rgba(23, 37, 84, .55);
  --cover-fg: #a1a1aa;
  --brand-ring: 0 0 0 1px rgba(147, 197, 253, .25), 0 0 16px -2px rgba(59, 130, 246, .6);
  --frame-dot: #3f3f46;
  --scrollbar: #3f3f46;
}

/* ---------- 4. Bootstrap 桥接（modal / popover / 表单 / alert 跟随语义 Token）---------- */
:root[data-theme] {
  --bs-body-font-family: var(--font-sans);
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--text);
  --bs-emphasis-color: var(--text);
  --bs-heading-color: var(--text);
  --bs-secondary-color: var(--text-3);
  --bs-border-color: var(--border-strong);
  --bs-primary: #2563eb;
  --bs-primary-rgb: 37, 99, 235;
  --bs-link-color: var(--accent-text);
  --bs-link-hover-color: var(--accent-hover);
  --bs-focus-ring-color: var(--focus-halo);
}
.modal-content {
  --bs-modal-bg: var(--elevated);
  --bs-modal-border-color: var(--border);
  --bs-modal-header-border-color: var(--border);
  --bs-modal-border-radius: var(--r-xl);
  --bs-modal-inner-border-radius: calc(var(--r-xl) - 1px);
  box-shadow: var(--shadow-lg);
}
.modal-title { font-size: var(--fs-lg); font-weight: 600; }
.modal .form-label { font-size: var(--fs-sm); color: var(--text-2); }
.modal .form-control {
  min-height: 44px; border-radius: var(--r-md); background: var(--surface); color: var(--text); border-color: var(--border-strong);
}
.modal .form-control:focus { border-color: var(--focus); box-shadow: 0 0 0 4px var(--focus-halo); }
.modal .btn-primary {
  --bs-btn-bg: #2563eb; --bs-btn-border-color: #2563eb;
  --bs-btn-hover-bg: #1d4ed8; --bs-btn-hover-border-color: #1d4ed8;
  --bs-btn-active-bg: #1e40af; --bs-btn-active-border-color: #1e40af;
  --bs-btn-focus-shadow-rgb: 37, 99, 235;
  min-width: 112px; height: 40px; border-radius: var(--r-md); font-weight: 500;
}
.alert-success { --bs-alert-color: var(--success); --bs-alert-bg: var(--success-bg); --bs-alert-border-color: var(--success-border); }
.alert-danger  { --bs-alert-color: var(--danger);  --bs-alert-bg: var(--danger-bg);  --bs-alert-border-color: var(--danger-border); }
.alert { border-radius: var(--r-md); font-size: var(--fs-sm); }
.alert i { margin-right: 6px; }
.wechat-popover {
  --bs-popover-bg: var(--elevated);
  --bs-popover-border-color: var(--border);
  --bs-popover-body-color: var(--text-2);
  max-width: 210px; border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
}
.wechat-qr { width: 100%; border-radius: var(--r-md); }

/* ---------- 5. Base ---------- */
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--scrollbar) transparent; background: var(--bg); }
html[data-motion="full"] { scroll-behavior: smooth; }
.hm-body {
  margin: 0; font-family: var(--font-sans); font-size: var(--fs-base); line-height: var(--lh-base);
  color: var(--text); background: var(--bg); overflow-x: clip;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
.hm-body :where(h1, h2, h3, h4, p, ul, figure) { margin: 0; }
.hm-body :where(h1, h2, h3, h4) { color: var(--text); font-weight: 600; line-height: 1.3; }
:where(.hm-body) a { color: var(--accent-text); text-decoration: none; }
:where(.hm-body) ul { padding: 0; list-style: none; }
.hm-body img, .hm-body video { max-width: 100%; display: block; }
.hm-body :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.hm-body ::selection { background: rgba(37, 99, 235, .2); }
section[id], #contact { scroll-margin-top: calc(var(--nav-h) + 8px); }
#home { scroll-margin-top: 0; }

.hm-wrap { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.hm-skip {
  position: fixed; left: 16px; top: 12px; z-index: 200; padding: 8px 14px; border-radius: var(--r-md);
  background: var(--accent); color: #fff !important; font-size: var(--fs-sm); transform: translateY(-160%);
}
.hm-skip:focus { transform: none; }

/* 主题切换（不支持 View Transitions 时）：仅在切换瞬间开启颜色过渡，替代常驻的全局 * { transition } */
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
  transition: background-color var(--dur-slow) var(--ease-standard), border-color var(--dur-slow) var(--ease-standard),
              color var(--dur-slow) var(--ease-standard), fill var(--dur-slow) var(--ease-standard) !important;
}
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { z-index: 2; }
::view-transition-old(root) { z-index: 1; }

/* 下划线生长链接 */
.hm-link-u {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; padding-bottom: 1px;
  transition: background-size var(--dur-base) var(--ease-out), color var(--dur-fast) var(--ease-standard);
}
.hm-link-u:hover { background-size: 100% 1px; }

/* 阅读进度（2px 纯色，scaleX 驱动） */
.hm-progress {
  position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 120; pointer-events: none;
  background: var(--accent-text); transform-origin: 0 50%; transform: scaleX(0);
}

/* ---------- 6. 按钮 ---------- */
.hm-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: var(--r-md); overflow: hidden; isolation: isolate;
  font: 500 var(--fs-sm)/1 var(--font-sans); border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  text-decoration: none; -webkit-tap-highlight-color: transparent;
  transition: background-color var(--dur-fast) var(--ease-standard), border-color var(--dur-fast) var(--ease-standard),
              color var(--dur-fast) var(--ease-standard), box-shadow var(--dur-base) var(--ease-standard),
              transform var(--dur-base) var(--ease-out);
}
.hm-btn svg, .hm-btn > i { width: 16px; height: 16px; flex: none; transition: transform var(--dur-base) var(--ease-out); }
.hm-btn > i { display: inline-grid; place-items: center; font-size: 15px; }
.hm-btn:hover { transform: translateY(var(--lift-btn)); }
.hm-btn:active { transform: translateY(0) scale(var(--press-scale)); transition-duration: var(--dur-instant); }
.hm-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 6px var(--focus-halo); }
.hm-btn-lg { height: 48px; padding: 0 24px; font-size: var(--fs-base); }
.hm-btn-sm { height: 36px; padding: 0 12px; font-size: 13px; }

.hm-btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--btn-primary-shadow); }
.hm-btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); box-shadow: var(--btn-primary-shadow-hover); }
.hm-btn-primary:hover .hm-i-arrow { transform: translateX(3px); }
.hm-btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.hm-btn-secondary:hover { background: var(--muted); color: var(--text); }
/* 管理后台：中性 outline，不使用品牌蓝，权重低于主 CTA */
.hm-btn-admin { background: transparent; color: var(--text-2); border-color: var(--border-strong); }
.hm-btn-admin:hover { background: var(--muted); color: var(--text); border-color: var(--text-3); }
.hm-shackle { transition: transform var(--dur-base) var(--ease-out); }
.hm-btn-admin:hover .hm-shackle, .hm-foot-admin:hover .hm-shackle, .hm-hero-admin:hover .hm-shackle { transform: translateY(-1.5px); }

/* 主 CTA 光泽：悬停单次扫过 */
.hm-btn-sheen::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .22) 50%, transparent 70%);
  transform: translateX(-120%);
}
.hm-btn-sheen:hover::after { transform: translateX(120%); transition: transform 700ms var(--ease-in-out); }

/* 磁吸：外层 .hm-mag 负责位移；按钮自身保留 hover 抬升与 :active 缩放 */
.hm-mag { display: inline-flex; will-change: transform; }
.hm-btn .hm-mg-in { display: inline-flex; align-items: center; gap: inherit; will-change: transform; }

.hm-text-btn {
  display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-sm); font-weight: 500; color: var(--accent-text);
}
.hm-text-btn svg { width: 14px; height: 14px; transition: transform var(--dur-base) var(--ease-out); }
.hm-text-btn:hover { color: var(--accent-text); }
.hm-text-btn:hover svg { transform: translate(2px, -2px); }

.hm-icon-btn {
  position: relative; width: 36px; height: 36px; display: inline-grid; place-items: center; flex: none; padding: 0;
  border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-standard), color var(--dur-fast), border-color var(--dur-fast),
              transform var(--dur-instant) var(--ease-standard);
}
.hm-icon-btn:hover { background: var(--muted); color: var(--text); }
.hm-icon-btn:active { transform: scale(.94); }
.hm-icon-btn svg { width: 18px; height: 18px; }

/* 主题按钮：太阳 / 月亮叠放旋转交替 */
.hm-theme-btn { overflow: hidden; }
.hm-theme-btn svg { grid-area: 1 / 1; transition: transform var(--dur-slow) var(--ease-spring), opacity var(--dur-base) var(--ease-standard); }
.hm-theme-btn .hm-i-moon { opacity: 1; transform: none; }
.hm-theme-btn .hm-i-sun { opacity: 0; transform: rotate(-120deg) scale(.4); }
:root[data-theme="dark"] .hm-theme-btn .hm-i-sun { opacity: 1; transform: none; color: #fbbf24; } /* amber-400 */
:root[data-theme="dark"] .hm-theme-btn .hm-i-moon { opacity: 0; transform: rotate(120deg) scale(.4); }
.hm-icon-btn.hm-theme-btn:hover .hm-i-moon { transform: rotate(-18deg); }
:root[data-theme="dark"] .hm-icon-btn.hm-theme-btn:hover .hm-i-sun { transform: rotate(45deg); }

/* ---------- 7. 顶栏 ---------- */
.hm-nav {
  position: sticky; top: 0; z-index: 100; height: var(--nav-h);
  background: var(--nav-bg); border-bottom: 1px solid transparent;
  -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px);
  transition: background-color var(--dur-slow) var(--ease-standard), border-color var(--dur-slow) var(--ease-standard),
              box-shadow var(--dur-slow) var(--ease-standard);
}
.hm-nav.is-stuck, .hm-menu-open .hm-nav { background: var(--nav-bg-scrolled); border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }
.hm-nav-inner { display: flex; align-items: center; height: 100%; gap: var(--space-8); }
.hm-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; font-size: var(--fs-base); flex: none; min-width: 0; }
.hm-brand:hover { color: var(--text); }
.hm-brand-mark {
  width: 30px; height: 30px; border-radius: var(--r-md); background: var(--accent); color: #fff; flex: none;
  display: grid; place-items: center; font: 600 12px/1 var(--font-mono); box-shadow: var(--brand-ring);
  transition: transform var(--dur-base) var(--ease-out);
}
.hm-brand:hover .hm-brand-mark { transform: rotate(-6deg); }
.hm-brand-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-brand-img { height: 32px; width: auto; }

.hm-links { display: flex; align-items: center; gap: 2px; min-width: 0; }
.hm-links > a, .hm-more-btn {
  position: relative; padding: 6px 12px; border-radius: var(--r-md); color: var(--text-2); font-size: var(--fs-sm); font-weight: 500;
  white-space: nowrap; line-height: var(--lh-sm);
  transition: background-color var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard);
}
.hm-links > a:hover, .hm-more-btn:hover, .hm-more-btn[aria-expanded="true"] { background: var(--muted); color: var(--text); }
.hm-links > a.is-current { color: var(--text); }
.hm-links > a.is-current::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -13px; height: 2px; border-radius: 2px; background: var(--accent-text);
}
.hm-more { position: relative; display: none; }
.hm-more-btn { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; cursor: pointer; font-family: inherit; }
.hm-more-btn svg { width: 14px; height: 14px; transition: transform var(--dur-base) var(--ease-out); }
.hm-more-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.hm-more-btn.is-current { color: var(--text); }
.hm-more-menu {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 160px; padding: 6px; z-index: 10;
  background: var(--elevated); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  transform-origin: 20% 0; animation: pop-in var(--dur-base) var(--ease-out);
}
.hm-more-menu a { display: block; padding: 8px 12px; border-radius: var(--r-md); color: var(--text-2); font-size: var(--fs-sm); }
.hm-more-menu a:hover, .hm-more-menu a.is-current { background: var(--muted); color: var(--text); }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }

.hm-nav-right { margin-left: auto; display: flex; align-items: center; gap: var(--space-2); flex: none; }
.hm-nav-sep { width: 1px; height: 20px; background: var(--border); margin: 0 var(--space-1); }
.hm-nav-admin svg { width: 15px; height: 15px; }

/* 汉堡（.menu-toggle 由 index.js 切换 .active） */
.hm-burger {
  display: none; position: relative; width: 36px; height: 36px; padding: 0; border-radius: var(--r-md);
  border: 1px solid var(--border); background: var(--surface); cursor: pointer; color: var(--text);
}
.hm-burger span {
  position: absolute; left: 10px; right: 10px; height: 1.6px; border-radius: 2px; background: currentColor;
  transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-fast) var(--ease-standard);
}
.hm-burger span:nth-child(1) { top: 12px; }
.hm-burger span:nth-child(2) { top: 17px; }
.hm-burger span:nth-child(3) { top: 22px; }
.hm-burger.active span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.hm-burger.active span:nth-child(2) { opacity: 0; }
.hm-burger.active span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* 移动端抽屉（index.js 给 ul 加 .show） */
.hm-drawer {
  display: none; position: absolute; left: 0; right: 0; top: 100%;
  background: var(--elevated); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg);
  max-height: calc(100vh - var(--nav-h)); max-height: calc(100dvh - var(--nav-h)); overflow-y: auto;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity var(--dur-base) var(--ease-standard), transform var(--dur-base) var(--ease-out), visibility 0s linear var(--dur-base);
}
.hm-drawer:has(.hm-drawer-list.show), .hm-menu-open .hm-drawer {
  opacity: 1; visibility: visible; transform: none; transition-delay: 0s;
}
.hm-drawer-list { padding: var(--space-3) 0 var(--space-5); display: grid; gap: 2px; }
.hm-drawer-list > li > a {
  display: flex; align-items: center; min-height: 44px; padding: 0 var(--space-3); border-radius: var(--r-md);
  color: var(--text-2); font-size: var(--fs-base); font-weight: 500;
}
.hm-drawer-list > li > a:hover, .hm-drawer-list > li > a.is-current { background: var(--muted); color: var(--text); }
.hm-drawer-row { margin-top: var(--space-2); padding-top: var(--space-3); border-top: 1px solid var(--border); }
.hm-drawer-theme {
  width: 100%; display: flex; align-items: center; gap: var(--space-3); min-height: 44px; padding: 0 var(--space-3);
  border: 0; border-radius: var(--r-md); background: transparent; color: var(--text-2); font: 500 var(--fs-base)/1 var(--font-sans); cursor: pointer;
}
.hm-drawer-theme:hover { background: var(--muted); color: var(--text); }
.hm-drawer-theme-ico { display: inline-grid; place-items: center; width: 20px; height: 20px; }
.hm-drawer-theme-ico svg { width: 18px; height: 18px; }
.hm-drawer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); margin-top: var(--space-3); }
.hm-drawer-actions .hm-btn { height: 44px; }

/* ---------- 8. 入场 / 滚动进入 ---------- */
@keyframes rise { from { opacity: 0; transform: translate3d(0, var(--reveal-distance), 0); } }
@keyframes fade { from { opacity: 0; } }
@keyframes grow-x { from { transform: scaleX(0); } }
/* fill-mode 用 backwards：结束后不锁 transform，不影响 hover 抬升 */
.js .is-play .ld { animation: rise var(--dur-reveal) var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * var(--stagger) + 60ms); }
.js .rv:not(.in) { opacity: 0; }
.js .rv.in { animation: rise var(--dur-reveal) var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * var(--stagger)); }

/* 区块标题逐字遮罩揭示 */
.hm-split .ch { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.hm-split .ch > span { display: inline-block; }
.js .rv:not(.in) .hm-split .ch > span { transform: translate3d(0, 110%, 0); }
.js .rv.in .hm-split .ch > span { animation: char-up var(--dur-reveal) var(--ease-out) backwards; animation-delay: calc(var(--ci) * var(--stagger-char) + 120ms); }
@keyframes char-up { from { transform: translate3d(0, 110%, 0); opacity: 0; } }

/* 脚本未就绪兜底：全部可见 */
.hm-nomotion .rv, .hm-nomotion .ld { opacity: 1 !important; animation: none !important; }

/* ---------- 9. 区块通用 ---------- */
.hm-band { position: relative; padding: var(--section-y) 0; border-top: 1px solid var(--border); }
.hm-band-subtle { background: var(--bg-subtle); }
.hm-head { display: flex; align-items: flex-end; gap: var(--space-4); margin-bottom: var(--space-8); }
.hm-head > div { min-width: 0; }
.hm-more-link { margin-left: auto; font-size: var(--fs-sm); font-weight: 500; white-space: nowrap; }
.hm-kicker {
  position: relative; display: inline-block; margin-bottom: var(--space-2);
  font: 500 var(--fs-xs)/var(--lh-xs) var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent-subtle-fg);
}
.js .rv .hm-kicker::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: var(--accent-text);
  transform-origin: 0 50%; transform: scaleX(0); opacity: .6;
}
.js .rv.in .hm-kicker::after { transform: scaleX(1); transition: transform var(--dur-reveal) var(--ease-out) 200ms; }
.hm-h2 { font-size: var(--fs-3xl); line-height: var(--lh-3xl); font-weight: 600; letter-spacing: -.01em; }

.hm-grid { display: grid; gap: var(--space-6); }
.hm-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hm-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hm-tilt-group { perspective: 1100px; }

.hm-badge {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--r-sm);
  font-size: var(--fs-xs); font-weight: 500; line-height: 1; white-space: nowrap;
  background: var(--accent-subtle); color: var(--accent-subtle-fg); border: 1px solid var(--accent-border);
}

/* ---------- 10. 卡片：上浮 + 3D 倾斜 + 聚光（阴影放伪元素，只过渡 opacity）---------- */
.hm-card {
  position: relative; isolation: isolate; display: flex; flex-direction: column; min-width: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); color: inherit;
  transition: transform var(--dur-slow) var(--ease-out), border-color var(--dur-fast) var(--ease-standard);
}
.hm-card::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; z-index: -1; pointer-events: none; opacity: 0;
  box-shadow: var(--card-lift-fx); transition: opacity var(--dur-slow) var(--ease-standard);
}
.hm-card:hover {
  transform: translate3d(0, var(--lift-card), 0) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  border-color: var(--accent-border);
}
.hm-card:hover::before { opacity: 1; }
.hm-card .fx { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; z-index: 3; }
.hm-card .fx .sl {
  position: absolute; left: 0; top: 0; width: 420px; height: 420px; margin: -210px 0 0 -210px; border-radius: 50%;
  background: radial-gradient(closest-side, var(--spot), transparent); opacity: 0; will-change: transform, opacity;
  transition: opacity var(--dur-slow) var(--ease-standard);
}
.hm-card .fx .ring { position: absolute; inset: 0; border-radius: inherit; opacity: 0; box-shadow: var(--card-ring); transition: opacity var(--dur-base) var(--ease-standard); }
.hm-card:hover .fx .sl, .hm-card:hover .fx .ring { opacity: 1; }
.hm-card h3 { font-size: var(--fs-lg); line-height: var(--lh-lg); transition: color var(--dur-fast) var(--ease-standard); }
.hm-card p { font-size: var(--fs-sm); line-height: var(--lh-sm); color: var(--text-2); }
.hm-card-no { position: absolute; top: var(--space-5); right: var(--space-5); font: 500 var(--fs-xs)/1 var(--font-mono); color: var(--text-3); }

/* 服务 */
.hm-svc { gap: var(--space-3); padding: var(--card-pad); }
.hm-svc-ico {
  width: 44px; height: 44px; border-radius: var(--r-md); display: grid; place-items: center; margin-bottom: var(--space-2);
  background: var(--accent-subtle); color: var(--accent-subtle-fg); border: 1px solid var(--accent-border); font-size: 18px;
  transition: transform var(--dur-base) var(--ease-spring);
}
.hm-svc:hover .hm-svc-ico { transform: translate3d(0, -4px, 0) scale(1.06); }
.hm-svc:hover h3 { color: var(--accent-text); }

/* 团队 */
.hm-member { gap: var(--space-4); padding: var(--card-pad); }
.hm-member-top { display: flex; align-items: center; gap: var(--space-4); padding-right: var(--space-8); }
.hm-avatar {
  position: relative; width: 56px; height: 56px; flex: none; border-radius: 50%; overflow: hidden;
  background: var(--accent-subtle); border: 1px solid var(--accent-border);
}
.hm-avatar-fb { position: absolute; inset: 0; display: grid; place-items: center; font-size: var(--fs-xl); font-weight: 600; color: var(--accent-subtle-fg); }
.hm-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hm-member-id { min-width: 0; }
.hm-member-pos { margin-top: 2px; font-size: var(--fs-sm) !important; color: var(--text-3) !important; }
.hm-member-bio { flex: 1; }
.hm-social { display: flex; gap: var(--space-2); padding-top: var(--space-4); border-top: 1px solid var(--border); }
.hm-social .social-icon {
  width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: var(--r-md);
  border: 1px solid var(--border); color: var(--text-2); font-size: 15px;
  transition: background-color var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast), transform var(--dur-instant);
}
.hm-social .social-icon:hover { background: var(--accent-subtle); color: var(--accent-subtle-fg); border-color: var(--accent-border); }
.hm-social .social-icon:active { transform: scale(.94); }

/* 封面（作品 / 环境）：图片缺失时显示主题化占位 */
.hm-cover {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: calc(var(--r-lg) - 1px) calc(var(--r-lg) - 1px) 0 0;
  background: var(--cover-bg); border-bottom: 1px solid var(--border); display: grid; place-items: center;
}
.hm-cover::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 70% 90% at 0% 0%, var(--cover-tint), transparent 70%); }
.hm-cover::after {
  content: ""; position: absolute; inset: -20px; pointer-events: none;
  background: linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 20px 20px, linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 20px 20px;
  transition: transform 900ms var(--ease-out);
}
.hm-card:hover .hm-cover::after { transform: translate3d(-16px, -16px, 0); }
.hm-cover-glyph { position: relative; z-index: 1; font: 500 13px/20px var(--font-mono); color: var(--cover-fg); padding: 0 var(--space-6); text-align: center; }
.hm-cover-glyph b { color: var(--accent-subtle-fg); font-weight: 500; }
.hm-cover-icon { font-size: 28px; color: var(--text-3); }
.hm-cover img {
  position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; object-fit: cover;
  transition: transform 900ms var(--ease-out);
}
.hm-card:hover .hm-cover img { transform: scale(1.04); }
.hm-cover .hm-badge { position: absolute; z-index: 3; left: var(--space-3); top: var(--space-3); background: var(--elevated); color: var(--text-2); border-color: var(--border); box-shadow: var(--shadow-sm); }
.hm-cover-tall { aspect-ratio: 4 / 3; }

.hm-work-body, .hm-env-body { padding: var(--space-5) var(--card-pad) var(--card-pad); display: flex; flex-direction: column; gap: var(--space-2); flex: 1; }
.hm-work-body .hm-text-btn { margin-top: auto; padding-top: var(--space-2); }
.hm-work:hover h3, .hm-env:hover h3 { color: var(--accent-text); }
.hm-env-body h3 { font-size: var(--fs-base); line-height: var(--lh-sm); }

/* 文化 */
.hm-culture { gap: var(--space-3); padding: var(--card-pad); }
.hm-culture-no { font: 600 var(--fs-2xl)/1 var(--font-mono); color: var(--accent-text); margin-bottom: var(--space-2); }

/* 关于 */
.hm-about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: var(--space-16); align-items: center; }
.hm-about-media {
  position: relative; border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 3; background: var(--muted);
}
.hm-about-media img, .hm-about-media video { width: 100%; height: 100%; object-fit: cover; transition: transform 1200ms var(--ease-out); }
.hm-about-media:hover img { transform: scale(1.03); }
.hm-about-text .hm-h2 { margin-bottom: var(--space-4); }
.hm-about-body { color: var(--text-2); font-size: var(--fs-lg); line-height: 32px; max-width: 34em; }

/* 团队查询 CTA */
.hm-cta {
  position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-8); align-items: center;
  padding: var(--space-12); border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--shadow-sm);
}
.hm-cta::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 50% 90% at 100% 0%, var(--accent-subtle), transparent 70%); }
.hm-cta::after {
  content: ""; position: absolute; width: 60%; height: 220%; right: -20%; top: -60%; pointer-events: none; border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow), transparent); animation: mesh-b 14s var(--ease-in-out) infinite alternate;
}
.hm-cta > * { position: relative; z-index: 1; }
.hm-cta-desc { margin-top: var(--space-2); color: var(--text-2); max-width: 36em; }
:root[data-theme="dark"] .hm-cta { box-shadow: var(--shadow-lg); }

/* ---------- 11. Hero ---------- */
.hm-hero {
  position: relative; overflow: hidden; isolation: isolate;
  margin-top: calc(var(--nav-h) * -1); padding: calc(var(--nav-h) + 88px) 0 var(--space-24);
}
.hm-hero-bg, .hm-hero-glow, .hm-hero-sweep, .hm-hero-mesh, .hm-hero-particles { position: absolute; pointer-events: none; z-index: -1; }
.hm-hero-bg {
  inset: -80px 0 0 0;
  background:
    radial-gradient(ellipse 55% 60% at 85% 0%, var(--accent-subtle), transparent 70%),
    linear-gradient(var(--hero-grid) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, var(--hero-grid) 1px, transparent 1px) 0 0 / 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 80% 75% at 70% 20%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 80% 75% at 70% 20%, #000 30%, transparent 75%);
  will-change: transform;
}
.hm-hero-glow {
  inset: 0; background: radial-gradient(640px circle at var(--mx, 72%) var(--my, 30%), var(--glow), transparent 62%);
  opacity: 0; transition: opacity var(--dur-slow) var(--ease-standard);
}
.hm-hero.pointer-in .hm-hero-glow { opacity: 1; }
.hm-hero-sweep { inset: 0; overflow: hidden; }
.hm-hero-sweep::before {
  content: ""; position: absolute; top: -20%; bottom: -20%; left: 0; width: 30%; opacity: 0;
  background: linear-gradient(100deg, transparent 0%, var(--sweep) 38%, var(--sweep-core) 50%, var(--sweep) 62%, transparent 100%);
  transform: translateX(-120%) skewX(-14deg);
}
.js .is-play .hm-hero-sweep::before { animation: sweep-loop 7200ms var(--ease-in-out) 300ms infinite both; }
@keyframes sweep-loop {
  0% { transform: translateX(-120%) skewX(-14deg); opacity: 0; }
  4% { opacity: 1; } 24% { opacity: 1; }
  30%, 100% { transform: translateX(380%) skewX(-14deg); opacity: 0; }
}
.hm-hero-mesh {
  inset: -18% -8% -6% -8%; will-change: transform;
  -webkit-mask-image: linear-gradient(#000 55%, transparent 96%); mask-image: linear-gradient(#000 55%, transparent 96%);
  animation: fade 1400ms var(--ease-out) both;
}
.hm-hero-mesh i { position: absolute; display: block; border-radius: 50%; will-change: transform; }
.hm-hero-mesh i:nth-child(1) { width: 52vw; height: 52vw; right: -6vw; top: -14vw; background: radial-gradient(closest-side, var(--mesh-1), transparent); animation: mesh-a 19s var(--ease-in-out) infinite alternate; }
.hm-hero-mesh i:nth-child(2) { width: 40vw; height: 40vw; right: 20vw; top: 2vw; background: radial-gradient(closest-side, var(--mesh-2), transparent); animation: mesh-b 23s var(--ease-in-out) infinite alternate; }
.hm-hero-mesh i:nth-child(3) { width: 36vw; height: 36vw; right: -4vw; top: 16vw; background: radial-gradient(closest-side, var(--mesh-3), transparent); animation: mesh-c 17s var(--ease-in-out) infinite alternate; }
.hm-hero-mesh i:nth-child(4) { width: 44vw; height: 44vw; left: -12vw; top: -8vw; background: radial-gradient(closest-side, var(--mesh-4), transparent); animation: mesh-d 27s var(--ease-in-out) infinite alternate; }
@keyframes mesh-a { to { transform: translate3d(-9vw, 6vw, 0) scale(1.12); } }
@keyframes mesh-b { to { transform: translate3d(10vw, -3vw, 0) scale(.86); } }
@keyframes mesh-c { to { transform: translate3d(-14vw, -7vw, 0) scale(1.18); } }
@keyframes mesh-d { to { transform: translate3d(8vw, 9vw, 0) scale(1.1); } }
.hm-hero-particles {
  inset: 0; will-change: transform;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 72% 35%, #000 35%, transparent 80%);
          mask-image: radial-gradient(ellipse 70% 80% at 72% 35%, #000 35%, transparent 80%);
}
.hm-hero-particles b {
  position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); border-radius: 50%;
  background: var(--particle); box-shadow: var(--particle-glow); opacity: 0; will-change: transform, opacity;
  animation: float var(--d) var(--ease-in-out) var(--dl) infinite alternate;
}
@keyframes float {
  0% { transform: translate3d(0, 0, 0); opacity: .25; }
  50% { opacity: .85; }
  100% { transform: translate3d(var(--dx), -40px, 0); opacity: .3; }
}

.hm-hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: var(--space-16); align-items: center; }
.hm-hero-copy { min-width: 0; will-change: transform, opacity; }
.hm-hero-copy > .hm-kicker { margin-bottom: var(--space-5); }
.hm-hero-swiper { width: 100%; overflow: hidden; }
.hm-slide { height: auto; }
.hm-hero-title { font-size: var(--fs-5xl); line-height: var(--lh-5xl); font-weight: 600; letter-spacing: -.015em; color: var(--text); }
.hm-hero-lead { margin-top: var(--space-5); max-width: 34em; font-size: var(--fs-lg); line-height: 32px; color: var(--text-2); }
.is-cycled .swiper-slide-active .hm-hero-title { animation: rise var(--dur-reveal) var(--ease-out) backwards; }
.is-cycled .swiper-slide-active .hm-hero-lead { animation: rise var(--dur-reveal) var(--ease-out) 90ms backwards; }

html:not(.js) .hm-pager { display: none; }
.hm-pager { display: flex; align-items: center; gap: var(--space-3); margin-top: var(--space-6); }
.hm-dots { display: flex; align-items: center; gap: 6px; position: static !important; width: auto !important; }
.hm-dots .swiper-pagination-bullet {
  position: relative; width: 28px; height: 4px; margin: 0 !important; border-radius: 4px; overflow: hidden;
  background: var(--border-strong); opacity: 1; cursor: pointer;
}
/* 扩大点击区域 */
.hm-dots .swiper-pagination-bullet::before { content: ""; position: absolute; inset: -10px -3px; }
.hm-dots .swiper-pagination-bullet::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--accent-text);
  transform-origin: 0 50%; transform: scaleX(0);
}
.hm-dots .swiper-pagination-bullet-active::after { transform: scaleX(1); }
/* 自动播放时，当前条的填充 = 剩余时间进度（JS 写入 --p，只驱动 transform） */
.is-autoplay .hm-dots .swiper-pagination-bullet-active::after { transform: scaleX(var(--p, 0)); }
.hm-count { white-space: nowrap; font: 500 var(--fs-xs)/1 var(--font-mono); color: var(--text-3); font-variant-numeric: tabular-nums; }
.hm-count b { color: var(--text); font-weight: 600; }
.hm-pager-btn {
  width: 28px; height: 28px; display: inline-grid; place-items: center; padding: 0; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer;
  transition: background-color var(--dur-fast), color var(--dur-fast), transform var(--dur-instant);
}
.hm-pager-btn:hover { background: var(--muted); color: var(--text); }
.hm-pager-btn:active { transform: scale(.92); }
.hm-pager-btn svg { width: 12px; height: 12px; grid-area: 1 / 1; }
.hm-pager-btn .hm-i-play, .hm-pager-btn[aria-pressed="true"] .hm-i-pause { display: none; }
.hm-pager-btn[aria-pressed="true"] .hm-i-play { display: block; }

.hm-actions { display: flex; gap: var(--space-3); margin-top: var(--space-8); flex-wrap: wrap; }
.hm-hero-admin { margin-top: var(--space-4); font-size: 13px; line-height: 20px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.hm-hero-admin svg { width: 14px; height: 14px; flex: none; }
.hm-hero-admin a { color: var(--text-2); }
.hm-hero-admin a:hover { color: var(--text); }
.hm-signals {
  display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-6); margin-top: var(--space-12); padding-top: var(--space-6);
  border-top: 1px solid var(--border);
}
.hm-signals li { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--fs-sm); color: var(--text-2); font-weight: 500; }
.hm-signals i {
  width: 20px; height: 20px; display: inline-grid; place-items: center; border-radius: 50%; font-size: 10px;
  background: var(--accent-subtle); color: var(--accent-subtle-fg); border: 1px solid var(--accent-border);
}

/* 右侧：浏览器框 + 轮播图同步 */
.hm-hero-media { position: relative; min-width: 0; will-change: transform; }
.hm-hero-media::before {
  content: ""; position: absolute; inset: 8% -6% -8% 8%; z-index: -1; border-radius: 32px; pointer-events: none;
  background: radial-gradient(closest-side, var(--glow), transparent);
}
.hm-frame { border-radius: var(--r-xl); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-lg); overflow: hidden; }
:root[data-theme="dark"] .hm-frame { background: linear-gradient(180deg, rgba(39, 39, 42, .7), rgba(24, 24, 27, .9)); }
.hm-frame-bar { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 var(--space-4); border-bottom: 1px solid var(--border); }
.hm-frame-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--frame-dot); }
.hm-frame-bar span {
  margin-left: var(--space-3); flex: 1; min-width: 0; height: 20px; padding: 0 10px; border-radius: var(--r-sm);
  background: var(--muted); color: var(--text-3); font: 500 11px/20px var(--font-mono); overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.hm-frame-view { position: relative; aspect-ratio: 4 / 3; background: var(--muted); overflow: hidden; }
.hm-frame-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.08);
  transition: opacity 900ms var(--ease-standard), transform 7000ms var(--ease-out);
}
.hm-frame-img.is-active { opacity: 1; transform: scale(1); }

/* ---------- 12. 页脚 ---------- */
.hm-foot { border-top: 1px solid var(--border); background: var(--bg-subtle); padding: var(--space-16) 0 var(--space-8); font-size: var(--fs-sm); color: var(--text-3); }
.hm-foot-main { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: var(--space-8); }
.hm-foot h4 { font-size: var(--fs-sm); line-height: var(--lh-sm); font-weight: 600; color: var(--text); margin-bottom: var(--space-4); }
.hm-foot p { line-height: var(--lh-sm); max-width: 28em; }
.hm-foot ul { display: grid; gap: var(--space-2); }
.hm-foot li { line-height: var(--lh-sm); overflow-wrap: anywhere; }
.hm-foot li i { width: 16px; color: var(--text-3); text-align: center; margin-right: 4px; }
.hm-foot a { color: var(--text-2); transition: color var(--dur-fast) var(--ease-standard); }
.hm-foot a:hover { color: var(--accent-text); }
.hm-foot-bottom {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-6);
  margin-top: var(--space-12); padding-top: var(--space-6); border-top: 1px solid var(--border); font-size: var(--fs-xs); line-height: var(--lh-xs);
}
.hm-foot-bottom a { color: var(--text-3); display: inline-flex; align-items: center; gap: 4px; }
.hm-foot-bottom a:hover { color: var(--text); }
.beian-icon { height: 16px; width: auto; display: inline-block !important; }
.hm-foot-admin { margin-left: auto; }
.hm-foot-admin svg { width: 12px; height: 12px; }

/* 返回顶部 */
.hm-to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 90; width: 40px; height: 40px; box-shadow: var(--shadow-md);
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-standard), transform var(--dur-base) var(--ease-out), background-color var(--dur-fast);
}
.hm-to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.hm-to-top.show:active { transform: scale(.94); }

/* ---------- 13. 响应式 ---------- */
@media (max-width: 1099px) {
  .hm-link-wide { display: none; }
  .hm-more { display: block; }
}
@media (max-width: 1023px) {
  .hm-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 959px) {
  :root { --section-y: 80px; }
  .hm-links, .hm-nav-sep { display: none; }
  .hm-nav-inner { gap: var(--space-4); }
  .hm-burger, .hm-drawer { display: block; }
  .hm-hero { padding-top: calc(var(--nav-h) + 64px); padding-bottom: var(--space-16); }
  .hm-hero-grid, .hm-about, .hm-cta { grid-template-columns: minmax(0, 1fr); }
  .hm-hero-grid { gap: var(--space-12); }
  .hm-hero-media { max-width: 560px; }
  .hm-hero-title { font-size: var(--fs-4xl); line-height: var(--lh-4xl); }
  .hm-about { gap: var(--space-8); }
  .hm-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm-foot-main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm-cta { padding: var(--space-8); gap: var(--space-6); }
}
@media (max-width: 639px) {
  :root { --gutter: var(--space-4); --section-y: var(--space-16); --card-pad: var(--space-5); }
  .hm-nav-admin, .hm-nav-cta, .hm-mag-nav-cta { display: none; }
  .hm-nav-right { gap: 6px; }
  .hm-hero { padding-top: calc(var(--nav-h) + 40px); padding-bottom: var(--space-12); }
  .hm-hero-title { font-size: min(var(--fs-3xl), 7.2vw); line-height: 1.34; }
  .hm-hero-lead { font-size: var(--fs-base); line-height: var(--lh-base); margin-top: var(--space-3); }
  .hm-actions > * { flex: 1 1 100%; }
  .hm-actions .hm-btn, .hm-cta-actions .hm-btn { width: 100%; }
  .hm-actions .hm-mag, .hm-cta-actions .hm-mag { display: flex; }
  .hm-signals { margin-top: var(--space-8); gap: var(--space-3) var(--space-4); }
  .hm-grid, .hm-grid-3, .hm-grid-4 { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
  .hm-h2 { font-size: var(--fs-2xl); line-height: var(--lh-2xl); }
  .hm-head { flex-wrap: wrap; margin-bottom: var(--space-6); }
  .hm-more-link { margin-left: 0; }
  .hm-about-body { font-size: var(--fs-base); line-height: var(--lh-base); }
  .hm-cta { padding: var(--space-6); }
  .hm-foot { padding-top: var(--space-12); }
  .hm-foot-main { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
  .hm-foot-admin { margin-left: 0; }
  .hm-to-top { right: 16px; bottom: 16px; }
}
@media (min-width: 960px) {
  .hm-drawer { display: none !important; }
}

/* ---------- 14. 触屏 / 粗指针：关闭倾斜、磁吸、鼠标光 ---------- */
@media (hover: none), (pointer: coarse) {
  .hm-card:hover { transform: none; }
  .hm-card .fx, .hm-hero-glow { display: none; }
  .hm-btn:hover { transform: none; }
  .hm-mag, .hm-mg-in { transform: none !important; }
}

/* ---------- 15. 减弱动效降级 ---------- */
[data-motion="reduce"] .hm-hero-sweep, [data-motion="reduce"] .hm-hero-glow,
[data-motion="reduce"] .hm-hero-particles, [data-motion="reduce"] .hm-card .fx .sl,
[data-motion="reduce"] .hm-btn-sheen::after { display: none; }
[data-motion="reduce"] .hm-hero-mesh, [data-motion="reduce"] .hm-hero-mesh i, [data-motion="reduce"] .hm-cta::after { animation: none; }
[data-motion="reduce"] .hm-card:hover { transform: none; }
[data-motion="reduce"] .hm-mag, [data-motion="reduce"] .hm-mg-in { transform: none !important; }
[data-motion="reduce"] .hm-split .ch > span { animation: none !important; transform: none !important; }
[data-motion="reduce"] .hm-theme-btn svg { transition-duration: 0ms; }
[data-motion="reduce"] .hm-frame-img { transform: none; transition: opacity var(--dur-base) linear; }
[data-motion="reduce"] .hm-card:hover .hm-cover img, [data-motion="reduce"] .hm-about-media:hover img,
[data-motion="reduce"] .hm-card:hover .hm-cover::after { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .hm-hero-mesh i, .hm-hero-particles b, .hm-hero-sweep::before, .hm-cta::after { animation: none !important; }
}
