/* ==========================================================================
   IM赛场 · 共享站点样式 /assets/site.css
   夜场转播室 × 战术板：极细边界、等宽索引、珠宝色分区
   ========================================================================== */

/* ---------- 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, figure, blockquote, dl, dd, ul, ol {
  margin: 0;
}

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

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

button, input, select, textarea { font: inherit; color: inherit; }

button {
  background: none;
  border: 0;
  cursor: pointer;
}

a { color: inherit; }

/* ---------- 2. 变量 ---------- */
:root {
  /* 珠宝色分区 */
  --c-ink: #071E1A;
  --c-ink-2: #0A2822;
  --c-navy: #0B1B33;
  --c-violet: #1B1530;
  --c-wine: #3B1B24;
  --c-sage: #6F857C;
  --c-mist: #E8F0E9;
  --c-paper: #F5EDD8;
  --c-lime: #C8FF5A;
  --c-orange: #FF7A2F;
  --c-ice: #7FE7D4;

  /* 边界与层级 */
  --line: rgba(232, 240, 233, 0.14);
  --line-mid: rgba(232, 240, 233, 0.24);
  --line-strong: rgba(232, 240, 233, 0.38);

  /* 字体 */
  --f-heading: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --f-body: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --f-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --f-score: "Barlow Condensed", "Roboto Condensed", "Arial Narrow", "Source Han Sans SC", sans-serif;

  /* 尺度 */
  --w-max: 1280px;
  --pad-x: clamp(16px, 4vw, 48px);
  --radius: 2px;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* ---------- 3. 中文排版基底 ---------- */
html, body { min-height: 100%; }

body {
  background-color: var(--c-ink);
  background-image:
    radial-gradient(1100px 520px at 8% -12%, rgba(11, 27, 51, 0.92), transparent 68%),
    radial-gradient(760px 420px at 100% 0%, rgba(27, 21, 48, 0.8), transparent 70%);
  background-repeat: no-repeat;
  color: var(--c-mist);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--f-heading);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.01em;
  color: var(--c-mist);
}

h1 { font-size: clamp(32px, 4.4vw, 52px); line-height: 1.08; }
h2 { font-size: clamp(24px, 2.8vw, 31px); line-height: 1.18; }
h3 { font-size: clamp(19px, 2vw, 22px); line-height: 1.28; }

p { text-wrap: pretty; }

::selection {
  background: var(--c-lime);
  color: var(--c-ink);
}

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--c-ice);
  outline-offset: 3px;
  border-radius: 1px;
}

/* ---------- 4. Skip link ---------- */
.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 999;
  display: inline-block;
  padding: 10px 16px;
  background: var(--c-lime);
  color: var(--c-ink);
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-decoration: none;
  border-radius: var(--radius);
  transition: top 0.18s var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible {
  top: 12px;
  outline: 2px solid var(--c-ice);
  outline-offset: 2px;
}

/* ---------- 5. 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(7, 30, 26, 0.94);
  border-bottom: 1px solid var(--line-mid);
  -webkit-backdrop-filter: blur(10px) saturate(125%);
  backdrop-filter: blur(10px) saturate(125%);
}

.header-frame {
  position: relative;
  width: 100%;
  max-width: var(--w-max);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.masthead {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding-block: clamp(14px, 2.2vw, 20px) clamp(10px, 1.6vw, 14px);
}

.masthead__meta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-family: var(--f-mono);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.16em;
  color: var(--c-sage);
}

.masthead__meta--left { justify-self: start; }
.masthead__meta--right {
  justify-self: end;
  text-align: right;
  color: var(--c-ice);
}

.pulse {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-lime);
  box-shadow: 0 0 0 0 rgba(200, 255, 90, 0.55);
  animation: pulse-ring 2.6s ease-out infinite;
}

@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(200, 255, 90, 0.5); }
  70%  { box-shadow: 0 0 0 7px rgba(200, 255, 90, 0); }
  100% { box-shadow: 0 0 0 0 rgba(200, 255, 90, 0); }
}

.brand {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 2px;
  text-decoration: none;
  color: var(--c-mist);
}

.brand__mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--c-lime);
  border-radius: 1px;
  background: rgba(200, 255, 90, 0.07);
  color: var(--c-lime);
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.brand:hover .brand__mark,
.brand:focus-visible .brand__mark {
  background: var(--c-lime);
  color: var(--c-ink);
}

.brand__name {
  font-size: clamp(20px, 2.3vw, 26px);
  font-weight: 800;
  letter-spacing: 0.07em;
  line-height: 1;
}

/* ---------- 6. 导航 ---------- */
.nav-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  border-top: 1px solid var(--line);
}

