/* ==========================================================================
   悟空赛场 · 共享站点样式  /assets/site.css
   结构：重置 → 变量 → 基础排版 → 容器与画板 → 控件 → 头部 → 页脚 → 动效
   ========================================================================== */

/* ---------- 1. 重置 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body,
h1, h2, h3, h4, h5,
p, ul, ol, li, figure, blockquote, dl, dd {
  margin: 0;
}

ul, ol { padding: 0; list-style: none; }

img, svg, picture, video { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

/* ---------- 2. 设计变量 ---------- */
:root {
  /* 色板 */
  --cloud: #F7F3EA;
  --gold: #F2B544;
  --ink: #101A2B;
  --ink-2: #1B2A44;
  --cinnabar: #D6452F;
  --cyan: #31C9C0;
  --cyan-deep: #1C8B85;
  --violet: #7B61FF;
  --mist: #C9BFA9;
  --paper: #E6E0D3;
  --text: #20242B;
  --green: #2E9E6B;

  /* 字体 */
  --font-display: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
  --font-data: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;

  /* 框架尺寸 */
  --rail: 148px;
  --topbar: 64px;
  --shell-max: 1280px;
  --gutter: clamp(20px, 4vw, 56px);

  /* 形状与阴影 */
  --rule: 1px solid var(--mist);
  --shadow-sheet: 4px 4px 0 var(--paper);
  --shadow-lift: 0 22px 44px -22px rgba(16, 26, 43, 0.5);

  --ease-out: cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* ---------- 3. 基础排版 ---------- */
body {
  margin: 0;
  padding-left: var(--rail);
  min-height: 100vh;
  background: var(--cloud);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: var(--ink);
}

h1 { font-size: clamp(2.6rem, 6vw, 5.2rem); line-height: 1; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1.28; }

p { max-width: 36em; }

strong { color: var(--ink); font-weight: 700; }

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

::selection { background: var(--gold); color: var(--ink); }

/* ---------- 4. 容器与画板 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(40px, 7vw, 96px);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 18px;
  margin-bottom: clamp(20px, 3vw, 36px);
}

.section-index {
  font-family: var(--font-data);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--cinnabar);
}

.section-title {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-data);
  font-size: 11.5px;
  letter-spacing: 0.26em;
  color: var(--cinnabar);
}

.panel {
  position: relative;
  background: var(--cloud);
  border: var(--rule);
  box-shadow: var(--shadow-sheet);
  border-radius: 2px;
  padding: clamp(20px, 3vw, 36px);
}

.panel--ink {
  background: var(--ink);
  color: var(--cloud);
  border-color: var(--ink-2);
  box-shadow: 4px 4px 0 var(--ink-2);
}
.panel--ink h2,
.panel--ink h3 { color: var(--cloud); }
.panel--ink p { color: rgba(247, 243, 234, 0.78); }

.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
}
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- 5. 控件 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.3;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s var(--ease-out),
              color 0.18s var(--ease-out),
              border-color 0.18s var(--ease-out),
              transform 0.18s var(--ease-out),
              box-shadow 0.18s var(--ease-out);
}

.btn--gold {
  background: var(--gold);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.btn--gold:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn--gold:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

.btn--ink {
  background: var(--ink);
  color: var(--cloud);
  box-shadow: 3px 3px 0 var(--mist);
}
.btn--ink:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--mist); }
.btn--ink:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--mist); }

.btn--line {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn--line:hover { background: var(--ink); color: var(--cloud); }

.btn--sm { padding: 8px 14px; font-size: 12.5px; }

/* 标签 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  font-family: var(--font-data);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cloud);
  border: 1px solid var(--mist);
  border-radius: 2px;
}
.tag--gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.tag--ink { background: var(--ink); border-color: var(--ink); color: var(--cloud); }
.tag--violet { border-color: var(--violet); color: var(--violet); }
.tag--cyan { border-color: var(--cyan); color: var(--cyan-deep); }

/* 数据单元 */
.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-value {
  font-family: var(--font-data);
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-family: var(--font-data);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  color: rgba(32, 36, 43, 0.62);
}
.stat--ink .stat-value { color: var(--gold); }
.stat--ink .stat-label { color: rgba(247, 243, 234, 0.62); }

/* 面包屑 */
.breadcrumbs {
  font-family: var(--font-data);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(32, 36, 43, 0.58);
}
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.breadcrumbs li { display: flex; align-items: center; gap: 8px; }
.breadcrumbs li + li::before { content: "/"; color: var(--mist); }
.breadcrumbs a { text-decoration: none; color: inherit; transition: color 0.18s var(--ease-out); }
.breadcrumbs a:hover { color: var(--cinnabar); }
.breadcrumbs [aria-current="page"] { color: var(--ink); }

/* 图片容器基础规则 */
.media-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--paper);
  border: var(--rule);
  border-radius: 2px;
}
.media-frame > img,
.media-frame > picture > img,
.media-frame > svg,
.media-frame > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--slanted { clip-path: polygon(0 0, 100% 4%, 100% 100%, 0 96%); }
.media-frame--ink { background: var(--ink-2); border-color: var(--ink-2); }

