/* ==========================================================================
   AB体育官网 · 共享外壳 /assets/site.css
   战术板：坐标网格底 + 侧边轨道 + 切角面板 + 等宽数据字
   ========================================================================== */

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  min-height: 100%;
}

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

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

p,
h1,
h2,
h3,
h4,
h5,
h6,
figure,
blockquote {
  margin: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
}

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

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

table {
  border-collapse: collapse;
  width: 100%;
}

/* ---------- 2. 设计变量 ---------- */
:root {
  /* 色彩体系 */
  --ink-950: #040C14;
  --ink-900: #07131F;
  --ink-850: #081725;
  --ink-800: #0E2233;
  --ink-750: #13293C;

  --green:  #19E3A2;
  --cyan:   #47F5E0;
  --amber:  #FFB547;
  --steel:  #9FB6C9;
  --warm:   #C9C2B8;
  --paper:  #E6F1F5;
  --muted:  #8FA6B5;
  --danger: #FF6B6B;

  /* 尺寸与节奏 */
  --rail-w: 252px;
  --bar-h: 58px;
  --shell-max: 1140px;
  --gutter: clamp(18px, 4vw, 44px);

  /* 字体 */
  --font-sans: "PingFang SC", "HarmonyOS Sans SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", "Roboto Mono",
               Menlo, Consolas, monospace;

  /* 缓动 */
  --ease-out: cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* ---------- 3. 基础排版 ---------- */
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--paper);
  background-color: var(--ink-900);
  background-image:
    linear-gradient(rgba(159, 182, 201, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(159, 182, 201, 0.055) 1px, transparent 1px);
  background-size: 76px 76px;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.14;
  color: var(--paper);
}

strong, b { font-weight: 800; }

::selection {
  background: var(--green);
  color: #04140F;
}

/* 焦点可见 */
:where(a, button, [tabindex], summary):focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- 4. 通用工具 ---------- */
.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;
}

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

.section {
  padding-block: clamp(36px, 5.5vw, 72px);
}

#main-content {
  display: block;
  scroll-margin-top: calc(var(--bar-h) + 12px);
}

.rule {
  height: 1px;
  border: 0;
  margin: 0;
  background: linear-gradient(90deg, rgba(71, 245, 224, 0.55), rgba(159, 182, 201, 0.14) 42%, transparent);
}

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--green);
}

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

.display {
  font-size: clamp(2.1rem, 5.6vw, 3.7rem);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.035em;
  color: var(--paper);
  text-wrap: balance;
}

.lede {
  font-size: clamp(15px, 1.3vw, 17.5px);
  line-height: 1.78;
  color: var(--muted);
  max-width: 36em;
}

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

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}

/* 切角面板 */
.panel {
  background: var(--ink-800);
  border: 1px solid rgba(159, 182, 201, 0.16);
  border-radius: 2px;
  padding: clamp(18px, 2.4vw, 28px);
  color: var(--paper);
}

.panel--cut {
  border-radius: 0;
  border-color: rgba(71, 245, 224, 0.2);
  clip-path: polygon(
    0 0,
    calc(100% - 22px) 0,
    100% 22px,
    100% 100%,
    22px 100%,
    0 calc(100% - 22px)
  );
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
  border-radius: 2px;
  clip-path: polygon(
    0 0,
    calc(100% - 13px) 0,
    100% 13px,
    100% 100%,
    13px 100%,
    0 calc(100% - 13px)
  );
  transition: transform 0.18s var(--ease-out),
              filter 0.18s var(--ease-out),
              background-color 0.18s var(--ease-out),
              color 0.18s var(--ease-out);
}

.btn--primary {
  background: var(--green);
  color: #04140F;
}

.btn--primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn--ghost {
  background: rgba(159, 182, 201, 0.14);
  color: var(--paper);
}

.btn--ghost:hover {
  background: rgba(71, 245, 224, 0.18);
  color: var(--cyan);
}

/* 标签 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.1em;
  background: rgba(159, 182, 201, 0.14);
  color: var(--steel);
}

.tag--green {
  background: var(--green);
  color: #04140F;
}

.tag--amber {
  background: var(--amber);
  color: #2A1A00;
}

/* 面包屑（应用在 ol 上） */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb li + li::before {
  content: "/";
  color: rgba(159, 182, 201, 0.45);
}

.breadcrumb a {
  color: var(--steel);
  transition: color 0.18s var(--ease-out);
}

.breadcrumb a:hover { color: var(--cyan); }