.site-nav__list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 2.2vw, 34px);
}

.site-nav a {
  position: relative;
  display: inline-block;
  padding: 14px 2px 12px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-decoration: none;
  color: rgba(232, 240, 233, 0.72);
  transition: color 0.18s var(--ease);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 1px;
  background: var(--c-lime);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.22s var(--ease);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--c-mist);
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
}

.site-nav a[aria-current="page"] {
  color: var(--c-lime);
}

.site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--line-mid);
  border-radius: var(--radius);
  color: var(--c-mist);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  line-height: 1;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
}

.nav-toggle:hover { border-color: var(--c-ice); color: var(--c-ice); }

.nav-toggle__label { display: inline-block; }

.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  width: 16px;
}

.nav-toggle__bars i {
  display: block;
  height: 1px;
  background: currentColor;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

.nav-bar[data-open] .nav-toggle {
  border-color: var(--c-lime);
  color: var(--c-lime);
}

.nav-bar[data-open] .nav-toggle__bars i:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav-bar[data-open] .nav-toggle__bars i:nth-child(2) { opacity: 0; }
.nav-bar[data-open] .nav-toggle__bars i:nth-child(3) { transform: translateY(-4px) rotate(-45deg); }

/* ---------- 7. 滚动进度条（JS 注入） ---------- */
.read-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  overflow: hidden;
  pointer-events: none;
}

.read-progress__bar {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--c-ice), var(--c-lime));
}

/* ---------- 8. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 9vw, 112px);
  background: linear-gradient(180deg, var(--c-ink-2) 0%, var(--c-navy) 100%);
  border-top: 1px solid var(--line-strong);
  color: var(--c-mist);
}

.site-footer::before {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--c-lime) 0%, rgba(200, 255, 90, 0) 34%, rgba(127, 231, 212, 0) 66%, var(--c-ice) 100%);
  opacity: 0.6;
}

.footer-frame {
  width: 100%;
  max-width: var(--w-max);
  margin-inline: auto;
  padding: clamp(32px, 5vw, 56px) var(--pad-x) clamp(20px, 3vw, 28px);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(0, 2.4fr);
  gap: clamp(24px, 4vw, 56px);
  padding-bottom: clamp(24px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(18px, 2vw, 21px);
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
}

.footer-brand__mark {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--c-lime);
  border-radius: 1px;
  color: var(--c-lime);
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1;
}

.footer-brand__line {
  margin-top: 12px;
  max-width: 24ch;
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: rgba(232, 240, 233, 0.62);
}

.footer-region {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--c-ice);
}

.footer-region__key {
  padding-left: 8px;
  border-left: 2px solid var(--c-lime);
  color: rgba(232, 240, 233, 0.5);
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 36px);
}

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

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

.footer-col__title {
  margin: 0 0 14px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  line-height: 1.4;
  color: var(--c-ice);
}

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

.footer-list a {
  position: relative;
  display: inline-block;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(232, 240, 233, 0.74);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

.footer-list a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--c-lime);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.2s var(--ease);
}

.footer-list a:hover,
.footer-list a:focus-visible { color: var(--c-mist); }

.footer-list a:hover::after,
.footer-list a:focus-visible::after { transform: scaleX(1); }

.footer-contact {
  display: grid;
  gap: 10px;
  font-size: 13.5px;
}

.footer-contact__row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}

.footer-contact__key {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  line-height: 1.6;
  color: var(--c-sage);
  text-transform: uppercase;
}

.footer-contact__val {
  color: var(--c-mist);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.footer-contact__note {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line-mid);
  max-width: 44ch;
  font-size: 12.5px;
  line-height: 1.72;
  color: rgba(232, 240, 233, 0.55);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: clamp(20px, 3vw, 28px);
  padding-top: clamp(18px, 2.6vw, 24px);
  border-top: 1px solid var(--line);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  line-height: 1.6;
  color: rgba(232, 240, 233, 0.48);
}

.footer-legal__copy,
.footer-legal__icp,
.footer-legal__region { margin: 0; }

.footer-legal__icp { color: rgba(232, 240, 233, 0.6); }

/* ---------- 9. 正文容器与节奏 ---------- */
.wrap {
  width: 100%;
  max-width: var(--w-max);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.section {
  padding-block: clamp(40px, 6vw, 80px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  margin-bottom: 14px;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--c-ice);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.lede {
  max-width: 62ch;
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.8;
  color: rgba(232, 240, 233, 0.78);
}

.rule {
  height: 1px;
  margin-block: clamp(24px, 4vw, 40px);
  border: 0;
  background: var(--line);
}

/* ---------- 10. 网格 ---------- */
.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 640px) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1000px) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- 11. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  padding: 12px 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: transparent;
  color: var(--c-mist);
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.18s var(--ease), color 0.18s var(--ease),
              border-color 0.18s var(--ease), transform 0.18s var(--ease);
}

