/* ==========================================================================
   亚富体育 · 共享样式 /assets/site.css
   1 重置与变量 · 2 基础排版与工具 · 3 组件 · 4 头部框体 · 5 页脚 · 6 无障碍
   ========================================================================== */

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

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

body, h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { max-width: 100%; }
button { font: inherit; color: inherit; }

:root {
  --ink-900: #0E1A2B;
  --ink-800: #1B2A41;
  --green-500: #2ECC71;
  --green-700: #157A43;
  --green-050: #E8F8EE;
  --orange-500: #FF6B35;
  --orange-700: #C2410C;
  --paper: #F7F9F8;
  --slate: #5B6B7C;
  --line: #D6E3DA;
  --white: #FFFFFF;
  --rail-w: 252px;
  --topbar-h: 46px;
  --gutter: 24px;
  --maxw: 1240px;
  --cut: 16px;
  --dur: .24s;
  --font-sans: "HarmonyOS Sans SC", "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
}

/* 2 ---------- 基础排版与工具 ---------- */
body {
  background: var(--paper);
  color: var(--ink-800);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1 {
  font-size: clamp(30px, 4.4vw, 44px);
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--ink-900);
}
h2 {
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.24;
  font-weight: 800;
  color: var(--ink-900);
}
h3 {
  font-size: 18px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--ink-800);
}
a { color: var(--green-700); }
strong { font-weight: 700; }

#main-content {
  display: block;
  scroll-margin-top: 108px;
}

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
}
.mono--accent { color: var(--orange-500); }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 20px;
}

.grid { display: grid; gap: var(--gutter); }

/* 切角面板 */
.panel {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 24px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
}
.panel--tint { background: var(--green-050); border-color: #C9EBD6; }
.panel--ink {
  background: var(--ink-800);
  border-color: var(--ink-800);
  color: var(--paper);
}
.panel--ink h3, .panel--ink h2 { color: var(--paper); }

/* 标签 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  padding: 3px 10px;
  background: var(--green-050);
  color: var(--green-700);
  border: 1px solid #C9EBD6;
}
.tag--accent {
  background: #FFEDE5;
  color: var(--orange-700);
  border-color: #FFD2C0;
}

/* 章节眉标与标题组 */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--green-700);
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 26px;
  height: 2px;
  background: var(--orange-500);
  transform: skewX(-24deg);
}
.section-head { display: grid; gap: 8px; margin-bottom: 32px; max-width: 62ch; }
.section-title { margin: 0; }
.section-desc { margin: 0; color: var(--slate); font-size: 16px; }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
  transition: background var(--dur) ease, color var(--dur) ease, transform var(--dur) ease, box-shadow var(--dur) ease;
}
.btn--primary { background: var(--green-500); color: var(--ink-900); }
.btn--primary:hover { background: var(--green-700); color: var(--paper); transform: translate(2px, -2px); box-shadow: 6px 6px 0 rgba(14, 26, 43, .16); }
.btn--dark { background: var(--ink-800); color: var(--paper); }
.btn--dark:hover { background: var(--ink-900); transform: translate(2px, -2px); box-shadow: 6px 6px 0 rgba(46, 204, 113, .3); }
.btn--accent { background: var(--orange-500); color: var(--ink-900); }
.btn--accent:hover { background: var(--orange-700); color: var(--paper); transform: translate(2px, -2px); box-shadow: 6px 6px 0 rgba(14, 26, 43, .16); }
.btn--ghost { background: transparent; border-color: var(--ink-800); color: var(--ink-800); }
.btn--ghost:hover { background: var(--ink-800); color: var(--paper); }

/* 面包屑 */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 16px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--slate);
}
.breadcrumb a { color: var(--green-700); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.crumb-sep { color: var(--line); }
.crumb-current { color: var(--ink-800); }

/* 图片容器基类（页面阶段放入 img） */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--ink-800);
  border: 1px solid var(--line);
}
.media-frame img,
.media-frame video { display: block; width: 100%; height: 100%; object-fit: cover; }
.media-frame--16x9 { aspect-ratio: 16 / 9; }
.media-frame--4x3 { aspect-ratio: 4 / 3; }
.media-frame--1x1 { aspect-ratio: 1 / 1; }
.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--cut {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 24px), calc(100% - 24px) 100%, 0 100%);
}