/* 图片容器（页面阶段放占位图） */
.media-frame {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--ink-800), var(--ink-750));
  clip-path: polygon(
    0 0,
    calc(100% - 20px) 0,
    100% 20px,
    100% 100%,
    20px 100%,
    0 calc(100% - 20px)
  );
}

.media-frame > img,
.media-frame > picture > 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-caption {
  margin-top: 10px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- 5. 滚动显现协议 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

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

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ---------- 6. 头部 / 侧边轨道 ---------- */
.skip-link {
  position: absolute;
  left: 50%;
  top: 10px;
  z-index: 200;
  transform: translate(-50%, -220%);
  padding: 10px 18px;
  border-radius: 2px;
  background: var(--green);
  color: #04140F;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.03em;
  transition: transform 0.2s var(--ease-out);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translate(-50%, 0);
}

.scroll-meter {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 96;
  pointer-events: none;
  background: rgba(159, 182, 201, 0.14);
}

.scroll-meter-fill {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--green), var(--cyan) 62%, var(--amber));
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  width: var(--rail-w);
  background:
    linear-gradient(180deg, rgba(25, 227, 162, 0.1), transparent 26%),
    linear-gradient(180deg, #0A1A28 0%, #050E18 68%, var(--ink-950) 100%);
  border-right: 1px solid rgba(71, 245, 224, 0.16);
  box-shadow: 1px 0 0 rgba(4, 12, 20, 0.9),
              14px 0 44px -30px rgba(71, 245, 224, 0.6);
}

.site-header::after {
  content: "";
  position: absolute;
  top: 0;
  right: -1px;
  width: 2px;
  height: 38%;
  background: linear-gradient(180deg, var(--cyan), transparent);
  opacity: 0.85;
  pointer-events: none;
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 26px 20px 18px;
  border-bottom: 1px solid rgba(159, 182, 201, 0.14);
}

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

.brand--stack { align-items: flex-start; }

.brand-mark {
  position: relative;
  flex: none;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  clip-path: polygon(0 0, 72% 0, 100% 28%, 100% 100%, 28% 100%, 0 72%);
  box-shadow: 0 0 18px rgba(25, 227, 162, 0.38);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent 0 4px,
    rgba(7, 19, 31, 0.55) 4px 6px
  );
}

.brand-text {
  display: block;
  min-width: 0;
}

.brand-name {
  display: block;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: var(--paper);
}

.brand-sub {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.2;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green);
}

/* 移动菜单按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid rgba(71, 245, 224, 0.34);
  border-radius: 2px;
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  line-height: 1;
  transition: border-color 0.18s var(--ease-out), color 0.18s var(--ease-out);
}

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

.nav-toggle-icon {
  display: grid;
  gap: 4px;
  width: 16px;
}

.nav-toggle-icon i {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s var(--ease-out), opacity 0.2s var(--ease-out);
}

.site-header[data-open="true"] .nav-toggle-icon i:first-child {
  transform: translateY(3px) rotate(45deg);
}

.site-header[data-open="true"] .nav-toggle-icon i:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

/* 遮罩（仅移动端可见） */
.nav-scrim {
  display: none;
  position: fixed;
  top: var(--bar-h);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 82;
  background: rgba(4, 12, 20, 0.66);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.24s var(--ease-out), visibility 0.24s var(--ease-out);
}

/* 轨道主体 */
.rail {
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1 1 auto;
  min-height: 0;
  padding: 22px 18px 26px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(71, 245, 224, 0.3) transparent;
}

.rail-block {
  display: block;
}

.rail-block--foot {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(159, 182, 201, 0.14);
}

.rail-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--steel);
}

.rail-label::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(159, 182, 201, 0.34), transparent);
}

.rail-meta {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--muted);
}

/* 联赛切换图例 */
.league-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.league-btn {
  padding: 5px 10px;
  border: 1px solid rgba(159, 182, 201, 0.26);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.5;
  letter-spacing: 0.08em;
  color: var(--muted);
  clip-path: polygon(0 0, 100% 0, 100% 62%, 88% 100%, 0 100%);
  transition: color 0.18s var(--ease-out),
              border-color 0.18s var(--ease-out),
              background-color 0.18s var(--ease-out);
}

.league-btn:hover {
  color: var(--paper);
  border-color: var(--cyan);
}

.league-btn[aria-pressed="true"] {
  background: rgba(25, 227, 162, 0.16);
  border-color: var(--green);
  color: var(--green);
}

/* 主导航 */
.site-nav { display: block; }

