/* =========================================================
   KAIYUN赛场 — 共享样式 /assets/site.css
   夜间球场灯光 × 转播控制台
   1. Reset  2. Tokens  3. 基础排版  4. 布局  5. 按钮与标签
   6. 头部  7. 移动端头部  8. 页脚  9. 通用组件  10. 动效与无障碍
   ========================================================= */

/* ---------- 1. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, blockquote, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg, picture, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }
hr { border: 0; }
#main-content { scroll-margin-top: 96px; }

/* ---------- 2. Tokens ---------- */
:root {
  --pitch: #0B1F17;
  --stand: #12302A;
  --cream: #F3EFE4;
  --card: #E7E3D6;
  --lime: #C6FF4A;
  --lime-soft: #EAF7C9;
  --orange: #FF6B2C;
  --orange-ink: #B33A12;
  --ink: #2A2622;
  --muted: #6E7A72;
  --mid: #1E5F4B;

  --line: rgba(42, 38, 34, .14);
  --line-pitch: rgba(198, 255, 74, .22);
  --cream-70: rgba(243, 239, 228, .74);
  --cream-45: rgba(243, 239, 228, .48);

  --font-display: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;

  --gutter: clamp(20px, 4.5vw, 56px);
  --maxw: 1200px;
  --sp-1: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 40px;
  --sp-5: 64px;
  --sp-6: 96px;

  --radius: 14px;
  --cut: 10px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --header-h: 68px;
}

/* ---------- 3. 基础排版 ---------- */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--cream);
  background-image: radial-gradient(circle at 1px 1px, rgba(42, 38, 34, .055) 1px, transparent 0);
  background-size: 22px 22px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.nav-open { overflow: hidden; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.14;
  color: inherit;
}
h1 { font-size: clamp(34px, 5vw, 58px); }
h2 { font-size: clamp(26px, 3.4vw, 38px); }
h3 { font-size: clamp(20px, 2.1vw, 24px); font-weight: 800; line-height: 1.32; }
h4 { font-size: 17px; font-weight: 800; line-height: 1.4; }
p { line-height: 1.75; }

.h1 { font-family: var(--font-display); font-weight: 900; font-size: clamp(34px, 5vw, 58px); line-height: 1.08; letter-spacing: -.02em; }
.h2 { font-family: var(--font-display); font-weight: 900; font-size: clamp(26px, 3.4vw, 38px); line-height: 1.16; letter-spacing: -.02em; }
.h3 { font-family: var(--font-display); font-weight: 800; font-size: clamp(20px, 2.1vw, 24px); line-height: 1.32; }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.lede { font-size: clamp(16px, 1.35vw, 18px); line-height: 1.75; color: var(--muted); max-width: 40ch; }
.prose { max-width: 38em; font-size: 16.5px; line-height: 1.8; }
.prose p + p { margin-top: 1em; }
.prose h3 { margin-top: 1.6em; margin-bottom: .5em; }

.visually-hidden {
  position: absolute !important;
  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;
}

/* ---------- 4. 布局 ---------- */
.shell {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: clamp(56px, 7vw, 96px); }
.section--tight { padding-block: clamp(32px, 4.5vw, 56px); }
.section--pitch { background: var(--pitch); color: var(--cream); }
.section--stand { background: var(--stand); color: var(--cream); }
.section--card { background: var(--card); }

.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--bento { grid-template-columns: repeat(12, minmax(0, 1fr)); }

/* ---------- 5. 按钮、跳转链接与标签 ---------- */
:focus-visible {
  outline: 2px solid var(--orange-ink);
  outline-offset: 3px;
  border-radius: 2px;
}
.site-header :focus-visible,
.site-footer :focus-visible,
.section--pitch :focus-visible,
.section--stand :focus-visible {
  outline-color: var(--lime);
}

.skip-link {
  position: absolute;
  top: -110px;
  left: var(--sp-3);
  z-index: 300;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  background: var(--lime);
  color: var(--pitch);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  clip-path: polygon(var(--cut) 0, 100% 0, calc(100% - var(--cut)) 100%, 0 100%);
  transition: top .18s var(--ease);
}
.skip-link:focus { top: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1;
  white-space: nowrap;
  clip-path: polygon(var(--cut) 0, 100% 0, calc(100% - var(--cut)) 100%, 0 100%);
  transition: background-color .18s var(--ease), color .18s var(--ease), transform .18s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--lime); color: var(--pitch); }
.btn--primary:hover { background: #D6FF77; }
.btn--ghost { background: rgba(243, 239, 228, .1); color: var(--cream); box-shadow: inset 0 0 0 1px rgba(243, 239, 228, .34); }
.btn--ghost:hover { background: rgba(243, 239, 228, .18); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 0 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--mid);
  background: var(--lime-soft);
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}
.tag--lime { background: var(--lime); color: var(--pitch); }
.tag--orange { background: rgba(255, 107, 44, .16); color: var(--orange-ink); }

