/* =========================================================
   亚体育中文官网 — /assets/site.css
   共享层：reset / 变量 / 中文排版 / 头部轨道 / 页脚 /
   通用按钮、面包屑、容器、网格、表格、媒体容器
   ========================================================= */

:root {
  --deep: #0A1A2A;
  --night: #10263A;
  --steel: #1E3A52;
  --mist: #C9D6DF;
  --paper: #F6F8F7;
  --grass: #37A56A;
  --signal: #F26B3A;
  --peach: #F7B49B;
  --table: #7F98AA;

  --ink: var(--paper);
  --ink-soft: rgba(201, 214, 223, 0.78);
  --ink-faint: rgba(201, 214, 223, 0.55);
  --line: rgba(201, 214, 223, 0.16);
  --line-strong: rgba(201, 214, 223, 0.30);

  --rail-w: 236px;
  --gutter: clamp(20px, 4vw, 56px);
  --maxw: 1180px;

  --font-body: system-ui, -apple-system, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: "Arial Narrow", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --r-sm: 6px;
  --r-md: 14px;
  --r-lg: 26px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--deep);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--paper);
}

p { margin: 0 0 1em; }

ul, ol { margin: 0; padding: 0; }

a { color: inherit; }

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

button { font: inherit; color: inherit; }

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

#main-content { scroll-margin-top: 92px; }

/* ---------- 通用容器与排版 ---------- */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--grass);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: currentColor;
  flex: none;
}

.section-title {
  font-size: clamp(26px, 3.4vw, 40px);
  margin: 0 0 18px;
}

.prose { font-size: 17px; line-height: 1.8; color: var(--ink-soft); }
.prose h2 { font-size: clamp(22px, 2.4vw, 28px); margin-top: 1.6em; }
.prose h3 { font-size: 19px; margin-top: 1.4em; color: var(--paper); }
.prose strong { color: var(--paper); }
.prose a { color: var(--peach); text-decoration: underline; text-underline-offset: 3px; }

.muted { color: var(--ink-faint); font-size: 14px; line-height: 1.8; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease),
              border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

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

.btn--primary { background: var(--signal); color: var(--deep); }
.btn--primary:hover { background: #ff7f52; }

.btn--ghost { background: transparent; color: var(--paper); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--grass); color: var(--grass); }

.btn--quiet { background: rgba(201, 214, 223, 0.09); color: var(--mist); }
.btn--quiet:hover { background: rgba(201, 214, 223, 0.16); }

/* ---------- 面包屑 ---------- */

.breadcrumb {
  font-size: 13px;
  color: var(--table);
  margin: 0 0 22px;
}

.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.breadcrumb li { display: flex; align-items: center; gap: 8px; }
.breadcrumb li + li::before { content: "⁄"; color: rgba(127, 152, 170, 0.7); }
.breadcrumb a { color: var(--mist); text-decoration: none; }
.breadcrumb a:hover { color: var(--grass); }
.breadcrumb [aria-current="page"] { color: var(--peach); }

/* ---------- 卡片 / 数据带 / 标签 ---------- */

.card {
  background: linear-gradient(160deg, rgba(30, 58, 82, 0.92), rgba(16, 38, 58, 0.92));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(18px, 2.4vw, 30px);
}

.data-band {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.data-band > * { background: var(--deep); padding: 18px 20px; }

.data-value {
  display: block;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--paper);
}

.data-label {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--table);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.6;
}

