/* ==========================================================================
   BSPORT赛事 · 共享样式 /assets/site.css
   夜航蓝 / 深墨绿 / 荧光青柠 / 电光橙 / 奶油纸
   ========================================================================== */

:root {
  --navy: #071A2B;
  --forest: #0E2B25;
  --stand: #0B0F12;
  --lime: #C8FF3D;
  --orange: #FF6A2B;
  --cream: #F3E9D2;
  --brown: #2B1D16;
  --sage: #6F8378;
  --mist: #9FB7AD;
  --gold: #B88A44;
  --alert: #FF5A5F;

  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --fs-11: 0.6875rem;
  --fs-12: 0.75rem;
  --fs-14: 0.875rem;
  --fs-16: 1rem;
  --fs-18: 1.125rem;
  --fs-20: 1.25rem;
  --fs-24: 1.5rem;
  --fs-28: 1.75rem;
  --fs-36: 2.25rem;
  --fs-48: 3rem;
  --fs-72: 4.5rem;
  --fs-128: 8rem;

  --header-h: 88px;
  --gutter: clamp(1rem, 3vw, 2.5rem);
  --maxw: 1320px;
  --cut: 18px;
}

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

* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
}

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--fs-16);
  line-height: 1.7;
  color: var(--mist);
  background-color: var(--navy);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

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

ul,
ol { list-style: none; }

h1, h2, h3, h4, h5 {
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.01em;
  color: var(--cream);
}

p { overflow-wrap: anywhere; }

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

/* ---------- container ---------- */
.container {
  width: 100%;
  max-width: calc(var(--maxw) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow { max-width: calc(820px + var(--gutter) * 2); }

/* ---------- main offset (fixed header) ---------- */
main { padding-top: var(--header-h); }
main[data-overlay-hero] { padding-top: 0; }

/* ---------- skip link ---------- */
.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 300;
  display: inline-block;
  padding: 0.7rem 1.15rem;
  font-size: var(--fs-14);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #08160A;
  background: var(--lime);
  transform: translateY(-130%);
  transition: transform 0.22s ease;
}

.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--cream);
  outline-offset: -4px;
}

/* ==========================================================================
   头部
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  color: var(--cream);
  background-color: transparent;
  background-image: linear-gradient(180deg, rgba(7, 26, 43, 0.94) 0%, rgba(7, 26, 43, 0.72) 48%, rgba(7, 26, 43, 0) 100%);
  transition: background-color 0.35s ease, box-shadow 0.35s ease;
}

.site-header[data-scrolled="true"] {
  background-color: var(--navy);
  background-image: none;
  box-shadow: 0 1px 0 rgba(200, 255, 61, 0.16), 0 22px 44px -34px rgba(0, 0, 0, 0.95);
}

/* 顶部刻度条 */
.header__rail {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 32px;
  max-height: 34px;
  padding-block: 0.35rem;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage);
  border-bottom: 1px solid rgba(159, 183, 173, 0.14);
  transition: max-height 0.32s ease, opacity 0.28s ease, padding 0.32s ease, border-color 0.32s ease;
}

.site-header[data-scrolled="true"] .header__rail {
  max-height: 0;
  padding-block: 0;
  opacity: 0;
  border-bottom-color: transparent;
}

.rail__tick {
  width: 22px;
  height: 6px;
  flex: 0 0 auto;
  background-image: repeating-linear-gradient(90deg, rgba(159, 183, 173, 0.55) 0 1px, transparent 1px 5px);
}

.rail__label { white-space: nowrap; }

.rail__meter {
  flex: 1 1 auto;
  height: 3px;
  min-width: 24px;
  background-image: repeating-linear-gradient(90deg, rgba(159, 183, 173, 0.28) 0 1px, transparent 1px 9px);
}

.rail__label--live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--lime);
}

.rail__label--live::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--lime);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