/* ---------- 6. 头部（框架式边签） ---------- */
.skip-link {
  position: fixed;
  top: 12px;
  left: calc(var(--rail) + 16px);
  z-index: 200;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--cloud);
  font-size: 14px;
  border-radius: 2px;
  transform: translateY(-180%);
  transition: transform 0.18s var(--ease-out);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail);
  z-index: 120;
  display: flex;
  background: var(--cloud);
  border-right: var(--rule);
}

/* 装订边上的金色竖线 */
.site-header::before {
  content: "";
  position: absolute;
  top: 0;
  right: -1px;
  width: 3px;
  height: 36vh;
  background: linear-gradient(180deg, var(--gold), rgba(242, 181, 68, 0));
  pointer-events: none;
}
.site-header::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 1px;
  height: 96px;
  transform: translateX(-50%);
  background: linear-gradient(0deg, var(--gold), rgba(242, 181, 68, 0));
  pointer-events: none;
}

.header-frame {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100%;
  padding: 22px 14px 22px;
}

.header-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.brand-seal {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
  border-radius: 2px;
  box-shadow: 3px 3px 0 var(--paper);
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.brand-mark:hover .brand-seal {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--paper);
}

.brand-name {
  writing-mode: vertical-rl;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1;
  color: var(--ink);
}

.brand-desc {
  font-family: var(--font-data);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  line-height: 1.5;
  color: rgba(32, 36, 43, 0.5);
  text-align: center;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--cloud);
  color: var(--ink);
  font-size: 13px;
  letter-spacing: 0.06em;
}
.nav-toggle-bars {
  position: relative;
  display: block;
  width: 16px;
  height: 10px;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--ink);
  transition: transform 0.22s var(--ease-out);
}
.nav-toggle-bars::before { top: 0; }
.nav-toggle-bars::after { bottom: 0; }
.site-header[data-open] .nav-toggle-bars::before { transform: translateY(4px) rotate(45deg); }
.site-header[data-open] .nav-toggle-bars::after { transform: translateY(-4px) rotate(-45deg); }
.nav-toggle-text { font-family: var(--font-body); }

.site-nav {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 24px;
  padding-top: 16px;
  border-top: var(--rule);
  overflow-y: auto;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item { margin: 0; }

.nav-link {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 7px;
  padding: 9px 22px 9px 9px;
  border-left: 2px solid transparent;
  border-radius: 0 3px 3px 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: background 0.18s var(--ease-out),
              border-color 0.18s var(--ease-out),
              color 0.18s var(--ease-out);
}

.nav-index {
  font-family: var(--font-data);
  font-size: 10px;
  letter-spacing: 0.02em;
  color: var(--mist);
  transition: color 0.18s var(--ease-out);
}

.nav-label { white-space: nowrap; }

.nav-link:hover {
  background: rgba(242, 181, 68, 0.16);
  border-left-color: var(--gold);
}
.nav-link:hover .nav-index { color: var(--gold); }

.nav-link[aria-current="page"] {
  background: var(--paper);
  border-left-color: var(--cinnabar);
  color: var(--ink);
  font-weight: 600;
}
.nav-link[aria-current="page"] .nav-index { color: var(--cinnabar); }
.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 9px;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--cinnabar);
}

.header-cta {
  margin-top: auto;
  padding-top: 18px;
  border-top: var(--rule);
}

.btn-gold {
  display: block;
  padding: 11px 8px;
  background: var(--gold);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  border-radius: 2px;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out);
}
.btn-gold:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn-gold:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

/* 装订线滚动进度 */
.scroll-progress {
  position: fixed;
  top: 0;
  bottom: 0;
  left: var(--rail);
  width: 2px;
  z-index: 110;
  pointer-events: none;
  background: rgba(201, 191, 169, 0.2);
}
.scroll-progress-bar {
  display: block;
  width: 100%;
  height: calc(var(--scroll-progress, 0) * 100%);
  background: linear-gradient(180deg, var(--gold), var(--cinnabar));
}

/* ---------- 7. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(60px, 9vw, 120px);
  background: var(--ink);
  color: var(--cloud);
  overflow: hidden;
}

/* 筋斗云弧晕 */
.site-footer::before {
  content: "";
  position: absolute;
  top: -110px;
  right: -80px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  border: 1px solid rgba(242, 181, 68, 0.26);
  pointer-events: none;
}
.site-footer::after {
  content: "";
  position: absolute;
  top: -60px;
  right: 90px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  border: 1px solid rgba(49, 201, 192, 0.18);
  pointer-events: none;
}

