/* ==========================================================
   经典指南 · 共享样式表 /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, h6, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; width: 100%; }

/* ---------- 2. 变量 ---------- */
:root {
  --c-black: #050A10;
  --c-base: #0B1B2B;
  --c-base-2: #10263B;
  --c-steel: #1B3A57;
  --c-mid: #7A8FA6;
  --c-mist: #C9D3DC;
  --c-paper: #F4F0E6;
  --c-orange: #FF6A2A;
  --c-cyan: #5DE0E6;

  --line: rgba(201, 211, 220, 0.16);
  --line-strong: rgba(93, 224, 230, 0.28);
  --line-soft: rgba(201, 211, 220, 0.08);

  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;

  --header-h: 108px;
  --gutter: clamp(16px, 3vw, 32px);
  --section-gap: clamp(48px, 7vw, 96px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 3. 基础排版 ---------- */
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--c-paper);
  background: var(--c-base);
  padding-top: var(--header-h);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: 0.01em;
  color: inherit;
}
h1 { font-size: clamp(34px, 5.6vw, 64px); }
h2 { font-size: clamp(26px, 3.6vw, 44px); }
h3 { font-size: clamp(19px, 2.2vw, 26px); }

strong { font-weight: 700; }

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--c-cyan);
  outline-offset: 2px;
}

#main-content { scroll-margin-top: calc(var(--header-h) + 16px); }

/* ---------- 4. 通用工具 ---------- */
.container {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: 960px; }

.grid { display: grid; gap: clamp(16px, 2.4vw, 28px); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-cyan);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  flex: none;
}

.mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--c-mid);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  color: var(--c-cyan);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.6;
}

.rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin-block: clamp(20px, 3vw, 32px);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- 5. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.2;
  border: 1px solid transparent;
  border-radius: 0;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease);
  white-space: nowrap;
}
.btn--primary {
  background: var(--c-orange);
  color: var(--c-black);
  font-weight: 700;
}
.btn--primary:hover { background: #ff8449; }
.btn--ghost {
  border-color: var(--c-steel);
  color: var(--c-paper);
  background: transparent;
}
.btn--ghost:hover {
  border-color: var(--c-cyan);
  color: var(--c-cyan);
}
.btn--sm {
  padding: 8px 14px;
  font-size: 12.5px;
  letter-spacing: 0.04em;
}

/* ---------- 6. 跳过链接 ---------- */
.skip-link {
  position: fixed;
  left: 12px;
  top: -120px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--c-cyan);
  color: var(--c-black);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: top 0.18s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ---------- 7. 头部框架 ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 120;
  background: var(--c-black);
  color: var(--c-paper);
  border-bottom: 1px solid var(--line-strong);
  box-shadow: 0 12px 32px rgba(5, 10, 16, 0.55);
}

.site-header__bar {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  min-height: 62px;
  padding: 9px var(--gutter);
  max-width: 1600px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: none;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border: 1px solid var(--line-strong);
  color: var(--c-cyan);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  background: linear-gradient(150deg, rgba(93, 224, 230, 0.16), transparent 62%);
}
.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}
.brand__name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--c-paper);
}
.brand__line {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  color: var(--c-mid);
  white-space: nowrap;
}

.site-header__utility {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: var(--c-mid);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.site-header__utility::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: none;
  background: var(--c-orange);
  box-shadow: 0 0 0 3px rgba(255, 106, 42, 0.18);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  margin-left: auto;
}

/* ---------- 8. 导航 ---------- */
.site-nav {
  position: relative;
  background: var(--c-base);
  border-top: 1px solid var(--line-soft);
}
.site-nav__list {
  display: flex;
  align-items: stretch;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.site-nav__list::-webkit-scrollbar { display: none; }
.site-nav__item { flex: 0 0 auto; }
.site-nav__link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 13px clamp(12px, 1.5vw, 22px) 12px;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--c-mist);
  border-right: 1px solid var(--line-soft);
  white-space: nowrap;
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease);
}
.site-nav__item:first-child .site-nav__link { border-left: 1px solid var(--line-soft); }
.site-nav__index {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--c-steel);
  transition: color 0.18s var(--ease);
}
.site-nav__link:hover {
  color: var(--c-paper);
  background: rgba(93, 224, 230, 0.07);
}
.site-nav__link:hover .site-nav__index { color: var(--c-cyan); }
.site-nav__link[aria-current="page"] {
  color: var(--c-paper);
  background: rgba(255, 106, 42, 0.1);
}
.site-nav__link[aria-current="page"] .site-nav__index { color: var(--c-orange); }
.site-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--c-orange);
}
.site-nav__link:focus-visible { outline-offset: -2px; }

/* ---------- 9. 阅读进度 ---------- */
.scroll-progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: rgba(201, 211, 220, 0.1);
  pointer-events: none;
}
.scroll-progress__fill {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--c-cyan), var(--c-orange));
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}

