/* ============================================================
   必博看台 · 全站共享样式 /assets/site.css
   框架式导航 + 看台记分板 + 档案资料卡
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

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

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

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

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

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

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

/* ---------- 2. tokens ---------- */
:root {
  /* 色彩体系 */
  --ink: #0E1B2A;
  --panel: #16273A;
  --orange: #FF6B2C;
  --orange-mist: #FF9A64;
  --teal: #2EC4B6;
  --teal-pale: #7ED9D1;
  --sand: #F2C14E;
  --white: #E8EDF2;
  --muted: #9FB0C0;
  --line: #4A5D6E;
  --fog: #DCE6EE;

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

  /* 结构 */
  --frame-w: 248px;
  --container: 1160px;
  --gap: clamp(16px, 2.2vw, 28px);
  --section-y: clamp(44px, 6vw, 88px);
  --radius: 3px;
}

@media (min-width: 1024px) and (max-width: 1280px) {
  :root { --frame-w: 218px; }
}

/* ---------- 3. base ---------- */
body {
  min-height: 100vh;
  background-color: var(--ink);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.8;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--white);
}

strong { font-weight: 700; color: var(--white); }

::selection { background: var(--orange); color: #10161D; }

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

html.nav-open { overflow: hidden; }

/* ---------- 4. 排版工具 ---------- */
.display {
  font-size: clamp(32px, 4.6vw, 52px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.display--sm { font-size: clamp(26px, 3.2vw, 34px); }

.focus-number {
  font-family: var(--font-mono);
  font-size: clamp(46px, 7.4vw, 76px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--sand);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  display: block;
}

.focus-number--orange { color: var(--orange); }
.focus-number--teal { color: var(--teal); }

.lead {
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.85;
  color: var(--white);
  max-width: 62ch;
}

.field-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: 0.02em;
}

.muted { color: var(--muted); }

.rule {
  height: 1px;
  border: 0;
  background: var(--line);
  margin: 0;
}

.stack > * + * { margin-top: clamp(14px, 1.8vw, 24px); }

/* ---------- 5. 布局容器 ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(18px, 3vw, 48px);
}

.section { padding-block: var(--section-y); }

.section--panel {
  background-color: var(--panel);
  border-block: 1px solid var(--line);
}

.section--fog {
  background-color: var(--fog);
  color: var(--ink);
  --muted: #4E6577;
  --line: #B6C6D3;
  --panel: #EEF3F7;
  border-block: 1px solid #B6C6D3;
}

.section--fog h1,
.section--fog h2,
.section--fog h3,
.section--fog h4,
.section--fog strong { color: var(--ink); }

.section--fog .field-label { color: #47606F; }

.grid {
  display: grid;
  gap: var(--gap);
}

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

@media (max-width: 1080px) {
  .grid--asym { grid-template-columns: 1fr 1.6fr; }
}

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

/* 看台阶梯错位：偶数卡整体下沉 */
@media (min-width: 881px) {
  .grid--offset > *:nth-child(even) { transform: translateY(18px); }
  .grid--offset > *:nth-child(3n) { transform: translateY(34px); }
}

/* ---------- 6. 资料卡 / 面板 ---------- */
.card {
  position: relative;
  display: block;
  padding: clamp(18px, 2vw, 26px);
  background-color: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 26px;
  height: 3px;
  background: var(--teal);
  opacity: 0;
  transition: opacity 0.18s ease;
}

a.card:hover,
a.card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--teal);
}

a.card:hover::before,
a.card:focus-visible::before { opacity: 1; }

.card--flat { background-color: transparent; }
.card--flat:hover { transform: none; }

.card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.card__title {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.card__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.card__text {
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
  margin: 0;
}

.panel {
  display: block;
  padding: clamp(18px, 2vw, 28px);
  background-color: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* ---------- 7. 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.08em;
  color: var(--muted);
  white-space: nowrap;
}

.tag--orange { color: var(--orange); border-color: rgba(255, 107, 44, 0.6); }
.tag--teal { color: var(--teal); border-color: rgba(46, 196, 182, 0.6); }
.tag--sand { color: var(--sand); border-color: rgba(242, 193, 78, 0.6); }

.tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- 8. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-align: center;
  transition: background-color 0.18s ease, color 0.18s ease,
              border-color 0.18s ease, transform 0.18s ease;
}

