/* ============================================================
   泛亚CN官网 · 共享外壳样式 /assets/site.css
   依据：赣江夜航深青蓝 + 信号橙 + 校对绿 / 粗野主义速查卡
   ============================================================ */

/* ---------- 1 · Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body,
h1, h2, h3, h4, h5, h6, p,
ul, ol, li, figure, blockquote { margin: 0; padding: 0; }

ul, ol { list-style: none; }

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

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

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

a { color: inherit; text-decoration: none; }

table { width: 100%; border-collapse: collapse; }

/* ---------- 2 · 设计变量 ---------- */
:root {
  --c-night: #082A33;
  --c-deep: #0F3B47;
  --c-cream: #F4E8D0;
  --c-paper: #FBF5E6;
  --c-signal: #FF6B35;
  --c-proof: #38B26B;
  --c-brown: #1A1512;
  --c-rust: #D94A28;
  --c-steel: #8FA6A8;
  --c-shadow: #06181D;

  --line-night: rgba(244, 232, 208, .20);
  --line-ink: rgba(26, 21, 18, .16);
  --ink-soft: rgba(26, 21, 18, .72);
  --paper-soft: rgba(251, 245, 230, .70);
  --paper-dim: rgba(251, 245, 230, .46);

  --font-display: "Roboto Condensed", "Oswald", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "Noto Sans Mono CJK SC", "SFMono-Regular", Consolas, monospace;

  --shell: 1240px;
  --gutter: clamp(16px, 4vw, 44px);
  --shell-pad: clamp(28px, 5vw, 68px);
  --shadow-hard: 6px 6px 0 var(--c-shadow);
  --ease: cubic-bezier(.2, .7, .3, 1);
}

/* ---------- 3 · 基础排版 ---------- */
body {
  background: var(--c-night);
  color: var(--c-paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: .01em;
}

p { overflow-wrap: break-word; }

:focus-visible {
  outline: 3px solid var(--c-signal);
  outline-offset: 3px;
}

::selection {
  background: var(--c-signal);
  color: var(--c-night);
}

/* ---------- 4 · 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .06em;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--c-brown);
  background: var(--c-paper);
  border: 2px solid var(--c-shadow);
  box-shadow: 4px 4px 0 var(--c-shadow);
  transition: transform .16s var(--ease), box-shadow .16s var(--ease),
              background .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease);
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--c-shadow);
}

.btn:active {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 var(--c-shadow);
}

.btn--strong {
  color: var(--c-night);
  background: var(--c-paper);
  border-color: var(--c-shadow);
  box-shadow: 4px 4px 0 var(--c-rust);
}

.btn--strong:hover { box-shadow: 6px 6px 0 var(--c-rust); }

.btn--ghost {
  color: var(--c-paper);
  background: transparent;
  border-color: var(--c-paper);
  box-shadow: 3px 3px 0 rgba(6, 24, 29, .9);
}

.btn--ghost:hover {
  color: var(--c-night);
  background: var(--c-paper);
  box-shadow: 5px 5px 0 rgba(6, 24, 29, .9);
}

.btn--sm {
  padding: 5px 11px;
  font-size: 12px;
  letter-spacing: .08em;
}

/* ---------- 5 · 头部外壳 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  color: var(--c-paper);
  background: rgba(8, 42, 51, .88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 3px solid var(--c-shadow);
  transition: background .25s var(--ease), box-shadow .25s var(--ease);
}

.site-header[data-scrolled="true"] {
  background: var(--c-night);
  box-shadow: 0 14px 0 rgba(6, 24, 29, .28);
}

.skip-link {
  position: absolute;
  left: 14px;
  top: -80px;
  z-index: 200;
  padding: 10px 16px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--c-night);
  background: var(--c-paper);
  border: 2px solid var(--c-shadow);
  box-shadow: 4px 4px 0 var(--c-rust);
  transition: top .18s var(--ease);
}

.skip-link:focus { top: 14px; }

/* ----- 5.1 双栏信息带 ----- */
.strip-band {
  background: var(--c-deep);
  border-bottom: 1px solid var(--c-shadow);
  font-size: 12.5px;
}

.strip-band__inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 8px var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px clamp(16px, 3vw, 36px);
}

.strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.strip--progress {
  padding-left: clamp(16px, 2vw, 26px);
  border-left: 1px solid var(--line-night);
}

.strip__tag {
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--c-brown);
  background: var(--c-paper);
  border: 1px solid var(--c-shadow);
  box-shadow: 2px 2px 0 var(--c-shadow);
  white-space: nowrap;
}

.entry-link {
  padding-bottom: 1px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .02em;
  color: var(--c-paper);
  border-bottom: 2px solid var(--c-rust);
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

.entry-link:hover {
  color: var(--c-signal);
  border-bottom-color: var(--c-signal);
}

.strip__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.strip__cat {
  display: inline-block;
  padding: 2px 9px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--paper-soft);
  border: 1px solid var(--line-night);
  transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}

