/* =====================================================
   星空赛场 · 共享样式  /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, p, ul, ol, li, dl, dd, dt, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img, svg, video { display: block; max-width: 100%; }
svg { height: auto; }
input, select, textarea { font: inherit; }

/* ---------- 2. 变量 ---------- */
:root {
  --ink: #05070F;
  --ink-2: #0A1020;
  --panel: #111C33;
  --line: #223253;
  --white: #E9EEF8;
  --mist: #9AA9C4;
  --gold: #F4C95D;
  --orange: #FF6B2C;
  --cyan: #5FD3FF;
  --paper: #F1E7D0;

  --bar-h: 44px;
  --nav-w: 88px;
  --max: 1200px;

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

  --ease: cubic-bezier(.22, .61, .36, 1);
  --dur: 220ms;
}
@media (max-width: 1023px) {
  :root { --bar-h: 52px; }
}

/* ---------- 3. 页面基底 ---------- */
html { scroll-padding-top: calc(var(--bar-h) + 18px); }
body {
  min-height: 100vh;
  padding-top: var(--bar-h);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  color: var(--white);
  background-color: var(--ink);
  background-image:
    linear-gradient(to right, rgba(34, 50, 83, .42) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(34, 50, 83, .32) 1px, transparent 1px),
    radial-gradient(900px 620px at 82% -6%, rgba(95, 211, 255, .10), transparent 62%),
    radial-gradient(680px 480px at 4% 8%, rgba(244, 201, 93, .075), transparent 60%);
  background-size: 88px 88px, 88px 88px, 100% 100%, 100% 100%;
  background-repeat: repeat, repeat, no-repeat, no-repeat;
  background-attachment: fixed, fixed, fixed, fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@media (min-width: 1024px) {
  body { padding-left: var(--nav-w); }
}

#main-content { display: block; }
#main-content:focus { outline: none; }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
strong { font-weight: 700; color: var(--white); }

::selection { background: rgba(244, 201, 93, .3); color: var(--white); }

:where(a, button, [tabindex], input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* ---------- 4. 跳至主要内容 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  display: inline-block;
  padding: 11px 20px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--ink);
  background: var(--gold);
  border-radius: 2px;
  transform: translateY(-180%);
  transition: transform var(--dur) var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- 5. 顶部状态条 ---------- */
.status-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--bar-h);
  padding: 0 clamp(12px, 2vw, 24px);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--mist);
  background: rgba(5, 7, 15, .93);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.status-bar__coords {
  flex: none;
  color: rgba(154, 169, 196, .78);
}
.status-bar__signal {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  animation: sv-pulse 2.4s var(--ease) infinite;
}
@keyframes sv-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(244, 201, 93, .48); }
  70%  { box-shadow: 0 0 0 8px rgba(244, 201, 93, 0); }
  100% { box-shadow: 0 0 0 0 rgba(244, 201, 93, 0); }
}
.status-bar__readout {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  letter-spacing: .14em;
  color: var(--gold);
}
.status-bar__note {
  flex: none;
  color: rgba(154, 169, 196, .72);
}
.status-bar__progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--orange));
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .12s linear;
}
@media (max-width: 767px) {
  .status-bar { padding-right: 62px; letter-spacing: .1em; }
  .status-bar__coords,
  .status-bar__note { display: none; }
}

/* ---------- 6. 移动菜单按钮 ---------- */
.nav-toggle {
  position: fixed;
  top: 4px;
  right: 6px;
  z-index: 120;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--white);
  background: rgba(17, 28, 51, .72);
  border: 1px solid var(--line);
  border-radius: 2px;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.nav-toggle:hover { border-color: var(--gold); color: var(--gold); }
.nav-toggle__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform var(--dur) 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); }
@media (min-width: 1024px) {
  .nav-toggle { display: none; }
}