/* 显现动画（JS 添加 .reveal-ready 后才隐藏） */
.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal-ready [data-reveal].is-visible { opacity: 1; transform: none; }

/* 阅读进度 */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--orange-500);
  z-index: 200;
  pointer-events: none;
}

/* 跳转链接 */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 400;
  padding: 10px 18px;
  background: var(--green-500);
  color: var(--ink-900);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform .18s ease;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}
.skip-link:focus,
.skip-link:focus-visible { transform: translateY(0); }

/* 3 ---------- 响应式网格 ---------- */
@media (min-width: 768px) {
  .container { padding-inline: 32px; }
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--split { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
  #main-content { scroll-margin-top: 96px; }
}

/* 4 ---------- 头部：移动端为顶部条 + 抽屉 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: var(--ink-900);
  color: var(--paper);
  border-bottom: 1px solid rgba(214, 227, 218, .18);
}

.site-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 16px;
  background: #0A1421;
  border-bottom: 1px solid rgba(214, 227, 218, .14);
}
.topbar-note {
  margin: 0;
  font-size: 12px;
  letter-spacing: .03em;
  color: #A9BBCB;
}
.topbar-links {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
}
.lang-tag { color: var(--green-500); font-size: 11px; }
.topbar-link {
  color: var(--paper);
  text-decoration: none;
  padding-bottom: 1px;
  border-bottom: 1px solid transparent;
  transition: color var(--dur) ease, border-color var(--dur) ease;
}
.topbar-link:hover { color: var(--green-500); border-bottom-color: var(--green-500); }

.rail {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 16px 16px;
  background: var(--ink-900);
}
.site-header[data-open] .rail {
  max-height: calc(100vh - 42px);
  overflow-y: auto;
}

.rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-mark {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
  color: var(--paper);
}
.brand-name {
  display: inline-block;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1.3;
}
.brand-name::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 12px;
  margin-right: 8px;
  background: var(--green-500);
  transform: skewX(-14deg);
}
.brand-tag {
  font-size: 12px;
  letter-spacing: .03em;
  color: #9FB2C4;
  padding-left: 18px;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid rgba(214, 227, 218, .34);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% 68%, calc(100% - 10px) 100%, 0 100%);
  transition: background var(--dur) ease, border-color var(--dur) ease;
}
.nav-toggle:hover { background: rgba(46, 204, 113, .16); border-color: var(--green-500); }
.nav-toggle-bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
}
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle-text { font-size: 12px; }

.site-nav { display: none; border-top: 1px solid rgba(214, 227, 218, .16); padding-top: 8px; }
.site-header[data-open] .site-nav { display: block; }

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

.nav-link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 11px 12px;
  color: #C6D3DE;
  font-size: 15px;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color var(--dur) ease, background var(--dur) ease, border-color var(--dur) ease, transform var(--dur) ease;
}
.nav-link:hover,
.nav-link:focus-visible {
  color: var(--paper);
  background: rgba(46, 204, 113, .14);
  border-left-color: var(--green-500);
  transform: translateX(2px);
}
.nav-link[aria-current="page"] {
  color: var(--ink-900);
  background: var(--green-500);
  border-left-color: var(--orange-500);
  font-weight: 700;
  transform: none;
}
.nav-idx {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--green-500);
  font-variant-numeric: tabular-nums;
}
.nav-link[aria-current="page"] .nav-idx { color: var(--ink-800); }
.nav-label { flex: 1; }

.rail-actions { display: none; gap: 8px; }
.site-header[data-open] .rail-actions { display: grid; }

.rail-action {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  text-decoration: none;
  color: var(--paper);
  background: rgba(247, 249, 248, .06);
  border: 1px solid rgba(214, 227, 218, .2);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
  transition: background var(--dur) ease, color var(--dur) ease, border-color var(--dur) ease;
}
.rail-action:hover {
  background: var(--green-500);
  color: var(--ink-900);
  border-color: var(--green-500);
}
.rail-action-label { font-size: 14px; font-weight: 700; }
.rail-action-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--green-500);
}
.rail-action:hover .rail-action-meta { color: var(--ink-800); }

/* 桌面端：导航成为页面边框 */
@media (min-width: 1024px) {
  body {
    padding-top: var(--topbar-h);
    padding-left: var(--rail-w);
  }

  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    background: none;
    border-bottom: 0;
  }

  .site-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-h);
    padding: 0 28px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }
  .topbar-note { color: var(--slate); }
  .lang-tag { color: var(--orange-700); }
  .topbar-link { color: var(--ink-800); }
  .topbar-link:hover { color: var(--green-700); border-bottom-color: var(--green-700); }

  .rail {
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    bottom: 0;
    width: var(--rail-w);
    max-height: none;
    overflow-y: auto;
    padding: 28px 20px 24px;
    gap: 0;
    border-right: 1px solid rgba(214, 227, 218, .15);
  }

  .rail-head { display: block; }
  .nav-toggle { display: none; }

  .site-nav {
    display: block;
    margin-top: 26px;
    padding: 0;
    border-top: 0;
  }
  .site-header[data-open] .site-nav { display: block; }

  .nav-link { padding: 9px 12px 9px 10px; }

  .rail-actions {
    display: grid;
    margin-top: auto;
    padding-top: 28px;
  }

  .scroll-progress { left: var(--rail-w); }
  #main-content { scroll-margin-top: calc(var(--topbar-h) + 24px); }
}