.tag--grass { background: rgba(55, 165, 106, 0.18); color: #7FE0AC; }
.tag--signal { background: rgba(242, 107, 58, 0.18); color: var(--peach); }
.tag--steel { background: rgba(201, 214, 223, 0.12); color: var(--mist); }

/* ---------- 数据表 ---------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(30, 58, 82, 0.30);
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.65;
}

.table caption {
  padding: 14px 16px;
  text-align: left;
  font-size: 13px;
  color: var(--table);
}

.table th, .table td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(201, 214, 223, 0.10);
}

.table thead th {
  background: rgba(16, 38, 58, 0.92);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--mist);
  white-space: nowrap;
}

.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: rgba(55, 165, 106, 0.07); }
.table .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---------- 图片 / 图形容器（共享基础规则） ---------- */

.media {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--r-md);
  background-color: var(--steel);
  background-image:
    linear-gradient(135deg, rgba(55, 165, 106, 0.22), rgba(10, 26, 42, 0.86)),
    repeating-linear-gradient(90deg, rgba(201, 214, 223, 0.10) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(0deg, rgba(201, 214, 223, 0.08) 0 1px, transparent 1px 46px);
  aspect-ratio: 16 / 9;
}

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

.media--wide { aspect-ratio: 21 / 9; }
.media--tall { aspect-ratio: 4 / 5; }
.media--square { aspect-ratio: 1 / 1; }

.media-caption {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.8;
  color: var(--table);
}

/* ---------- 显现动效 ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

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

/* =========================================================
   头部：移动端顶栏 + 抽屉 / 桌面端左侧轨道
   ========================================================= */

.skip-link {
  position: absolute;
  top: -80px;
  left: 12px;
  z-index: 210;
  padding: 10px 18px;
  border-radius: 0 0 10px 10px;
  background: var(--signal);
  color: var(--deep);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}

.skip-link:focus { top: 0; }

.site-rail {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--night);
  color: var(--mist);
  border-bottom: 1px solid var(--line);
}

.rail-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 96;
  pointer-events: none;
  background: linear-gradient(90deg, var(--grass), var(--signal));
  transform: scaleX(var(--progress, 0));
  transform-origin: 0 50%;
}

.rail-bar {
  position: relative;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 64px;
  padding: 10px var(--gutter);
  background: var(--night);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--paper);
}

.brand-mark {
  position: relative;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 11px 11px 11px 3px;
  background: var(--signal);
  transform: rotate(-8deg);
  transition: transform 0.3s var(--ease);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 5px 5px 5px 1px;
  background: var(--deep);
}

.brand:hover .brand-mark { transform: rotate(0deg); }

.brand-text { display: block; }

.brand-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.brand-sub {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.26em;
  color: var(--grass);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(201, 214, 223, 0.08);
  color: var(--mist);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.nav-toggle:hover { border-color: var(--grass); color: var(--paper); }

.nav-toggle-lines { display: grid; gap: 4px; width: 16px; }
.nav-toggle-lines i {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.25s var(--ease), width 0.25s var(--ease);
}
.nav-toggle-lines i:nth-child(2) { width: 70%; }

[data-open="true"] .nav-toggle-lines i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
[data-open="true"] .nav-toggle-lines i:nth-child(2) { width: 100%; transform: scaleX(0); }
[data-open="true"] .nav-toggle-lines i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.rail-nav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  width: min(320px, 86vw);
  display: flex;
  flex-direction: column;
  padding: 84px 20px 26px;
  overflow-y: auto;
  background: var(--night);
  border-left: 1px solid var(--line-strong);
  visibility: hidden;
  transform: translateX(101%);
  transition: transform 0.34s var(--ease), visibility 0s 0.34s;
}

.site-rail[data-open="true"] .rail-nav {
  visibility: visible;
  transform: none;
  transition: transform 0.34s var(--ease), visibility 0s 0s;
}

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

.rail-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  border-left: 3px solid transparent;
  border-radius: 10px;
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease),
              border-color 0.2s var(--ease);
}

.rail-link:hover { color: var(--paper); background: rgba(201, 214, 223, 0.07); }

.rail-link[aria-current="page"] {
  color: var(--paper);
  border-left-color: var(--signal);
  background: linear-gradient(90deg, rgba(242, 107, 58, 0.18), rgba(242, 107, 58, 0));
}

.rail-num {
  flex: none;
  min-width: 22px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--table);
}

.rail-link[aria-current="page"] .rail-num { color: var(--signal); }

.rail-label { display: block; }