.nav-list {
  counter-reset: navidx;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-list > li { counter-increment: navidx; }

.nav-list a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 12px;
  border-radius: 2px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.4;
  color: rgba(230, 241, 245, 0.74);
  transition: color 0.18s var(--ease-out), background-color 0.18s var(--ease-out);
}

.nav-list a::before {
  content: counter(navidx, decimal-leading-zero);
  flex: none;
  width: 20px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(143, 166, 181, 0.72);
  transition: color 0.18s var(--ease-out);
}

.nav-list a:hover {
  color: var(--paper);
  background: rgba(71, 245, 224, 0.08);
}

.nav-list a[aria-current="page"] {
  color: var(--paper);
  background: rgba(25, 227, 162, 0.12);
  box-shadow: inset 3px 0 0 var(--green);
}

.nav-list a[aria-current="page"]::before {
  color: var(--green);
}

/* ---------- 7. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 8vw, 108px);
  padding-top: clamp(38px, 5.5vw, 68px);
  background: linear-gradient(180deg,
    rgba(10, 26, 40, 0) 0%,
    #0A1A28 20%,
    #050E18 100%);
  border-top: 1px solid rgba(71, 245, 224, 0.18);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: clamp(120px, 26%, 300px);
  height: 2px;
  background: linear-gradient(90deg, var(--green), rgba(71, 245, 224, 0));
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(26px, 3.4vw, 46px);
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding: 0 var(--gutter) clamp(30px, 4vw, 44px);
}

.footer-brand { display: block; }

.footer-motto {
  margin-top: 18px;
  max-width: 22em;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.65;
  color: var(--paper);
}

.footer-note {
  margin-top: 10px;
  max-width: 24em;
  font-size: 13px;
  line-height: 1.72;
  color: var(--muted);
}

.footer-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 24px 28px;
}

.footer-group { display: block; }

.footer-heading {
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--green);
}

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

.footer-list a {
  display: inline-block;
  padding: 3px 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--steel);
  background-image: linear-gradient(var(--cyan), var(--cyan));
  background-repeat: no-repeat;
  background-size: 0% 1px;
  background-position: 0 100%;
  transition: color 0.2s var(--ease-out), background-size 0.24s var(--ease-out);
}

.footer-list a:hover {
  color: var(--paper);
  background-size: 100% 1px;
}

.footer-contact {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
}

.footer-contact-line {
  display: flex;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(159, 182, 201, 0.16);
  word-break: break-word;
}

.footer-contact-key {
  flex: none;
  width: 34px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.9;
  letter-spacing: 0.12em;
  color: var(--steel);
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding: 20px var(--gutter) 34px;
  border-top: 1px solid rgba(159, 182, 201, 0.14);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.footer-legal { color: var(--steel); }

.footer-copy { color: rgba(143, 166, 181, 0.86); }

/* ---------- 8. 响应式 ---------- */
@media (min-width: 700px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-groups { grid-column: 1 / -1; }
}

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

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

  .footer-inner {
    grid-template-columns: 1.15fr 1.6fr 1.2fr;
    align-items: start;
  }

  .footer-groups { grid-column: auto; }
}

@media (max-width: 1099px) {
  html.nav-open { overflow: hidden; }

  .site-header {
    position: sticky;
    top: 0;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(71, 245, 224, 0.18);
    background: rgba(7, 19, 31, 0.95);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: 0 12px 40px -30px rgba(0, 0, 0, 0.95);
  }

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

  .header-bar {
    height: var(--bar-h);
    padding: 0 var(--gutter);
    border-bottom: 0;
  }

  .brand-name { font-size: 16px; }

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

  .nav-scrim { display: block; }

  .site-header[data-open="true"] .nav-scrim {
    opacity: 1;
    visibility: visible;
  }

  .rail {
    position: fixed;
    top: var(--bar-h);
    right: 0;
    bottom: 0;
    z-index: 84;
    flex: none;
    width: min(88vw, 336px);
    padding: 24px var(--gutter) 36px;
    background: var(--ink-850);
    border-left: 1px solid rgba(71, 245, 224, 0.22);
    box-shadow: -28px 0 64px -34px rgba(0, 0, 0, 0.95);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.3s var(--ease-out), visibility 0.3s var(--ease-out);
  }

  .site-header[data-open="true"] .rail {
    transform: translateX(0);
    visibility: visible;
  }

  .nav-list a { font-size: 15px; padding-block: 12px; }
}

@media (max-width: 560px) {
  .footer-base {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- 9. 降低动效偏好 ---------- */
@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;
  }

  .site-header .rail,
  .nav-scrim,
  .scroll-meter-fill {
    transition: none !important;
  }
}
