/* =====================================================================
   博奥体育 · 共享站点样式表 /assets/site.css
   草原夜青 × 暖沙 · 电子记分牌语汇
   ===================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 150px;
}

body, h1, h2, h3, h4, h5, p, ul, ol, li, figure, figcaption, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
table { width: 100%; border-collapse: collapse; }

/* ---------- 2. 变量 ---------- */
:root {
  --night:   #062B2E;
  --deep:    #0E4A4F;
  --steel:   #14666B;
  --sand:    #E8DCC0;
  --paper:   #F5EFE2;
  --lime:    #B9F227;
  --flame:   #F0533B;
  --mist:    #8FA3A6;
  --celadon: #CBE7DE;
  --ink:     #10201F;

  --font-display: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: var(--font-display);
  --font-mono: "JetBrains Mono", "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;

  --maxw: 1200px;
  --gutter: 24px;
  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;
  --rule: 1px solid rgba(16, 32, 31, .14);
  --rule-dark: 1px solid rgba(232, 220, 192, .18);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --shadow-1: 0 1px 0 rgba(16, 32, 31, .05), 0 14px 32px -24px rgba(6, 43, 46, .75);
}

/* ---------- 3. 基础排版 ---------- */
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-weight: 900;
  line-height: 1.14;
  letter-spacing: -.02em;
  color: inherit;
}
h1 { font-size: clamp(30px, 5.2vw, 56px); }
h2 { font-size: clamp(24px, 3.4vw, 40px); }
h3 { font-size: clamp(19px, 2.2vw, 24px); }
h4 { font-size: 18px; }

p { text-wrap: pretty; }

.num,
[data-num] {
  font-family: var(--font-mono);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
  font-feature-settings: "tnum" 1;
}

::selection { background: var(--lime); color: var(--night); }

/* ---------- 4. 焦点与跳转 ---------- */
:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: -120px;
  transform: translateX(-50%);
  z-index: 90;
  padding: 11px 24px;
  background: var(--lime);
  color: var(--night);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .04em;
  border-radius: 0 0 14px 14px;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 0; }

/* ---------- 5. 布局工具 ---------- */
.shell {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.grid { display: grid; gap: 24px; }
.grid--12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.grid--split { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }

.slab { background: var(--night); color: var(--sand); }
.slab--deep { background: var(--deep); color: var(--sand); }
.slab--sand { background: var(--sand); color: var(--ink); }

.section-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 26px;
}
.section-head__num {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .22em;
  color: var(--flame);
}
.section-head__num::after {
  content: "";
  width: 46px;
  height: 2px;
  background: var(--lime);
}

.prose { max-width: 68ch; font-size: 17px; line-height: 1.8; }
.prose p + p { margin-top: 1.2em; }
.prose h2 { margin-top: 1.8em; margin-bottom: .5em; }
.prose h3 { margin-top: 1.4em; margin-bottom: .45em; }
.prose a {
  color: var(--steel);
  border-bottom: 1px solid rgba(20, 102, 107, .45);
}
.prose a:hover { color: var(--flame); border-bottom-color: var(--flame); }

