/* ===========================================================
   金博中心 · 共享外壳样式 /assets/site.css
   基调：档案室 × 航海日志 —— 深青蓝柜体、暖白纸张、复古金刻度
   =========================================================== */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --ink: #0B3B4A;
  --ink-2: #0E4A5C;
  --ink-3: #1B7288;
  --gold: #C9A227;
  --gold-hi: #E6CB6E;
  --brick: #B54A3A;
  --paper: #F6F1E7;
  --card: #FDFBF6;
  --text: #22343A;
  --meta: #6E7E82;
  --line: rgba(11, 59, 74, 0.18);
  --line-strong: rgba(11, 59, 74, 0.32);
  --line-dark: rgba(246, 241, 231, 0.16);
  --shadow-1: 0 1px 2px rgba(11, 59, 74, 0.08);
  --shadow-2: 0 18px 40px -26px rgba(11, 59, 74, 0.55);
  --radius: 14px;
  --radius-lg: 22px;
  --wrap: 1180px;
  --gutter: clamp(18px, 4vw, 44px);
  --serif: "Source Han Serif SC", "Songti SC", "Noto Serif SC", "SimSun", serif;
  --sans: "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
}

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.85;
  color: var(--text);
  background-color: var(--paper);
  background-image:
    repeating-linear-gradient(0deg, rgba(11, 59, 74, 0.035) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(90deg, rgba(11, 59, 74, 0.035) 0 1px, transparent 1px 34px),
    radial-gradient(120% 80% at 88% -12%, rgba(201, 162, 39, 0.12), transparent 62%),
    radial-gradient(90% 70% at 0% 0%, rgba(27, 114, 136, 0.08), transparent 60%);
  background-attachment: fixed;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0 0 0.6em;
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--ink);
}
h1 { font-size: clamp(34px, 5vw, 52px); }
h2 { font-size: clamp(26px, 3.4vw, 34px); }
h3 { font-size: clamp(20px, 2.4vw, 24px); }
h4 { font-size: 18px; }

p { margin: 0 0 1.2em; }
p:last-child { margin-bottom: 0; }

a { color: var(--ink-2); }

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

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

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