/* 5 ---------- 页脚 ---------- */
.site-footer {
  background: var(--ink-900);
  color: #C6D3DE;
  border-top: 6px solid var(--green-500);
}
.footer-inner {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 44px 20px 28px;
  display: grid;
  gap: 32px;
}

.footer-row { display: grid; gap: 12px; }
.footer-brand-row { justify-items: start; }
.footer-brand-row .brand-name { font-size: 22px; }
.footer-intro {
  margin: 0;
  max-width: 46ch;
  font-size: 14px;
  line-height: 1.7;
  color: #A9BBCB;
}

.footer-feedback {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 14px 16px;
  background: rgba(247, 249, 248, .06);
  border-left: 3px solid var(--orange-500);
}
.footer-cta {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  background: var(--green-500);
  color: var(--ink-900);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%);
  transition: background var(--dur) ease, color var(--dur) ease;
}
.footer-cta:hover { background: var(--paper); color: var(--ink-900); }
.footer-feedback-label { color: var(--green-500); }
.footer-text { font-size: 14px; color: #A9BBCB; line-height: 1.7; }

.footer-index {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.footer-col { min-width: 0; }
.footer-col-title {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .08em;
  color: var(--green-500);
}
.footer-list { display: grid; gap: 8px; }
.footer-link {
  color: #C6D3DE;
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--dur) ease, border-color var(--dur) ease;
}
.footer-link:hover { color: var(--green-500); border-bottom-color: var(--green-500); }
.footer-col--contact .footer-text { font-size: 14px; }

.footer-contact {
  display: grid;
  gap: 10px;
  padding-top: 24px;
  border-top: 1px solid rgba(214, 227, 218, .16);
}
.contact-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  font-size: 14px;
  color: #C6D3DE;
}
.contact-key { color: var(--green-500); min-width: 72px; }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(214, 227, 218, .16);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .05em;
  color: #8FA3B6;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 768px) {
  .footer-inner { padding: 56px 32px 32px; gap: 36px; }
  .footer-index { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
  .footer-contact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 32px; }
}

@media (min-width: 1024px) {
  .footer-inner { padding-inline: 48px; }
  .footer-contact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* 6 ---------- 焦点与减少动效 ---------- */
:focus-visible {
  outline: 3px solid var(--orange-500);
  outline-offset: 2px;
}
.site-header :focus-visible,
.site-footer :focus-visible {
  outline: 3px solid var(--green-500);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal-ready [data-reveal] { opacity: 1; transform: none; }
  .skip-link { transition: none; }
}
