/* ==========================================================================
   贝斯特2255品牌 · 共享站点层  /assets/site.css
   蓝图网格 / 档案标签 / 湖蓝锚点 / 赭石行动 / 粗野主义边框
   ========================================================================== */

/* ---------- 1. 设计变量 ---------- */
:root {
  --ink: #0E1116;
  --paper: #F6F3EC;
  --archive: #E5DFD2;
  --lake: #1F6F8B;
  --deep: #0F4A5F;
  --ochre: #A85B2A;
  --ochre-soft: #C9803F;
  --flag-yellow: #E0AC2B;
  --flag-green: #3E7A4E;
  --flag-red: #B23A2E;
  --cloud: #FFFFFF;
  --mist: #6E7C86;

  --line: 2px solid var(--ink);
  --shadow: 8px 8px 0 var(--ink);
  --shadow-sm: 4px 4px 0 var(--ink);
  --radius: 2px;

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

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --nav-break: 900px;
  --footer-soft: #C8C2B5;
}

/* ---------- 2. 重置与基础排版 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 {
  margin: 0 0 .5em;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -.012em;
  color: var(--ink);
}

h1 { font-size: clamp(34px, 5vw, 68px); line-height: 1.06; letter-spacing: -.03em; }
h2 { font-size: clamp(26px, 3vw, 34px); }
h3 { font-size: clamp(20px, 2.1vw, 24px); }
h4 { font-size: 17px; letter-spacing: 0; }

p { margin: 0 0 1.05em; max-width: 34em; }
p:last-child { margin-bottom: 0; }

a { color: var(--lake); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--deep); }

ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li { margin-bottom: .3em; }

img, svg { max-width: 100%; height: auto; }

::selection { background: var(--flag-yellow); color: var(--ink); }

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

/* ---------- 3. 布局工具 ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.blueprint-grid {
  background-color: var(--paper);
  background-image:
    linear-gradient(to right, rgba(14, 17, 22, .055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(14, 17, 22, .055) 1px, transparent 1px);
  background-size: 48px 48px;
}

.rule {
  height: 0;
  margin: 0;
  border: 0;
  border-top: var(--line);
}

/* ---------- 4. 共享文字组件 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--lake);
}

.eyebrow::before {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  background: var(--flag-yellow);
  border: 1px solid var(--ink);
}

.meta {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: .03em;
  color: var(--mist);
}

.lead {
  max-width: 36em;
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.8;
  color: var(--ink);
}

/* ---------- 5. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
  letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease, color .16s ease;
}

.btn--ochre {
  background: var(--ochre);
  border-color: var(--ink);
  color: var(--cloud);
  box-shadow: var(--shadow-sm);
}

.btn--ochre:hover {
  background: var(--ochre-soft);
  color: var(--cloud);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}

.btn--ghost {
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.btn--ghost:hover {
  background: var(--archive);
  color: var(--ink);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}

.btn--sm {
  padding: 9px 16px;
  font-size: 14px;
}

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

/* ---------- 6. 标签与卡片 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--archive);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.7;
  letter-spacing: .05em;
  white-space: nowrap;
}

.tag--blue {
  background: var(--lake);
  border-color: var(--deep);
  color: var(--cloud);
}

.tag--ochre {
  background: var(--ochre);
  border-color: #7A3F1B;
  color: var(--cloud);
}

.panel {
  padding: clamp(18px, 3vw, 28px);
  border: var(--line);
  border-radius: var(--radius);
  background: var(--cloud);
  box-shadow: var(--shadow);
}

.panel--archive { background: var(--archive); }

.panel--ink {
  background: var(--ink);
  color: var(--paper);
}

.panel--ink h2,
.panel--ink h3,
.panel--ink h4 { color: var(--paper); }

/* ---------- 7. 图片容器（页面阶段放置占位） ---------- */
.figure {
  margin: 0;
  border: var(--line);
  border-radius: var(--radius);
  background: var(--archive);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.figure__media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: var(--archive);
  background-image:
    linear-gradient(135deg, rgba(31, 111, 139, .18), rgba(168, 91, 42, .14)),
    linear-gradient(to right, rgba(14, 17, 22, .12) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(14, 17, 22, .12) 1px, transparent 1px);
  background-size: auto, 40px 40px, 40px 40px;
}