/* ---------- 通用容器 ---------- */
.wrap {
  width: min(var(--wrap), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.stack > * + * { margin-top: 1.2rem; }

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

.plate {
  padding: clamp(18px, 2.4vw, 28px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}

/* ---------- 文字等级 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 0.9em;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.16em;
  color: var(--gold);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--gold);
}

.mono {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--meta);
}

.lede {
  font-size: clamp(17px, 1.7vw, 19px);
  line-height: 1.8;
  color: var(--ink-2);
}

.note {
  font-size: 14px;
  line-height: 1.75;
  color: var(--meta);
}

.divider-rule {
  height: 1px;
  border: 0;
  margin: clamp(28px, 4vw, 48px) 0;
  background: linear-gradient(90deg, var(--gold), rgba(201, 162, 39, 0.06));
}

/* ---------- 标签 ---------- */
.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: rgba(230, 203, 110, 0.42);
}
.tag--alert {
  color: #fff;
  background: var(--brick);
}
.tag--mono {
  color: var(--ink-2);
  background: transparent;
  border: 1px solid var(--line-strong);
}

/* ---------- 面包屑 ---------- */
.breadcrumbs {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--meta);
}
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.breadcrumbs li + li::before {
  content: "/";
  margin-right: 6px;
  color: var(--line-strong);
}
.breadcrumbs a {
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
}
.breadcrumbs a:hover { border-bottom-color: var(--gold); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.btn-gold {
  background: var(--gold);
  color: #10222a;
  border-color: var(--gold);
}
.btn-gold:hover { background: var(--gold-hi); border-color: var(--gold-hi); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover {
  background: rgba(201, 162, 39, 0.16);
  border-color: var(--gold);
}

.btn-line {
  background: transparent;
  color: var(--gold-hi);
  border-color: rgba(230, 203, 110, 0.5);
}
.btn-line:hover { background: rgba(230, 203, 110, 0.14); }

.btn-sm { padding: 8px 16px; font-size: 13.5px; }

/* ---------- 图片容器（页面阶段放图） ---------- */
.figure {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(0deg, rgba(11, 59, 74, 0.05) 0 1px, transparent 1px 18px),
    repeating-linear-gradient(90deg, rgba(11, 59, 74, 0.05) 0 1px, transparent 1px 18px),
    linear-gradient(135deg, rgba(27, 114, 136, 0.08), rgba(201, 162, 39, 0.07)),
    var(--card);
  box-shadow: var(--shadow-1);
}
.figure::before,
.figure::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid var(--gold);
  pointer-events: none;
}
.figure::before { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.figure::after { right: 10px; bottom: 10px; border-top: 0; border-left: 0; }
.figure img { display: block; width: 100%; height: 100%; object-fit: cover; }
.figure--wide { aspect-ratio: 16 / 9; }
.figure--portrait { aspect-ratio: 4 / 5; }
.figure--square { aspect-ratio: 1 / 1; }
.figure-caption {
  padding: 10px 16px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--meta);
}
.figure-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* ---------- 时间线 ---------- */
.timeline { margin: 0; padding: 0; list-style: none; }
.timeline-item {
  position: relative;
  padding: 0 0 26px 26px;
  border-left: 1px solid var(--line-strong);
}
.timeline-item:last-child { padding-bottom: 0; border-left-color: transparent; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 9px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  background: var(--card);
}
.timeline-item[data-state="current"]::before { background: var(--gold); }
.timeline-item[data-state="alert"]::before { border-color: var(--brick); }
.timeline-meta {
  display: block;
  margin-bottom: 2px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--meta);
}

/* ---------- 分段切换 ---------- */
.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(11, 59, 74, 0.06);
}
.segmented button,
.segmented [role="tab"] {
  padding: 7px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease;
}
.segmented button:hover { background: rgba(201, 162, 39, 0.18); }
.segmented [aria-selected="true"] { background: var(--ink); color: var(--gold-hi); }

/* ===========================================================
   页头：悬浮胶囊导航
   =========================================================== */
.skip-link {
  position: absolute;
  top: -70px;
  left: 16px;
  z-index: 90;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--gold);
  color: #10222a;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.18s ease;
}
.skip-link:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  padding: 14px var(--gutter) 12px;
  background: linear-gradient(180deg, rgba(246, 241, 231, 0.94), rgba(246, 241, 231, 0.62) 70%, rgba(246, 241, 231, 0));
  transition: padding 0.24s ease, background-color 0.24s ease;
}
.site-header[data-scrolled="true"] {
  padding-top: 6px;
  padding-bottom: 6px;
  background: rgba(246, 241, 231, 0.96);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: min(var(--wrap), 100%);
  margin-inline: auto;
}

/* 品牌岛 */
.brand-island {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 7px 18px 7px 7px;
  border: 1px solid rgba(27, 114, 136, 0.55);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  box-shadow: var(--shadow-2);
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  line-height: 1;
}
.brand-text { display: flex; flex-direction: column; }
.brand-name {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.3;
}
.brand-note {
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.4;
  letter-spacing: 0.05em;
  color: rgba(246, 241, 231, 0.62);
}

/* 栏目岛 */
.nav-island {
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(253, 251, 246, 0.88);
  box-shadow: var(--shadow-1);
  transition: padding 0.24s ease;
}
.site-header[data-scrolled="true"] .nav-island { padding: 4px; }

.nav-list {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-link {
  display: block;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--ink);
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, padding 0.24s ease;
}
.site-header[data-scrolled="true"] .nav-link { padding: 6px 12px; }
.nav-link:hover {
  background: rgba(201, 162, 39, 0.16);
  border-color: rgba(201, 162, 39, 0.55);
}
.nav-link[aria-current="page"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--gold-hi);
}