/* ---------- 10. 移动菜单键 ---------- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid var(--c-steel);
  color: var(--c-paper);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
}
.nav-toggle:hover { border-color: var(--c-cyan); color: var(--c-cyan); }
.nav-toggle__bars {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  width: 16px;
  height: 12px;
}
.nav-toggle__bars span {
  display: block;
  height: 1.5px;
  width: 100%;
  background: var(--c-cyan);
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle__label { line-height: 1; }

/* ---------- 11. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: var(--section-gap);
  background: var(--c-black);
  color: var(--c-mist);
  border-top: 1px solid var(--line-strong);
}
.site-footer__inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: clamp(40px, 5.5vw, 72px) var(--gutter) 24px;
}
.site-footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(28px, 4vw, 64px);
}
.site-footer__brand { min-width: 0; }
.site-footer__brandline {
  font-size: clamp(17px, 1.6vw, 20px);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--c-paper);
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.site-footer__lead {
  max-width: 32em;
  font-size: 14px;
  line-height: 1.7;
  color: var(--c-mist);
  margin-bottom: 16px;
}
.site-footer__meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  line-height: 1.9;
  color: var(--c-mid);
}

.footer-nav { min-width: 0; }
.footer-nav__title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-steel);
  margin-bottom: 14px;
}
.footer-nav__list {
  display: grid;
  gap: 9px;
}
.footer-nav__link {
  display: inline-block;
  font-size: 14px;
  color: var(--c-mist);
  transition: color 0.18s var(--ease), transform 0.18s var(--ease);
}
.footer-nav__link:hover { color: var(--c-cyan); transform: translateX(3px); }

.footer-contact { min-width: 0; }
.footer-contact__list {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}
.footer-contact__item {
  display: grid;
  gap: 2px;
}
.footer-contact__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--c-steel);
}
.footer-contact__value {
  font-size: 14.5px;
  color: var(--c-paper);
  word-break: break-word;
}
a.footer-contact__value {
  color: var(--c-cyan);
  border-bottom: 1px solid transparent;
  justify-self: start;
}
a.footer-contact__value:hover { border-bottom-color: var(--c-cyan); }
.footer-contact__note {
  max-width: 34em;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.8;
  letter-spacing: 0.03em;
  color: var(--c-mid);
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 32px;
  margin-top: clamp(32px, 4vw, 52px);
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

/* ---------- 12. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--c-mid);
}
.breadcrumb a { color: var(--c-cyan); }
.breadcrumb a:hover { color: var(--c-orange); }
.breadcrumb__sep { color: var(--c-steel); }

/* ---------- 13. 图片容器基础 ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line-strong);
  background:
    repeating-linear-gradient(90deg, rgba(93, 224, 230, 0.07) 0 1px, transparent 1px 9px),
    var(--c-base-2);
}
.media-frame--wide { aspect-ratio: 16 / 9; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.media-frame:hover > img { transform: scale(1.03); }
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.35;
  background: repeating-linear-gradient(0deg, rgba(5, 10, 16, 0.45) 0 1px, transparent 1px 3px);
}
.media-frame__caption {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  padding: 7px 12px;
  background: rgba(5, 10, 16, 0.85);
  color: var(--c-cyan);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}

/* ---------- 14. 暖白阅读面 ---------- */
.surface-paper {
  background: var(--c-paper);
  color: var(--c-black);
}
.surface-paper .mono { color: #5D6B78; }
.surface-paper .eyebrow { color: #0B6E73; }
.surface-paper .rule { border-top-color: rgba(5, 10, 16, 0.16); }
.surface-paper .tag {
  color: #0B6E73;
  border-color: rgba(11, 110, 115, 0.35);
}
.surface-paper a:focus-visible,
.surface-paper button:focus-visible { outline-color: var(--c-orange); }
.surface-paper .breadcrumb { color: #6B7784; }
.surface-paper .breadcrumb a { color: #0B6E73; }
.surface-paper .breadcrumb__sep { color: #A9B4BE; }

/* ---------- 15. 响应式 ---------- */
@media (max-width: 1100px) {
  .site-header__utility { font-size: 10.5px; }
}

@media (max-width: 900px) {
  :root { --header-h: 64px; }

  .site-header__bar { min-height: 64px; padding-block: 11px; }
  .site-header__utility { display: none; }
  .site-header__actions .btn--ghost { display: none; }
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    background: var(--c-black);
    border-top: 1px solid var(--line-strong);
    border-bottom: 1px solid var(--line-strong);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    box-shadow: 0 24px 48px rgba(5, 10, 16, 0.7);
  }
  .site-header[data-open] .site-nav { display: block; }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    padding: 6px 0;
    overflow-x: visible;
  }
  .site-nav__item { flex: 1 1 auto; }
  .site-nav__link {
    width: 100%;
    padding: 15px var(--gutter);
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
    font-size: 15px;
  }
  .site-nav__item:first-child .site-nav__link { border-left: 0; }
  .site-nav__link[aria-current="page"] { background: rgba(255, 106, 42, 0.12); }
  .site-nav__link[aria-current="page"]::after {
    left: 0;
    right: auto;
    top: 0;
    bottom: 0;
    width: 3px;
    height: auto;
  }

  .site-header[data-open] .nav-toggle__bars span:first-child {
    transform: translateY(4.5px) rotate(45deg);
  }
  .site-header[data-open] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
  .site-header[data-open] .nav-toggle__bars span:last-child {
    transform: translateY(-4.5px) rotate(-45deg);
  }

  .site-footer__top { grid-template-columns: minmax(0, 1fr); }
  .site-footer__bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
  .brand__line { display: none; }
  .brand__mark { width: 34px; height: 34px; font-size: 12px; }
  .site-header__actions .btn--primary { display: none; }
  .footer-nav__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 18px; }
}

@media (min-width: 641px) {
  body { font-size: 17px; }
}

/* ---------- 16. 减少动效 ---------- */
@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;
  }
  .media-frame:hover > img { transform: none; }
  .footer-nav__link:hover { transform: none; }
}
