/* ============================================================
   银河主页 · 共享样式表 /assets/site.css
   深空控制台体系：轨道导航 + 堆叠画板 + 星云渐变
   ============================================================ */

/* ---------- 1. 设计变量 ---------- */
:root {
  --void: #03050F;
  --indigo: #070B1F;
  --panel: #111A3A;
  --panel-hi: #16204A;
  --nebula: #6D4AFF;
  --orbit: #2E4A8F;
  --silver: #D9E2F2;
  --dust: #8C97B8;
  --signal: #FF7A1A;
  --aurora: #4FD1C5;
  --paper: #F7F9FF;

  --font-display: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', serif;
  --font-sans: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', 'SFMono-Regular', monospace;

  --rail-w: 116px;
  --header-h: 64px;
  --shell: 1280px;
  --gutter: clamp(18px, 4vw, 48px);

  --radius-s: 10px;
  --radius-m: 18px;
  --radius-l: 26px;
  --ease: cubic-bezier(.22, .61, .36, 1);

  --read: 0;
}

/* ---------- 2. 重置 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  padding-top: var(--header-h);
  color: var(--silver);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0;
  background-color: var(--indigo);
  background-image:
    radial-gradient(120% 78% at 88% -12%, rgba(109, 74, 255, .20), transparent 62%),
    radial-gradient(92% 70% at -6% 88%, rgba(46, 74, 143, .26), transparent 66%),
    radial-gradient(1.4px 1.4px at 62px 92px, rgba(217, 226, 242, .30), transparent 100%),
    radial-gradient(1px 1px at 224px 168px, rgba(217, 226, 242, .20), transparent 100%),
    radial-gradient(1.6px 1.6px at 318px 56px, rgba(109, 74, 255, .48), transparent 100%);
  background-size: 100% 100%, 100% 100%, 380px 320px, 380px 320px, 380px 320px;
  background-repeat: no-repeat, no-repeat, repeat, repeat, repeat;
  background-attachment: fixed, fixed, scroll, scroll, scroll;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; 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%; height: auto; }

::selection { background: var(--nebula); color: var(--paper); }

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

/* ---------- 3. 跳转链接 ---------- */
.st-skip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 130;
  padding: 12px 22px;
  background: var(--signal);
  color: #1A0D05;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .06em;
  border-radius: 0 0 12px 0;
  transform: translateY(-130%);
  transition: transform .24s var(--ease);
}
.st-skip:focus,
.st-skip:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--paper);
  outline-offset: 2px;
}

/* ---------- 4. 阅读进度带 ---------- */
.st-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 120;
  background: rgba(217, 226, 242, .07);
  pointer-events: none;
}
.st-progress__bar {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(var(--read));
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--nebula) 0%, var(--aurora) 68%, var(--signal) 100%);
  transition: transform .12s linear;
}

/* ---------- 5. 品牌星门标记 ---------- */
.st-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 4px;
  border-radius: var(--radius-s);
  color: var(--paper);
  min-width: 0;
}
.st-brand:focus-visible { outline-offset: 4px; }

.st-brand__gate {
  position: relative;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(109, 74, 255, .85);
  background: radial-gradient(circle at 50% 50%, rgba(109, 74, 255, .34), transparent 68%);
  box-shadow: 0 0 0 4px rgba(109, 74, 255, .10), inset 0 0 12px rgba(109, 74, 255, .45);
}
.st-brand__gate::before {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  border: 1px solid rgba(79, 209, 197, .55);
}
.st-brand__core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 10px var(--signal);
}

.st-brand__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}
.st-brand__name {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--paper);
  white-space: nowrap;
}
.st-brand__sub {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--dust);
  white-space: nowrap;
}

/* ---------- 6. 头部 / 轨道导航 ---------- */
.st-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 clamp(14px, 4vw, 22px);
  color: var(--silver);
  background: linear-gradient(180deg, rgba(7, 11, 31, .985), rgba(13, 20, 46, .96));
  border-bottom: 1px solid rgba(109, 74, 255, .28);
  box-shadow: 0 10px 30px -22px rgba(3, 5, 15, .95);
}