/* 主条 */
.header__bar {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.75rem);
  min-height: 56px;
  padding-block: 0.4rem;
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex: 0 0 auto;
  color: var(--cream);
  text-decoration: none;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #08160A;
  background: var(--lime);
  clip-path: polygon(0 0, 100% 0, 100% 62%, 62% 100%, 0 100%);
  transition: background-color 0.24s ease;
}

.brand:hover .brand__mark,
.brand:focus-visible .brand__mark { background: var(--orange); }

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.1;
}

.brand__name {
  font-size: var(--fs-16);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--cream);
}

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

.brand--footer .brand__mark {
  width: 40px;
  height: 40px;
  font-size: var(--fs-14);
}

.brand--footer .brand__name { font-size: var(--fs-18); }

/* 移动目录按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.55rem;
  margin-left: auto;
  padding: 0.5rem 0.85rem;
  font-size: var(--fs-12);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--cream);
  border: 1px solid rgba(159, 183, 173, 0.34);
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
  transition: border-color 0.22s ease, color 0.22s ease;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  color: var(--lime);
  border-color: var(--lime);
}

.nav-toggle__bars {
  display: grid;
  gap: 3px;
  width: 16px;
}

.nav-toggle__bars span {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform 0.26s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* 导航 */
.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 1.9rem);
  margin-left: auto;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(0.85rem, 1.7vw, 1.6rem);
}

.site-nav__link {
  position: relative;
  display: inline-block;
  padding: 0.45rem 0;
  font-size: var(--fs-14);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--cream);
  transition: color 0.22s ease;
}

.site-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.1rem;
  width: 0;
  height: 2px;
  background: var(--lime);
  transition: width 0.28s ease;
}

.site-nav__link:hover,
.site-nav__link:focus-visible { color: var(--lime); }

.site-nav__link:hover::after,
.site-nav__link:focus-visible::after { width: 100%; }

.site-nav__link[aria-current="page"] { color: var(--lime); }
.site-nav__link[aria-current="page"]::after { width: 100%; }

.nav-cta { flex: 0 0 auto; }

/* 进度线 */
.header__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(159, 183, 173, 0.14);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.site-header[data-scrolled="true"] .header__progress { opacity: 1; }

.header__progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--lime), var(--orange));
  transition: width 0.12s linear;
}

/* ==========================================================================
   页脚
   ========================================================================== */
.site-footer {
  position: relative;
  padding-block: clamp(2.75rem, 6vw, 4.5rem) 1.75rem;
  font-size: var(--fs-14);
  color: var(--mist);
  background: linear-gradient(180deg, var(--forest) 0%, var(--navy) 62%);
  border-top: 1px solid rgba(200, 255, 61, 0.18);
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(1.75rem, 4vw, 3.5rem);
  padding-bottom: clamp(1.75rem, 4vw, 2.75rem);
  border-bottom: 1px solid rgba(159, 183, 173, 0.18);
}

.footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer__lede {
  margin-top: 1rem;
  max-width: 34ch;
  font-size: var(--fs-14);
  line-height: 1.75;
  color: var(--mist);
}

.footer__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  margin-top: 1.15rem;
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--sage);
}

.footer__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.dot--lime { background: var(--lime); }
.dot--orange { background: var(--orange); }

.footer__title {
  margin-bottom: 0.9rem;
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.footer__list {
  display: grid;
  gap: 0.55rem;
}

.footer__list--contact { gap: 0.7rem; }

.footer__link {
  position: relative;
  font-size: var(--fs-14);
  color: var(--mist);
  transition: color 0.2s ease;
  overflow-wrap: anywhere;
}

.footer__link:hover,
.footer__link:focus-visible { color: var(--lime); }

.footer__contact-item {
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr);
  gap: 0.5rem;
  align-items: baseline;
}

.footer__key {
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--sage);
}

.footer__value {
  font-size: var(--fs-14);
  line-height: 1.6;
  color: var(--cream);
  overflow-wrap: anywhere;
}

.footer__note {
  margin-top: 1.1rem;
  max-width: 42ch;
  font-size: var(--fs-12);
  line-height: 1.75;
  color: var(--sage);
}

.footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.75rem;
  padding-top: 1.5rem;
  font-size: var(--fs-12);
  color: var(--sage);
}

.footer__copy { color: var(--sage); }

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.footer__legal .footer__link {
  font-size: var(--fs-12);
  color: var(--mist);
}

.footer__icp {
  margin-left: auto;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  color: var(--sage);
}

/* ==========================================================================
   通用组件
   ========================================================================== */
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lime);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--lime);
}

.coord {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.18rem 0.55rem;
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--gold);
  background: rgba(184, 138, 68, 0.08);
  border: 1px solid rgba(184, 138, 68, 0.42);
}

.panel-cut {
  --cut: 18px;
  position: relative;
  background: var(--stand);
  clip-path: polygon(
    0 0,
    calc(100% - var(--cut)) 0,
    100% var(--cut),
    100% 100%,
    var(--cut) 100%,
    0 calc(100% - var(--cut))
  );
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.78rem 1.35rem;
  font-family: var(--font-sans);
  font-size: var(--fs-14);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  transition: background-color 0.22s ease, color 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}

.btn:hover,
.btn:focus-visible { transform: translateY(-1px); }

.btn--lime {
  color: #08160A;
  background: var(--lime);
}

.btn--lime:hover,
.btn--lime:focus-visible { background: #DCFF84; }

.btn--orange {
  color: #1A0A03;
  background: var(--orange);
}

.btn--orange:hover,
.btn--orange:focus-visible { background: #FF8C5C; }

.btn--ghost {
  color: var(--cream);
  background: transparent;
  border-color: rgba(159, 183, 173, 0.45);
}

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

.breadcrumb { font-size: var(--fs-12); }

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--sage);
}

.breadcrumb li + li::before {
  content: "/";
  color: var(--gold);
}

.breadcrumb a {
  color: var(--mist);
  transition: color 0.2s ease;
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible { color: var(--lime); }

.breadcrumb [aria-current="page"] { color: var(--cream); }

.grid {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.75rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

/* 图片容器基础规则（页面阶段放置占位/图片） */
.media-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: var(--stand);
  background-image:
    repeating-linear-gradient(90deg, rgba(159, 183, 173, 0.1) 0 1px, transparent 1px 28px),
    linear-gradient(150deg, rgba(14, 43, 37, 0.95), rgba(7, 26, 43, 0.98));
  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: 21 / 9; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--tall { aspect-ratio: 3 / 4; }

/* 滚动显现 */
html.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

html.js-reveal [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 959px) {
  :root { --header-h: 60px; }

  .header__rail { display: none; }

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

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-left: 0;
    max-height: calc(100vh - var(--header-h));
    padding: 0.25rem var(--gutter) 1.5rem;
    overflow-y: auto;
    background: var(--navy);
    border-top: 1px solid rgba(159, 183, 173, 0.22);
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.92);
  }

  .site-nav[data-open="true"] {
    display: flex;
    animation: nav-in 0.28s ease both;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav__list li + li { border-top: 1px solid rgba(159, 183, 173, 0.14); }

  .site-nav__link {
    display: block;
    padding: 0.95rem 0;
    font-size: var(--fs-16);
  }

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

  .site-nav__link[aria-current="page"]::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 2px;
    margin-right: 0.6rem;
    vertical-align: middle;
    background: var(--lime);
  }

  .nav-cta {
    width: 100%;
    margin-top: 1.1rem;
  }

  body[data-nav-open="true"] { overflow: hidden; }
}

@keyframes nav-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 1023px) {
  .footer__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 639px) {
  .footer__grid { grid-template-columns: minmax(0, 1fr); }
  .footer__brand { grid-column: auto; }
  .footer__icp { margin-left: 0; }
  .brand__sub { display: none; }
  .footer__contact-item { grid-template-columns: 3rem minmax(0, 1fr); }
}

@media (max-width: 380px) {
  .nav-toggle__label { display: none; }
}

/* ==========================================================================
   可访问性：减弱动效
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

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

  .site-nav[data-open="true"] { animation: none; }
  .btn:hover { transform: none; }
}