.rail-foot {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rail-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--signal);
  color: var(--deep);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.rail-cta:hover { background: #ff7f52; transform: translateY(-1px); }

.rail-link--sub {
  justify-content: center;
  padding: 10px 12px;
  font-size: 13px;
  border-left: 0;
  background: rgba(201, 214, 223, 0.06);
}

.rail-scrim {
  position: fixed;
  inset: 0;
  z-index: 85;
  background: rgba(6, 14, 22, 0.66);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}

.site-rail[data-open="true"] .rail-scrim { opacity: 1; pointer-events: auto; }

/* =========================================================
   页脚
   ========================================================= */

.site-foot {
  position: relative;
  margin-top: clamp(48px, 7vw, 90px);
  padding: clamp(36px, 6vw, 68px) var(--gutter) 30px;
  background: #0B1C2C;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.8;
}

.foot-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  max-width: var(--maxw);
  margin-inline: auto;
}

.foot-name {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 0.02em;
  color: var(--paper);
}

.foot-tag {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--grass);
}

.foot-note { margin: 0; font-size: 13px; line-height: 1.85; color: var(--ink-faint); max-width: 34ch; }

.foot-title {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--table);
}

.foot-list { list-style: none; display: flex; flex-direction: column; gap: 9px; }

.foot-link {
  color: var(--mist);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.foot-link:hover { color: var(--grass); }

.foot-item { display: flex; flex-wrap: wrap; gap: 4px 10px; }

.foot-k {
  flex: none;
  min-width: 34px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--table);
  padding-top: 3px;
}

.foot-v { color: var(--mist); word-break: break-word; }

.foot-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  max-width: var(--maxw);
  margin: 34px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--table);
}

.foot-copy, .foot-region, .foot-icp { margin: 0; }

.foot-legal {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-left: auto;
}

.foot-legal .foot-link { font-size: 12.5px; }

.to-top {
  position: fixed;
  right: clamp(14px, 3vw, 30px);
  bottom: clamp(14px, 3vw, 30px);
  z-index: 70;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--steel);
  color: var(--paper);
  font-size: 17px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease),
              visibility 0s 0.25s, background-color 0.2s var(--ease);
}

.to-top:hover { background: var(--signal); color: var(--deep); border-color: var(--signal); }

.to-top.is-on {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease),
              visibility 0s 0s, background-color 0.2s var(--ease);
}

/* =========================================================
   响应式：平板 / 桌面轨道
   ========================================================= */

@media (min-width: 720px) {
  .foot-grid { grid-template-columns: 1.15fr 0.9fr 1.25fr; gap: 40px; }
}

@media (min-width: 960px) {
  body { padding-left: var(--rail-w); }

  .site-rail {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: auto;
    width: var(--rail-w);
    display: flex;
    flex-direction: column;
    border-bottom: 0;
    border-right: 1px solid var(--line);
    background: linear-gradient(180deg, #10263A 0%, #0C1F31 100%);
  }

  .rail-progress { left: var(--rail-w); }

  .rail-bar {
    display: block;
    flex: none;
    padding: 26px 20px 20px;
    border-bottom: 1px solid var(--line);
    background: transparent;
  }

  .brand { align-items: flex-start; gap: 12px; }

  .brand-name { font-size: 17px; }
  .brand-sub { letter-spacing: 0.22em; }

  .nav-toggle { display: none; }

  .rail-nav {
    position: static;
    inset: auto;
    width: auto;
    flex: 1 1 auto;
    padding: 18px 14px 22px;
    overflow-y: auto;
    border-left: 0;
    background: transparent;
    visibility: visible;
    transform: none;
    transition: none;
  }

  .rail-link { padding: 11px 12px; font-size: 15px; }
  .rail-foot { margin-top: auto; }

  .rail-scrim { display: none; }

  .foot-base { gap: 10px 28px; }

  #main-content { scroll-margin-top: 24px; }
}

@media (min-width: 1280px) {
  :root { --rail-w: 252px; }
}

/* =========================================================
   可访问性与动效偏好
   ========================================================= */

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal] { opacity: 1; transform: none; }
  .rail-nav { transition: none; }
}
