/* ============================================================
   site.css — 熊猫体育登录 共享外壳
   夜间球场灯光下的竹林跑道 / 纵向叙事长卷
   ============================================================ */

/* ---------- 1. reset ---------- */
*,
*::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; }

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

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

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

input, textarea, select { font: inherit; color: inherit; }

/* ---------- 2. tokens ---------- */
:root {
  color-scheme: light;

  /* 矿物色体系 */
  --ink: #101A14;          /* 墨竹黑 */
  --paper: #F7F5EF;        /* 熊猫白 */
  --paper-warm: #EFEAE0;
  --bamboo: #3B7A57;       /* 竹青 */
  --bamboo-lit: #4A9068;
  --moss: #A8C4B0;         /* 苔绿浅 */
  --sprint: #FF6B35;       /* sprint 橙 */
  --sprint-lit: #FF8557;
  --forest: #1E3A2C;       /* 深墨绿 */
  --sand: #D9D3C7;         /* 暖灰 */
  --stone: #6E6C64;        /* 岩灰 */
  --clay: #C4703F;         /* 陶土 */
  --lamp: #F2C14E;         /* 夜灯黄 */

  --font-display: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-body: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: ui-monospace, "JetBrains Mono", "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, monospace;

  --shell: 1200px;
  --pad: clamp(16px, 4vw, 36px);

  --r-lg: 30px;
  --r-md: 18px;
  --r-sm: 10px;
  --r-pill: 999px;

  --ease: cubic-bezier(.22, .68, .28, 1);
  --line: rgba(16, 26, 20, .12);
  --line-soft: rgba(16, 26, 20, .07);
  --line-light: rgba(247, 245, 239, .18);

  --progress: 0;
}

/* ---------- 3. 中文排版基线 ---------- */
body {
  background-color: var(--paper);
  background-image:
    radial-gradient(120% 70% at 100% -6%, rgba(168, 196, 176, .34), transparent 58%),
    radial-gradient(90% 60% at -8% 4%, rgba(217, 211, 199, .48), transparent 60%);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: .012em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.02em;
  text-wrap: balance;
}

h1 { font-size: clamp(38px, 6.4vw, 76px); }
h2 { font-size: clamp(26px, 3.4vw, 40px); }
h3 { font-size: clamp(19px, 2vw, 24px); line-height: 1.28; }

p { text-wrap: pretty; }
p + p { margin-top: .85em; }

strong { font-weight: 700; }

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

/* ---------- 4. 焦点与可达性 ---------- */
:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--sprint);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--pad);
  z-index: 200;
  display: inline-block;
  padding: 12px 20px;
  border-radius: 0 0 var(--r-md) var(--r-md);
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 700;
  transition: top .2s var(--ease);
}

.skip-link:focus {
  top: 0;
  outline-offset: -3px;
}

/* ---------- 5. 容器与网格 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ---------- 6. 通用元件 ---------- */
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--bamboo);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transition: background-color .22s var(--ease), color .22s var(--ease), border-color .22s var(--ease), transform .22s var(--ease);
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--sprint {
  background: var(--sprint);
  color: var(--ink);
}

.btn--sprint:hover { background: var(--sprint-lit); }

.btn--bamboo {
  background: var(--bamboo);
  color: var(--paper);
}

.btn--bamboo:hover { background: var(--bamboo-lit); }

.btn--ghost {
  background: transparent;
  border-color: rgba(16, 26, 20, .22);
  color: var(--ink);
}

.btn--ghost:hover {
  background: var(--paper-warm);
  border-color: var(--bamboo);
  color: var(--bamboo);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: var(--sand);
  color: var(--ink);
}

.tag--bamboo { background: var(--bamboo); color: var(--paper); }
.tag--moss { background: var(--moss); color: var(--ink); }
.tag--sprint { background: var(--sprint); color: var(--ink); }
.tag--clay { background: var(--clay); color: var(--paper); }

/* 竹节刻度分隔 */
.rule-bamboo {
  position: relative;
  height: 1px;
  border: 0;
  margin-block: clamp(28px, 4vw, 48px);
  background: var(--sand);
}

.rule-bamboo::before,
.rule-bamboo::after {
  content: "";
  position: absolute;
  top: -3px;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--bamboo);
}

.rule-bamboo::before { left: 0; }
.rule-bamboo::after { right: 0; background: var(--sprint); }

/* 面包屑 */
.breadcrumb { padding-block: 18px 4px; }

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--stone);
}

.breadcrumb__item { display: inline-flex; align-items: center; gap: 8px; }