/* ---------- 7. 框架式竖排导航 ---------- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 110;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: min(84vw, 340px);
  height: 100dvh;
  padding: 20px 18px 26px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: linear-gradient(178deg, #0B1224 0%, #05070F 62%, #0A1020 100%);
  border-right: 1px solid var(--line);
  box-shadow: 28px 0 70px rgba(0, 0, 0, .62);
  transform: translateX(-103%);
  visibility: hidden;
  transition: transform var(--dur) var(--ease), visibility var(--dur) var(--ease);
}
.site-nav[data-open] {
  transform: translateX(0);
  visibility: visible;
}
@media (max-width: 1023px) {
  html.nav-open,
  html.nav-open body { overflow: hidden; }
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.nav__mark { flex: none; width: 26px; height: 26px; color: var(--gold); }
.nav__wordmark { display: flex; flex-direction: column; line-height: 1.25; }
.nav__brand-name { font-size: 15px; font-weight: 700; letter-spacing: .16em; }
.nav__brand-sub { font-family: var(--mono); font-size: 9.5px; letter-spacing: .24em; color: var(--mist); }

.nav__list { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; }
.nav__item { display: flex; }
.nav__link {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 11px 10px;
  color: var(--mist);
  border-left: 2px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.nav__link:hover {
  color: var(--white);
  background: rgba(17, 28, 51, .62);
  border-left-color: var(--cyan);
}
.nav__link[aria-current="page"] {
  color: var(--gold);
  background: rgba(244, 201, 93, .07);
  border-left-color: var(--gold);
}
.nav__num {
  flex: none;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  color: rgba(154, 169, 196, .62);
  transition: color var(--dur) var(--ease);
}
.nav__link:hover .nav__num { color: var(--cyan); }
.nav__link[aria-current="page"] .nav__num { color: var(--gold); }
.nav__label { font-size: 15px; letter-spacing: .06em; }

.nav__actions {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.nav__cta {
  display: block;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--white);
  background: rgba(17, 28, 51, .6);
  border: 1px solid var(--line);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav__cta:hover { color: var(--cyan); border-color: var(--cyan); }
.nav__cta--gold { color: var(--ink); background: var(--gold); border-color: var(--gold); }
.nav__cta--gold:hover { color: var(--ink); background: #FFD97A; border-color: #FFD97A; }

@media (min-width: 1024px) {
  .site-nav {
    top: var(--bar-h);
    bottom: 0;
    width: var(--nav-w);
    height: auto;
    align-items: center;
    gap: 20px;
    padding: 24px 0 18px;
    overflow-x: hidden;
    overflow-y: auto;
    box-shadow: none;
    transform: none;
    visibility: visible;
    scrollbar-width: thin;
  }
  .nav__brand {
    flex-direction: column;
    gap: 10px;
    width: 100%;
    padding-bottom: 16px;
  }
  .nav__wordmark { align-items: center; }
  .nav__brand-name {
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-size: 13px;
    letter-spacing: .24em;
  }
  .nav__brand-sub { display: none; }
  .nav__list { align-items: center; gap: 4px; margin-top: 0; }
  .nav__link {
    flex-direction: column;
    gap: 7px;
    width: auto;
    padding: 8px 4px;
    border-left: 0;
    border-top: 2px solid transparent;
    background: none;
  }
  .nav__link:hover { background: none; border-top-color: var(--cyan); }
  .nav__link[aria-current="page"] { background: none; border-top-color: var(--gold); }
  .nav__num { font-size: 9.5px; }
  .nav__label {
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: .2em;
  }
  .nav__actions {
    justify-items: center;
    gap: 8px;
    margin-top: 8px;
    padding-top: 14px;
  }
  .nav__cta { width: 62px; min-height: 0; padding: 9px 4px; font-size: 11px; letter-spacing: .02em; line-height: 1.4; }
}

/* ---------- 8. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(64px, 9vw, 128px);
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(180deg, rgba(10, 16, 32, .92) 0%, #05070F 46%, #070C18 100%);
  border-top: 1px solid var(--line);
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: clamp(120px, 22vw, 300px);
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--orange));
}
.site-footer::after {
  content: "";
  position: absolute;
  top: -150px;
  right: -130px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(95, 211, 255, .11), transparent 66%);
  pointer-events: none;
}
.footer__inner {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin-inline: auto;
  padding: clamp(44px, 6vw, 82px) clamp(20px, 4vw, 56px) 26px;
}
.footer__top { display: grid; gap: clamp(32px, 4vw, 56px); }
@media (min-width: 900px) {
  .footer__top { grid-template-columns: minmax(240px, 1fr) 1.5fr; }
}
.footer__brand { display: flex; flex-direction: column; gap: 14px; }
.footer__mark { display: block; width: 30px; height: 30px; color: var(--gold); }
.footer__mark svg { width: 100%; }
.footer__brandline { font-size: 19px; font-weight: 700; letter-spacing: .1em; }
.footer__summary {
  max-width: 34ch;
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--mist);
}
.footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 26px 20px;
}
.footer__group { min-width: 0; }
.footer__title {
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .26em;
  color: var(--gold);
  text-transform: uppercase;
}
.footer__links { display: grid; gap: 10px; }
.footer__links a {
  position: relative;
  display: inline-block;
  font-size: 14px;
  color: var(--mist);
  transition: color var(--dur) var(--ease);
}
.footer__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform var(--dur) var(--ease);
}
.footer__links a:hover { color: var(--white); }
.footer__links a:hover::after { transform: scaleX(1); }

.footer__contact {
  margin-top: clamp(34px, 5vw, 54px);
  padding-top: clamp(22px, 3vw, 32px);
  border-top: 1px dashed rgba(34, 50, 83, .95);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(196px, 1fr));
  gap: 18px 28px;
}
.contact-item { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.contact-item__label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .24em;
  color: rgba(154, 169, 196, .82);
}
.contact-item__value {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.7;
  letter-spacing: .02em;
  color: var(--white);
  overflow-wrap: anywhere;
}
.footer__note {
  margin-top: 22px;
  padding: 13px 16px;
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--mist);
  background: rgba(255, 107, 44, .06);
  border-left: 2px solid var(--orange);
}
.footer__bottom {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  color: rgba(154, 169, 196, .85);
}
.footer__icp { flex: none; }
.footer__copy { flex: none; }

/* ---------- 9. 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--white);
  background: rgba(17, 28, 51, .62);
  border: 1px solid var(--line);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:hover { color: var(--cyan); border-color: var(--cyan); transform: translateY(-2px); }
.btn--gold { color: var(--ink); background: var(--gold); border-color: var(--gold); }
.btn--gold:hover { color: var(--ink); background: #FFD97A; border-color: #FFD97A; }
.btn--ghost { background: transparent; }
.btn--sm { min-height: 44px; padding: 0 16px; font-size: 12.5px; }

/* ---------- 10. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--mist);
}
.breadcrumb__list { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.breadcrumb__item { display: flex; align-items: center; gap: 8px; }
.breadcrumb__item a { color: var(--mist); transition: color var(--dur) var(--ease); }
.breadcrumb__item a:hover { color: var(--gold); }
.breadcrumb__item [aria-current="page"] { color: var(--gold); }
.breadcrumb__sep { color: rgba(154, 169, 196, .45); }

/* ---------- 11. 章节 / 正文 / 图片容器 ---------- */
.section { position: relative; padding-block: clamp(48px, 7vw, 104px); }
.section--band { background: var(--ink-2); }
.section--panel { background: linear-gradient(180deg, rgba(17, 28, 51, .72), rgba(10, 16, 32, .92)); }
.section__index {
  display: block;
  font-family: var(--mono);
  font-size: clamp(40px, 7vw, 96px);
  line-height: .9;
  letter-spacing: -.03em;
  color: rgba(34, 50, 83, .95);
}
.section__label {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .28em;
  color: var(--mist);
}

.prose {
  max-width: 68ch;
  font-size: 16.5px;
  line-height: 1.85;
  color: #C8D3E8;
}
.prose > * + * { margin-top: 1.05em; }
.prose h2 {
  margin-top: 1.7em;
  font-size: clamp(22px, 2.6vw, 30px);
  color: var(--white);
}
.prose h3 {
  margin-top: 1.4em;
  font-size: 18px;
  font-weight: 600;
  color: var(--white);
}
.prose ul { display: grid; gap: .55em; }
.prose ul li { position: relative; padding-left: 18px; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .8em;
  width: 7px;
  height: 1px;
  background: var(--gold);
}
.prose a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.prose a:hover { color: var(--gold); }

.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(135deg, rgba(17, 28, 51, .95), rgba(5, 7, 15, .98));
  border: 1px solid var(--line);
}
.media-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(to right, rgba(34, 50, 83, .5) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(34, 50, 83, .5) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: .5;
  pointer-events: none;
}
.media-frame__img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame--wide { aspect-ratio: 16 / 9; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-caption {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--mist);
}

/* ---------- 12. 工具类 ---------- */
.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 56px);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 13. 减少动效 ---------- */
@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;
  }
}