/* ---------- 6. 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  padding-block: 12px;
  color: var(--cream);
  background-image: linear-gradient(180deg, rgba(11, 31, 23, .96) 0%, rgba(11, 31, 23, .76) 55%, rgba(11, 31, 23, 0) 100%);
  background-color: transparent;
  transition: background-color .3s var(--ease), padding .3s var(--ease), box-shadow .3s var(--ease);
}
.site-header[data-scrolled="true"] {
  background-color: var(--stand);
  background-image: none;
  padding-block: 6px;
  box-shadow: 0 1px 0 var(--line-pitch), 0 18px 40px -28px rgba(0, 0, 0, .9);
}
body.nav-open .site-header {
  background-color: var(--stand);
  background-image: none;
}
.header-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 26px);
  min-height: 52px;
}

.brand { display: inline-flex; align-items: center; gap: 11px; flex: 0 0 auto; min-height: 44px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  background: var(--lime);
  color: var(--pitch);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
  clip-path: polygon(0 0, 100% 0, 100% 68%, 72% 100%, 0 100%);
  transition: transform .2s var(--ease);
}
.brand:hover .brand-mark { transform: translateY(-2px); }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name {
  display: block;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.1;
  color: var(--cream);
}
.brand-sub {
  display: block;
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--cream-45);
}

.site-nav { margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: 2px; }
.nav-item { display: flex; }
.nav-link {
  position: relative;
  z-index: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 clamp(8px, .95vw, 13px);
  font-size: clamp(13px, 1.05vw, 14px);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  color: rgba(243, 239, 228, .8);
  transition: color .18s var(--ease);
}
.nav-link::before {
  content: "";
  position: absolute;
  inset: 5px 0;
  z-index: -1;
  background: transparent;
  clip-path: polygon(9px 0, 100% 0, calc(100% - 9px) 100%, 0 100%);
  transition: background-color .18s var(--ease);
}
.nav-link:hover { color: var(--cream); }
.nav-link:hover::before { background: rgba(198, 255, 74, .16); }
.nav-link[aria-current="page"] { color: var(--pitch); font-weight: 800; }
.nav-link[aria-current="page"]::before { background: var(--lime); }

.nav-item--cta { display: none; }
.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin-top: 20px;
  padding: 0 22px;
  background: var(--lime);
  color: var(--pitch);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: .01em;
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
}

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: clamp(8px, 1.2vw, 18px); }

.nav-toggle {
  display: none;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  background: rgba(198, 255, 74, .16);
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  transition: background-color .18s var(--ease);
}
.nav-toggle:hover { background: rgba(198, 255, 74, .3); }
.nav-toggle-bars {
  position: relative;
  display: block;
  width: 20px;
  height: 2px;
  background: var(--lime);
  transition: background-color .2s var(--ease);
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--lime);
  transition: transform .22s var(--ease), opacity .22s var(--ease);
}
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- 7. 移动端头部 ---------- */
@media (max-width: 1120px) {
  .nav-toggle { display: grid; }
  .header-actions .btn--ghost { display: none; }
  .brand-sub { display: none; }
  .header-inner { z-index: 3; }

  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    padding: calc(var(--header-h) + 20px) var(--gutter) 48px;
    background-color: var(--pitch);
    background-image: linear-gradient(160deg, rgba(18, 48, 42, .92) 0%, rgba(11, 31, 23, 1) 62%);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity .24s var(--ease), transform .24s var(--ease), visibility .24s var(--ease);
  }
  .site-nav[data-open="true"] {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; margin-top: 8px; }
  .nav-item { display: block; }
  .nav-link {
    width: 100%;
    min-height: 58px;
    justify-content: flex-start;
    padding: 0 20px;
    font-size: 17px;
    font-weight: 700;
    border-bottom: 1px solid rgba(198, 255, 74, .14);
  }
  .nav-link::before {
    inset: 0;
    clip-path: polygon(14px 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
  }
  .nav-item--cta { display: block; }
}

@media (max-width: 560px) {
  .site-header { padding-block: 10px; }
  .brand-mark { width: 38px; height: 38px; font-size: 13px; }
  .brand-name { font-size: 17px; }
  .header-actions .btn--primary { padding: 0 14px; font-size: 13px; }
}