.figure__media > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.figure__caption {
  padding: 10px 14px;
  border-top: var(--line);
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: .02em;
  color: var(--mist);
}

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

/* ---------- 8. 头部 ---------- */
.site-header {
  position: relative;
  z-index: 50;
  background: var(--paper);
}

.skip-link {
  position: absolute;
  top: -80px;
  left: 12px;
  z-index: 200;
  padding: 10px 18px;
  border: 2px solid var(--flag-yellow);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 13px;
  text-decoration: none;
  transition: top .2s ease;
}

.skip-link:focus {
  top: 12px;
  color: var(--paper);
  outline: 2px solid var(--cloud);
  outline-offset: 2px;
}

/* 信息条 */
.topbar {
  background: var(--ink);
  color: var(--paper);
  border-bottom: 1px solid var(--deep);
}

.topbar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 24px;
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 7px var(--gutter);
}

.topbar__item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: .06em;
  color: rgba(246, 243, 236, .82);
}

.topbar__dot {
  display: block;
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  background: var(--flag-yellow);
}

.topbar__item--time { color: rgba(246, 243, 236, .62); }
.topbar__item--icp { white-space: nowrap; }

/* 刊头 */
.masthead {
  border-bottom: var(--line);
  background: var(--paper);
}

.masthead__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(16px, 2.6vw, 28px) var(--gutter);
}

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

.masthead__coord {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: .12em;
  color: var(--mist);
  white-space: nowrap;
}

.masthead__brand { text-align: center; }

.masthead__wordmark {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(26px, 3.6vw, 44px);
  line-height: 1.1;
  letter-spacing: .06em;
  color: var(--ink);
  text-decoration: none;
  transition: color .18s ease;
}

.masthead__wordmark:hover { color: var(--lake); }

.masthead__tagline {
  margin: 7px 0 0;
  max-width: none;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: .08em;
  color: var(--mist);
}

.masthead__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 8px 13px;
  border: var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: .1em;
  cursor: pointer;
}

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

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

.nav-toggle__bars span {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--ink);
  transition: transform .22s ease, opacity .22s ease;
}

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

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

/* 导航 */
.site-nav {
  border-bottom: var(--line);
  background: var(--paper);
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 clamp(2px, 1.4vw, 24px);
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
  list-style: none;
}

.site-nav__item { margin: 0; }

.site-nav__link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 13px 6px 11px;
  border-bottom: 3px solid transparent;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: .01em;
  text-decoration: none;
  transition: color .18s ease, border-color .18s ease, background-color .18s ease;
}

.site-nav__num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .08em;
  color: var(--mist);
  transition: color .18s ease;
}

.site-nav__label { white-space: nowrap; }

.site-nav__link:hover {
  color: var(--lake);
  border-bottom-color: var(--lake);
}

.site-nav__link:hover .site-nav__num { color: var(--lake); }

.site-nav__link[aria-current="page"] {
  color: var(--lake);
  border-bottom-color: var(--lake);
}

.site-nav__link[aria-current="page"] .site-nav__num { color: var(--lake); }

