/* ===== 嘉美赛事 共享样式 /assets/site.css ===== */

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

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

body,
h1, h2, h3, h4, h5, p, ul, ol, li, figure, blockquote, dl, dd, table, caption {
  margin: 0;
}

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

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

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

a { color: inherit; }

table { border-collapse: collapse; border-spacing: 0; }

/* --- 变量 --- */
:root {
  --ink: #0D1B2E;
  --ink-2: #142944;
  --ink-3: #0A1524;
  --line: #1F3A5C;
  --cy: #3DE8C6;
  --cy-deep: #0E7C6B;
  --cy-light: #8CF7E0;
  --paper: #F2E4C2;
  --paper-2: #FAF3E0;
  --amber: #EFA13C;
  --muted: #93A6BC;
  --edge: #C7D3E3;

  --rail-w: 220px;
  --bar-h: 64px;

  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;

  --ease: cubic-bezier(.2, .7, .3, 1);
  --shadow: 0 20px 44px -28px rgba(0, 0, 0, .82);

  --font-title: "Archivo Narrow", "Noto Sans SC Condensed", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-num: "IBM Plex Mono", "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* --- 基底 --- */
body {
  padding-left: var(--rail-w);
  padding-top: var(--bar-h);
  min-height: 100vh;
  background-color: var(--ink);
  background-image:
    repeating-linear-gradient(0deg, rgba(147, 166, 188, .045) 0 1px, transparent 1px 5px),
    radial-gradient(circle at 16% 6%, rgba(61, 232, 198, .10), transparent 46%),
    radial-gradient(circle at 92% 88%, rgba(14, 124, 107, .18), transparent 54%);
  background-attachment: fixed;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: .01em;
}

h1, h2, h3, h4 {
  font-family: var(--font-title);
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.16;
  color: #FBF3E2;
}

h1 { font-size: clamp(38px, 5.6vw, 56px); }
h2 { font-size: clamp(26px, 3.2vw, 32px); }
h3 { font-size: 20px; }
h4 { font-size: 17px; }

p { text-wrap: pretty; }

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

/* --- 工具类 --- */
.num {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-num);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--amber);
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(239, 161, 60, .45);
}

.batch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  border-radius: var(--radius-pill);
  background: rgba(239, 161, 60, .12);
  border: 1px solid rgba(239, 161, 60, .45);
  color: #F6C888;
  font-family: var(--font-num);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: .06em;
}

.batch__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(239, 161, 60, .16);
  flex: 0 0 auto;
}

/* --- 布局 --- */
.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 clamp(18px, 3vw, 40px);
}

.grid {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
}

.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* --- 按钮 --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .03em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background .22s var(--ease), color .22s var(--ease),
              border-color .22s var(--ease), box-shadow .22s var(--ease),
              transform .18s var(--ease);
}

.btn--primary {
  background: var(--cy);
  color: #06231F;
  box-shadow: 0 0 0 0 rgba(61, 232, 198, .45);
}

.btn--primary:hover {
  background: var(--cy-light);
  box-shadow: 0 0 0 4px rgba(61, 232, 198, .16);
}

.btn--ghost {
  border-color: var(--line);
  color: var(--paper);
  background: rgba(20, 41, 68, .5);
}

.btn--ghost:hover {
  border-color: var(--cy);
  color: var(--cy-light);
  background: rgba(61, 232, 198, .08);
}

.btn:active { transform: translateY(1px) scale(.99); }

/* --- 胶囊筛选 --- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: rgba(20, 41, 68, .55);
  color: var(--edge);
  font-size: 13.5px;
  letter-spacing: .03em;
  cursor: pointer;
  transition: background .22s var(--ease), color .22s var(--ease),
              border-color .22s var(--ease), box-shadow .22s var(--ease);
}

.pill:hover {
  border-color: var(--cy);
  color: var(--cy-light);
}

.pill[aria-pressed="true"] {
  background: rgba(61, 232, 198, .16);
  border-color: var(--cy);
  color: var(--cy-light);
  box-shadow: 0 0 0 3px rgba(61, 232, 198, .10);
}

/* --- 卡片 --- */
.card {
  position: relative;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(20, 41, 68, .92), rgba(13, 27, 46, .94));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.card--paper {
  background: linear-gradient(170deg, var(--paper-2), var(--paper));
  border-color: rgba(31, 58, 92, .32);
  color: #22303F;
}

