/* ==========================================================================
   威利斯人主站 · 共享样式 /assets/site.css
   0. Reset  1. 变量  2. 基础排版  3. 容器与网格  4. 组件  5. 页头  6. 页脚  7. 响应式
   ========================================================================== */

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

html, body, h1, h2, h3, h4, h5, p, ul, ol, li, figure, blockquote, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg, picture { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; width: 100%; }

/* ---------- 2. 变量 ---------- */
:root {
  --ink-900: #0B231E;
  --ink-800: #143A31;
  --ink-700: #1F5445;
  --gold-500: #C9A227;
  --gold-300: #E4CB77;
  --brick: #8C3B2E;
  --paper: #F4EFE4;
  --paper-2: #EAE3D4;
  --graphite: #1A1D1C;
  --mist: #93A29B;
  --cyan: #5FA79B;

  --line-dark: rgba(201, 162, 39, 0.26);
  --line-soft: rgba(147, 162, 155, 0.18);
  --line-light: rgba(26, 29, 28, 0.16);

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

  --shell: 1280px;
  --gutter: clamp(18px, 4vw, 44px);
  --ease: cubic-bezier(.2, .6, .3, 1);
  --dur: 240ms;
}

/* ---------- 3. 基础排版 ---------- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--paper);
  color: var(--graphite);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.85;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

:focus-visible {
  outline: 2px solid var(--gold-300);
  outline-offset: 3px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 12px; top: -80px;
  z-index: 200;
  padding: 12px 20px;
  background: var(--gold-500);
  color: var(--ink-900);
  font-size: 13px;
  letter-spacing: .14em;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 12px; }

/* ---------- 4. 容器 / 网格 / 分区 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section { padding: clamp(56px, 8vw, 120px) 0; }
.section--tight { padding: clamp(36px, 5vw, 68px) 0; }
.section--dark { background: var(--ink-900); color: var(--paper); }
.section--mid { background: var(--ink-800); color: var(--paper); }
.section--paper { background: var(--paper); color: var(--graphite); }
.section--paper2 { background: var(--paper-2); color: var(--graphite); }

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

.span-1 { grid-column: span 1; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-9 { grid-column: span 9; }
.span-10 { grid-column: span 10; }
.span-11 { grid-column: span 11; }
.span-12 { grid-column: span 12; }

.prose { max-width: 34em; font-size: 17px; line-height: 1.85; }
.prose p + p { margin-top: 1.05em; }
.prose strong { color: var(--gold-500); font-weight: 600; }

.num {
  font-family: var(--font-mono);
  font-size: 1.02em;
  letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
}

.rule { height: 1px; border: 0; background: var(--line-dark); }
.section--paper .rule, .section--paper2 .rule { background: var(--line-light); }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .24em;
  color: var(--gold-500);
}
.kicker::before { content: ""; width: 28px; height: 1px; background: currentColor; }

.h-display {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(34px, 6.2vw, 84px);
  line-height: 1.04;
  letter-spacing: -.02em;
}
.h-sub {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(24px, 3.4vw, 42px);
  line-height: 1.16;
  letter-spacing: -.01em;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px 32px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line-dark);
  margin-bottom: clamp(28px, 4vw, 56px);
}
.section--paper .section-head, .section--paper2 .section-head { border-bottom-color: var(--line-light); }
.section-head__note { font-size: 13px; letter-spacing: .06em; color: var(--mist); max-width: 34ch; }

.note-vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 12px;
  letter-spacing: .24em;
  color: var(--mist);
}

.annotation {
  font-size: 12px;
  letter-spacing: .2em;
  color: var(--mist);
}

/* 面包屑 */
.breadcrumb { padding: 16px 0; }
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--mist);
}
.crumbs li { display: flex; align-items: center; gap: 10px; }
.crumbs li + li::before { content: "/"; color: var(--line-soft); }
.crumbs a:hover { color: var(--gold-500); }
.crumbs [aria-current="page"] { color: var(--gold-500); }