.breadcrumb__link {
  color: var(--bamboo);
  transition: color .2s var(--ease);
}

.breadcrumb__link:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.breadcrumb__sep { color: var(--sand); }

.breadcrumb__item[aria-current="page"] { color: var(--ink); }

/* 图片容器基础规则 */
.media-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  background-color: var(--forest);
  background-image:
    radial-gradient(110% 80% at 18% 6%, rgba(59, 122, 87, .62), transparent 62%),
    radial-gradient(90% 76% at 92% 96%, rgba(255, 107, 53, .34), transparent 64%),
    radial-gradient(60% 50% at 74% 12%, rgba(242, 193, 78, .22), transparent 66%);
  aspect-ratio: 16 / 9;
  isolation: isolate;
}

.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--inset { border-radius: var(--r-md); }

.media-frame__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(178deg, rgba(16, 26, 20, 0) 32%, rgba(16, 26, 20, .74) 100%);
  pointer-events: none;
}

.media-frame__cap {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* 显现 */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* 右侧章节索引浮岛 */
.chapter-index { display: none; }

.chapter-index__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(247, 245, 239, .94);
  box-shadow: 0 26px 50px -42px rgba(16, 26, 20, .8);
}

.chapter-index__link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 12px;
  border-radius: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--stone);
  transition: background-color .2s var(--ease), color .2s var(--ease);
}

.chapter-index__link:hover { background: var(--paper-warm); color: var(--ink); }

.chapter-index__link[aria-current="true"] {
  background: var(--sand);
  color: var(--ink);
}

.chapter-index__num {
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--bamboo);
}

@media (min-width: 1200px) {
  .chapter-index {
    display: block;
    position: fixed;
    right: 22px;
    top: 50%;
    z-index: 40;
    transform: translateY(-50%);
  }
}

/* ---------- 7. 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  padding: 16px 0 12px;
  background: linear-gradient(180deg, var(--paper) 52%, rgba(247, 245, 239, 0));
  transition: padding .3s var(--ease);
}

.site-header[data-shrink] {
  padding-top: 8px;
  padding-bottom: 8px;
}

.header__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 22px);
}

/* 品牌标记 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
  color: var(--ink);
}

.brand__mark {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  width: 7px;
  flex: 0 0 auto;
  color: currentColor;
}

.brand__node {
  display: block;
  height: 6px;
  border-radius: 2px;
  background: currentColor;
}

.brand__node:first-child { background: var(--sprint); }

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.16;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.brand__note {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  color: var(--stone);
}

/* 胶囊导航 */
.nav-pill {
  display: flex;
  align-items: center;
  margin-left: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--paper);
  box-shadow: 0 20px 38px -34px rgba(16, 26, 20, .85);
}

.nav-pill__list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-pill__link {
  position: relative;
  display: block;
  padding: 10px 14px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  transition: background-color .2s var(--ease), color .2s var(--ease), padding .3s var(--ease), font-size .3s var(--ease);
}

.nav-pill__link:hover { background: var(--paper-warm); }

.nav-pill__link[aria-current="page"] {
  background: var(--bamboo);
  color: var(--paper);
}

.nav-pill__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  top: 7px;
  right: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sprint);
}

.site-header[data-shrink] .nav-pill__link {
  padding: 8px 12px;
  font-size: 13px;
}

.nav-pill__foot { display: none; }

/* 头部行动区 */
.header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.header__secondary {
  padding: 8px 2px;
  border-bottom: 1px dashed rgba(59, 122, 87, .55);
  font-size: 13px;
  font-weight: 600;
  color: var(--bamboo);
  white-space: nowrap;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}

.header__secondary:hover {
  color: var(--ink);
  border-bottom-color: var(--sprint);
}

.header__cta { flex: 0 0 auto; }

/* 移动按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.nav-toggle__bars {
  display: block;
  width: 20px;
  height: 14px;
  background:
    linear-gradient(var(--ink), var(--ink)) 0 0 / 100% 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 0 6px / 100% 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 0 12px / 100% 2px no-repeat;
  transition: background .2s var(--ease);
}

.nav-toggle[aria-expanded="true"] {
  border-color: var(--bamboo);
  color: var(--bamboo);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars {
  background: linear-gradient(var(--bamboo), var(--bamboo)) 0 6px / 100% 2px no-repeat;
}

.nav-toggle__label { letter-spacing: .06em; }

/* 滚动进度 */
.header__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--bamboo), var(--moss) 48%, var(--sprint));
  transform: scaleX(var(--progress, 0));
  transform-origin: 0 50%;
}

