/* ============================================================
   steady-gouwan.com.cn — 共享样式表 /assets/site.css
   深靛蓝画布 · 暖金描边 · 青瓷绿状态 · 粗野主义硬边
   ============================================================ */

/* ---------- 01. reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body,
h1, h2, h3, h4, h5, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; }
img, svg, video { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; }
a { color: inherit; }
b, strong { font-weight: 700; }
table { border-collapse: collapse; }

/* ---------- 02. 变量 ---------- */
:root {
  --indigo-900: #0B1626;
  --indigo-700: #16294A;
  --indigo-500: #24406E;
  --gold-500: #C9A55C;
  --gold-200: #EBD6A6;
  --jade-500: #5FA08B;
  --jade-200: #BBD8CD;
  --clay-600: #C0643E;
  --paper-100: #F2ECE0;
  --mist-400: #93A2B8;
  --ink-950: #050A12;

  --shell-max: 1240px;
  --pad: 24px;
  --gap: 16px;
  --radius: 4px;

  --hair-gold: rgba(201, 165, 92, 0.34);
  --hair-mist: rgba(147, 162, 184, 0.24);

  --shadow-hard: 6px 6px 0 var(--ink-950);
  --shadow-soft: 6px 6px 0 rgba(5, 10, 18, 0.55);

  --font-display: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, "Courier New", monospace;

  --ease-expo: cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (min-width: 768px) { :root { --pad: 40px; } }
@media (min-width: 1200px) { :root { --pad: 64px; } }

/* ---------- 03. 基础排版 ---------- */
body {
  min-height: 100vh;
  background: var(--indigo-900);
  color: var(--paper-100);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.85;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: 0.01em;
  text-wrap: pretty;
}

p { text-wrap: pretty; }

::selection {
  background: var(--gold-500);
  color: var(--ink-950);
}

/* ---------- 04. 通用工具 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.86em;
  letter-spacing: 0.04em;
}

.index-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1.4;
  color: var(--mist-400);
  text-transform: uppercase;
}

.rule {
  height: 2px;
  border: 0;
  margin: 0;
  background: var(--gold-500);
  opacity: 0.45;
}

/* ---------- 05. 跳转链接 ---------- */
.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 200;
  display: inline-block;
  padding: 10px 18px;
  background: var(--gold-200);
  color: var(--ink-950);
  border: 2px solid var(--ink-950);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--ink-950);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: top 0.18s var(--ease-expo);
}

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

/* ---------- 06. 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--indigo-900);
  border-bottom: 2px solid var(--ink-950);
  transition: box-shadow 0.2s ease;
}

.site-header.is-condensed { box-shadow: 0 10px 28px rgba(5, 10, 18, 0.55); }

.header-top {
  background: var(--indigo-700);
  border-bottom: 1px solid var(--hair-gold);
}

.header-top__inner {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2.4vw, 32px);
  min-height: 58px;
  padding-block: 10px;
  transition: min-height 0.2s ease, padding 0.2s ease;
}

.site-header.is-condensed .header-top__inner {
  min-height: 46px;
  padding-block: 6px;
}

/* 品牌 */
.brand {
  flex: 0 1 auto;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
  color: var(--paper-100);
}

.brand__mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid var(--gold-500);
  border-radius: var(--radius);
  background: var(--indigo-900);
  box-shadow: 3px 3px 0 rgba(5, 10, 18, 0.9);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--gold-200);
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  line-height: 1.2;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.06em;
  color: var(--paper-100);
}

.brand__tagline {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--mist-400);
  transition: opacity 0.2s ease;
}

.site-header.is-condensed .brand__tagline { opacity: 0.55; }

/* 版本信息条 */
.meta-strip {
  display: flex;
  align-items: center;
  gap: clamp(8px, 2vw, 26px);
  margin-left: auto;
}

.meta-strip__item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-left: clamp(8px, 2vw, 26px);
  border-left: 1px solid var(--hair-mist);
}

.meta-strip__label {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--mist-400);
  white-space: nowrap;
}

.meta-strip__value {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--gold-200);
  white-space: nowrap;
}

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  background: var(--indigo-900);
  border: 2px solid var(--gold-500);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 rgba(5, 10, 18, 0.9);
  color: var(--gold-200);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  cursor: pointer;
  transition: background-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

.nav-toggle:hover { background: var(--indigo-500); }

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

.nav-toggle__bars span {
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.2s var(--ease-expo), opacity 0.2s ease;
}

.nav-toggle__label { line-height: 1; }

