/* ============================================================
   半岛赛场 · 共享样式表  /assets/site.css
   深夜数据指挥室 × 赛场边线视角
   ============================================================ */

/* ---------- 1. 重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: #071A14; }
body, h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }

/* ---------- 2. 变量 ---------- */
:root {
  --ink-950: #050F0C;
  --ink-900: #071A14;
  --ink-800: #0D2B22;
  --ink-700: #123328;
  --line: #1F3D34;
  --line-soft: rgba(31, 61, 52, .62);

  --silver: #E8ECEA;
  --mist: #A7B3AD;
  --frost: #F7FAF8;

  --grass: #17C964;
  --grass-deep: #0E8F49;
  --grass-dim: rgba(23, 201, 100, .10);
  --grass-line: rgba(23, 201, 100, .45);
  --amber: #F5A524;
  --amber-dim: rgba(245, 165, 36, .10);
  --red: #E5484D;
  --red-dim: rgba(229, 72, 77, .12);
  --yellow: #F4D03F;
  --yellow-dim: rgba(244, 208, 63, .10);

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

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-xl: 34px;
  --shell-max: 1180px;
}

/* ---------- 3. 基础 ---------- */
body {
  min-height: 100vh;
  overflow-x: hidden;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: .01em;
  color: var(--silver);
  background-color: var(--ink-900);
  background-image:
    radial-gradient(circle at 8% -4%, rgba(23, 201, 100, .10), transparent 42%),
    radial-gradient(circle at 96% 104%, rgba(245, 165, 36, .06), transparent 46%);
  background-attachment: fixed;
}

h1, h2, h3, h4 {
  font-family: var(--font-title);
  font-weight: 800;
  line-height: 1.26;
  letter-spacing: .02em;
  color: var(--silver);
}

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

.skip-link {
  position: absolute;
  top: -72px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 240;
  padding: 10px 20px;
  border-radius: 0 0 14px 14px;
  background: var(--grass);
  color: #04170F;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: top .2s ease;
}
.skip-link:focus { top: 0; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 4. 文字层级 ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--grass);
}
.section-head__title { font-size: 28px; }
.lede { font-size: 17px; color: var(--mist); max-width: 62ch; }
.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}
.rot-label {
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .3em;
  color: var(--mist);
  text-transform: uppercase;
}

/* ---------- 5. 容器与网格 ---------- */
.shell {
  width: min(var(--shell-max), 100% - 36px);
  margin-inline: auto;
}
.shell--wide {
  width: min(1380px, 100% - 36px);
  margin-inline: auto;
}
.section { padding: 64px 0; }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.grid { display: grid; gap: 22px; }
.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)); }

/* ---------- 6. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .22s ease, color .22s ease, border-color .22s ease,
              transform .22s ease, box-shadow .22s ease;
}
.btn--primary {
  background: var(--grass);
  color: #04170F;
  box-shadow: 0 12px 28px -16px rgba(23, 201, 100, .95);
}
.btn--primary:hover { background: #22DE73; transform: translateY(-1px); }
.btn--panel {
  background: var(--grass-dim);
  border-color: var(--grass-line);
  color: var(--grass);
}
.btn--panel:hover { background: var(--grass); color: #04170F; transform: translateY(-1px); }
.btn--ghost {
  border-color: var(--line);
  color: var(--silver);
}
.btn--ghost:hover { border-color: var(--grass-line); color: var(--grass); }

/* ---------- 7. 胶囊状态 ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .02);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--mist);
  white-space: nowrap;
}
.pill--grass { color: var(--grass); border-color: var(--grass-line); background: var(--grass-dim); }
.pill--amber { color: var(--amber); border-color: rgba(245, 165, 36, .45); background: var(--amber-dim); }
.pill--red { color: var(--red); border-color: rgba(229, 72, 77, .5); background: var(--red-dim); }
.pill--yellow { color: var(--yellow); border-color: rgba(244, 208, 63, .45); background: var(--yellow-dim); }

/* ---------- 8. 卡片 ---------- */
.card {
  position: relative;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--ink-800), rgba(13, 43, 34, .78));
  transition: border-color .22s ease, transform .22s ease;
}
.card:hover { border-color: var(--grass-line); transform: translateY(-2px); }
.card__title { font-size: 20px; font-weight: 800; }
.card__meta { font-size: 13px; color: var(--mist); }

/* ---------- 9. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--mist);
}
.breadcrumb a { color: var(--mist); text-decoration: none; transition: color .2s ease; }
.breadcrumb a:hover { color: var(--grass); }
.breadcrumb__sep { opacity: .45; }

/* ---------- 10. 图片容器 ---------- */
.figure {
  position: relative;
  display: block;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(150deg, #0F332A, #071A14 72%);
}
.figure::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .45;
  background: repeating-linear-gradient(115deg, rgba(23, 201, 100, .09) 0 1px, transparent 1px 22px);
}
.figure__img {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.figure--16x9 { aspect-ratio: 16 / 9; }
.figure--4x3 { aspect-ratio: 4 / 3; }
.figure--1x1 { aspect-ratio: 1 / 1; }
.figure--3x4 { aspect-ratio: 3 / 4; }
.figure__cap {
  position: absolute;
  left: 14px;
  bottom: 12px;
  z-index: 2;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(5, 15, 12, .74);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--silver);
}