.btn--primary {
  border-color: var(--c-lime);
  background: var(--c-lime);
  color: var(--c-ink);
  font-weight: 600;
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: #D8FF87;
  border-color: #D8FF87;
}

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

/* ---------- 12. 面包屑 ---------- */
.breadcrumb {
  padding-block: clamp(18px, 2.4vw, 26px) 0;
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  line-height: 1.6;
  color: rgba(232, 240, 233, 0.5);
}

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

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

.breadcrumb__link {
  text-decoration: none;
  color: rgba(232, 240, 233, 0.66);
  transition: color 0.18s var(--ease);
}

.breadcrumb__link:hover,
.breadcrumb__link:focus-visible { color: var(--c-ice); }

.breadcrumb__item [aria-current="page"] {
  color: var(--c-mist);
}

/* ---------- 13. 图片容器基础规则 ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--c-navy);
  background-image:
    repeating-linear-gradient(45deg, rgba(127, 231, 212, 0.08) 0 1px, transparent 1px 14px),
    radial-gradient(120% 90% at 20% 0%, rgba(27, 21, 48, 0.9), transparent 70%),
    linear-gradient(180deg, rgba(200, 255, 90, 0.06), rgba(127, 231, 212, 0.03));
}

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

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(232, 240, 233, 0.05);
}

.media--wide { aspect-ratio: 21 / 9; }
.media--portrait { aspect-ratio: 4 / 5; }
.media--square { aspect-ratio: 1 / 1; }

/* ---------- 14. 响应式 ---------- */
@media (max-width: 900px) {
  .footer-top { grid-template-columns: minmax(0, 1fr); }
  .footer-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-col--contact { grid-column: 1 / -1; }
  .footer-contact__note { max-width: 60ch; }
}

@media (max-width: 860px) {
  .masthead {
    grid-template-columns: 1fr auto;
    padding-block: 14px 12px;
  }

  .masthead__meta--right { display: none; }

  .brand { justify-self: end; }

  .nav-bar {
    justify-content: flex-end;
    min-height: 56px;
    padding-block: 8px;
  }

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

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 55;
    display: none;
    padding: 6px var(--pad-x) 18px;
    background: var(--c-navy);
    border-bottom: 1px solid var(--line-strong);
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.5);
  }

  .nav-bar[data-open] .site-nav { display: block; }

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

  .site-nav a {
    display: block;
    padding: 15px 0;
    font-size: 13px;
    border-bottom: 1px solid var(--line);
  }

  .site-nav a::after { display: none; }

  .site-nav a[aria-current="page"] {
    padding-left: 11px;
    border-left: 2px solid var(--c-lime);
  }

  .site-nav li:last-child a { border-bottom: 0; }
}

@media (max-width: 640px) {
  body { font-size: 15.5px; }

  .masthead__meta--left { font-size: 10px; letter-spacing: 0.12em; }

  .brand__mark { width: 26px; height: 26px; font-size: 10px; }

  .footer-columns { grid-template-columns: minmax(0, 1fr); }
  .footer-col--contact { grid-column: auto; }

  .footer-legal { justify-content: flex-start; }

  .footer-contact__row { grid-template-columns: 40px minmax(0, 1fr); }

  .btn { width: 100%; }
}

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

/* ---------- 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;
    scroll-behavior: auto !important;
  }

  .pulse { animation: none; box-shadow: none; }
  .read-progress__bar { transition: none; }
}

/* ---------- 16. 打印 ---------- */
@media print {
  .site-header,
  .site-footer,
  .skip-link,
  .read-progress { display: none !important; }

  body {
    background: #fff !important;
    color: #111 !important;
  }

  a { color: #111 !important; text-decoration: underline; }
}