.btn--primary {
  background-color: var(--orange);
  border-color: var(--orange);
  color: #10161D;
}

.btn--primary:hover {
  background-color: var(--orange-mist);
  border-color: var(--orange-mist);
  transform: translateY(-2px);
}

.btn--ghost {
  border-color: var(--line);
  color: var(--white);
}

.btn--ghost:hover {
  border-color: var(--teal);
  color: var(--teal-pale);
  transform: translateY(-2px);
}

.btn--block { width: 100%; }

/* ---------- 9. 面包屑 ---------- */
.crumbs {
  padding-block: 16px;
  border-bottom: 1px solid var(--line);
}

.crumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.crumbs__item { display: inline-flex; align-items: center; gap: 8px; }

.crumbs__item + .crumbs__item::before {
  content: "/";
  color: var(--line);
}

.crumbs__link {
  color: var(--muted);
  transition: color 0.18s ease;
}

.crumbs__link:hover { color: var(--teal); }

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

/* ---------- 10. 图片容器基础规则 ---------- */
.media-frame {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--panel);
  background-image:
    linear-gradient(155deg, rgba(46, 196, 182, 0.16) 0%, rgba(14, 27, 42, 0) 46%),
    linear-gradient(20deg, rgba(255, 107, 44, 0.14) 0%, rgba(14, 27, 42, 0) 52%);
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(159, 176, 192, 0.16) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(159, 176, 192, 0.16) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}

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

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

.media-frame__caption {
  position: absolute;
  z-index: 2;
  left: 12px;
  bottom: 12px;
  padding: 4px 9px;
  background-color: rgba(14, 27, 42, 0.86);
  border: 1px solid var(--line);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--teal-pale);
}

@media (max-width: 600px) {
  .media-frame--21x9 { aspect-ratio: 16 / 9; }
}

/* ---------- 11. 滚动显现协议 ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.42s ease, transform 0.42s ease;
}

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

/* ---------- 12. skip link ---------- */
.skip-link {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 120;
  padding: 10px 16px;
  background-color: var(--sand);
  color: #10161D;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius);
  transform: translateY(-180%);
  transition: transform 0.18s ease;
}

.skip-link:focus {
  transform: none;
  outline: 2px solid #10161D;
  outline-offset: 2px;
}

/* ---------- 13. 头部框架 ---------- */
.site-header {
  position: relative;
  z-index: 60;
  display: flex;
  flex-direction: column;
  width: 100%;
  background-color: var(--ink);
  border-bottom: 1px solid var(--line);
  overflow: visible;
}

@media (min-width: 1024px) {
  .site-header {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--frame-w);
    border-bottom: 0;
    border-right: 1px solid var(--line);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .site-header::after {
    content: "";
    position: absolute;
    top: 0;
    right: -1px;
    width: 1px;
    height: 160px;
    background: linear-gradient(180deg, var(--orange), rgba(255, 107, 44, 0));
  }
}

/* 品牌区 */
.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
}

@media (min-width: 1024px) {
  .site-header__bar {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 26px 20px 22px;
    border-bottom: 1px solid var(--line);
  }
}

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

.brand__mark {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: linear-gradient(140deg, var(--orange) 0%, var(--orange-mist) 45%, var(--sand) 100%);
  color: #10161D;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

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

.brand__name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.25;
  color: var(--white);
}

.brand__tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  line-height: 1.4;
}

/* 移动导航按钮 */
.nav-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  transition: border-color 0.18s ease, color 0.18s ease;
}

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

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 16px;
  height: 2px;
  background-color: currentColor;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.nav-toggle__bars { position: relative; }

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}

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

.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background-color: 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); }