.strip__cat:hover {
  color: var(--c-paper);
  background: var(--c-night);
  border-color: var(--c-rust);
}

.strip__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--paper-dim);
  white-space: nowrap;
}

.strip__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--paper-soft);
  white-space: nowrap;
}

.progress-track {
  display: block;
  flex: 0 0 auto;
  width: clamp(70px, 12vw, 132px);
  height: 8px;
  background: rgba(6, 24, 29, .78);
  border: 1px solid var(--c-shadow);
}

.progress-fill {
  display: block;
  height: 100%;
  background: var(--c-signal);
}

.progress-value {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--c-signal);
  white-space: nowrap;
}

/* ----- 5.2 导航条 ----- */
.nav-bar {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 10px var(--gutter);
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 34px);
  transition: padding .25s var(--ease);
}

.site-header[data-scrolled="true"] .nav-bar { padding-block: 6px; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  min-width: 0;
}

.brand__mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  line-height: 1;
  color: var(--c-night);
  background: var(--c-paper);
  border: 2px solid var(--c-shadow);
  box-shadow: 3px 3px 0 var(--c-rust);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.22;
  min-width: 0;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .04em;
  color: var(--c-paper);
}

.brand__line {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  color: var(--paper-dim);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--c-paper);
  border: 2px solid var(--c-paper);
  box-shadow: 3px 3px 0 var(--c-shadow);
  transition: background .18s var(--ease), color .18s var(--ease);
}

.nav-toggle:hover { background: rgba(251, 245, 230, .14); }

.nav-toggle[aria-expanded="true"] {
  color: var(--c-night);
  background: var(--c-paper);
}

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 15px;
  height: 2px;
  background: currentColor;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 15px;
  height: 2px;
  background: currentColor;
}

.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after { top: 5px; }

.nav-toggle__text { white-space: nowrap; }

.nav-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  display: none;
  flex-direction: column;
  align-items: stretch;
  padding: 4px var(--gutter) 18px;
  max-height: 70vh;
  overflow-y: auto;
  background: var(--c-night);
  border-top: 1px solid var(--line-night);
  border-bottom: 3px solid var(--c-shadow);
}

.nav-panel[data-open="true"] { display: flex; }

.nav-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.nav-list__item { border-bottom: 1px solid rgba(244, 232, 208, .14); }

.nav-link {
  display: block;
  padding: 14px 4px 14px 12px;
  font-size: 15.5px;
  color: var(--paper-soft);
  border-left: 3px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease);
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--c-paper);
  background: rgba(251, 245, 230, .06);
  border-left-color: var(--c-rust);
}

.nav-link[aria-current="page"] {
  color: var(--c-paper);
  font-weight: 700;
  border-left-color: var(--c-signal);
}

.nav-cta { display: none; }

/* ----- 5.3 阅读刻度 ----- */
.scroll-meter {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  overflow: hidden;
  background: rgba(6, 24, 29, .55);
}

.scroll-meter__fill {
  display: block;
  width: 0;
  height: 100%;
  background: var(--c-signal);
}

/* ---------- 6 · 页脚外壳 ---------- */
.site-footer {
  position: relative;
  padding: clamp(34px, 5vw, 68px) var(--gutter) clamp(20px, 3vw, 34px);
  color: var(--c-paper);
  background-color: var(--c-night);
  background-image:
    linear-gradient(rgba(244, 232, 208, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 232, 208, .045) 1px, transparent 1px);
  background-size: 34px 34px;
  border-top: 4px solid var(--c-shadow);
}

.footer-grid {
  max-width: var(--shell);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3.4vw, 46px);
  padding-bottom: clamp(24px, 3.5vw, 44px);
}

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

.footer-brand {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(20px, 2.4vw, 26px);
  letter-spacing: .04em;
  line-height: 1.2;
  color: var(--c-paper);
}

.footer-brand::after {
  content: "";
  display: block;
  width: 56px;
  height: 5px;
  margin-top: 12px;
  background: var(--c-rust);
}

.footer-col__title {
  margin-bottom: 12px;
  padding-bottom: 9px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: .18em;
  color: var(--c-steel);
  border-bottom: 1px solid var(--line-night);
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-list a,
.footer-list span {
  display: inline-block;
  padding: 5px 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: rgba(251, 245, 230, .86);
  border-bottom: 1px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

.footer-list a:hover {
  color: var(--c-paper);
  border-bottom-color: var(--c-rust);
}

.footer-list--contact span {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .02em;
}

.footer-note {
  max-width: 36ch;
  margin-top: 12px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--paper-soft);
}

.footer-note--mono {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .02em;
  color: var(--paper-dim);
}

.footer-bottom {
  max-width: var(--shell);
  margin: 0 auto;
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 26px;
  border-top: 1px solid var(--line-night);
}

.footer-legal {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--paper-dim);
}