/* ---------- 8. 页脚 ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  margin-top: clamp(64px, 9vw, 128px);
  padding-bottom: 26px;
  background: var(--forest);
  color: #E9E7DE;
  font-size: 15px;
}

.site-footer::after {
  content: "";
  position: absolute;
  right: -12%;
  top: -18%;
  width: min(560px, 72vw);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 193, 78, .16), rgba(242, 193, 78, 0) 68%);
  pointer-events: none;
}

.footer__band {
  height: 14px;
  background: linear-gradient(90deg, var(--sprint) 0 34%, var(--clay) 34% 46%, var(--bamboo) 46% 78%, var(--moss) 78% 100%);
  clip-path: polygon(0 0, 100% 0, 100% 26%, 0 100%);
}

.footer__inner {
  position: relative;
  z-index: 1;
  padding-top: clamp(40px, 6vw, 76px);
}

.footer__body {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(26px, 4vw, 56px);
}

.footer__brandlink {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 800;
  letter-spacing: -.02em;
}

.footer__brandlink:hover .brand__node { background: var(--sprint); }

.footer__summary {
  max-width: 34ch;
  margin-top: 16px;
  color: #B7C3B9;
  font-size: 14.5px;
  line-height: 1.8;
}

.footer__brand .btn { margin-top: 22px; }

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

.footer__col-title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--moss);
}

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

.footer__link {
  display: inline-block;
  padding: 5px 0;
  color: #DCDAD0;
  font-size: 14.5px;
  border-bottom: 1px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}

.footer__link:hover {
  color: var(--paper);
  border-bottom-color: var(--sprint);
}

.footer__contact-list { display: flex; flex-direction: column; }

.contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line-light);
}

.contact-row__key {
  flex: 0 0 40px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--moss);
}

.contact-row__value {
  flex: 1 1 auto;
  min-width: 0;
  color: #EDEBE2;
  font-family: var(--font-mono);
  font-size: 13.5px;
  letter-spacing: .01em;
  overflow-wrap: anywhere;
}

.copy-btn {
  margin-left: auto;
  padding: 4px 10px;
  border: 1px solid rgba(168, 196, 176, .42);
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  color: var(--moss);
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}

.copy-btn:hover {
  border-color: var(--moss);
  color: var(--paper);
}

.copy-btn[data-copied="true"] {
  background: var(--sprint);
  border-color: var(--sprint);
  color: var(--ink);
}

.copy-btn[data-copied="false"] {
  background: var(--clay);
  border-color: var(--clay);
  color: var(--paper);
}

.footer__note {
  margin-top: 14px;
  color: #9FB0A4;
  font-size: 12.5px;
  line-height: 1.7;
}

.copy-status {
  min-height: 1.3em;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--moss);
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: clamp(34px, 5vw, 60px);
  padding-top: 20px;
  border-top: 1px solid var(--line-light);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .07em;
  color: #9FB0A4;
}

.footer__legal-line { color: #C6CEC5; }
.footer__legal-meta { color: #8B9C90; }
.footer__year { font-variant-numeric: tabular-nums; }

/* ---------- 9. 响应式 ---------- */
@media (max-width: 1120px) {
  .nav-pill__link { padding: 9px 10px; font-size: 13px; }
  .header__secondary { display: none; }
}

@media (max-width: 900px) {
  .site-header { padding: 12px 0 10px; }

  .nav-toggle { display: inline-flex; }

  .header__actions { display: none; }

  .nav-pill {
    display: none;
    position: absolute;
    left: var(--pad);
    right: var(--pad);
    top: calc(100% + 10px);
    margin-left: 0;
    max-height: calc(100vh - 150px);
    overflow: auto;
    padding: 12px;
    border-radius: 24px;
    box-shadow: 0 30px 56px -40px rgba(16, 26, 20, .7);
  }

  .nav-pill[data-open] { display: block; }

  .nav-pill__list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .nav-pill__link {
    padding: 13px 16px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
  }

  .site-header[data-shrink] .nav-pill__link {
    padding: 13px 16px;
    font-size: 16px;
  }

  .nav-pill__foot {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--line);
  }

  .nav-pill__foot .btn { width: 100%; }

  .footer__body { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .brand__note { display: none; }

  .footer__body { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
  .footer__legal { justify-content: flex-start; }
  .contact-row__key { flex-basis: 100%; }
  .copy-btn { margin-left: 0; }
}

@media (max-width: 400px) {
  .footer__grid { grid-template-columns: 1fr; }
}

/* ---------- 10. 减弱动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .btn:hover { transform: none; }
}
