/* ============================================================
   银河服务 · 共享样式 /assets/site.css
   ============================================================ */

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

html { -webkit-text-size-adjust: 100%; }

body, h1, h2, h3, h4, h5, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

:root {
  --ink: #05070F;
  --panel: #0B1226;
  --line: #1E2A44;
  --violet: #6C4CF1;
  --cyan: #3FD8D4;
  --gold: #F2B84B;
  --rock: #8A93A6;
  --cream: #F4F1E8;
  --moss: #7FA88A;
  --clay: #C9795A;
  --rail-w: 240px;
  --topbar-h: 60px;
  --shadow-hard: 6px 6px 0 rgba(0, 0, 0, .55);
  --font-sans: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  padding-top: var(--topbar-h);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.8;
  letter-spacing: .008em;
  color: var(--cream);
  background-color: var(--ink);
  background-image:
    radial-gradient(780px 540px at 6% -10%, rgba(108, 76, 241, .28), transparent 68%),
    radial-gradient(620px 460px at 94% 2%, rgba(63, 216, 212, .12), transparent 72%),
    radial-gradient(900px 700px at 62% 110%, rgba(108, 76, 241, .13), transparent 74%);
  background-repeat: no-repeat;
}

h1, h2, h3, h4 { font-weight: 800; line-height: 1.24; letter-spacing: -.01em; color: var(--cream); }
h1 { font-size: clamp(32px, 5.2vw, 56px); }
h2 { font-size: clamp(24px, 3.2vw, 34px); }
h3 { font-size: clamp(19px, 2.1vw, 23px); }
p { max-width: 68ch; }

a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--gold); }

strong { font-weight: 800; }
code, .mono, kbd { font-family: var(--font-mono); font-size: .92em; letter-spacing: .01em; }

::selection { background: rgba(108, 76, 241, .55); color: var(--cream); }

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

/* ---------------- 通用工具 ---------------- */

.wrap {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 20px;
}

.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: 1fr; }

.kicker {
  display: block;
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--cyan);
}

.note { font-size: 13px; line-height: 1.7; color: var(--rock); max-width: 60ch; }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 24px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--rock);
}
.breadcrumb li { display: flex; align-items: center; gap: 8px; }
.breadcrumb li + li::before { content: "/"; color: rgba(63, 216, 212, .45); }
.breadcrumb a { color: var(--rock); }
.breadcrumb a:hover { color: var(--cyan); }
.breadcrumb [aria-current="page"] { color: var(--cream); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 22px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.btn--gold {
  color: #0B1020;
  background: var(--gold);
  box-shadow: 4px 4px 0 rgba(108, 76, 241, .5);
}
.btn--gold:hover { color: #0B1020; transform: translate(-2px, -2px); box-shadow: 6px 6px 0 rgba(108, 76, 241, .62); }
.btn--ghost {
  color: var(--cream);
  background: transparent;
  border-color: var(--line);
}
.btn--ghost:hover { color: var(--cream); border-color: var(--cyan); background: rgba(63, 216, 212, .08); }

.panel {
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 2px;
  box-shadow: var(--shadow-hard);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--rock);
  border: 1px solid var(--line);
  border-radius: 2px;
  white-space: nowrap;
}
.tag--cyan { color: var(--cyan); border-color: rgba(63, 216, 212, .42); background: rgba(63, 216, 212, .08); }
.tag--gold { color: #0B1020; background: var(--gold); border-color: var(--gold); }
.tag--moss { color: var(--moss); border-color: rgba(127, 168, 138, .48); background: rgba(127, 168, 138, .08); }
.tag--clay { color: var(--clay); border-color: rgba(201, 121, 90, .48); background: rgba(201, 121, 90, .08); }

.media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 2px;
  background:
    linear-gradient(150deg, rgba(108, 76, 241, .3) 0%, rgba(63, 216, 212, .13) 55%, rgba(11, 18, 38, .95) 100%);
  box-shadow: var(--shadow-hard);
}
.media img { width: 100%; height: 100%; object-fit: cover; }
.media--tall { aspect-ratio: 4 / 5; }
.media--square { aspect-ratio: 1 / 1; }
.media__tag {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--cream);
  background: rgba(5, 7, 15, .84);
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
}
.filter-btn {
  appearance: none;
  padding: 7px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--rock);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.filter-btn:hover { color: var(--cream); border-color: var(--cyan); }
