/* =========================================================
   新利全站 · 共享样式 /assets/site.css
   奶油纸底 + 墨黑数据层 + 红金强调 + 冷青蓝辅助
   ========================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
}

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

ul, ol { padding: 0; list-style: none; }

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

button { font: inherit; color: inherit; background: none; border: 0; }

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

table { border-collapse: collapse; }

/* ---------- 2. 变量 ---------- */
:root {
  --cream: #F7F2E8;
  --ink: #1A1512;
  --ink-deep: #0D0B09;
  --red: #D7263D;
  --gold: #D9A441;
  --teal: #2E7F8F;
  --paper: #E8E0D2;
  --warm: #8C8179;
  --rust: #E4572E;
  --glass: rgba(255, 255, 255, 0.72);

  --rule: rgba(26, 21, 18, 0.14);
  --rule-strong: rgba(26, 21, 18, 0.32);
  --on-dark: rgba(232, 224, 210, 0.82);
  --on-dark-soft: rgba(232, 224, 210, 0.62);
  --line-dark: rgba(232, 224, 210, 0.16);

  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --mono: "Roboto Mono", "SFMono-Regular", Menlo, Consolas, "Courier New", monospace;

  --wrap: 1240px;
  --gut: clamp(16px, 4vw, 40px);
  --header-h: 72px;
  --radius: 2px;
}

/* ---------- 3. 基础中文排版 ---------- */
body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--cream);
  background-image:
    linear-gradient(rgba(26, 21, 18, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 21, 18, 0.045) 1px, transparent 1px);
  background-size: 64px 64px, 64px 64px;
  background-position: -1px -1px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.01em;
  color: var(--ink);
}

h1 { font-size: clamp(28px, 4.2vw, 46px); }
h2 { font-size: clamp(22px, 2.8vw, 32px); }
h3 { font-size: clamp(17px, 1.8vw, 21px); }
h4 { font-size: 16px; }

p { text-wrap: pretty; }

::selection { background: var(--red); color: #fff; }

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}
.site-footer :focus-visible { outline-color: var(--gold); }

#main-content { display: block; scroll-margin-top: 104px; }
#main-content:focus { outline: none; }

/* ---------- 4. 工具类 ---------- */
.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: 0.04em;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.section { padding: clamp(32px, 5vw, 64px) 0; }

.rule-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--warm);
  margin-bottom: 18px;
}
.rule-label::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--rule-strong);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--red);
}

.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  line-height: 1.6;
  padding: 3px 8px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--rule-strong);
}
.tag--red { background: var(--red); color: #fff; border-color: var(--red); }
.tag--gold { background: var(--gold); color: var(--ink-deep); border-color: var(--gold); }
.tag--teal { background: rgba(46, 127, 143, 0.12); color: var(--teal); border-color: rgba(46, 127, 143, 0.4); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn--solid { background: var(--ink); color: var(--cream); }
.btn--solid:hover { background: var(--red); border-color: var(--red); }
.btn--outline:hover { background: var(--ink); color: var(--cream); }
.btn--quiet { border-color: var(--rule-strong); color: var(--teal); }
.btn--quiet:hover { border-color: var(--teal); background: rgba(46, 127, 143, 0.08); }

/* 面包屑 */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 14px 0;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--warm);
}
.breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--rule-strong);
}
.breadcrumb a:hover { color: var(--red); }

/* 栅格 */
.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
}
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* 面板：实色层与玻璃层并置 */
.panel {
  background: #fff;
  border: 1px solid var(--rule);
  padding: clamp(16px, 2vw, 24px);
}
.panel--glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  backdrop-filter: blur(10px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

/* 数据表 */
.data-table { width: 100%; font-size: 14px; }
.data-table th {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--warm);
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--ink);
}
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule);
  font-variant-numeric: tabular-nums;
}
.data-table tbody tr { transition: background-color 0.18s ease; }
.data-table tbody tr:hover { background: var(--glass); }
.data-table .num { font-family: var(--mono); text-align: right; }