.footer-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding: clamp(40px, 6vw, 72px) var(--gutter) 28px;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 24px;
  padding-bottom: clamp(22px, 3.4vw, 36px);
  border-bottom: 1px solid rgba(201, 191, 169, 0.28);
}

.footer-closing {
  margin: 0;
  max-width: none;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.2vw, 2.5rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: 0.02em;
  color: var(--cloud);
}

.footer-brand {
  margin: 0;
  max-width: none;
  font-family: var(--font-data);
  font-size: 12px;
  letter-spacing: 0.22em;
  line-height: 1.6;
  color: var(--gold);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(22px, 4vw, 48px);
  padding: clamp(26px, 4vw, 44px) 0;
}

.footer-col { min-width: 0; }

.footer-heading {
  margin: 0 0 14px;
  font-family: var(--font-data);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.26em;
  color: var(--mist);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links a {
  display: inline-block;
  padding-bottom: 1px;
  font-size: 14.5px;
  color: rgba(247, 243, 234, 0.92);
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--ease-out), border-color 0.18s var(--ease-out);
}
.footer-links a::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 9px;
  background: var(--gold);
  opacity: 0.55;
  transform: translateY(-2px);
}
.footer-links a:hover { color: var(--gold); border-bottom-color: var(--gold); }
.footer-links a[aria-current="page"] { color: var(--gold); }

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}
.footer-contact-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.footer-contact-key {
  flex: 0 0 auto;
  font-family: var(--font-data);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--mist);
}
.footer-contact-val {
  color: rgba(247, 243, 234, 0.88);
  word-break: break-word;
}

.footer-note {
  margin-top: 14px;
  max-width: 32em;
  font-size: 12.5px;
  line-height: 1.85;
  color: rgba(247, 243, 234, 0.55);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 26px;
  padding-top: 20px;
  border-top: 1px solid rgba(201, 191, 169, 0.28);
  font-family: var(--font-data);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: rgba(247, 243, 234, 0.55);
}
.footer-legal p { margin: 0; max-width: none; }

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.footer-legal-links a {
  color: rgba(247, 243, 234, 0.72);
  transition: color 0.18s var(--ease-out);
}
.footer-legal-links a:hover { color: var(--gold); }

.footer-icp { white-space: nowrap; }
.footer-copy { white-space: nowrap; }

/* ---------- 8. 动效 ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.js [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* ---------- 9. 平板与移动端 ---------- */
@media (max-width: 1100px) {
  :root { --rail: 132px; }
  .nav-link { font-size: 12.5px; padding-right: 18px; }
}

@media (max-width: 960px) {
  body {
    padding-left: 0;
    padding-top: var(--topbar);
  }

  .skip-link {
    left: 16px;
    top: calc(var(--topbar) + 10px);
  }

  .site-header {
    top: 0;
    right: 0;
    bottom: auto;
    width: auto;
    height: var(--topbar);
    border-right: 0;
    border-bottom: var(--rule);
  }
  .site-header::before {
    top: auto;
    right: 0;
    bottom: -1px;
    left: 0;
    width: auto;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), rgba(242, 181, 68, 0));
  }
  .site-header::after { display: none; }

  .header-frame {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    height: var(--topbar);
    min-height: 0;
    padding: 0 16px;
  }

  .header-brand {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }

  .brand-mark { gap: 8px; align-items: center; }

  .brand-seal {
    width: 30px;
    height: 30px;
    font-size: 17px;
    box-shadow: 2px 2px 0 var(--paper);
  }

  .brand-name {
    writing-mode: horizontal-tb;
    font-size: 17px;
    letter-spacing: 0.08em;
  }

  .brand-desc { display: none; }

  .nav-toggle { display: inline-flex; margin-left: auto; }

  .header-cta { display: none; }

  .site-nav {
    position: fixed;
    top: var(--topbar);
    right: 0;
    left: 0;
    z-index: 130;
    display: none;
    margin: 0;
    padding: 12px 12px 22px;
    max-height: calc(100vh - var(--topbar));
    max-height: calc(100dvh - var(--topbar));
    overflow-y: auto;
    background: var(--cloud);
    border-top: var(--rule);
    border-bottom: var(--rule);
    box-shadow: var(--shadow-lift);
  }
  .site-header[data-open] .site-nav { display: block; }

  .nav-link {
    padding: 13px 24px 13px 12px;
    font-size: 15px;
    border-left-width: 3px;
  }
  .nav-index { font-size: 11px; }

  .scroll-progress {
    top: var(--topbar);
    right: 0;
    bottom: auto;
    left: 0;
    width: auto;
    height: 2px;
  }
  .scroll-progress-bar {
    width: calc(var(--scroll-progress, 0) * 100%);
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--cinnabar));
  }

  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .grid--2,
  .grid--3 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-top { align-items: flex-start; }
  .footer-legal { justify-content: flex-start; }
}

/* ---------- 10. 减少动态效果 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .js [data-reveal] { opacity: 1; transform: none; }
  .scroll-progress { display: none; }
}
