/* ==========================================================================
   通宝官网 · 全站共享样式 /assets/site.css
   1 设计令牌  2 重置  3 中文排版  4 通用组件
   5 头部  6 页脚  7 动效  8 响应式
   ========================================================================== */

/* ---------- 1. 设计令牌 ---------- */
:root {
  --red-700: #A51C30;
  --red-500: #C8344A;
  --red-100: #F6DDE0;
  --gold-500: #C9A227;
  --gold-200: #EAD9A0;
  --ink-900: #17323A;
  --ink-700: #244C55;
  --ink-500: #3D6770;
  --warm-50: #FBF7F0;
  --warm-100: #F3EDE3;
  --text-900: #1F2326;

  --font-serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", serif;
  --font-sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;

  --shell-max: 1320px;
  --gutter: clamp(16px, 3.2vw, 40px);
  --header-h: 76px;
  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 16px;
  --shadow-soft: 0 24px 60px -40px rgba(23, 50, 58, .55);
}

/* ---------- 2. 重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 14px);
}

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

/* ---------- 3. 中文排版 ---------- */
body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: clamp(15.5px, 1.02vw, 17px);
  line-height: 1.8;
  letter-spacing: .01em;
  color: var(--text-900);
  background-color: var(--warm-50);
  background-image:
    radial-gradient(58% 40% at 100% -6%, rgba(246, 221, 224, .62), transparent 72%),
    radial-gradient(46% 34% at -4% 2%, rgba(234, 217, 160, .34), transparent 74%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: .01em;
  color: var(--ink-900);
  text-wrap: balance;
}
h1 { font-size: clamp(30px, 4.2vw, 56px); line-height: 1.18; }
h2 { font-size: clamp(23px, 2.6vw, 34px); }
h3 { font-size: clamp(18px, 1.7vw, 22px); }
p { max-width: 72ch; }
strong { font-weight: 900; color: var(--ink-900); }
::selection { background: var(--gold-200); color: var(--ink-900); }

:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 3px;
  border-radius: 4px;
}
.site-footer :focus-visible { outline-color: var(--gold-200); }

/* ---------- 4. 通用组件 ---------- */
.skip-link {
  position: fixed;
  top: -110px;
  left: 16px;
  z-index: 999;
  padding: 12px 22px;
  background: var(--red-700);
  color: var(--warm-50);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .08em;
  border-radius: 0 0 var(--radius-s) var(--radius-s);
  box-shadow: 0 14px 28px -18px rgba(23, 50, 58, .9);
  transition: top .18s ease;
}
.skip-link:focus { top: 0; }

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--wide { max-width: var(--shell-max); }
.container--narrow { max-width: 820px; }

.section { padding-block: clamp(44px, 6vw, 88px); }
.section-head {
  display: grid;
  gap: 12px;
  max-width: 66ch;
  margin-bottom: clamp(22px, 3vw, 40px);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--red-700);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--gold-500);
  border-radius: 1px;
}
.display-title { font-size: clamp(30px, 4.2vw, 56px); line-height: 1.18; }
.lede {
  font-size: clamp(16px, 1.35vw, 18px);
  line-height: 1.85;
  color: var(--ink-700);
  max-width: 68ch;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .08em;
  line-height: 1.4;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.btn--primary {
  background: var(--red-700);
  color: var(--warm-50);
  box-shadow: 0 14px 28px -18px rgba(165, 28, 48, .95);
}
.btn--primary:hover { background: var(--red-500); transform: translateY(-1px); }
.btn--ghost {
  background: transparent;
  color: var(--ink-900);
  border-color: rgba(23, 50, 58, .28);
}
.btn--ghost:hover {
  color: var(--red-700);
  border-color: var(--gold-500);
  background: rgba(201, 162, 39, .1);
}
.btn--gold {
  background: transparent;
  color: var(--gold-200);
  border-color: rgba(201, 162, 39, .62);
}
.btn--gold:hover {
  background: rgba(201, 162, 39, .18);
  border-color: var(--gold-500);
  color: var(--warm-50);
}
.btn--block { width: 100%; }

.breadcrumb {
  padding-block: 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .03em;
  color: var(--ink-500);
}
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb li + li::before { content: "/"; color: rgba(23, 50, 58, .34); }
.breadcrumb a:hover { color: var(--red-700); }
.breadcrumb [aria-current="page"] { color: var(--ink-900); font-weight: 700; }

.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--split { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }

.card {
  position: relative;
  padding: clamp(18px, 2.4vw, 28px);
  background: var(--warm-50);
  border: 1px solid rgba(23, 50, 58, .12);
  border-radius: var(--radius-m);
}
.card--glass {
  background: rgba(251, 247, 240, .62);
  border-color: rgba(255, 255, 255, .55);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  backdrop-filter: blur(12px) saturate(1.15);
  box-shadow: var(--shadow-soft);
}
.card--dark {
  background: var(--ink-900);
  border-color: rgba(201, 162, 39, .26);
  color: rgba(251, 247, 240, .78);
}
.card--dark h2, .card--dark h3, .card--dark h4 { color: var(--warm-50); }

.img-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-m);
  background-color: var(--ink-700);
  background-image:
    linear-gradient(140deg, rgba(23, 50, 58, .96), rgba(36, 76, 85, .82) 58%, rgba(201, 162, 39, .32)),
    repeating-linear-gradient(45deg, rgba(251, 247, 240, .05) 0 2px, transparent 2px 14px);
  isolation: isolate;
}
.img-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(251, 247, 240, .18);
  border-radius: inherit;
  pointer-events: none;
  z-index: 2;
}
.img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 1;
}
.img-frame--wide { aspect-ratio: 16 / 9; }
.img-frame--pano { aspect-ratio: 21 / 9; }
.img-frame--tall { aspect-ratio: 3 / 4; }
.img-frame--square { aspect-ratio: 1 / 1; }