/* 图片容器（页面阶段放图） */
.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--paper);
  border: 1px solid var(--rule);
}
.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(215, 38, 61, 0.16), transparent 46%);
}
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--portrait { aspect-ratio: 3 / 4; }
.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--dark { background: var(--ink-deep); border-color: rgba(217, 164, 65, 0.3); }
.media-frame__caption {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 1;
  padding: 8px 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--cream);
  background: linear-gradient(90deg, rgba(13, 11, 9, 0.86), rgba(13, 11, 9, 0));
}

/* 正文连续阅读 */
.prose {
  max-width: 72ch;
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink);
}
.prose p + p { margin-top: 14px; }
.prose h2 { margin: 32px 0 12px; font-size: 22px; }
.prose h3 { margin: 24px 0 10px; font-size: 18px; }
.prose ul { margin: 12px 0; display: grid; gap: 8px; }
.prose li { position: relative; padding-left: 18px; }
.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  width: 6px;
  height: 2px;
  background: var(--red);
}
.prose a {
  color: var(--rust);
  padding-bottom: 1px;
  background-image: linear-gradient(var(--rust), var(--rust));
  background-size: 0 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.25s ease;
}
.prose a:hover { background-size: 100% 1px; }

/* ---------- 5. 页头 ---------- */
.skip-link {
  position: absolute;
  left: 10px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--cream);
  font-size: 13px;
  font-weight: 700;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 10px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(247, 242, 232, 0.88);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 2px solid var(--ink);
  transition: box-shadow 0.25s ease;
}
.site-header[data-scrolled] { box-shadow: 0 12px 28px rgba(13, 11, 9, 0.12); }

.header-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gut);
  min-height: var(--header-h);
}

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

.brand-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}
.brand-glyph {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  background: var(--ink-deep);
  color: var(--cream);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.02em;
}
.brand-glyph::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--red);
}
.brand-text { display: flex; flex-direction: column; }
.brand-name {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: var(--ink);
  transition: color 0.2s ease;
}
.brand-sub {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--warm);
  line-height: 1.4;
}
.brand-mark:hover .brand-name { color: var(--red); }