/* ---------- 5. 通用组件 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6em;
  padding: 15px 28px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .12em;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.btn--gold { background: var(--gold-500); border-color: var(--gold-500); color: var(--ink-900); }
.btn--gold:hover { background: var(--gold-300); border-color: var(--gold-300); }
.btn--outline { border-color: var(--gold-500); color: var(--gold-500); }
.btn--outline:hover { background: rgba(201, 162, 39, .14); }
.btn--paper { border-color: var(--line-light); color: var(--graphite); background: transparent; }
.btn--paper:hover { background: var(--graphite); color: var(--paper); border-color: var(--graphite); }
.btn--sm { padding: 11px 18px; font-size: 13px; letter-spacing: .1em; }

.tag {
  display: inline-block;
  padding: 5px 11px;
  border: 1px solid currentColor;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  line-height: 1.5;
  white-space: nowrap;
}
.tag--gold { color: var(--gold-500); }
.tag--brick { background: var(--brick); border-color: var(--brick); color: var(--paper); }
.tag--mist { color: var(--mist); }

.dossier {
  position: relative;
  padding: clamp(20px, 2.6vw, 34px);
  background: var(--ink-800);
  border: 1px solid var(--line-dark);
  color: var(--paper);
}
.dossier--paper { background: var(--paper); color: var(--graphite); border-color: var(--line-light); }
.dossier__num {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--gold-500);
}
.dossier__title {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: clamp(19px, 2.2vw, 26px);
  font-weight: 800;
  line-height: 1.28;
}
.dossier__meta { margin-top: 14px; font-size: 13px; line-height: 1.8; color: var(--mist); }

.spec-table { font-size: 15px; }
.spec-table caption {
  text-align: left;
  font-size: 12px;
  letter-spacing: .22em;
  color: var(--gold-500);
  padding-bottom: 12px;
}
.spec-table th,
.spec-table td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line-dark);
  text-align: left;
  vertical-align: top;
}
.spec-table thead th {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .2em;
  color: var(--gold-300);
  border-bottom-color: var(--line-dark);
}
.spec-table tbody tr:nth-child(even) { background: rgba(20, 58, 49, .42); }
.section--paper .spec-table th,
.section--paper .spec-table td { border-bottom-color: var(--line-light); }
.section--paper .spec-table thead th { color: var(--ink-700); }
.section--paper .spec-table tbody tr:nth-child(even) { background: rgba(31, 84, 69, .07); }

/* 图片容器基础规则（页面阶段填入 img / 内联 svg） */
.figure {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--ink-800);
  border: 1px solid var(--line-dark);
}
.figure > img,
.figure > svg,
.figure > picture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.figure--16x9 { aspect-ratio: 16 / 9; }
.figure--4x3 { aspect-ratio: 4 / 3; }
.figure--3x4 { aspect-ratio: 3 / 4; }
.figure--1x1 { aspect-ratio: 1 / 1; }
.figure--wide { aspect-ratio: 21 / 9; }
.figure--tall { aspect-ratio: 2 / 3; }
.figure--placeholder {
  background-color: var(--ink-800);
  background-image:
    linear-gradient(rgba(31, 84, 69, .55) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 84, 69, .55) 1px, transparent 1px);
  background-size: 28px 28px;
}
.figure__cap {
  position: absolute;
  inset: auto auto 0 0;
  margin: 0;
  padding: 10px 14px;
  background: rgba(11, 35, 30, .88);
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--gold-300);
}

/* 入场动效 */
[data-reveal] { opacity: 1; }
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
html.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- 6. 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--ink-900);
  color: var(--paper);
  border-bottom: 1px solid var(--line-dark);
}

.header-shell {
  display: flex;
  align-items: stretch;
  min-height: 62px;
}

.brand-rail {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 12px 18px 12px 0;
  border-right: 1px solid var(--line-dark);
}
.brand-rail__seal {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--gold-500);
  color: var(--gold-500);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}
.brand-rail__cn {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .14em;
  color: var(--paper);
  white-space: nowrap;
}

.commandbar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1 1 auto;
  min-width: 0;
  padding-left: 20px;
}

.commandbar__status { display: none; }
.commandbar__dot { width: 6px; height: 6px; background: var(--gold-500); flex: 0 0 auto; }
.commandbar__label {
  font-size: 11px;
  letter-spacing: .24em;
  color: var(--mist);
}
.commandbar__value {
  font-size: 13px;
  letter-spacing: .14em;
  color: var(--gold-300);
  white-space: nowrap;
}

.cmdnav { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.cmdnav__list { display: flex; align-items: center; gap: 2px; }
.cmdnav__item { flex: 0 0 auto; }
.cmdnav__link {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 9px 11px;
  font-size: 13.5px;
  letter-spacing: .08em;
  color: rgba(244, 239, 228, .74);
  border-bottom: 2px solid transparent;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.cmdnav__link:hover { color: var(--paper); background: rgba(31, 84, 69, .55); }
.cmdnav__num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .06em;
  color: var(--mist);
}
.cmdnav__link[aria-current="page"] {
  color: var(--gold-500);
  border-bottom-color: var(--gold-500);
}
.cmdnav__link[aria-current="page"] .cmdnav__num { color: var(--gold-500); }

.cmdnav__cta {
  padding: 10px 16px;
  border: 1px solid var(--gold-500);
  color: var(--gold-500);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  white-space: nowrap;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.cmdnav__cta:hover { background: var(--gold-500); color: var(--ink-900); }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding: 10px 12px;
  border: 1px solid var(--line-dark);
  color: var(--paper);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.nav-toggle:hover { border-color: var(--gold-500); background: rgba(31, 84, 69, .5); }
.nav-toggle__bars { position: relative; display: block; width: 18px; height: 10px; }
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: var(--gold-500);
  transition: transform var(--dur) var(--ease);
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after { bottom: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(4.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-4.5px) rotate(-45deg); }
.nav-toggle__label {
  font-size: 11px;
  letter-spacing: .22em;
  color: var(--mist);
}

.read-progress {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 3px;
  background: rgba(244, 239, 228, .07);
}
.read-progress__bar {
  display: block;
  height: 100%;
  width: 0;
  background: var(--gold-500);
}

/* ---------- 7. 页脚 ---------- */
.site-footer {
  position: relative;
  background: var(--ink-900);
  color: var(--paper);
  border-top: 1px solid var(--line-dark);
  padding-top: clamp(44px, 6vw, 84px);
}

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

.footer-brand {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: .04em;
  color: var(--paper);
}
.footer-brand__sub {
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: .22em;
  color: var(--gold-500);
}
.footer-note {
  margin-top: 18px;
  max-width: 30ch;
  font-size: 13px;
  line-height: 1.95;
  color: var(--mist);
}

.footer-title {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .28em;
  color: var(--gold-300);
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line-dark);
}

.footer-list { font-size: 14px; }
.footer-list li {
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
  color: rgba(244, 239, 228, .8);
  line-height: 1.7;
}
.footer-list li:last-child { border-bottom: 0; }
.footer-list a { display: inline-block; transition: color var(--dur) var(--ease), transform var(--dur) var(--ease); }
.footer-list a:hover { color: var(--gold-500); transform: translateX(3px); }
.footer-list--plain li { color: var(--mist); }

.footer-key {
  display: inline-block;
  min-width: 46px;
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--gold-300);
}

