/* =========================================================
   华体会赛场 · 全站共享样式 /assets/site.css
   1 重置  2 令牌  3 基础排版  4 页头  5 页脚
   6 通用组件  7 动效协议  8 响应式  9 降级动效
   ========================================================= */

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

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

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

ul, ol { margin: 0; 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%; height: auto; }

address { font-style: normal; }

/* ---------- 2. 令牌 ---------- */
:root {
  /* 色彩 */
  --deep: #0E2B24;
  --lime: #7BE04A;
  --lime-soft: #8FED60;
  --lime-mist: #C9E8B8;
  --orange: #FF5A36;
  --orange-deep: #A33214;
  --blue: #2E6BE6;
  --blue-deep: #1D4AAB;
  --warm: #EDE7DD;
  --paper: #F7F2E8;
  --ink: #12100E;
  --ink-mid: #6B655C;

  /* 字体 */
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
  --font-display: "Arial Narrow", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", "Courier New", monospace;

  /* 尺度 */
  --shell: min(1220px, 100% - clamp(32px, 6vw, 96px));
  --header-h: 76px;
  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-xl: 44px;

  /* 线面 */
  --line: rgba(18, 16, 14, 0.14);
  --line-deep: rgba(247, 242, 232, 0.18);
  --shadow-card: 0 18px 44px -30px rgba(14, 43, 36, 0.55);
  --shadow-panel: 0 26px 60px -40px rgba(14, 43, 36, 0.7);
}

/* ---------- 3. 基础排版 ---------- */
body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.85;
  color: var(--ink);
  background-color: var(--warm);
  background-image:
    radial-gradient(circle at 8% 2%, rgba(255, 255, 255, 0.62), transparent 44%),
    radial-gradient(circle at 96% 22%, rgba(201, 232, 184, 0.35), transparent 40%),
    repeating-linear-gradient(0deg, rgba(18, 16, 14, 0.022) 0 1px, transparent 1px 4px);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1 { font-size: clamp(38px, 7vw, 96px); line-height: 1.03; letter-spacing: -0.03em; }
h2 { font-size: clamp(28px, 4.2vw, 48px); }
h3 { font-size: clamp(20px, 2.4vw, 28px); }
h4 { font-size: 18px; }

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

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

.site-header[data-scrolled] :focus-visible,
.site-footer :focus-visible { outline-color: var(--lime); }

/* ---------- 4. 页头 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  transform: translateY(-220%);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--deep);
  color: var(--paper);
  font-size: 14px;
  font-weight: 700;
  border: 2px solid var(--lime);
  transition: transform 0.2s ease;
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: transparent;
  color: var(--paper);
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.site-header[data-scrolled] {
  background: rgba(247, 242, 232, 0.95);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line), 0 22px 44px -38px rgba(14, 43, 36, 0.85);
  -webkit-backdrop-filter: blur(9px) saturate(140%);
  backdrop-filter: blur(9px) saturate(140%);
}

.header-inner {
  width: var(--shell);
  margin-inline: auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
  color: inherit;
}

.brand__mark {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  padding: 8px 10px;
  border-radius: 12px 12px 12px 4px;
  background: var(--lime);
  color: var(--deep);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}

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

.brand__tagline {
  font-size: 11.5px;
  letter-spacing: 0.06em;
  opacity: 0.74;
}

/* 筛选 / 移动导航按钮 */
.filter-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: inherit;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.filter-toggle:hover { background: rgba(123, 224, 74, 0.16); border-color: var(--lime); }

.filter-toggle__bars { display: inline-flex; flex-direction: column; gap: 3px; }

.filter-toggle__bars i {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.filter-toggle__text { line-height: 1; }

/* 主导航 */
.site-nav {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(2px, 1.3vw, 18px);
}

.site-nav__item { display: inline-flex; align-items: center; }

.site-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 10px 6px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: inherit;
  white-space: nowrap;
}

.site-nav__link::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 4px;
  height: 3px;
  border-radius: 3px;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.26s cubic-bezier(0.22, 0.8, 0.2, 1);
}

.site-nav__link:hover::after,
.site-nav__link:focus-visible::after { transform: scaleX(1); }

.site-nav__link[aria-current="page"] { font-weight: 800; }

.site-nav__link[aria-current="page"]::after { transform: scaleX(1); }