/* ---------- 6. 通用组件 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .02em;
  border: 1px solid transparent;
  transition: transform .18s var(--ease), background-color .2s var(--ease),
              color .2s var(--ease), border-color .2s var(--ease);
}
.btn--primary { background: var(--lime); color: var(--night); }
.btn--primary:hover { background: #CDF75A; transform: translateY(-2px); }
.btn--ghost { border-color: rgba(232, 220, 192, .42); color: var(--sand); }
.btn--ghost:hover { border-color: var(--lime); color: var(--lime); transform: translateY(-2px); }
.btn--dark { border-color: rgba(16, 32, 31, .3); color: var(--ink); }
.btn--dark:hover { border-color: var(--deep); background: var(--celadon); color: var(--deep); transform: translateY(-2px); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 15px;
  border: 1px solid rgba(232, 220, 192, .32);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .05em;
  color: var(--sand);
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.chip:hover { background: var(--lime); color: var(--night); border-color: var(--lime); }
.chip--accent { border-color: rgba(185, 242, 39, .62); color: var(--lime); }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--mist);
}
.breadcrumb a { color: var(--steel); transition: color .2s var(--ease); }
.breadcrumb a:hover { color: var(--flame); }
.breadcrumb li + li::before { content: "/"; margin-right: 10px; color: rgba(143, 163, 166, .7); }

.panel {
  background: var(--paper);
  border: 1px solid rgba(16, 32, 31, .12);
  border-radius: var(--radius-m);
  padding: 24px;
  transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.panel:hover {
  transform: translateY(-2px);
  border-color: var(--lime);
  box-shadow: var(--shadow-1);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .1em;
  background: rgba(20, 102, 107, .13);
  color: var(--deep);
}
.tag--flame { background: rgba(240, 83, 59, .15); color: #A82F1B; }
.tag--lime { background: rgba(185, 242, 39, .32); color: #3E5B00; }

/* ---------- 7. 图片容器（供页面阶段放置图片） ---------- */
.figure {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-m);
  background: linear-gradient(135deg, var(--deep), var(--night));
  margin: 0;
}
.figure::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(232, 220, 192, .12) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(0deg, rgba(232, 220, 192, .12) 0 1px, transparent 1px 34px);
  opacity: .55;
  pointer-events: none;
}
.figure > img,
.figure > svg {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.figure--16x9 { aspect-ratio: 16 / 9; }
.figure--4x3  { aspect-ratio: 4 / 3; }
.figure--1x1  { aspect-ratio: 1 / 1; }
.figure--tall { aspect-ratio: 3 / 4; }
.figure__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 16px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--sand);
  background: linear-gradient(to top, rgba(6, 43, 46, .9), rgba(6, 43, 46, 0));
}

/* ---------- 8. 显现（由 site.js 添加 .js-ready / .is-visible） ---------- */
.js-ready [data-reveal] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .24s var(--ease), transform .24s var(--ease);
}
.js-ready [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* =====================================================================
   9. 页头
   ===================================================================== */
.site-header {
  --scroll-progress: 0;
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--paper);
  border-bottom: 1px solid rgba(16, 32, 31, .16);
  transition: box-shadow .25s var(--ease);
}
.site-header.is-condensed { box-shadow: 0 12px 34px -26px rgba(6, 43, 46, .95); }
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--lime);
  transform: scaleX(var(--scroll-progress));
  transform-origin: 0 50%;
  pointer-events: none;
}

.masthead {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 18px var(--gutter) 12px;
  transition: padding .25s var(--ease);
}
.site-header.is-condensed .masthead { padding-top: 10px; padding-bottom: 8px; }

.masthead__brand {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.brand__mark {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 11px 11px 11px 3px;
  background: var(--deep);
  color: var(--lime);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}
.brand__name {
  font-size: 27px;
  font-weight: 900;
  letter-spacing: -.02em;
  color: var(--ink);
  line-height: 1.1;
}
.brand__tagline {
  max-height: 22px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .24em;
  color: var(--mist);
  transition: max-height .25s var(--ease), opacity .25s var(--ease);
}
.site-header.is-condensed .brand__tagline { max-height: 0; opacity: 0; }

.nav-toggle {
  grid-column: 3;
  justify-self: end;
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 15px;
  border: 1px solid rgba(16, 32, 31, .24);
  border-radius: 999px;
  background: var(--paper);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--deep);
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.nav-toggle:hover { border-color: var(--deep); background: var(--celadon); }
.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  width: 16px;
}
.nav-toggle__bars i {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: var(--deep);
  transition: transform .2s var(--ease), opacity .2s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.primary-nav {
  max-height: none;
  padding-bottom: 14px;
  transition: max-height .3s var(--ease);
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.nav-list a {
  position: relative;
  display: block;
  padding: 10px 17px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--ink);
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.nav-list a:hover { background: var(--celadon); color: var(--deep); }
.nav-list a[aria-current="page"] { background: var(--deep); color: var(--sand); }
.nav-list a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 17px;
  right: 17px;
  bottom: 4px;
  height: 2px;
  background: var(--lime);
}

.datastrip {
  background: var(--night);
  color: var(--sand);
}
.datastrip__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 9px var(--gutter);
}
.datastrip__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--mist);
}
.datastrip__tags li { display: inline-flex; align-items: center; gap: 7px; }
.datastrip__tags li + li {
  margin-left: 18px;
  padding-left: 18px;
  border-left: 1px solid rgba(232, 220, 192, .2);
}
.datastrip__tags b { color: var(--lime); font-weight: 700; }
.datastrip__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* =====================================================================
   10. 页脚
   ===================================================================== */