/* 移动导航按钮 */
.st-burger {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(140, 151, 184, .32);
  color: var(--silver);
  font-size: 12px;
  letter-spacing: .14em;
  transition: border-color .24s var(--ease), color .24s var(--ease), background-color .24s var(--ease);
}
.st-burger:hover,
.st-burger:active {
  border-color: rgba(109, 74, 255, .75);
  color: var(--paper);
  background: rgba(109, 74, 255, .14);
}
.st-burger__bars {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 16px;
}
.st-burger__bars i {
  display: block;
  height: 1.5px;
  width: 100%;
  border-radius: 2px;
  background: currentColor;
  transition: transform .32s var(--ease), opacity .2s var(--ease);
}
.st-header[data-open="true"] .st-burger__bars i:first-child { transform: translateY(2.75px) rotate(45deg); }
.st-header[data-open="true"] .st-burger__bars i:last-child { transform: translateY(-2.75px) rotate(-45deg); }
.st-burger__label { white-space: nowrap; }

/* 抽屉 / 轨道导航 */
.st-nav {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 105;
  width: min(82vw, 320px);
  padding: calc(var(--header-h) + 22px) 18px 32px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: linear-gradient(165deg, #131D42 0%, #0A1028 58%, #070B1F 100%);
  border-right: 1px solid rgba(109, 74, 255, .4);
  transform: translateX(-104%);
  visibility: hidden;
  box-shadow: 0 0 0 0 rgba(3, 5, 15, 0);
  transition:
    transform .42s var(--ease),
    box-shadow .42s var(--ease),
    visibility 0s linear .44s;
}
.st-header[data-open="true"] .st-nav {
  transform: translateX(0);
  visibility: visible;
  box-shadow: 0 0 0 100vmax rgba(3, 5, 15, .68);
  transition:
    transform .42s var(--ease),
    box-shadow .42s var(--ease),
    visibility 0s linear 0s;
}

.st-nav__list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.st-nav__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 12px;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: .04em;
  color: rgba(217, 226, 242, .78);
  transition: color .24s var(--ease), background-color .24s var(--ease);
}
.st-nav__link::before {
  content: '';
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(140, 151, 184, .5);
  transition: background-color .24s var(--ease), box-shadow .24s var(--ease), transform .24s var(--ease);
}
.st-nav__link:hover {
  color: var(--paper);
  background: rgba(109, 74, 255, .14);
}
.st-nav__link:hover::before {
  background: var(--aurora);
  box-shadow: 0 0 9px var(--aurora);
  transform: scale(1.25);
}
.st-nav__link[aria-current="page"] {
  color: var(--paper);
  background: linear-gradient(90deg, rgba(109, 74, 255, .26), rgba(109, 74, 255, 0));
}
.st-nav__link[aria-current="page"]::before {
  background: var(--signal);
  box-shadow: 0 0 10px var(--signal);
}
.st-nav__label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

html.is-nav-open { overflow: hidden; }

/* ---------- 7. 桌面端：左侧轨道 ---------- */
@media (min-width: 1024px) {
  body {
    padding-top: 0;
    padding-left: var(--rail-w);
  }

  .st-header {
    right: auto;
    bottom: 0;
    height: auto;
    width: var(--rail-w);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    padding: 24px 10px 20px;
    border-bottom: 0;
    border-right: 1px solid rgba(109, 74, 255, .28);
    background: linear-gradient(180deg, rgba(11, 16, 38, .98), rgba(6, 9, 26, .995));
    box-shadow: 1px 0 0 rgba(3, 5, 15, .7);
  }

  .st-brand {
    flex-direction: column;
    gap: 8px;
    padding: 4px 0;
    text-align: center;
    align-items: center;
  }
  .st-brand__text { align-items: center; }
  .st-brand__name { font-size: 12px; letter-spacing: .1em; }
  .st-brand__sub { font-size: 8px; letter-spacing: .16em; }

  .st-burger { display: none; }

  .st-nav {
    position: static;
    width: 100%;
    margin-top: 26px;
    padding: 0;
    transform: none;
    visibility: visible;
    box-shadow: none;
    border: 0;
    background: none;
    overflow-y: auto;
    overflow-x: hidden;
  }
  .st-header[data-open="true"] .st-nav {
    transform: none;
    box-shadow: none;
  }

  .st-nav__list { gap: 2px; }

  .st-nav__link {
    gap: 6px;
    padding: 9px 5px;
    border-radius: 8px;
    font-size: 12px;
    letter-spacing: .02em;
  }
  .st-nav__link::before { width: 4px; height: 4px; }
  .st-nav__link[aria-current="page"] {
    background: linear-gradient(90deg, rgba(109, 74, 255, .3), rgba(109, 74, 255, 0));
  }
}