.nav-toggle[aria-expanded="true"] {
  background: var(--gold-500);
  color: var(--indigo-900);
  box-shadow: 2px 2px 0 rgba(5, 10, 18, 0.9);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* 导航行 */
.header-nav {
  background: var(--indigo-900);
}

.header-nav__inner {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.4vw, 32px);
  min-height: 58px;
}

.primary-nav {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(4px, 1.6vw, 26px);
  list-style: none;
}

.nav-list__link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 2px;
  color: var(--paper-100);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 1.4;
  text-decoration: none;
  border-radius: 2px;
  transition: color 0.14s ease;
}

.nav-list__link::before {
  content: "";
  flex: 0 0 auto;
  width: 3px;
  height: 1.05em;
  background: transparent;
  transition: background-color 0.14s ease;
}

.nav-list__link:hover { color: var(--gold-200); }
.nav-list__link:hover::before { background: var(--indigo-500); }

.nav-list__link[aria-current="page"] {
  color: var(--gold-500);
  font-weight: 700;
}

.nav-list__link[aria-current="page"]::before { background: var(--clay-600); }

.header-cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border: 2px solid var(--gold-500);
  border-radius: var(--radius);
  background: transparent;
  box-shadow: 4px 4px 0 rgba(5, 10, 18, 0.9);
  color: var(--gold-200);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: transform 0.14s var(--ease-expo), box-shadow 0.14s var(--ease-expo), background-color 0.14s ease, color 0.14s ease;
}

.header-cta:hover {
  background: var(--gold-500);
  color: var(--indigo-900);
  transform: translate(-1px, -1px);
  box-shadow: 6px 6px 0 rgba(5, 10, 18, 0.9);
}

/* 移动端：抽屉导航 */
@media (max-width: 900px) {
  .meta-strip { display: none; }

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

  .header-nav__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-height: 0;
  }

  [data-nav] { display: none; }

  [data-nav][data-open="true"] {
    display: block;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    padding-bottom: 6px;
  }

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

  .nav-list__link {
    justify-content: flex-start;
    padding: 13px 4px;
    font-size: 16px;
    border-bottom: 1px solid var(--hair-mist);
    border-radius: 0;
  }

  .nav-list__link::before { height: 1.1em; }

  .nav-list__link[aria-current="page"] { background: rgba(36, 64, 110, 0.45); }

  .primary-nav:not([data-open="true"]) ~ .header-cta { display: none; }

  .header-cta {
    margin: 14px 0 18px;
  }
}

/* ---------- 07. 页脚 ---------- */
.site-footer {
  margin-top: clamp(48px, 7vw, 96px);
  background: var(--indigo-700);
  border-top: 2px solid var(--ink-950);
}

.footer-top {
  background: var(--indigo-900);
  border-bottom: 1px solid var(--hair-gold);
}

.footer-top__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 32px;
  padding-block: clamp(22px, 3vw, 34px);
}

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

.footer-brand__name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 0.08em;
  line-height: 1.2;
  color: var(--paper-100);
}

.footer-brand__claim {
  flex: 1 1 100%;
  max-width: 46ch;
  font-size: 13px;
  line-height: 1.8;
  letter-spacing: 0.02em;
  color: var(--mist-400);
}

.footer-stamp {
  flex: 0 0 auto;
  padding: 7px 13px;
  border: 1px solid rgba(95, 160, 139, 0.5);
  border-radius: 3px;
  background: rgba(95, 160, 139, 0.1);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--jade-200);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(26px, 4vw, 48px);
  padding-block: clamp(32px, 5vw, 56px);
}

@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1000px) {
  .footer-grid { grid-template-columns: 1.1fr 1fr 1.5fr; }
}

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

.footer-col__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  line-height: 1.4;
  color: var(--gold-200);
}

.footer-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link {
  display: inline-block;
  font-size: 14px;
  letter-spacing: 0.04em;
  line-height: 1.7;
  color: var(--paper-100);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.14s ease, border-color 0.14s ease;
}

.footer-link:hover {
  color: var(--gold-200);
  border-bottom-color: var(--gold-200);
}

.footer-col--contact {
  padding-left: 0;
  border-left: 0;
}

@media (min-width: 1000px) {
  .footer-col--contact {
    padding-left: clamp(20px, 3vw, 36px);
    border-left: 1px solid var(--hair-mist);
  }
}

.footer-contact {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-contact__line {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 14px;
  line-height: 1.7;
}

.footer-contact__key {
  flex: 0 0 auto;
  min-width: 46px;
  padding-top: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--mist-400);
}

