/* =========================================================
   安博赛场 · Site Kit 共享样式 /assets/site.css
   框架式页头 + 档案式页脚 + 战术板组件基座
   ========================================================= */

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

:root {
  /* 色板 */
  --abyss: #061826;
  --tactical: #0B2B45;
  --panel: #123F5E;
  --cyan: #19E3D0;
  --amber: #F5A524;
  --live: #B6FF3B;
  --ice: #E8F1F5;
  --steel: #8FA6B5;
  --line: #2C5A75;
  --coral: #FF6B4A;

  /* 字体 */
  --font-sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;

  /* 度量 */
  --maxw: 1440px;
  --gutter: 48px;
  --header-h: 64px;
  --header-h-sm: 52px;
  --radius: 2px;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

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

body {
  margin: 0;
  background: var(--abyss);
  color: var(--ice);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: .005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 12px;
  font-family: var(--font-sans);
  font-weight: 900;
  line-height: 1.22;
  letter-spacing: -.02em;
  color: var(--ice);
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1em; padding-left: 1.25em; }

a { color: var(--cyan); text-decoration: none; }
a:hover { color: #6FF3E7; }

strong, b { font-weight: 800; }

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 40px 0;
}

::selection { background: var(--amber); color: var(--abyss); }

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

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

/* ---------- 工具类 ---------- */
.mono {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cyan);
}
.eyebrow::before {
  content: "";
  width: 10px;
  height: 2px;
  background: var(--cyan);
}

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

/* ---------- 跳转链接 ---------- */
.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 1200;
  padding: 12px 20px;
  background: var(--amber);
  color: var(--abyss);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .04em;
  text-decoration: none;
  border-radius: var(--radius);
  transition: top .18s var(--ease);
}
.skip-link:focus,
.skip-link:focus-visible {
  top: 16px;
  color: var(--abyss);
}

/* =========================================================
   页头：框架条
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(6, 24, 38, .94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  border-left: 3px solid var(--cyan);
}

.site-header__inner {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  min-height: var(--header-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 36px;
  transition: min-height .24s var(--ease);
}

.site-header[data-scrolled="true"] .site-header__inner {
  min-height: var(--header-h-sm);
}

.site-header__progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  display: block;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--live));
  transition: width .1s linear;
  pointer-events: none;
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  color: var(--ice);
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover { color: var(--ice); }

.brand__name {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: .04em;
}

.brand__slash {
  color: var(--cyan);
  font-size: 15px;
  font-weight: 400;
}

.brand__sub {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--steel);
}

/* 导航：物理索引条 */
.site-nav {
  display: flex;
  justify-content: center;
  min-width: 0;
}

.site-nav__list {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(11, 43, 69, .55);
  overflow: hidden;
}

.site-nav__list > li { border-left: 1px solid var(--line); }
.site-nav__list > li:first-child { border-left: 0; }

.site-nav__link {
  position: relative;
  display: block;
  height: 38px;
  line-height: 38px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--steel);
  text-decoration: none;
  transition: color .18s var(--ease), background-color .18s var(--ease);
}
.site-nav__link:hover,
.site-nav__link:focus-visible {
  color: var(--ice);
  background: rgba(25, 227, 208, .09);
}

.site-nav__link[aria-current="page"] {
  color: var(--amber);
  background: rgba(245, 165, 36, .1);
}
.site-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  background: var(--amber);
}

/* 头部动作区 */
.site-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 38px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ice);
  cursor: pointer;
  transition: border-color .18s var(--ease), color .18s var(--ease);
}
.nav-toggle:hover { border-color: var(--cyan); color: var(--cyan); }

.nav-toggle__bar {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: background-color .2s var(--ease);
}
.nav-toggle__bar::before,
.nav-toggle__bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform .2s var(--ease);
}
.nav-toggle__bar::before { top: -6px; }
.nav-toggle__bar::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1.2;
  color: var(--ice);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s var(--ease), color .18s var(--ease),
              border-color .18s var(--ease), transform .18s var(--ease);
}