/* ---------- 8. 页脚 ---------- */
.st-footer {
  position: relative;
  margin-top: clamp(72px, 10vw, 132px);
  background: linear-gradient(180deg, rgba(7, 11, 31, .55), var(--void) 46%);
  border-top: 1px solid rgba(109, 74, 255, .22);
  color: var(--silver);
  overflow: hidden;
}
.st-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(760px, 88%);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(109, 74, 255, .9), rgba(79, 209, 197, .7), transparent);
}
.st-footer::after {
  content: '';
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -46%;
  height: 62%;
  pointer-events: none;
  background: radial-gradient(58% 100% at 50% 100%, rgba(109, 74, 255, .2), transparent 72%);
}

.st-footer__inner {
  position: relative;
  z-index: 1;
  max-width: var(--shell);
  margin: 0 auto;
  padding: clamp(44px, 7vw, 84px) var(--gutter) clamp(34px, 5vw, 56px);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 5vw, 64px);
}
@media (min-width: 768px) {
  .st-footer__inner { grid-template-columns: 1.1fr 1fr; }
}
@media (min-width: 1024px) {
  .st-footer__inner { grid-template-columns: 1.25fr 1.5fr; }
}

.st-footer__brand { min-width: 0; }

.st-brand.st-brand--footer {
  flex-direction: row;
  gap: 12px;
  align-items: center;
  text-align: left;
  padding: 0;
}
.st-brand--footer .st-brand__text { align-items: flex-start; }
.st-brand--footer .st-brand__name { font-size: 16px; letter-spacing: .14em; }
.st-brand--footer .st-brand__sub { font-size: 9.5px; }
.st-brand--footer .st-brand__gate { width: 34px; height: 34px; }

.st-footer__summary {
  margin-top: 18px;
  max-width: 40ch;
  font-size: 14.5px;
  line-height: 1.85;
  color: rgba(217, 226, 242, .72);
}

.st-footer__contact {
  display: grid;
  gap: 11px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid rgba(217, 226, 242, .1);
}
.st-footer__contact li {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.st-footer__contact .st-mono {
  color: var(--dust);
  font-size: 11px;
  letter-spacing: .16em;
  padding-top: 4px;
}
.st-footer__contact-val {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(217, 226, 242, .84);
  word-break: break-word;
}

.st-footer__nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 22px;
  align-content: start;
}
@media (min-width: 600px) {
  .st-footer__nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.st-footer__col { min-width: 0; }

.st-footer__title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .18em;
  color: var(--paper);
}
.st-footer__title::before {
  content: '';
  width: 14px;
  height: 1px;
  background: var(--signal);
}

.st-footer__links { display: grid; gap: 9px; }

.st-footer__link {
  display: inline-block;
  width: fit-content;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(217, 226, 242, .7);
  transition: color .22s var(--ease), transform .22s var(--ease);
}
.st-footer__link:hover {
  color: var(--paper);
  transform: translateX(3px);
}

.st-footer__base {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(217, 226, 242, .1);
  background: rgba(3, 5, 15, .55);
}
.st-footer__base-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 18px var(--gutter) 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 22px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  color: var(--dust);
}
.st-footer__copy { line-height: 1.7; }
.st-footer__icp { color: rgba(217, 226, 242, .72); }

.st-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}
.st-footer__legal-link {
  color: rgba(217, 226, 242, .68);
  transition: color .22s var(--ease);
}
.st-footer__legal-link:hover { color: var(--aurora); }

/* ---------- 9. 通用排版组件 ---------- */
.st-shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.st-section {
  position: relative;
  padding-block: clamp(52px, 8vw, 96px);
}

.st-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--dust);
}
.st-eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, var(--signal), transparent);
}

.st-display {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.16;
  letter-spacing: -.01em;
  color: var(--paper);
}