.footer-contact__val {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--paper-100);
  word-break: break-word;
}

.footer-bottom {
  background: var(--indigo-900);
  border-top: 1px solid var(--hair-mist);
}

.footer-bottom__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 28px;
  padding-block: 18px 22px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--mist-400);
}

.footer-copy { line-height: 1.8; }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  line-height: 1.8;
}

.footer-legal .footer-link {
  font-size: 12px;
  color: var(--mist-400);
}

.footer-legal .footer-link:hover { color: var(--gold-200); }

/* ---------- 08. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border: 2px solid var(--ink-950);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s var(--ease-expo), box-shadow 0.16s var(--ease-expo), background-color 0.16s ease;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--ink-950);
}

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

.btn--gold {
  background: var(--gold-500);
  color: var(--ink-950);
}

.btn--gold:hover { background: var(--gold-200); }

.btn--ghost {
  background: transparent;
  border-color: var(--gold-500);
  box-shadow: var(--shadow-soft);
  color: var(--gold-200);
}

.btn--ghost:hover {
  background: rgba(201, 165, 92, 0.12);
  box-shadow: 8px 8px 0 rgba(5, 10, 18, 0.7);
}

.btn--sm {
  padding: 9px 15px;
  font-size: 13px;
  box-shadow: 4px 4px 0 var(--ink-950);
}

/* ---------- 09. 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid rgba(201, 165, 92, 0.5);
  border-radius: 3px;
  background: rgba(201, 165, 92, 0.08);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.7;
  color: var(--gold-200);
  white-space: nowrap;
}

.tag--jade {
  border-color: rgba(95, 160, 139, 0.6);
  background: rgba(95, 160, 139, 0.16);
  color: var(--jade-200);
}

/* ---------- 10. 面包屑 ---------- */
.breadcrumb { margin-block: 20px 0; }

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.breadcrumb__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--mist-400);
}

.breadcrumb__item + .breadcrumb__item::before {
  content: "/";
  color: rgba(147, 162, 184, 0.5);
}

.breadcrumb__link {
  color: var(--mist-400);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.14s ease, border-color 0.14s ease;
}

.breadcrumb__link:hover {
  color: var(--gold-200);
  border-bottom-color: var(--gold-200);
}

/* ---------- 11. 长文容器 ---------- */
.prose {
  max-width: 34em;
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.85;
  letter-spacing: 0.01em;
  color: var(--paper-100);
}

.prose p { margin-bottom: 1.2em; }

.prose h2,
.prose h3 {
  margin: 1.6em 0 0.6em;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.prose h2 { font-size: clamp(22px, 2.4vw, 28px); }
.prose h3 { font-size: clamp(18px, 1.8vw, 21px); }

.prose ul,
.prose ol {
  margin: 0 0 1.2em;
  padding-left: 1.3em;
}

.prose li { margin-bottom: 0.45em; }

.prose a {
  color: var(--gold-200);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.14s ease, text-decoration-thickness 0.14s ease;
}

.prose a:hover {
  text-decoration-color: var(--gold-500);
  text-decoration-thickness: 3px;
}

.prose strong { color: var(--gold-200); }

/* ---------- 12. 图片容器（页面阶段放置图片） ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 2px solid var(--ink-950);
  border-radius: var(--radius);
  background:
    linear-gradient(115deg, rgba(36, 64, 110, 0.9) 0%, var(--indigo-700) 52%, rgba(22, 41, 74, 0.95) 100%);
  box-shadow: var(--shadow-hard);
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 0%, rgba(201, 165, 92, 0.16) 44%, transparent 68%);
}

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

.media-frame__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-frame__caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  line-height: 1.7;
  color: var(--mist-400);
}

/* ---------- 13. 网格 ---------- */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}

@media (min-width: 960px) {
  .grid--split {
    grid-template-columns: minmax(0, 62fr) minmax(0, 30fr);
    justify-content: space-between;
    gap: clamp(24px, 4vw, 56px);
  }
}

/* ---------- 14. 检索进度线 ---------- */
.scroll-meter {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 120;
  pointer-events: none;
  background: transparent;
}

.scroll-meter__fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--clay-600) 0%, var(--gold-500) 58%, var(--jade-500) 100%);
  transform-origin: left center;
}

/* ---------- 15. 焦点与降级 ---------- */
:focus-visible {
  outline: 3px solid var(--jade-500);
  outline-offset: 3px;
  border-radius: 2px;
}

@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;
  }

  .btn:hover,
  .header-cta:hover {
    transform: none;
  }
}