.btn--amber {
  background: var(--amber);
  border-color: var(--amber);
  color: #20140A;
}
.btn--amber:hover,
.btn--amber:focus-visible {
  background: #FFB53D;
  border-color: #FFB53D;
  color: #20140A;
  transform: translateY(-1px);
}

.btn--ghost { border-color: var(--line); color: var(--ice); }
.btn--ghost:hover,
.btn--ghost:focus-visible { border-color: var(--cyan); color: var(--cyan); }

.btn--sm { padding: 9px 16px; font-size: 13px; letter-spacing: .06em; }

/* ---------- 面包屑 ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--steel);
}
.breadcrumbs li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumbs li + li::before { content: "/"; color: var(--line); }
.breadcrumbs a { color: var(--steel); text-decoration: none; }
.breadcrumbs a:hover { color: var(--cyan); }
.breadcrumbs [aria-current="page"] { color: var(--ice); }

/* ---------- 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--cyan);
  background: rgba(25, 227, 208, .07);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  white-space: nowrap;
}
.tag--amber {
  color: var(--amber);
  background: rgba(245, 165, 36, .1);
  border-color: rgba(245, 165, 36, .4);
}
.tag--live {
  color: var(--live);
  background: rgba(182, 255, 59, .08);
  border-color: rgba(182, 255, 59, .4);
}

/* ---------- 分屏骨架 ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: 24px;
  align-items: start;
}

/* ---------- 左侧索引轨道 ---------- */
.rail {
  position: sticky;
  top: 96px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(11, 43, 69, .5);
  padding: 14px 0;
}

.rail__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 2px;
}

.rail__link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--steel);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color .18s var(--ease), background-color .18s var(--ease), border-color .18s var(--ease);
}
.rail__link:hover {
  color: var(--ice);
  background: rgba(25, 227, 208, .07);
  border-left-color: var(--cyan);
}
.rail__link[aria-current="page"] {
  color: var(--amber);
  background: rgba(245, 165, 36, .1);
  border-left-color: var(--amber);
}

.rail__idx {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--cyan);
  flex: 0 0 auto;
}
.rail__link[aria-current="page"] .rail__idx { color: var(--amber); }

/* ---------- 章节大编号 ---------- */
.section-num {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(38px, 6vw, 64px);
  font-weight: 600;
  line-height: .9;
  letter-spacing: -.03em;
  color: rgba(25, 227, 208, .85);
  -webkit-text-stroke: 1px var(--cyan);
}
.section-num--active {
  color: var(--amber);
  -webkit-text-stroke: 1px var(--amber);
}

/* ---------- 卡片与面板 ---------- */
.card {
  position: relative;
  padding: 24px 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .22s var(--ease), border-color .22s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--amber);
}

.panel {
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* ---------- 图片容器（球场标注层） ---------- */
.media-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, #0B2B45 0%, #08202F 55%, #061826 100%);
  isolation: isolate;
}
.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 4 / 5; }
.media-frame--square { aspect-ratio: 1 / 1; }

.media-frame > img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(25, 227, 208, .14) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(25, 227, 208, .14) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: .75;
}

.media-frame::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 110px;
  height: 110px;
  margin: -55px 0 0 -55px;
  border: 1px solid rgba(25, 227, 208, .45);
  border-radius: 50%;
  pointer-events: none;
}

/* =========================================================
   页脚：编号档案卡
   ========================================================= */
.site-footer {
  position: relative;
  margin-top: 96px;
  padding: 0 0 28px;
  background: linear-gradient(180deg, var(--tactical) 0%, #081F31 60%, var(--abyss) 100%);
  border-top: 1px solid var(--line);
  color: var(--steel);
}

.site-footer::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan) 0%, rgba(25, 227, 208, .18) 45%, transparent 75%);
}

.site-footer__inner {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 56px var(--gutter) 0;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) repeat(3, minmax(140px, 1fr));
  gap: 40px 32px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
}