.site-nav__action {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 26px;
  padding: 13px 24px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--deep);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.site-nav__action:hover { background: var(--lime-soft); }

/* 头部 CTA */
.header-cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--orange);
  color: #FFFFFF;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: background-color 0.22s ease, transform 0.22s ease;
}

.header-cta:hover { background: var(--orange-deep); transform: translateY(-2px); }

/* 阅读进度 */
.read-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(18, 16, 14, 0.08);
  overflow: hidden;
}

.read-progress__bar {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--lime) 0%, var(--lime) 70%, var(--orange) 100%);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.14s linear;
}

/* ---------- 5. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 9vw, 120px);
  padding: clamp(48px, 7vw, 88px) 0 clamp(22px, 3vw, 32px);
  background: var(--deep);
  color: var(--warm);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: min(72%, 640px);
  height: 5px;
  background: linear-gradient(90deg, var(--lime) 0%, var(--lime) 58%, var(--orange) 100%);
}

.site-footer::after {
  content: "";
  position: absolute;
  right: -140px;
  bottom: -170px;
  width: 400px;
  height: 400px;
  border-radius: 46% 54% 62% 38%;
  background: radial-gradient(circle at 32% 32%, rgba(123, 224, 74, 0.2), transparent 70%);
  pointer-events: none;
}

.footer-inner {
  position: relative;
  z-index: 1;
  width: var(--shell);
  margin-inline: auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 0.9fr 1.3fr;
  gap: clamp(24px, 3.5vw, 56px);
  padding-bottom: clamp(32px, 4vw, 52px);
  border-bottom: 1px solid var(--line-deep);
}

.footer-brand { display: flex; flex-direction: column; gap: 14px; }

.footer-brand .brand { color: var(--paper); }

.footer-brand__lead {
  font-size: 15px;
  line-height: 1.85;
  color: rgba(237, 231, 221, 0.78);
  max-width: 36ch;
}

.footer-brand__note { font-size: 13.5px; }

.footer-col { display: flex; flex-direction: column; min-width: 0; }

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

.footer-col__title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 16px;
}

.footer-list { display: flex; flex-direction: column; gap: 11px; }

.footer-link {
  font-size: 15px;
  color: rgba(237, 231, 221, 0.82);
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--lime);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 15px;
  color: rgba(237, 231, 221, 0.86);
  word-break: break-word;
}

.footer-contact__line { display: block; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 26px;
  padding-top: 22px;
  font-size: 13px;
  color: rgba(237, 231, 221, 0.6);
}

.footer-copy,
.footer-icp {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

/* ---------- 6. 通用组件 ---------- */
.shell { width: var(--shell); margin-inline: auto; }

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

/* 章节抬头 */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 22px;
  margin-bottom: clamp(20px, 3vw, 34px);
}

.section-head__kicker {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 90, 54, 0.14);
  color: var(--orange-deep);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-head__title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.8vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.14;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.22s ease, color 0.22s ease,
    border-color 0.22s ease, transform 0.22s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn--primary { background: var(--lime); color: var(--deep); }

.btn--primary:hover { background: var(--lime-soft); }

.btn--orange { background: var(--orange); color: #FFFFFF; }

.btn--orange:hover { background: var(--orange-deep); }

.btn--outline { background: transparent; border-color: currentColor; color: inherit; }

.btn--outline:hover { background: rgba(123, 224, 74, 0.18); border-color: var(--lime); }

/* 标签 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--lime-mist);
  color: var(--deep);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1.5;
}

.tag--season { background: rgba(255, 90, 54, 0.15); color: var(--orange-deep); }

.tag--data { background: rgba(46, 107, 230, 0.13); color: var(--blue-deep); }

.tag--live { background: var(--deep); color: var(--lime); }

/* 面包屑 */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.03em;
  color: var(--ink-mid);
}

.crumbs__item { display: inline-flex; align-items: center; }

.crumbs__item:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  color: rgba(18, 16, 14, 0.3);
}

.crumbs__link { color: inherit; transition: color 0.2s ease; }

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

/* 面板 */
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(201, 232, 184, 0.4), rgba(247, 242, 232, 0));
}

.panel__body { padding: clamp(18px, 2.6vw, 28px); }