/* ---------- 8. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 7vw, 96px);
  background-color: var(--pitch);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(198, 255, 74, .085) 1px, transparent 0),
    linear-gradient(180deg, rgba(18, 48, 42, .6) 0%, rgba(11, 31, 23, 1) 58%);
  background-size: 24px 24px, 100% 100%;
  color: var(--cream);
  overflow: hidden;
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--lime) 0 34%, var(--orange) 34% 52%, var(--mid) 52% 100%);
}
.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 2fr);
  gap: clamp(32px, 5vw, 72px);
  padding-block: clamp(48px, 6vw, 80px) clamp(32px, 4vw, 48px);
}
.footer-brand { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.brand--footer { color: var(--cream); }
.footer-intro { font-size: 14.5px; line-height: 1.8; color: var(--cream-70); max-width: 36ch; }
.footer-stat {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--lime);
}
.footer-stat .num { font-size: 15px; }

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
}
.footer-col { min-width: 0; }
.footer-title {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-pitch);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--lime);
  line-height: 1.2;
}
.footer-list li + li { margin-top: 2px; }
.footer-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 14.5px;
  color: var(--cream-70);
  transition: color .18s var(--ease), transform .18s var(--ease);
}
.footer-link:hover { color: var(--lime); transform: translateX(3px); }
.footer-link--sm { min-height: 34px; font-size: 13px; color: var(--cream-45); }

.footer-contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px 32px;
  padding-block: 26px;
  border-top: 1px solid rgba(243, 239, 228, .12);
}
.footer-contact-item { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; font-size: 13.5px; }
.footer-label {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--lime);
}
.footer-value {
  font-family: var(--font-mono);
  font-size: 13.5px;
  letter-spacing: .01em;
  color: var(--cream-70);
  word-break: break-word;
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  padding-block: 20px 36px;
  border-top: 1px solid rgba(243, 239, 228, .12);
  font-size: 12.5px;
  color: var(--cream-45);
}
.footer-copy { font-size: 12.5px; }
.footer-legal-list { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer-icp { font-family: var(--font-mono); letter-spacing: .04em; font-size: 12.5px; }

@media (max-width: 900px) {
  .footer-inner { grid-template-columns: minmax(0, 1fr); }
  .footer-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-base { flex-direction: column; align-items: flex-start; }
}

/* ---------- 9. 通用组件 ---------- */
.card {
  position: relative;
  padding: clamp(20px, 2.4vw, 28px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.card--pitch {
  background: var(--stand);
  color: var(--cream);
  border-color: var(--line-pitch);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .04em;
  color: var(--muted);
}
.breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb li + li::before { content: "/"; color: var(--mid); }
.breadcrumb a { color: var(--mid); transition: color .18s var(--ease); }
.breadcrumb a:hover { color: var(--orange-ink); }
.section--pitch .breadcrumb,
.section--stand .breadcrumb { color: var(--cream-45); }
.section--pitch .breadcrumb a,
.section--stand .breadcrumb a { color: var(--lime); }

/* 图片容器基础规则（页面阶段放置 <img> 即可） */
.media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background-color: var(--stand);
  background-image: linear-gradient(145deg, #12302A 0%, #0B1F17 100%);
  border: 1px solid var(--line-pitch);
  border-radius: var(--radius);
}
.media > img,
.media > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media > picture { display: block; width: 100%; height: 100%; }
.media > picture img { width: 100%; height: 100%; object-fit: cover; }
.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, rgba(198, 255, 74, .3) 1px, transparent 0);
  background-size: 16px 16px;
  opacity: .22;
  mix-blend-mode: screen;
}
.media--wide { aspect-ratio: 21 / 9; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--square { aspect-ratio: 1 / 1; }
.media--tall { aspect-ratio: 3 / 4; }
.media--blank { background-image: linear-gradient(145deg, #14342C 0%, #0B1F17 70%); }
.media--slant { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 32px), calc(100% - 32px) 100%, 0 100%); }
.media-caption {
  display: block;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .02em;
  color: var(--muted);
}

/* 标签页 */
.tablist {
  position: relative;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 2px solid rgba(30, 95, 75, .22);
  scrollbar-width: thin;
}
.tab {
  position: relative;
  flex: 0 0 auto;
  min-height: 46px;
  padding: 0 18px;
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--muted);
  transition: color .18s var(--ease);
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); }
.tab:focus-visible { outline-offset: -2px; }
.tab-ink {
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 3px;
  background: var(--lime);
  pointer-events: none;
  transition: transform .22s var(--ease), width .22s var(--ease);
}
.tabpanel { padding-top: clamp(20px, 2.4vw, 32px); }
.tabpanel[hidden] { display: none; }
.section--pitch .tablist,
.section--stand .tablist { border-bottom-color: var(--line-pitch); }
.section--pitch .tab,
.section--stand .tab { color: var(--cream-45); }
.section--pitch .tab[aria-selected="true"],
.section--stand .tab[aria-selected="true"] { color: var(--cream); }

/* ---------- 10. 动效与无障碍 ---------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .32s var(--ease), transform .32s var(--ease);
  transition-delay: calc(var(--reveal-i, 0) * 60ms);
  will-change: opacity, transform;
}
html.js [data-reveal="in"] { opacity: 1; transform: none; will-change: auto; }

@keyframes tabfade { from { opacity: 0; } to { opacity: 1; } }
.tabpanel { animation: tabfade .18s var(--ease); }

@media (max-width: 860px) {
  .grid--2, .grid--3 { grid-template-columns: minmax(0, 1fr); }
  .grid--bento { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@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;
  }
  html.js [data-reveal] { opacity: 1; transform: none; transition-delay: 0ms; }
  .tabpanel { animation: none; }
  .btn:hover, .footer-link:hover, .brand:hover .brand-mark { transform: none; }
}