.card--paper h2,
.card--paper h3,
.card--paper h4 { color: #132033; }

/* --- 数据表 --- */
.table-base {
  width: 100%;
  font-size: 14px;
  line-height: 1.6;
}

.table-base caption {
  caption-side: top;
  text-align: left;
  font-family: var(--font-title);
  font-size: 16px;
  letter-spacing: .06em;
  color: var(--muted);
  padding-bottom: 10px;
}

.table-base th,
.table-base td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.table-base thead th {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.table-base tbody tr:hover { background: rgba(61, 232, 198, .06); }

.table-base td.num,
.table-base th.num {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* --- 图片容器 --- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--ink-2), var(--ink-3));
}

.media > img,
.media > picture,
.media > svg,
.media > video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--1x1 { aspect-ratio: 1 / 1; }
.media--21x9 { aspect-ratio: 21 / 9; }

.media__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px;
  font-size: 12.5px;
  letter-spacing: .03em;
  color: var(--paper);
  background: linear-gradient(180deg, transparent, rgba(10, 21, 36, .92));
}

.media__tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  background: rgba(239, 161, 60, .9);
  color: #241503;
  font-family: var(--font-num);
  font-size: 11px;
  letter-spacing: .06em;
}

/* --- 面包屑 --- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin: 18px 0 0;
  font-size: 13px;
  color: var(--muted);
}

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

.breadcrumb li + li::before {
  content: "/";
  color: rgba(147, 166, 188, .6);
}

.breadcrumb a {
  color: var(--edge);
  text-decoration: none;
  border-bottom: 1px solid rgba(147, 166, 188, .38);
  transition: color .22s var(--ease), border-color .22s var(--ease);
}

.breadcrumb a:hover {
  color: var(--cy-light);
  border-color: var(--cy);
}

.breadcrumb [aria-current="page"] {
  color: var(--cy-light);
  border-bottom: 0;
}

/* --- 显现动效 --- */
.reveal,
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .32s var(--ease), transform .32s var(--ease);
}

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

/* --- skip link --- */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--cy);
  color: #06231F;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform .26s var(--ease);
}

.skip-link:focus { transform: none; }

/* ================= 头部 ================= */
.site-header { position: relative; z-index: 60; }

.site-header[data-scrolled] .topline {
  box-shadow: 0 14px 34px -26px rgba(0, 0, 0, .95);
}

/* 侧边品牌轨道 */
.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 24px 18px 20px;
  background: linear-gradient(180deg, #142944 0%, #0D1B2E 58%, #0A1524 100%);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.rail::after {
  content: "";
  position: absolute;
  top: 26px;
  bottom: 26px;
  right: 6px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, transparent, rgba(61, 232, 198, .5) 22%, rgba(14, 124, 107, .22) 62%, transparent);
  pointer-events: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand__mark {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(140deg, var(--cy) 0%, var(--cy-deep) 100%);
  color: #05231E;
  box-shadow: 0 0 0 1px rgba(140, 247, 224, .35), 0 12px 26px -14px rgba(61, 232, 198, .7);
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.brand__name {
  font-family: var(--font-title);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .08em;
  color: #FBF3E2;
}

.brand__tag {
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--muted);
  letter-spacing: .02em;
}

/* 竖排章节索引 */
.nav { margin-top: 2px; }

.nav__list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav__item { display: block; }

.nav__link {
  position: relative;
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--edge);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background .22s var(--ease), color .22s var(--ease), transform .22s var(--ease);
}

.nav__link:hover {
  background: rgba(61, 232, 198, .10);
  color: var(--cy-light);
  transform: translateX(3px);
}

.nav__link[aria-current="page"] {
  background: linear-gradient(90deg, rgba(61, 232, 198, .22), rgba(61, 232, 198, 0));
  color: var(--cy-light);
}

.nav__link[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 2px;
  background: var(--cy);
}

.nav__idx {
  font-family: var(--font-num);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--muted);
}

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

.nav__label { min-width: 0; }

.rail__foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px dashed rgba(147, 166, 188, .25);
}

.rail__batch { margin: 0; }

.rail__note {
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted);
  letter-spacing: .02em;
}

/* 顶部框架条 */
.topline {
  position: fixed;
  top: 0;
  left: var(--rail-w);
  right: 0;
  height: var(--bar-h);
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 clamp(16px, 3vw, 36px);
  background: rgba(13, 27, 46, .88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.topline__brand {
  display: none;
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .08em;
  color: #FBF3E2;
  text-decoration: none;
}

.topline__lede {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--muted);
  margin-right: auto;
}

.topline__lede::before {
  content: "";
  width: 26px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cy), transparent);
}

.topline__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 15px 9px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: rgba(61, 232, 198, .08);
  color: var(--paper);
  font-size: 13px;
  letter-spacing: .08em;
  cursor: pointer;
  transition: border-color .22s var(--ease), background .22s var(--ease), color .22s var(--ease);
}

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

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--cy);
  transition: background .2s var(--ease);
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--cy);
  transition: transform .25s var(--ease);
}