.site-footer__mark {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .02em;
  color: var(--ice);
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}
.site-footer__mark-sub {
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--steel);
  font-weight: 500;
}

.site-footer__tagline {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--cyan);
  letter-spacing: .02em;
}

.site-footer__note {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--steel);
  max-width: 30ch;
}

.site-footer__col-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--ice);
}

.site-footer__idx {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--cyan);
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 1px;
}

.site-footer__links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.site-footer__link {
  display: inline-block;
  font-size: 14px;
  color: var(--steel);
  text-decoration: none;
  transition: color .18s var(--ease), transform .18s var(--ease);
}
.site-footer__link:hover,
.site-footer__link:focus-visible {
  color: var(--cyan);
  transform: translateX(3px);
}

.site-footer__contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px 28px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.site-footer__contact-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
  min-width: 0;
}

.site-footer__contact-label {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cyan);
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 1px;
}

.site-footer__contact-value {
  font-size: 14px;
  color: var(--steel);
  word-break: break-word;
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-top: 22px;
  font-size: 12.5px;
  letter-spacing: .02em;
  color: var(--steel);
}
.site-footer__legal { margin: 0; font-family: var(--font-mono); letter-spacing: .06em; }
.site-footer__copy { margin: 0; }

/* 回到顶部 */
.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 800;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--tactical);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--cyan);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .24s var(--ease), transform .24s var(--ease),
              visibility .24s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
}
.to-top[data-visible="true"] {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.to-top:hover,
.to-top:focus-visible { border-color: var(--amber); color: var(--amber); }

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 1200px) {
  :root { --gutter: 32px; }
  .site-footer__grid { gap: 32px 24px; }
}

@media (max-width: 1080px) {
  .brand__sub { display: none; }
  .site-header__inner { gap: 20px; }
  .site-nav__link { padding: 0 12px; font-size: 13px; }
}

@media (max-width: 960px) {
  .split { grid-template-columns: 1fr; }
  .rail {
    position: static;
    overflow-x: auto;
    padding: 8px;
  }
  .rail__list {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    gap: 6px;
  }
  .rail__link {
    border-left: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    white-space: nowrap;
    padding: 8px 14px;
  }
  .rail__link:hover { border-left-color: var(--line); border-color: var(--cyan); }
  .rail__link[aria-current="page"] { border-left-color: var(--amber); border-color: var(--amber); }
}

@media (max-width: 900px) {
  .site-header__inner {
    grid-template-columns: 1fr auto;
    min-height: 58px;
  }
  .site-header[data-scrolled="true"] .site-header__inner { min-height: 54px; }

  .nav-toggle { display: flex; }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    background: var(--tactical);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    max-height: calc(100vh - 58px);
    overflow-y: auto;
  }
  .site-nav[data-open="true"] { display: block; }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
  }
  .site-nav__list > li {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .site-nav__list > li:first-child { border-top: 0; }

  .site-nav__link {
    height: auto;
    line-height: 1.4;
    padding: 16px 20px;
    font-size: 16px;
  }
  .site-nav__link[aria-current="page"] { box-shadow: inset 3px 0 0 var(--amber); }
  .site-nav__link[aria-current="page"]::after { display: none; }

  .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  :root { --gutter: 20px; }

  body { font-size: 16px; line-height: 1.7; }

  .brand__name { font-size: 17px; }
  .site-header__actions { gap: 8px; }
  .btn--sm { padding: 8px 12px; font-size: 12px; }

  .site-footer { margin-top: 64px; }
  .site-footer__inner { padding-top: 40px; }
  .site-footer__grid {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-bottom: 28px;
  }
  .site-footer__contact { grid-template-columns: 1fr; }
  .site-footer__bottom { flex-direction: column; align-items: flex-start; }

  .to-top { right: 16px; bottom: 16px; }

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

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

  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  .card:hover,
  .btn--amber:hover,
  .site-footer__link:hover { transform: none; }
  .to-top { transform: none; }
  .site-header__progress { transition: none; }
}