.rail-nav {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  display: grid;
  gap: 2px;
}
.rail-item {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 10px;
  padding: 8px 10px;
  border-left: 2px solid transparent;
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
  font-size: 13px;
  letter-spacing: .02em;
  color: var(--ink-500);
  transition: color .18s ease, background-color .18s ease, border-color .18s ease;
}
.rail-num {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .04em;
  color: rgba(23, 50, 58, .42);
}
.rail-label { line-height: 1.5; }
.rail-item:hover { color: var(--red-700); background: rgba(246, 221, 224, .55); }
.rail-item.is-active {
  border-left-color: var(--red-700);
  color: var(--red-700);
  background: rgba(246, 221, 224, .48);
}
.rail-item.is-active .rail-num { color: var(--gold-500); }

/* ---------- 5. 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(251, 247, 240, .9);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  backdrop-filter: blur(16px) saturate(1.25);
  border-bottom: 1px solid rgba(23, 50, 58, .14);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 40px);
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  min-height: var(--header-h);
}

.brand-block {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding-left: 14px;
  flex: 0 0 auto;
}
.brand-block::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--red-700), var(--gold-500));
}

.brand-mark { display: inline-flex; align-items: center; gap: 12px; }
.brand-seal {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  background: var(--red-700);
  color: var(--warm-50);
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  line-height: 1;
  border-radius: 14px 14px 5px 5px;
  box-shadow: inset 0 0 0 1px rgba(251, 247, 240, .3), 0 8px 18px -12px rgba(165, 28, 48, .95);
}
.brand-text { display: grid; gap: 2px; line-height: 1.1; }
.brand-name {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .05em;
  color: var(--ink-900);
}
.brand-ver {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--ink-500);
}
.brand-hint {
  margin-left: 4px;
  padding-left: 14px;
  border-left: 1px solid rgba(23, 50, 58, .18);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  color: var(--ink-500);
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 10px 14px;
  border: 1px solid rgba(23, 50, 58, .2);
  border-radius: 8px;
  background: rgba(251, 247, 240, .6);
  color: var(--ink-900);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .08em;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.nav-toggle[aria-expanded="true"] {
  background: var(--red-700);
  border-color: var(--red-700);
  color: var(--warm-50);
}
.nav-toggle-bars {
  position: relative;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle-label { line-height: 1; }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.2vw, 20px);
  margin-left: auto;
}
.nav-list { display: flex; align-items: center; gap: clamp(2px, .7vw, 10px); }
.nav-list a {
  display: inline-flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: var(--radius-s);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .06em;
  color: var(--ink-900);
  transition: color .18s ease, background-color .18s ease, box-shadow .18s ease;
}
.nav-list a:hover { color: var(--red-700); background: var(--red-100); }
.nav-list a[aria-current="page"] {
  background: var(--red-700);
  color: var(--warm-50);
  box-shadow: inset 0 0 0 2px rgba(201, 162, 39, .82);
}

.nav-list--util a {
  padding: 8px 15px;
  border: 1px solid rgba(23, 50, 58, .2);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .04em;
}
.nav-list--util a:hover {
  color: var(--red-700);
  border-color: rgba(201, 162, 39, .8);
  background: rgba(234, 217, 160, .3);
}
.nav-list--util li:last-child a {
  background: var(--red-700);
  border-color: var(--red-700);
  color: var(--warm-50);
}
.nav-list--util li:last-child a:hover {
  background: var(--red-500);
  border-color: var(--red-500);
  color: var(--warm-50);
}
.nav-divider {
  flex: 0 0 auto;
  width: 1px;
  height: 20px;
  background: rgba(23, 50, 58, .18);
}

.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  pointer-events: none;
}
.scroll-progress-bar {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--red-700) 0%, var(--red-500) 55%, var(--gold-500) 100%);
  transition: transform .12s linear;
}

.mobile-dock { display: none; }

/* ---------- 6. 页脚 ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  margin-top: clamp(56px, 9vw, 128px);
  background: var(--ink-900);
  color: rgba(251, 247, 240, .76);
  font-size: 15px;
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 82% at 88% 0%, rgba(201, 162, 39, .16), transparent 62%),
    radial-gradient(90% 70% at 0% 100%, rgba(165, 28, 48, .24), transparent 66%);
}
.site-footer::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--red-700) 0 24%, var(--gold-500) 24% 32%, var(--ink-700) 32% 100%);
}

.footer-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(260px, 1.05fr) minmax(0, 2fr);
  gap: clamp(28px, 4vw, 56px);
  max-width: var(--shell-max);
  margin-inline: auto;
  padding: clamp(36px, 5vw, 68px) var(--gutter) clamp(24px, 3vw, 38px);
}

.footer-brand {
  display: grid;
  gap: 14px;
  align-content: start;
  justify-items: start;
}
.footer-seal {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--red-700);
  color: var(--warm-50);
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 600;
  line-height: 1;
  border-radius: 16px 16px 5px 5px;
  box-shadow: 0 0 0 1px rgba(201, 162, 39, .6);
}
.footer-brand-name {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--warm-50);
}
.footer-brand-text {
  max-width: 34ch;
  font-size: 14.5px;
  line-height: 1.85;
  color: rgba(251, 247, 240, .66);
}
.footer-cta { margin-top: 2px; }
.footer-note {
  max-width: 34ch;
  font-size: 12.5px;
  line-height: 1.75;
  letter-spacing: .02em;
  color: rgba(251, 247, 240, .5);
}

.footer-contact {
  display: grid;
  gap: 8px;
  margin-top: 6px;
  font-size: 13.5px;
}
.footer-contact li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
}
.footer-contact-label {
  flex: 0 0 auto;
  min-width: 60px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--gold-200);
  opacity: .9;
}
.footer-contact li > span:last-child {
  color: rgba(251, 247, 240, .82);
  word-break: break-word;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 40px);
}
.footer-col { min-width: 0; }
.footer-col-title {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(251, 247, 240, .14);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--gold-200);
}
.footer-col-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.footer-col-list a {
  display: inline-block;
  font-size: 14.5px;
  color: rgba(251, 247, 240, .74);
  transition: color .18s ease, transform .18s ease;
}
.footer-col-list a:hover {
  color: var(--gold-200);
  transform: translateX(3px);
}

.footer-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding: 18px var(--gutter) 26px;
  border-top: 1px solid rgba(251, 247, 240, .12);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .02em;
  color: rgba(251, 247, 240, .55);
}
.footer-legal { color: rgba(251, 247, 240, .7); }
.footer-copy { color: rgba(251, 247, 240, .5); }
.footer-bottom-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}
.footer-bottom-links a { color: rgba(251, 247, 240, .6); }
.footer-bottom-links a:hover { color: var(--gold-200); }

/* ---------- 7. 动效 ---------- */
html.has-anim [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease;
}
html.has-anim [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 8. 响应式 ---------- */
@media (max-width: 1100px) {
  .brand-hint { display: none; }
  .brand-block::before { top: 10px; bottom: 10px; }
}

@media (max-width: 900px) {
  .grid--2, .grid--3, .grid--split { grid-template-columns: minmax(0, 1fr); }
  .rail-nav { position: static; }
  .footer-inner { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
  :root { --header-h: 68px; }

  body { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }

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

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-left: 0;
    padding: 10px var(--gutter) 20px;
    background: var(--warm-50);
    border-bottom: 1px solid rgba(23, 50, 58, .14);
    box-shadow: 0 26px 44px -32px rgba(23, 50, 58, .6);
  }
  .site-nav[data-open] { display: flex; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }
  .nav-list a {
    padding: 13px 12px;
    font-size: 15px;
    border-radius: 8px;
  }
  .nav-list--util a {
    padding: 13px 16px;
    border-radius: 8px;
    font-size: 14px;
  }
  .nav-divider {
    width: auto;
    height: 1px;
    margin: 8px 0;
    background: rgba(23, 50, 58, .14);
  }

  .brand-name { font-size: 16px; }
  .brand-ver { font-size: 10.5px; }

  .mobile-dock {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 90;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom, 0px));
    background: rgba(23, 50, 58, .97);
    border-top: 1px solid rgba(201, 162, 39, .42);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
  .dock-link {
    display: grid;
    justify-items: center;
    gap: 4px;
    padding: 6px 2px;
    border-radius: 8px;
    color: rgba(251, 247, 240, .72);
    font-size: 11.5px;
    letter-spacing: .08em;
    transition: color .18s ease, background-color .18s ease;
  }
  .dock-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    opacity: .7;
  }
  .dock-label { line-height: 1.2; }
  .dock-link[aria-current="page"] {
    color: var(--gold-200);
    background: rgba(201, 162, 39, .16);
  }
  .dock-link[aria-current="page"] .dock-dot {
    background: var(--red-500);
    opacity: 1;
  }
}

@media (max-width: 640px) {
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 18px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .footer-brand-text, .footer-note { max-width: none; }
  .brand-seal { width: 34px; height: 34px; font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  html { scroll-behavior: auto; }
  html.has-anim [data-reveal] { opacity: 1; transform: none; }
  .scroll-progress-bar { transition: none; }
  .footer-col-list a:hover, .btn:hover { transform: none; }
}