.st-title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(20px, 3vw, 30px);
  line-height: 1.42;
  letter-spacing: .12em;
  color: var(--paper);
}

.st-lede {
  max-width: 62ch;
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.85;
  color: rgba(217, 226, 242, .82);
}

.st-mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .1em;
}

.st-accent { color: var(--signal); }

.st-rule {
  height: 1px;
  border: 0;
  margin: 0;
  background: linear-gradient(90deg, rgba(109, 74, 255, .55), rgba(217, 226, 242, .08), transparent);
}

/* ---------- 10. 面板与网格 ---------- */
.st-panel {
  position: relative;
  padding: clamp(22px, 3.6vw, 42px);
  border-radius: var(--radius-l);
  border: 1px solid rgba(109, 74, 255, .2);
  background: linear-gradient(165deg, rgba(17, 26, 58, .95), rgba(9, 14, 34, .95));
  overflow: hidden;
}
.st-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(217, 226, 242, .07);
}

.st-grid {
  display: grid;
  gap: clamp(18px, 3vw, 32px);
}
.st-grid--2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.st-grid--3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.st-grid--split { grid-template-columns: 1fr; }
@media (min-width: 900px) {
  .st-grid--split {
    grid-template-columns: 1.15fr .85fr;
    align-items: start;
  }
}

/* ---------- 11. 按钮 ---------- */
.st-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .08em;
  line-height: 1.4;
  cursor: pointer;
  transition:
    transform .26s var(--ease),
    box-shadow .26s var(--ease),
    background-color .26s var(--ease),
    color .26s var(--ease),
    border-color .26s var(--ease);
}
.st-btn--signal {
  background: linear-gradient(135deg, var(--signal), #FF9A4D);
  color: #1A0D05;
  box-shadow: 0 14px 32px -16px rgba(255, 122, 26, .9);
}
.st-btn--signal:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 38px -16px rgba(255, 122, 26, .95);
}
.st-btn--ghost {
  background: rgba(109, 74, 255, .12);
  color: var(--paper);
  border-color: rgba(109, 74, 255, .52);
}
.st-btn--ghost:hover {
  background: rgba(109, 74, 255, .22);
  border-color: var(--nebula);
  transform: translateY(-2px);
}
.st-btn--quiet {
  background: transparent;
  color: var(--silver);
  border-color: rgba(217, 226, 242, .28);
}
.st-btn--quiet:hover {
  color: var(--paper);
  border-color: var(--silver);
}
.st-btn--sm {
  padding: 9px 16px;
  font-size: 12.5px;
}

/* ---------- 12. 面包屑 ---------- */
.st-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  color: var(--dust);
}
.st-breadcrumb li { display: inline-flex; align-items: center; }
.st-breadcrumb li + li::before {
  content: '/';
  margin-right: 8px;
  color: rgba(140, 151, 184, .5);
}
.st-breadcrumb a {
  color: rgba(217, 226, 242, .74);
  transition: color .2s var(--ease);
}
.st-breadcrumb a:hover { color: var(--aurora); }

/* ---------- 13. 图片容器（页面阶段放置图片） ---------- */
.st-media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-m);
  background:
    radial-gradient(78% 58% at 28% 18%, rgba(109, 74, 255, .36), transparent 70%),
    linear-gradient(160deg, var(--panel-hi), var(--indigo));
}
.st-media::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(217, 226, 242, .08);
  pointer-events: none;
}
.st-media > img,
.st-media > picture,
.st-media > picture > img,
.st-media > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.st-media--wide { aspect-ratio: 16 / 9; }
.st-media--square { aspect-ratio: 1 / 1; }
.st-media--tall { aspect-ratio: 4 / 5; }

.st-media--orbit::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .45;
  background: repeating-radial-gradient(
    circle at 50% 50%,
    transparent 0 38px,
    rgba(109, 74, 255, .28) 38px 39px,
    transparent 39px 78px
  );
}

/* ---------- 14. 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .st-progress__bar { transition: none; }
  .st-nav,
  .st-header[data-open="true"] .st-nav { transition: none; }
  .st-btn--signal:hover,
  .st-btn--ghost:hover,
  .st-footer__link:hover,
  .st-nav__link:hover::before { transform: none; }
}