.footer-col .btn { margin-top: 20px; }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 28px;
  padding: 20px 0 28px;
  border-top: 1px solid var(--line-dark);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--mist);
}
.footer-legal__copy { line-height: 1.9; }
.footer-legal__copy .num { color: rgba(244, 239, 228, .72); }
.footer-legal__links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-legal__links a { color: var(--mist); transition: color var(--dur) var(--ease); }
.footer-legal__links a:hover { color: var(--gold-500); }

.to-top {
  position: fixed;
  right: clamp(14px, 3vw, 30px);
  bottom: clamp(14px, 3vw, 30px);
  z-index: 50;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  background: var(--ink-800);
  color: var(--gold-500);
  border: 1px solid var(--gold-500);
  font-size: 15px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.to-top[data-visible] { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--gold-500); color: var(--ink-900); }

/* ---------- 8. 响应式 ---------- */
@media (min-width: 720px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1023px) {
  .span-1, .span-2, .span-3, .span-4, .span-5 { grid-column: span 6; }
  .span-6, .span-7, .span-8, .span-9, .span-10, .span-11, .span-12 { grid-column: span 12; }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .cmdnav {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    margin-left: 0;
    padding: 104px var(--gutter) 48px;
    background: var(--ink-800);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur) var(--ease);
  }
  .cmdnav[data-open] {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }
  .cmdnav__list {
    display: block;
    width: 100%;
    border-top: 1px solid var(--line-dark);
  }
  .cmdnav__item { border-bottom: 1px solid var(--line-dark); }
  .cmdnav__link {
    display: flex;
    align-items: baseline;
    gap: 18px;
    width: 100%;
    padding: 18px 4px;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: .04em;
    color: rgba(244, 239, 228, .86);
    border-bottom: 0;
  }
  .cmdnav__link:hover { background: transparent; color: var(--gold-500); }
  .cmdnav__link[aria-current="page"] { border-bottom: 0; color: var(--gold-500); }
  .cmdnav__link[aria-current="page"]::after {
    content: "";
    flex: 1 1 auto;
    height: 2px;
    background: var(--gold-500);
    align-self: center;
  }
  .cmdnav__num { font-size: 12px; }
  .cmdnav__cta {
    margin-top: 30px;
    padding: 17px 20px;
    text-align: center;
    font-size: 14px;
  }
}

@media (min-width: 1024px) {
  .header-shell { min-height: 74px; }

  .brand-rail { padding: 12px 22px 12px 0; }
  .brand-rail__cn {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    max-height: 48px;
    font-size: 11px;
    letter-spacing: .1em;
    line-height: 1.15;
    white-space: normal;
  }

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

  .nav-toggle { display: none; }

  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1.4fr; gap: clamp(24px, 3vw, 56px); }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  .commandbar__label { display: none; }
  .cmdnav { gap: 8px; }
  .cmdnav__link { font-size: 12.5px; padding: 9px 8px; letter-spacing: .05em; }
  .cmdnav__cta { padding: 10px 12px; font-size: 12.5px; letter-spacing: .1em; }
}

@media (max-width: 719px) {
  .span-1, .span-2, .span-3, .span-4, .span-5, .span-6 { grid-column: span 12; }
  .grid--2, .grid--3 { grid-template-columns: minmax(0, 1fr); }
  body { font-size: 16px; }
  .brand-rail { padding-right: 14px; gap: 8px; }
  .brand-rail__seal { width: 28px; height: 28px; font-size: 13px; }
  .brand-rail__cn { font-size: 13px; letter-spacing: .1em; }
  .commandbar { padding-left: 14px; gap: 10px; }
  .nav-toggle__label { display: none; }
  .footer-legal { flex-direction: column; align-items: flex-start; }
}

/* ---------- 9. 无障碍：减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  html.js [data-reveal] { opacity: 1; transform: none; }
  .to-top { transition: none; }
}