.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after { top: 5px; }

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

/* ================= 页脚 ================= */
.site-footer {
  margin-top: clamp(48px, 7vw, 96px);
  padding: clamp(30px, 4vw, 56px) clamp(18px, 3vw, 40px) 26px;
  display: grid;
  grid-template-columns: minmax(190px, 250px) minmax(0, 1fr);
  gap: clamp(22px, 4vw, 56px);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #0F2136, #0A1524);
}

.footer__rail {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer__brand {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: .08em;
  color: #FBF3E2;
}

.footer__tag {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

.footer__batch { margin-top: 4px; }

.footer__body { display: flex; flex-direction: column; }

.footer__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.footer__col { min-width: 0; }

.footer__col-title {
  margin-bottom: 14px;
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer__links a {
  display: inline-block;
  padding: 5px 0;
  font-size: 14.5px;
  color: var(--edge);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .22s var(--ease), border-color .22s var(--ease);
}

.footer__links a:hover {
  color: var(--cy-light);
  border-color: var(--cy);
}

.footer__contact {
  margin-top: 30px;
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  background: rgba(242, 228, 194, .055);
  border: 1px solid rgba(242, 228, 194, .14);
}

.footer__contact-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 14px;
  line-height: 1.75;
  color: #D8E1EE;
}

.footer__contact-key {
  flex: 0 0 auto;
  min-width: 74px;
  font-family: var(--font-num);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--amber);
  padding-top: 3px;
}

.footer__contact-val { min-width: 0; }

.footer__contact-note {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(147, 166, 188, .28);
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}

.footer__base {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px dashed rgba(147, 166, 188, .28);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  font-size: 13px;
  color: var(--muted);
}

.footer__copy { margin-right: auto; }

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer__nav a {
  color: var(--edge);
  text-decoration: none;
  border-bottom: 1px solid rgba(147, 166, 188, .38);
  transition: color .22s var(--ease), border-color .22s var(--ease);
}

.footer__nav a:hover {
  color: var(--cy-light);
  border-color: var(--cy);
}

.footer__legal {
  font-family: var(--font-num);
  letter-spacing: .04em;
  color: var(--muted);
}

/* ================= 全局交互产物 ================= */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 2px;
  z-index: 90;
  background: linear-gradient(90deg, var(--cy-deep), var(--cy), var(--cy-light));
  pointer-events: none;
}

.to-top {
  position: fixed;
  right: clamp(14px, 2vw, 26px);
  bottom: clamp(14px, 2vw, 26px);
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 17px 11px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: rgba(20, 41, 68, .92);
  color: var(--paper);
  font-size: 13px;
  letter-spacing: .06em;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 18px 36px -22px rgba(0, 0, 0, .9);
  transition: opacity .28s var(--ease), transform .28s var(--ease),
              visibility .28s var(--ease), border-color .22s var(--ease), color .22s var(--ease);
}

.to-top[data-on] {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover {
  border-color: var(--cy);
  color: var(--cy-light);
}

.to-top__arrow {
  width: 10px;
  height: 10px;
  border-left: 2px solid var(--cy);
  border-top: 2px solid var(--cy);
  transform: rotate(45deg);
}

/* ================= 响应式 ================= */
@media (max-width: 1080px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  :root { --rail-w: 0px; }

  body { padding-left: 0; padding-top: var(--bar-h); }

  .topline {
    left: 0;
    padding: 0 14px;
    gap: 10px;
  }

  .topline__brand { display: block; }
  .topline__lede { display: none; }
  .topline .btn--ghost { display: none; }

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

  .rail {
    top: var(--bar-h);
    left: 12px;
    right: 12px;
    bottom: auto;
    width: auto;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    visibility: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: 0 34px 64px -34px rgba(0, 0, 0, .95);
    transition: max-height .38s var(--ease), opacity .3s var(--ease),
                padding .38s var(--ease), visibility .3s var(--ease);
  }

  .rail[data-open] {
    max-height: min(76vh, 620px);
    padding-top: 18px;
    padding-bottom: 18px;
    opacity: 1;
    visibility: visible;
  }

  .rail::after { display: none; }

  .rail__foot { margin-top: 16px; }

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

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

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

@media (max-width: 600px) {
  .grid--2,
  .grid--3,
  .grid--4 { grid-template-columns: minmax(0, 1fr); }

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

  .topline .btn { padding: 10px 15px; font-size: 13px; }

  .footer__contact { padding: 18px 16px; }
}

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

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

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