/* ---------- 11. 滚动进度与返回顶部 ---------- */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 200;
  pointer-events: none;
}
.scroll-progress__bar {
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--grass), var(--amber));
}
.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 150;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--ink-800);
  color: var(--silver);
  font-size: 18px;
  line-height: 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .24s ease, transform .24s ease, visibility .24s ease,
              border-color .24s ease, color .24s ease;
}
.to-top.is-active { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { border-color: var(--grass-line); color: var(--grass); }

/* ---------- 12. 入场显现 ---------- */
[data-reveal] {
  --reveal-delay: 0ms;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .52s ease var(--reveal-delay), transform .52s ease var(--reveal-delay);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- 13. 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 26, 20, .93);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.header-shell { padding: 0; }

.masthead {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 18px 0 14px;
  border-bottom: 1px solid var(--line-soft);
}
.masthead-note {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--mist);
}
.masthead-note--start { text-align: left; }
.masthead-note--end { text-align: right; }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-badge {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(150deg, var(--grass), var(--grass-deep));
  color: #04170F;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  box-shadow: 0 0 0 1px rgba(23, 201, 100, .35), 0 14px 30px -18px rgba(23, 201, 100, .95);
}
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name {
  font-family: var(--font-title);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: .1em;
  color: var(--silver);
}
.brand-sub {
  margin-top: 7px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .3em;
  color: var(--mist);
}
.brand:hover .brand-name { color: var(--grass); }

.nav-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px 0 15px;
}
.primary-nav { grid-column: 2; }
.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  color: var(--mist);
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}
.nav-link:hover {
  color: var(--silver);
  background: var(--grass-dim);
  border-color: rgba(23, 201, 100, .3);
}
.nav-link[aria-current="page"] {
  color: var(--grass);
  border-color: var(--grass-line);
  background: var(--grass-dim);
}
.nav-cta { grid-column: 3; justify-self: end; }

.nav-toggle {
  grid-column: 1;
  justify-self: start;
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--silver);
  font-size: 14px;
  font-weight: 600;
}
.nav-toggle__bars { display: grid; gap: 4px; }
.nav-toggle__bars i {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--silver);
  transition: transform .22s ease, opacity .22s ease;
}
.nav-toggle[aria-expanded="true"] { border-color: var(--grass-line); color: var(--grass); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i { background: var(--grass); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- 14. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: 72px;
  border-top: 1px solid var(--line);
  background: var(--ink-950);
  color: var(--mist);
  overflow: hidden;
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--grass) 22%, var(--amber) 64%, transparent);
  opacity: .85;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr .85fr .9fr 1.5fr;
  gap: 34px;
  padding: 56px 0 40px;
}
.footer-logo {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: .1em;
  color: var(--silver);
}
.footer-note {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--mist);
}
.footer-nav__title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--grass);
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
  font-size: 14px;
  color: var(--mist);
  text-decoration: none;
  transition: color .2s ease;
}
.footer-links a:hover { color: var(--grass); }

.footer-contact-list { display: flex; flex-direction: column; gap: 14px; }
.footer-contact-list li { display: flex; flex-direction: column; gap: 3px; }
.footer-key {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--amber);
}
.footer-val {
  font-size: 14px;
  line-height: 1.7;
  color: var(--silver);
  word-break: break-word;
}

.footer-rule { height: 1px; background: linear-gradient(90deg, var(--line), transparent); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 22px 0 10px;
}
.footer-bottom__legal { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.footer-meta { font-size: 13px; color: var(--mist); }
.footer-meta--copy { color: var(--mist); }
.footer-update {
  padding: 0 0 40px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--mist);
  max-width: 78ch;
}

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

@media (max-width: 900px) {
  body { font-size: 16px; }

  .masthead {
    grid-template-columns: 1fr auto 1fr;
    padding: 13px 0 11px;
  }
  .masthead-note { font-size: 10px; letter-spacing: .16em; }
  .brand-name { font-size: 22px; letter-spacing: .08em; }
  .brand-badge { width: 34px; height: 34px; border-radius: 12px; font-size: 12px; }

  .nav-bar {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "toggle cta"
      "nav nav";
    gap: 10px;
    padding: 10px 0 14px;
  }
  .nav-toggle { grid-area: toggle; display: inline-flex; justify-self: start; }
  .nav-cta { grid-area: cta; justify-self: end; font-size: 14px; padding: 9px 16px; }
  .primary-nav {
    grid-area: nav;
    grid-column: auto;
    display: none;
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }
  .primary-nav[data-open] { display: block; animation: navDrop .22s ease both; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-link {
    width: 100%;
    justify-content: flex-start;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 16px;
  }
  .site-header[data-open] { box-shadow: 0 18px 44px -24px rgba(0, 0, 0, .95); }

  .section { padding: 48px 0; }
  .section-head__title { font-size: 23px; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }

  .footer-top { grid-template-columns: 1fr 1fr; gap: 28px; padding: 44px 0 32px; }
  .footer-brand, .footer-contact { grid-column: 1 / -1; }
}

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

@media (max-width: 700px) {
  .masthead { grid-template-columns: 1fr; justify-items: center; gap: 6px; }
  .masthead-note { display: none; }
  .figure { border-radius: var(--r-md); }
  .card { border-radius: var(--r-md); padding: 18px; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .to-top { right: 14px; bottom: 14px; width: 42px; height: 42px; }
}

@media (max-width: 420px) {
  .shell, .shell--wide { width: min(var(--shell-max), 100% - 24px); }
  .brand-name { font-size: 20px; }
  .nav-cta { padding: 8px 13px; font-size: 13px; }
}

/* ---------- 16. 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}