@media (min-width: 1024px) {
  .nav-toggle { display: none; }
}

/* 导航 */
.site-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 70;
  display: grid;
  gap: 14px;
  padding: 16px;
  background-color: var(--panel);
  border-bottom: 1px solid var(--line);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.site-nav[data-open] {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.site-nav__title { display: none; }

.site-nav__list {
  display: grid;
  gap: 2px;
}

.site-nav__item { min-width: 0; }

.site-nav__link {
  position: relative;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  padding: 10px 12px 10px 14px;
  border-left: 2px solid transparent;
  border-radius: 0 2px 2px 0;
  color: var(--white);
  font-size: 15px;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.site-nav__index {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  transition: color 0.18s ease;
}

.site-nav__label { font-weight: 600; letter-spacing: 0.01em; }

.site-nav__link:hover {
  background-color: rgba(46, 196, 182, 0.1);
  border-left-color: var(--teal);
}

.site-nav__link:hover .site-nav__index { color: var(--teal-pale); }

.site-nav__link[aria-current="page"] {
  background-color: rgba(255, 107, 44, 0.12);
  border-left-color: var(--orange);
  color: #FFFFFF;
}

.site-nav__link[aria-current="page"] .site-nav__index { color: var(--orange); }

.site-nav__cta { margin-top: 4px; }

@media (min-width: 1024px) {
  .site-nav {
    position: static;
    flex: 1 1 auto;
    gap: 8px;
    padding: 22px 12px 18px;
    background-color: transparent;
    border-bottom: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
    align-content: start;
  }

  .site-nav__title { display: block; padding-left: 14px; margin-bottom: 4px; }

  .site-nav__cta { margin-top: 12px; }
}

/* 头部状态区 */
.site-header__status {
  display: none;
}

@media (min-width: 1024px) {
  .site-header__status {
    display: block;
    padding: 20px;
    border-top: 1px solid var(--line);
  }
}

.status-list {
  display: grid;
  gap: 9px;
  margin-bottom: 14px;
}

.status-list__item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--white);
}

.dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.dot--orange { background-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 107, 44, 0.18); }
.dot--teal { background-color: var(--teal); box-shadow: 0 0 0 3px rgba(46, 196, 182, 0.18); }
.dot--sand { background-color: var(--sand); box-shadow: 0 0 0 3px rgba(242, 193, 78, 0.18); }

.status-meta {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

/* ---------- 14. 页脚 ---------- */
.site-footer {
  position: relative;
  background-color: var(--ink);
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding-block: clamp(34px, 5vw, 64px) 26px;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: min(240px, 40%);
  height: 3px;
  background: linear-gradient(90deg, var(--orange) 0%, var(--sand) 52%, var(--teal) 100%);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.5fr;
  gap: clamp(24px, 3.4vw, 56px);
  align-items: start;
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
}

.footer-brand__name {
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 12px;
}

.footer-brand__lines {
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 10px;
}

.footer-brand__note {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--teal);
  margin: 0;
}

.footer-col { min-width: 0; }

.footer-heading {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 14px;
}

.footer-list {
  display: grid;
  gap: 4px;
}

.footer-list__item { min-width: 0; }

.footer-link {
  display: inline-block;
  padding: 5px 0;
  color: var(--white);
  font-size: 15px;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.footer-link:hover {
  color: var(--sand);
  border-bottom-color: var(--sand);
}

.footer-contact {
  display: grid;
  gap: 12px;
}

.footer-contact__row {
  display: grid;
  gap: 3px;
  margin: 0;
}

.footer-contact__key {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-contact__value {
  font-size: 14px;
  line-height: 1.7;
  color: var(--white);
  word-break: break-word;
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 28px;
  margin-top: clamp(28px, 4vw, 48px);
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.footer-base__meta,
.footer-base__legal { margin: 0; }

.footer-base__legal { color: var(--sand); }

/* ---------- 15. 动效降级 ---------- */
@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;
  }

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

  .grid--offset > * { transform: none !important; }
}