.filter-btn[aria-pressed="true"] { color: #0B1020; background: var(--cyan); border-color: var(--cyan); }

[data-filter-item][hidden] { display: none !important; }

/* ---------------- 跳转链接 ---------------- */

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 220;
  padding: 10px 18px;
  font-weight: 700;
  color: #0B1020;
  background: var(--gold);
  border-radius: 2px;
  transform: translateY(-220%);
  transition: transform .18s ease;
}
.skip-link:focus { transform: translateY(0); color: #0B1020; }

/* ---------------- 头部外壳 ---------------- */

.site-header { position: relative; z-index: 80; }

/* 轨道侧栏 */
.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  padding: 20px 0 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(108, 76, 241, .16) 0%, rgba(11, 18, 38, 0) 34%),
    var(--panel);
  z-index: 70;
}
.rail::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background-image: repeating-linear-gradient(90deg, rgba(108, 76, 241, .75) 0 1px, transparent 1px 12px);
  opacity: .6;
}
.rail__brand {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 16px 18px;
  border-bottom: 1px solid var(--line);
}
.rail__close {
  display: none;
  position: relative;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--cream);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
}
.rail__close::before,
.rail__close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 1.5px;
  background: currentColor;
}
.rail__close::before { transform: translate(-50%, -50%) rotate(45deg); }
.rail__close::after { transform: translate(-50%, -50%) rotate(-45deg); }

.rail__foot {
  margin-top: auto;
  padding: 18px 16px 0;
  border-top: 1px solid var(--line);
}
.rail__status {
  margin: 0 0 12px;
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--rock);
  max-width: none;
}
.rail__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  font-size: 13px;
  font-weight: 700;
  color: #0B1020;
  background: var(--gold);
  border-radius: 2px;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .5);
  transition: transform .18s ease, box-shadow .18s ease;
}
.rail__cta::after { content: "→"; font-family: var(--font-mono); }
.rail__cta:hover { color: #0B1020; transform: translate(-1px, -1px); box-shadow: 4px 4px 0 rgba(0, 0, 0, .62); }

/* 品牌块 */
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--cream);
  text-decoration: none;
}
.brand:hover { color: var(--cream); }
.brand__mark {
  position: relative;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(108, 76, 241, .9);
  background: radial-gradient(circle at 32% 28%, rgba(63, 216, 212, .95) 0%, rgba(108, 76, 241, .55) 44%, rgba(11, 18, 38, .9) 72%);
  box-shadow: 0 0 0 4px rgba(108, 76, 241, .12), inset 0 0 8px rgba(63, 216, 212, .5);
}
.brand__mark::after {
  content: "";
  position: absolute;
  inset: -7px -13px;
  border: 1px solid rgba(63, 216, 212, .38);
  border-radius: 50%;
  transform: rotate(-24deg);
}
.brand__type { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.brand__name {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: .02em;
  color: var(--cream);
}
.brand__tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.45;
  letter-spacing: .02em;
  color: var(--rock);
}

/* 侧栏导航 */
.nav { flex: 1 1 auto; padding: 18px 0 10px; }
.nav__kicker {
  margin: 0 0 10px;
  padding: 0 18px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--rock);
  max-width: none;
}
.nav__list { display: flex; flex-direction: column; }
.nav__link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 16px 9px 18px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--rock);
  border-left: 2px solid transparent;
  transition: color .2s ease, background .2s ease, border-color .2s ease, padding-left .2s ease;
}
.nav__link:hover,
.nav__link:focus-visible {
  color: var(--cream);
  background: rgba(108, 76, 241, .18);
  border-left-color: var(--violet);
  padding-left: 24px;
}
.nav__link[aria-current="page"] {
  color: var(--cream);
  background: linear-gradient(90deg, rgba(108, 76, 241, .34), rgba(63, 216, 212, .05));
  border-left-color: var(--gold);
}
.nav__idx {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .06em;
  color: rgba(138, 147, 166, .78);
}
.nav__link[aria-current="page"] .nav__idx { color: var(--gold); }
.nav__txt { min-width: 0; }

/* 遮罩 */
.rail-scrim {
  position: fixed;
  inset: 0;
  z-index: 65;
  background: rgba(3, 5, 12, .72);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
}

/* 顶部操作条 */
.topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--topbar-h);
  padding: 0 14px;
  background: rgba(5, 7, 15, .88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.topbar__brand {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .02em;
  color: var(--cream);
  white-space: nowrap;
}
.topbar__brand:hover { color: var(--cream); }
.topbar__meta {
  display: none;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--rock);
}
.topbar__meta::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 9px rgba(63, 216, 212, .9);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--cream);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease;
}
.nav-toggle:hover { border-color: var(--cyan); background: rgba(63, 216, 212, .08); }
.nav-toggle__bars {
  position: relative;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: background .18s ease;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform .2s ease;
}
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.site-header[data-open] .topbar .nav-toggle__bars { background: transparent; }
.site-header[data-open] .topbar .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.site-header[data-open] .topbar .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