/* 折叠按钮（桌面隐藏） */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(253, 251, 246, 0.92);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.05em;
  cursor: pointer;
}
.nav-toggle-bars {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  width: 16px;
}
.nav-toggle-bars i {
  display: block;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
}

/* 页头动作区 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 阅读进度 */
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  pointer-events: none;
}
.scroll-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--ink-3), var(--gold));
  transition: width 0.12s linear;
}

/* ===========================================================
   页脚：刻度尺 + 三列索引 + 客服
   =========================================================== */
.site-footer {
  margin-top: clamp(56px, 8vw, 104px);
  background: var(--ink);
  color: rgba(246, 241, 231, 0.76);
  font-size: 15px;
}
.footer-scale {
  height: 12px;
  border-bottom: 1px solid rgba(201, 162, 39, 0.28);
  background-image: repeating-linear-gradient(90deg, rgba(201, 162, 39, 0.55) 0 1px, transparent 1px 24px);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(0, 1.7fr) minmax(240px, 1fr);
  gap: clamp(28px, 4vw, 52px);
  padding-block: clamp(36px, 5vw, 64px) clamp(24px, 3vw, 40px);
}

.footer-brand-id {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}
.footer-name {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  color: var(--paper);
  letter-spacing: 0.02em;
}
.footer-tagline {
  margin: 14px 0 10px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  color: var(--gold-hi);
}
.footer-intro {
  margin: 0 0 20px;
  max-width: 34ch;
  line-height: 1.8;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.col-title {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--gold);
}
.footer-links { margin: 0; padding: 0; list-style: none; }
.footer-links li + li { margin-top: 9px; }
.footer-links a {
  color: rgba(246, 241, 231, 0.78);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.footer-links a:hover {
  color: var(--gold-hi);
  border-bottom-color: var(--gold-hi);
}

.contact-list { margin: 0 0 16px; padding: 0; list-style: none; }
.contact-list li + li { margin-top: 10px; }
.contact-key {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(201, 162, 39, 0.85);
}
.contact-value {
  display: block;
  color: rgba(246, 241, 231, 0.86);
  word-break: break-word;
}
.contact-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.75;
  color: rgba(246, 241, 231, 0.55);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  padding-block: 20px 28px;
  border-top: 1px solid var(--line-dark);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(246, 241, 231, 0.5);
}
.footer-legal p { margin: 0; }
.footer-legal p:first-child { margin-right: auto; }
.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.legal-links a {
  color: rgba(246, 241, 231, 0.66);
  text-decoration: none;
  border-bottom: 1px solid rgba(246, 241, 231, 0.24);
}
.legal-links a:hover { color: var(--gold-hi); border-bottom-color: var(--gold-hi); }

/* ===========================================================
   显现动效（无脚本时不影响阅读）
   =========================================================== */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.js-reveal [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ===========================================================
   响应式
   =========================================================== */
@media (max-width: 1080px) {
  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-brand { grid-column: 1 / -1; }
  .footer-contact { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .nav-island {
    position: relative;
    padding: 0;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
  }
  .site-header[data-scrolled="true"] .nav-island { padding: 0; }

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

  .nav-list {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    display: none;
    flex-direction: column;
    gap: 2px;
    min-width: 232px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--card);
    box-shadow: 0 20px 44px -24px rgba(11, 59, 74, 0.62);
  }
  .nav-island[data-open="true"] .nav-list { display: flex; }
  .site-header[data-scrolled="true"] .nav-link { padding: 9px 14px; }
  .nav-link { padding: 9px 14px; font-size: 15px; }

  .header-actions .btn-ghost { display: none; }

  .grid--2, .grid--3 { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .brand-note { display: none; }
  .nav-toggle-label { display: none; }
  .nav-toggle { padding: 9px 12px; }
  .btn { padding: 9px 15px; font-size: 13.5px; }
  .footer-cols { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}

/* ===========================================================
   可访问性：减少动态
   =========================================================== */
@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;
  }
  .js-reveal [data-reveal] { opacity: 1; transform: none; }
  .skip-link { transition: none; }
}