.site-footer {
  background: var(--night);
  color: var(--sand);
}
.footer__inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr 1.3fr;
  gap: 48px 40px;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 58px var(--gutter) 44px;
}
.footer__col { min-width: 0; }

.brand--footer { gap: 10px; }
.brand--footer .brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 9px 9px 9px 2px;
  background: var(--lime);
  color: var(--night);
  font-size: 17px;
}
.brand--footer .brand__name { font-size: 22px; color: var(--sand); }

.footer__icp {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .07em;
  color: var(--mist);
}
.footer__blurb {
  max-width: 30ch;
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(232, 220, 192, .72);
}

.footer__heading {
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .24em;
  color: var(--lime);
}

.footer__links a {
  display: inline-block;
  padding: 5px 0;
  font-size: 15px;
  color: rgba(232, 220, 192, .86);
  transition: color .2s var(--ease), transform .2s var(--ease);
}
.footer__links a:hover { color: var(--lime); transform: translateX(2px); }

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(232, 220, 192, .16);
}
.footer__legal a {
  font-size: 13px;
  color: var(--mist);
  transition: color .2s var(--ease);
}
.footer__legal a:hover { color: var(--sand); }

.footer__contact li {
  display: grid;
  grid-template-columns: 4.2em minmax(0, 1fr);
  gap: 12px;
  padding: 6px 0;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(232, 220, 192, .84);
}
.footer__contact .k {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--mist);
  padding-top: 4px;
}

.tickbar {
  position: relative;
  height: 54px;
  border-top: 1px solid rgba(232, 220, 192, .16);
}
.tickbar::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(185, 242, 39, .5) 0 1px, transparent 1px 140px),
    repeating-linear-gradient(90deg, rgba(232, 220, 192, .18) 0 1px, transparent 1px 28px);
  pointer-events: none;
}
.tickbar__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--maxw);
  height: 100%;
  margin-inline: auto;
  padding-inline: var(--gutter);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--mist);
}
.tickbar__label { background: var(--night); padding: 2px 12px; }

.footer__base { border-top: 1px solid rgba(232, 220, 192, .12); }
.footer__base-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 18px var(--gutter) 26px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .09em;
  color: rgba(143, 163, 166, .95);
}

/* =====================================================================
   11. 响应式
   ===================================================================== */
@media (max-width: 1080px) {
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__col:last-child { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  html { scroll-padding-top: 200px; }

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

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

  .primary-nav {
    max-height: 0;
    overflow: hidden;
    padding-bottom: 0;
  }
  .primary-nav[data-open="true"] { max-height: 36rem; padding-bottom: 14px; }

  .nav-list { flex-direction: column; gap: 2px; padding: 4px var(--gutter) 8px; }
  .nav-list a { padding: 12px 15px; border-radius: 10px; }
  .nav-list a[aria-current="page"]::after { left: 15px; right: 15px; bottom: 5px; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  :root { --gutter: 18px; }

  .brand__name { font-size: 23px; }
  .brand__mark { width: 35px; height: 35px; font-size: 18px; border-radius: 10px 10px 10px 3px; }
  .brand__tagline { font-size: 10.5px; letter-spacing: .18em; }

  .datastrip__inner { flex-direction: column; align-items: flex-start; gap: 10px; padding-block: 12px; }
  .datastrip__tags li + li { margin-left: 12px; padding-left: 12px; }

  .footer__inner { grid-template-columns: 1fr; gap: 36px; padding: 44px var(--gutter) 32px; }
  .footer__col:last-child { grid-column: auto; }
  .footer__blurb { max-width: none; }

  .figure--tall { aspect-ratio: 4 / 5; }
}

@media (max-width: 420px) {
  .brand__tagline { letter-spacing: .12em; }
  .datastrip__actions { width: 100%; }
  .chip { flex: 1 1 auto; justify-content: center; }
}

/* =====================================================================
   12. 减动效
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js-ready [data-reveal] { opacity: 1; transform: none; }
  .btn:hover, .panel:hover, .chip:hover { transform: none; }
  .footer__links a:hover { transform: none; }
}