.switch-key {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 8px 15px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  color: #0B1020;
  background: linear-gradient(135deg, var(--gold) 0%, #F7D48C 100%);
  border: 1px solid rgba(242, 184, 75, .7);
  border-radius: 2px;
  box-shadow: 3px 3px 0 rgba(108, 76, 241, .45);
  transition: transform .18s ease, box-shadow .18s ease;
}
.switch-key::before { content: "⇄"; font-family: var(--font-mono); font-size: 13px; }
.switch-key:hover {
  color: #0B1020;
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 rgba(108, 76, 241, .62);
}

/* 滚动进度星轨 */
.scroll-meter {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  pointer-events: none;
  overflow: hidden;
}
.scroll-meter__bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--violet) 0%, var(--cyan) 62%, var(--gold) 100%);
  transition: width .12s linear;
}

/* ---------------- 页脚 ---------------- */

.site-footer {
  position: relative;
  margin-top: 96px;
  border-top: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(11, 18, 38, .96) 0%, rgba(5, 7, 15, 1) 100%);
}
.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 7px;
  background-image: repeating-linear-gradient(90deg, rgba(63, 216, 212, .55) 0 1px, transparent 1px 14px);
  opacity: .55;
}
.site-footer__top {
  display: grid;
  gap: 36px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 46px 20px 36px;
}
.foot-ident { display: flex; flex-direction: column; gap: 14px; }
.foot-ident__note {
  font-size: 13px;
  line-height: 1.75;
  color: var(--rock);
  max-width: 34ch;
}
.foot-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 28px 20px;
}
.foot-col__title {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2em;
  color: var(--cyan);
  max-width: none;
}
.foot-col__list { display: flex; flex-direction: column; gap: 2px; }
.foot-link {
  display: inline-block;
  padding: 3px 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--rock);
  border-bottom: 1px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}
.foot-link:hover { color: var(--cream); border-bottom-color: var(--cyan); }

.foot-contact { display: flex; flex-direction: column; }
.foot-contact__row {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--rock);
  word-break: break-word;
  max-width: none;
}
.foot-contact__key {
  display: inline-block;
  min-width: 46px;
  color: var(--violet);
  letter-spacing: .1em;
}
.foot-contact__note {
  margin: 4px 0 0;
  font-size: 12.5px;
  line-height: 1.75;
  color: rgba(138, 147, 166, .82);
  max-width: 34ch;
}

.foot-legal {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 20px 28px;
  border-top: 1px solid var(--line);
}
.foot-legal__line {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.7;
  letter-spacing: .02em;
  color: var(--rock);
  word-break: break-word;
  max-width: none;
}
.foot-legal__line--dim { color: rgba(138, 147, 166, .66); }
.foot-legal [data-year] { display: inline-block; min-width: 3.4ch; }

/* ---------------- 显现动效 ---------------- */

html.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease;
}
html.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------------- 断点 ---------------- */

@media (max-width: 1023px) {
  .rail {
    width: min(84vw, 320px);
    transform: translateX(-104%);
    transition: transform .26s cubic-bezier(.2, .7, .3, 1);
    box-shadow: none;
  }
  .site-header[data-open] .rail {
    transform: translateX(0);
    box-shadow: 24px 0 64px rgba(0, 0, 0, .66);
  }
  .rail__close { display: block; }
  .site-header[data-open] .rail-scrim { opacity: 1; visibility: visible; }
}

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

@media (min-width: 768px) {
  .wrap { padding-inline: 32px; }
  .site-footer__top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 54px 32px 42px;
    gap: 40px;
  }
  .foot-legal { padding: 20px 32px 30px; }
}

@media (min-width: 1024px) {
  body { padding-left: var(--rail-w); }
  .rail-scrim { display: none; }
  .topbar { left: var(--rail-w); padding: 0 26px; }
  .topbar__brand { display: none; }
  .topbar__meta { display: inline-flex; }
  .nav-toggle { display: none; }
  .switch-key { padding: 9px 18px; }
  :root { --topbar-h: 64px; }
}

@media (min-width: 1100px) {
  .wrap { padding-inline: 40px; }
  .site-footer__top {
    grid-template-columns: 1.05fr 1.95fr 1.1fr;
    padding: 62px 40px 48px;
    gap: 44px;
  }
  .foot-legal { padding: 20px 40px 32px; }
}

/* ---------------- 动效降级 ---------------- */

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