.brand-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 14px;
  border-left: 1px solid var(--rule-strong);
}
.status-pill {
  padding: 3px 8px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.status-index {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--warm);
  white-space: nowrap;
}
.status-index .mono { color: var(--ink); font-weight: 700; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--ink);
  background: var(--glass);
  cursor: pointer;
}
.nav-toggle-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
}
.nav-toggle-bars {
  position: relative;
  display: block;
  width: 16px;
  height: 10px;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--ink);
  transition: transform 0.25s ease;
}
.nav-toggle-bars::before { top: 0; }
.nav-toggle-bars::after { bottom: 0; }
.site-header[data-open] .nav-toggle-bars::before { transform: translateY(4px) rotate(45deg); }
.site-header[data-open] .nav-toggle-bars::after { transform: translateY(-4px) rotate(-45deg); }
.site-header[data-open] .nav-toggle { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.site-header[data-open] .nav-toggle-bars::before,
.site-header[data-open] .nav-toggle-bars::after { background: var(--cream); }

.site-nav { display: flex; align-items: center; }
.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-list a {
  display: block;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
  border: 1px solid transparent;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.nav-list a:hover {
  background: var(--glass);
  border-color: var(--rule-strong);
  color: var(--red);
}
.nav-list a[aria-current="page"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}
.nav-list a[aria-current="page"]::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 7px;
  vertical-align: 1px;
  background: var(--gold);
}

.header-strip { display: none; }

/* ---------- 6. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 8vw, 110px);
  background: var(--ink-deep);
  color: var(--on-dark);
  border-top: 3px solid var(--red);
  overflow: hidden;
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(217, 164, 65, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(217, 164, 65, 0.07) 1px, transparent 1px);
  background-size: 48px 48px, 48px 48px;
}
.footer-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(36px, 5vw, 64px) var(--gut) 22px;
}

.footer-masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 18px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line-dark);
}
.footer-mark {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--cream);
  transition: color 0.2s ease;
}
.footer-mark:hover { color: var(--gold); }
.footer-tagline {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--on-dark-soft);
}
.footer-mono {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
  padding: clamp(26px, 3vw, 42px) 0;
}
.footer-col { min-width: 0; }

.footer-heading {
  position: relative;
  margin-bottom: 14px;
  padding-bottom: 9px;
  font-size: 11px;
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}
.footer-heading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 22px;
  height: 2px;
  background: var(--red);
}

.footer-links { display: grid; gap: 8px; }
.footer-links a {
  display: inline-block;
  padding-bottom: 2px;
  font-size: 13.5px;
  color: var(--on-dark);
  background-image: linear-gradient(var(--gold), var(--gold));
  background-size: 0 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.25s ease, color 0.2s ease;
}
.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--cream);
  background-size: 100% 1px;
}

.footer-contact { display: grid; gap: 11px; }
.footer-contact-item { display: grid; gap: 2px; }
.footer-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--warm);
}
.footer-value {
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(232, 224, 210, 0.88);
  word-break: break-word;
}
.footer-value--mono { font-family: var(--mono); letter-spacing: 0.04em; }

.footer-text {
  font-size: 13px;
  line-height: 1.9;
  color: var(--on-dark-soft);
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line-dark);
}
.footer-copy,
.footer-note {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(232, 224, 210, 0.55);
}

/* ---------- 7. 进度线与显现 ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 120;
  width: 100%;
  height: 3px;
  pointer-events: none;
  background: transparent;
}
.scroll-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--gold));
}

.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.has-js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 8. 响应式 ---------- */
@media (max-width: 1080px) {
  .brand-status { display: none; }
  .nav-list a { padding: 8px 9px; font-size: 12.5px; }
}

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

  .header-shell { gap: 12px; }
  .brand-sub { letter-spacing: 0.16em; }

  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    max-height: 0;
    padding: 0 var(--gut);
    overflow: hidden;
    visibility: hidden;
    background: var(--glass);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    backdrop-filter: blur(16px) saturate(150%);
    border-bottom: 2px solid var(--ink);
    box-shadow: 0 18px 40px rgba(13, 11, 9, 0.14);
    transition: max-height 0.34s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.34s;
  }
  .site-header[data-open] .site-nav {
    max-height: min(72vh, 460px);
    overflow-y: auto;
    visibility: visible;
  }
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px 0 12px;
  }
  .nav-list a {
    padding: 13px 4px;
    font-size: 14.5px;
    border-bottom: 1px dashed var(--rule);
  }
  .nav-list a:hover { background: transparent; border-color: var(--rule); color: var(--red); }
  .nav-list a[aria-current="page"] {
    background: transparent;
    border-color: var(--rule);
    color: var(--red);
    box-shadow: inset 3px 0 0 var(--red);
    padding-left: 12px;
  }

  .header-strip {
    display: block;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    background: rgba(232, 224, 210, 0.6);
    border-top: 1px solid var(--rule);
    scrollbar-width: thin;
  }
  .strip-list {
    display: flex;
    align-items: stretch;
    min-width: max-content;
    padding: 0 var(--gut);
  }
  .strip-list a {
    display: block;
    padding: 9px 14px 8px;
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: 0.1em;
    color: var(--ink);
    white-space: nowrap;
    border-right: 1px dashed var(--rule);
    transition: color 0.2s ease, background-color 0.2s ease;
  }
  .strip-list li:first-child a { border-left: 1px dashed var(--rule); }
  .strip-list a:hover { color: var(--red); background: var(--glass); }

  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .footer-mono { margin-left: 0; }
  .grid--2,
  .grid--3 { grid-template-columns: 1fr; }
  .media-frame--wide { aspect-ratio: 16 / 9; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-base { flex-direction: column; align-items: flex-start; }
}

/* ---------- 9. 降低动效 ---------- */
@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;
    transition-delay: 0ms !important;
  }
  .has-js [data-reveal] { opacity: 1; transform: none; }
}