/* ---------- 9. 页脚 ---------- */
.site-footer {
  border-top: 6px solid var(--lake);
  background-color: var(--ink);
  background-image:
    linear-gradient(to right, rgba(246, 243, 236, .05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(246, 243, 236, .05) 1px, transparent 1px);
  background-size: 56px 56px;
  color: var(--paper);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 3fr;
  gap: clamp(28px, 4vw, 60px);
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(36px, 5vw, 64px) var(--gutter) clamp(24px, 3.5vw, 40px);
}

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

.site-footer__wordmark {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.2;
  letter-spacing: .06em;
  color: var(--paper);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color .18s ease, color .18s ease;
}

.site-footer__wordmark:hover {
  color: var(--cloud);
  border-bottom-color: var(--ochre-soft);
}

.site-footer__tagline {
  margin: 10px 0 0;
  max-width: none;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: .08em;
  color: var(--flag-yellow);
}

.site-footer__desc {
  margin: 12px 0 0;
  max-width: 22em;
  font-size: 15px;
  line-height: 1.8;
  color: var(--footer-soft);
}

.site-footer__cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 32px);
}

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

.site-footer__col-title {
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(246, 243, 236, .18);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: .16em;
  color: var(--flag-yellow);
}

.site-footer__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__list-item { margin: 0 0 8px; }

.site-footer__link {
  display: inline-block;
  color: var(--footer-soft);
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.8;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}

.site-footer__link:hover {
  color: var(--paper);
  border-bottom-color: var(--ochre-soft);
}

.site-footer__contact {
  color: var(--footer-soft);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.9;
  letter-spacing: .02em;
  word-break: break-word;
}

.site-footer__legal {
  border-top: 1px solid rgba(246, 243, 236, .16);
  background: rgba(0, 0, 0, .2);
}

.site-footer__legal-text {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 16px var(--gutter) 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.8;
  letter-spacing: .02em;
  color: rgba(246, 243, 236, .6);
}

/* ---------- 10. 滚动进度（脚本注入） ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 2px;
  z-index: 90;
  background: rgba(14, 17, 22, .08);
  pointer-events: none;
}

.scroll-progress__bar {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--lake);
  transform: scaleY(var(--progress, 0));
  transform-origin: top center;
}

/* ---------- 11. 滚动显现 ---------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .4s ease, transform .4s ease;
  transition-delay: var(--reveal-delay, 0ms);
}

html.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 12. 响应式 ---------- */
@media (max-width: 1080px) {
  .masthead__inner { gap: 16px; }
}

@media (max-width: 980px) {
  .masthead__inner {
    grid-template-columns: 1fr auto;
    gap: 14px 20px;
  }
  .masthead__meta { display: none; }
  .masthead__brand { text-align: left; }
  .masthead__actions { justify-content: flex-end; }

  .site-footer__inner { grid-template-columns: 1fr; }
  .site-footer__desc { max-width: 40em; }
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    max-height: 0;
    overflow: hidden;
    border-bottom-width: 0;
    transition: max-height .35s ease;
  }

  .site-header[data-open] .site-nav {
    max-height: 80vh;
    overflow-y: auto;
    border-bottom-width: 2px;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 4px var(--gutter) 10px;
  }

  .site-nav__item { border-bottom: 1px solid var(--archive); }
  .site-nav__item:last-child { border-bottom: 0; }

  .site-nav__link {
    display: flex;
    width: 100%;
    padding: 14px 12px;
    border-bottom: 0;
    border-left: 3px solid transparent;
    font-size: 16px;
  }

  .site-nav__link:hover { background: var(--archive); }

  .site-nav__link[aria-current="page"] {
    border-bottom-color: transparent;
    border-left-color: var(--lake);
    background: rgba(31, 111, 139, .09);
  }
}

@media (max-width: 720px) {
  .site-footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .masthead__inner {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 12px;
  }
  .masthead__brand { text-align: center; }
  .masthead__actions {
    justify-content: center;
    width: 100%;
  }
  .topbar__inner { justify-content: center; gap: 4px 18px; }
  .topbar__item--time { display: none; }
  .figure--tall .figure__media { aspect-ratio: 4 / 5; }
}

@media (max-width: 460px) {
  .site-footer__cols { grid-template-columns: 1fr; }
}

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

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }

  html.js [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .scroll-progress { display: none; }

  .btn:hover,
  .btn:active { transform: none; }
}
