/* 公共组件：三页共享（header / footer / 按钮 / 分区标题 / 面包屑 / 卡片底座）。
   页面级布局写在 style.css，这里只放会被两个以上页面复用的结构。
   颜色与字号一律走 tokens.css 变量，本文件不新增字面色值。 */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: var(--fs-4);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: -60px;
  transform: translateX(-50%);
  z-index: 60;
  padding: 10px 20px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--on-dark);
  font-size: var(--fs-3);
  transition: top var(--dur) ease;
}
.skip-link:focus { top: 12px; }

/* ---------------------------------------------------------------- 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: var(--fs-5);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--dur) ease, border-color var(--dur) ease, color var(--dur) ease,
    transform var(--dur) ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: var(--on-dark);
}
.btn-primary:hover { background: var(--accent-dark); }

.btn-ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink-2);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-light {
  background: var(--on-dark);
  color: var(--accent-2);
}
.btn-light:hover { background: var(--accent-soft); }

.btn-outline-light {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--on-dark);
}
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--on-dark); }

.hero-stat {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--muted);
  font-size: var(--fs-5);
  white-space: nowrap;
}

/* ------------------------------------------------------------ 分区标题 */
.section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  font-size: var(--fs-8);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.5px;
  color: var(--ink);
  text-align: center;
}
.section-title::before,
.section-title::after {
  content: "";
  width: 88px;
  height: 1px;
  background: linear-gradient(90deg, rgba(167, 198, 230, 0), var(--chevron));
}
.section-title::after {
  background: linear-gradient(90deg, var(--chevron), rgba(167, 198, 230, 0));
}

/* -------------------------------------------------------------- 站点头部 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--surface);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 60px;
  height: 66px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--ink);
}
.brand-mark {
  width: 30px;
  height: 30px;
  flex: none;
  color: var(--accent);
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  font-size: var(--fs-5);
  font-weight: 600;
  color: var(--ink-2);
  transition: color var(--dur) ease, background var(--dur) ease;
}
.site-nav a:hover { color: var(--accent); background: var(--accent-soft); }
.site-nav a[aria-current="page"] { color: var(--accent); }
.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 22px;
  height: 2px;
  transform: translateX(-50%);
  border-radius: 2px;
  background: var(--accent);
}
.site-nav a { white-space: nowrap; flex: none; }

/* -------------------------------------------------------------- 站点页脚 */
.site-footer {
  background: var(--footer);
  color: var(--on-dark-2);
  padding: 58px 0 46px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px 30px;
}
.footer-brand-col { flex: 1 1 240px; min-width: 200px; }
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 26px;
  font-size: var(--fs-6);
  font-weight: 800;
  letter-spacing: 0.4px;
  color: var(--on-dark);
}
.footer-brand .brand-mark { color: var(--on-dark); width: 32px; height: 32px; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 18px;
  flex: 1 1 320px;
  min-width: 260px;
  padding: 6px 0 0;
}
.footer-links .footer-label {
  font-size: var(--fs-3);
  font-weight: 700;
  color: var(--on-dark);
  letter-spacing: 1px;
}
.footer-links a {
  font-size: var(--fs-3);
  color: var(--on-dark-2);
  transition: color var(--dur) ease;
}
.footer-links a:hover { color: var(--on-dark); text-decoration: underline; }
.footer-about { padding-left: 2px; flex: 0 1 340px; min-width: 260px; }
.footer-about h2 {
  font-size: var(--fs-5);
  font-weight: 700;
  color: var(--on-dark);
  margin-bottom: 10px;
}
.footer-about p {
  font-size: var(--fs-3);
  line-height: 1.95;
  color: var(--on-dark-3);
}
.footer-brand-text {
  font-size: var(--fs-2);
  line-height: 1.7;
  color: var(--on-dark-3);
  margin-top: 10px;
  max-width: 220px;
}
.footer-copy {
  margin-top: 18px;
  font-size: var(--fs-2);
  color: var(--on-dark-3);
}
.footer-icp {
  margin-top: 10px;
  font-size: var(--fs-2);
  color: var(--on-dark-3);
}

/* ---------------------------------------------------------------- 卡片 */
.card-media {
  overflow: hidden;
  border-radius: var(--r-1);
  background: var(--tile);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* -------------------------------------------------------------- 面包屑 */
.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-2);
  color: var(--muted);
}
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--accent); }
.crumb > * + *::before {
  content: "/";
  margin-right: 8px;
  color: var(--line);
}
.crumb [aria-current="page"] { color: var(--ink-2); font-weight: 600; }

/* -------------------------------------------------------- 响应式（公共） */
@media (max-width: 1024px) {
  .header-inner { gap: 24px; }
  .site-nav {
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .footer-inner { flex-direction: row; gap: 20px 24px; }
  .footer-about { flex: 1 1 100%; }
}

@media (max-width: 780px) {
  :root { --fs-9: 32px; --fs-8: 22px; }
  .site-header { position: static; }
  .header-inner {
    height: auto;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 12px;
    padding: 10px 0 0;
  }
  .brand { font-size: var(--fs-6); }
  .brand-mark { width: 26px; height: 26px; }
  .site-nav {
    flex: 1 1 100%;
    min-width: 0;
    gap: 2px;
    padding: 2px 0 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { height: 36px; padding: 0 10px; font-size: var(--fs-3); }
  .site-nav a[aria-current="page"]::after { bottom: 2px; }
  .footer-inner { flex-direction: column; gap: 18px; }
  .footer-brand-col,
  .footer-links,
  .footer-about { flex: 1 1 auto; min-width: 0; width: 100%; }
  .footer-links { padding: 0; }
  .footer-brand { padding-right: 0; }
  .section-title { gap: 12px; }
  .section-title::before,
  .section-title::after { width: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