/* 网格 */
.grid { display: grid; gap: clamp(16px, 2.4vw, 28px); }

.grid--split { grid-template-columns: minmax(0, 260px) minmax(0, 1fr); align-items: start; }

.grid--split--wide { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); align-items: start; }

.grid--cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* 媒体容器 */
.media-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: linear-gradient(140deg, var(--lime-mist) 0%, rgba(46, 107, 230, 0.16) 100%);
  isolation: isolate;
}

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

.media-frame--wide { aspect-ratio: 16 / 9; }

.media-frame--square { aspect-ratio: 1 / 1; }

.media-frame--tall { aspect-ratio: 3 / 4; }

.media-frame__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 16px;
  background: linear-gradient(0deg, rgba(14, 43, 36, 0.88), rgba(14, 43, 36, 0));
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
}

/* 记分牌数字 */
.score-figure {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: clamp(44px, 8vw, 96px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.045em;
  color: var(--deep);
  font-variant-numeric: tabular-nums;
}

/* 仿手写批注 */
.hand-note {
  font-style: italic;
  letter-spacing: 0.03em;
  color: var(--orange-deep);
}

.site-footer .hand-note { color: var(--lime); }

/* 回到顶部 */
.to-top {
  position: fixed;
  right: clamp(14px, 3vw, 30px);
  bottom: clamp(14px, 3vw, 30px);
  z-index: 70;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--deep);
  border-radius: 50%;
  background: var(--paper);
  color: var(--deep);
  font-size: 18px;
  font-weight: 700;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.25s ease;
}

.to-top[data-visible] { opacity: 1; transform: none; pointer-events: auto; }

.to-top:hover { background: var(--lime); }

/* ---------- 7. 动效协议 ---------- */
.js-ready [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.62s cubic-bezier(0.22, 0.8, 0.2, 1);
}

.js-ready [data-reveal][data-seen] { opacity: 1; transform: none; }

.js-ready [data-flip] {
  display: inline-block;
  opacity: 0;
  transform: rotateX(-72deg);
  transform-origin: bottom center;
  transition: transform 0.6s cubic-bezier(0.2, 0.85, 0.2, 1), opacity 0.45s ease-out;
}

.js-ready [data-flip][data-seen] { opacity: 1; transform: none; }

[data-section][data-active] { scroll-margin-top: calc(var(--header-h) + 18px); }

/* ---------- 8. 响应式 ---------- */
@media (max-width: 1080px) {
  .footer-top { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-col--contact { grid-column: 1 / -1; }
  .footer-contact { flex-direction: row; flex-wrap: wrap; gap: 10px 26px; }
}

@media (max-width: 900px) {
  :root { --header-h: 64px; }

  body { font-size: 16.5px; }

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

  .header-cta { display: none; }

  .brand__tagline { display: none; }

  .brand__name { font-size: 16.5px; }

  .site-nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(330px, 86vw);
    display: block;
    flex: none;
    padding: calc(var(--header-h) + 26px) 26px 40px;
    background: var(--deep);
    color: var(--paper);
    overflow-y: auto;
    transform: translateX(-102%);
    transition: transform 0.34s cubic-bezier(0.22, 0.85, 0.2, 1);
    box-shadow: 30px 0 70px -40px rgba(0, 0, 0, 0.8);
    z-index: 120;
  }

  .site-nav[data-open] { transform: translateX(0); }

  .site-nav__list { flex-direction: column; align-items: stretch; gap: 0; }

  .site-nav__item { display: block; border-bottom: 1px solid var(--line-deep); }

  .site-nav__link {
    display: block;
    width: 100%;
    padding: 16px 4px;
    font-size: 17px;
  }

  .site-nav__link::after { display: none; }

  .site-nav__link[aria-current="page"] { color: var(--lime); }

  .site-nav__action { display: inline-flex; }

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

  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  :root { --r-lg: 22px; }

  .footer-top { grid-template-columns: minmax(0, 1fr); gap: 30px; }

  .footer-contact { flex-direction: column; gap: 10px; }

  .footer-bottom { justify-content: flex-start; }

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

  .btn { width: 100%; }
}

/* ---------- 9. 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

  .js-ready [data-reveal],
  .js-ready [data-flip] {
    opacity: 1 !important;
    transform: none !important;
  }

  .read-progress__bar { transition: none; }
}