/* ---------- 7 · 移动端固定双按钮 ---------- */
.mobile-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--c-shadow);
  border-top: 3px solid var(--c-shadow);
}

.dock-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .08em;
  color: var(--c-paper);
  background: var(--c-night);
  transition: background .18s var(--ease), color .18s var(--ease);
}

.dock-btn::before {
  content: "";
  width: 9px;
  height: 9px;
  border: 2px solid currentColor;
  border-radius: 50%;
  transition: background .18s var(--ease);
}

.dock-btn[aria-pressed="true"] {
  color: var(--c-night);
  background: var(--c-proof);
}

.dock-btn[aria-pressed="true"]::before { background: var(--c-night); }

/* ---------- 8 · 正文通用容器 ---------- */
.page-shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding: var(--shell-pad) var(--gutter) clamp(46px, 6vw, 96px);
  color: var(--c-brown);
  background: var(--c-cream);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: clamp(18px, 3vw, 34px);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: rgba(26, 21, 18, .58);
}

.breadcrumb__item { display: inline-block; }

.breadcrumb a {
  padding-bottom: 1px;
  color: var(--c-rust);
  border-bottom: 1px solid currentColor;
}

.breadcrumb a:hover { color: var(--c-brown); }

.breadcrumb__sep { color: rgba(26, 21, 18, .28); }

.section { padding-block: clamp(26px, 3.6vw, 54px); }

.section:first-child { padding-top: 0; }

.section + .section { border-top: 1px solid var(--line-ink); }

.section__index {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .2em;
  color: var(--c-rust);
}

.section__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.16;
  letter-spacing: .01em;
  color: var(--c-brown);
}

.lede {
  max-width: 68ch;
  margin-top: 14px;
  font-size: 15.5px;
  line-height: 1.78;
  color: var(--ink-soft);
}

.tag-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-left: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--c-brown);
  border-left: 4px solid var(--c-rust);
}

.grid { display: grid; gap: clamp(14px, 2.2vw, 28px); }

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.grid--3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.slice {
  padding: clamp(16px, 2vw, 26px);
  background: var(--c-paper);
  border: 2px solid var(--c-brown);
  box-shadow: var(--shadow-hard);
}

.stack > * + * { margin-top: 14px; }

/* ---------- 9 · 图片占位容器 ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background-color: var(--c-cream);
  background-image:
    repeating-linear-gradient(0deg, rgba(26, 21, 18, .08) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(90deg, rgba(26, 21, 18, .08) 0 1px, transparent 1px 26px);
  border: 2px solid var(--c-brown);
  box-shadow: var(--shadow-hard);
}

.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame--square { aspect-ratio: 1 / 1; }

.media-frame__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame__cap {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--c-paper);
  background: var(--c-night);
}

/* ---------- 10 · 显现 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 11 · 响应式 ---------- */
@media (max-width: 1000px) {
  .site-footer { padding-bottom: calc(clamp(20px, 3vw, 34px) + 56px); }
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-col--brand { grid-column: 1 / -1; }
  .footer-note { max-width: none; }
}

@media (max-width: 760px) {
  .strip-band__inner {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .strip--progress {
    margin-top: 8px;
    padding-top: 8px;
    padding-left: 0;
    border-left: 0;
    border-top: 1px dashed var(--line-night);
  }

  .strip__meta { display: none; }
}

@media (max-width: 620px) {
  .brand__line { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { justify-content: flex-start; }
}

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

  .nav-cta {
    display: inline-flex;
    margin-left: auto;
  }

  .nav-panel {
    position: static;
    display: flex;
    flex: 1 1 auto;
    flex-direction: row;
    align-items: center;
    padding: 0;
    max-height: none;
    overflow: visible;
    background: transparent;
    border: 0;
  }

  .nav-list {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: clamp(6px, 1.5vw, 22px);
  }

  .nav-list__item { border-bottom: 0; }

  .nav-link {
    padding: 6px 2px 5px;
    font-size: 14px;
    color: rgba(251, 245, 230, .84);
    border-left: 0;
    border-bottom: 2px solid transparent;
    transition: color .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
  }

  .nav-link:hover,
  .nav-link:focus-visible {
    color: var(--c-paper);
    background: transparent;
    border-left-color: transparent;
    border-bottom-color: var(--c-rust);
    transform: translateY(-1px);
  }

  .nav-link[aria-current="page"] {
    color: var(--c-paper);
    font-weight: 700;
    background: transparent;
    border-left-color: transparent;
    border-bottom-color: var(--c-signal);
  }

  .mobile-dock { display: none; }
}

/* ---------- 12 · 降低动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .btn:hover,
  .nav-link:hover {
    transform: none;
  }
}
