/* ==========================================================================
   优发国际址 · /assets/site.css
   共享外壳：reset、变量、中文排版、页头、页脚、通用组件与图片容器
   ========================================================================== */

/* ---------- 1. reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; }
h1, h2, h3, h4, p, figure, blockquote, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
img, svg, video { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }

/* ---------- 2. 变量 ---------- */
:root {
  --tu: #0F5A55;
  --tu-mid: #17776F;
  --tu-pale: #D6E7E3;
  --saff: #A3271F;
  --saff-pale: #F2DCD9;
  --rock: #3C4348;
  --rock-mid: #6E747B;
  --paper: #FBFAF7;
  --indigo: #232B4A;
  --copper: #B08A4B;

  --serif: "Noto Serif SC", "Songti SC", "STSong", Georgia, "Times New Roman", serif;
  --sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1180px;
  --gutter: clamp(1.15rem, 4vw, 3.5rem);
  --ease: cubic-bezier(.2, .7, .3, 1);
  --hair: 1px solid rgba(60, 67, 72, .16);
  --hair-strong: 1px solid rgba(60, 67, 72, .28);
  --shadow-card: 0 2px 6px rgba(35, 43, 74, .07);
  --shadow-lift: 0 6px 18px rgba(35, 43, 74, .12);
}

/* ---------- 3. 中文排版基座 ---------- */
body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.85;
  font-weight: 400;
  color: var(--rock);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 900; line-height: 1.14; letter-spacing: -.01em; color: var(--tu); }
h1 { font-size: clamp(2.1rem, 4.8vw, 3.6rem); line-height: 1.1; }
h2 { font-size: clamp(1.55rem, 2.6vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 1.8vw, 1.34rem); font-family: var(--sans); font-weight: 700; letter-spacing: 0; color: var(--rock); }
h4 { font-size: 1rem; font-family: var(--sans); font-weight: 700; letter-spacing: 0; color: var(--rock); }
p { max-width: 34em; }
strong { font-weight: 700; color: var(--rock); }
:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; border-radius: 2px; }

/* ---------- 4. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: -5rem;
  left: 1rem;
  z-index: 200;
  padding: .7rem 1.1rem;
  background: var(--indigo);
  color: #FBFAF7;
  font-size: .9rem;
  border-radius: 4px;
  text-decoration: none;
  transition: top .18s var(--ease);
}
.skip-link:focus { top: 1rem; }

/* ---------- 5. 容器 ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.header-utility { background: var(--tu); color: #CFE3DF; position: relative; }
.header-utility::after {
  content: "";
  display: block;
  height: 3px;
  background: repeating-linear-gradient(90deg, var(--copper) 0 18px, transparent 18px 26px, var(--saff) 26px 38px, transparent 38px 54px);
}
.header-utility__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .35rem 1.6rem;
  padding-block: .55rem;
}
.header-utility__line {
  margin: 0;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .08em;
  color: #CFE3DF;
  max-width: none;
}
.header-utility__link {
  font-size: .8rem;
  font-weight: 600;
  color: #F2DCD9;
  text-decoration: underline;
  text-decoration-color: rgba(176, 138, 75, .9);
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  transition: color .18s var(--ease);
}
.header-utility__link:hover { color: #FFFFFF; text-decoration-color: #F2DCD9; }

.masthead { border-bottom: var(--hair); background: var(--paper); }
.masthead__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .45rem;
  text-align: center;
  padding-block: clamp(1.2rem, 2.8vw, 2rem) clamp(.95rem, 2vw, 1.45rem);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  text-decoration: none;
  color: var(--tu);
}
.brand__mark {
  width: 1.35rem;
  height: 1.35rem;
  flex: 0 0 auto;
  background: var(--tu);
  border: 1px solid var(--copper);
  position: relative;
  transform: rotate(45deg);
  transition: background-color .2s var(--ease);
}
.brand__mark::after {
  content: "";
  position: absolute;
  inset: 34%;
  background: var(--saff);
}
.brand:hover .brand__mark { background: var(--tu-mid); }
.brand__name {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(1.8rem, 4.8vw, 3rem);
  line-height: 1.04;
  letter-spacing: .03em;
  color: var(--tu);
}
.brand__tagline {
  margin: 0;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .32em;
  color: var(--rock-mid);
  max-width: none;
}

.primary-nav {
  background: var(--tu-pale);
  border-bottom: 1px solid rgba(15, 90, 85, .28);
  position: relative;
}
.primary-nav__bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 3.2rem;
  padding-block: .15rem;
}
.primary-nav__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(.6rem, 2.2vw, 2.1rem);
  counter-reset: navidx;
}
.primary-nav__list > li { display: flex; counter-increment: navidx; }
.primary-nav__link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: .4rem;
  padding: .8rem .1rem;
  font-size: .97rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--tu);
  text-decoration: none;
  transition: color .18s var(--ease);
}
.primary-nav__link::before {
  content: counter(navidx, decimal-leading-zero);
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: 0;
  color: var(--copper);
  font-weight: 500;
}
.primary-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: .42rem;
  height: 2px;
  background: var(--saff);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .2s var(--ease);
}
.primary-nav__link:hover { color: var(--tu-mid); }
.primary-nav__link:hover::after,
.primary-nav__link:focus-visible::after { transform: scaleX(1); }
.primary-nav__link[aria-current="page"] { color: var(--saff); }
.primary-nav__link[aria-current="page"]::after { transform: scaleX(1); }
.primary-nav__link[aria-current="page"]::before { color: var(--saff); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: .6rem;
  padding: .5rem .85rem;
  background: var(--tu);
  color: #F2DCD9;
  border: 1px solid rgba(15, 90, 85, .55);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .14em;
  cursor: pointer;
  transition: background-color .18s var(--ease);
}
.nav-toggle:hover { background: var(--tu-mid); }
.nav-toggle__bars { display: inline-flex; flex-direction: column; gap: 3px; width: 16px; }
.nav-toggle__bars span { display: block; height: 2px; background: currentColor; }
.nav-toggle__text { line-height: 1; }

/* ---------- 7. 页脚 ---------- */
.site-footer {
  position: relative;
  background: var(--indigo);
  color: #C4CADC;
  margin-top: clamp(2.5rem, 6vw, 5rem);
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: repeating-linear-gradient(90deg, var(--copper) 0 18px, transparent 18px 26px, var(--saff) 26px 38px, transparent 38px 54px);
}
.site-footer a {
  color: #E6E9F3;
  text-decoration: none;
  transition: color .18s var(--ease);
}
.site-footer a:hover { color: #FFFFFF; text-decoration: underline; text-decoration-color: var(--copper); text-underline-offset: 4px; }
.site-footer a:focus-visible { outline-color: #F2DCD9; }
.site-footer__inner { padding-block: clamp(2.2rem, 4.6vw, 3.5rem) 1.4rem; }
.site-footer__top {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(0, 1fr));
  gap: clamp(1.4rem, 3.5vw, 2.6rem);
}
.site-footer__mark {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 1.55rem;
  line-height: 1.2;
  letter-spacing: .03em;
  color: #FBFAF7;
  max-width: none;
}
.site-footer__line {
  margin-top: .6rem;
  font-size: .92rem;
  line-height: 1.7;
  color: #B4BBCE;
  max-width: 20em;
}
.site-footer__meta {
  margin-top: .9rem;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .1em;
  color: #8E96AF;
  max-width: none;
}
.site-footer__title {
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  color: #8E96AF;
  margin-bottom: .9rem;
  line-height: 1.4;
}
.site-footer__list { display: grid; gap: .55rem; font-size: .95rem; }
.site-footer__contact {
  margin-top: clamp(1.8rem, 4vw, 2.6rem);
  padding-top: 1.35rem;
  border-top: 1px solid rgba(196, 202, 220, .18);
  display: grid;
  gap: .45rem;
}
.site-footer__contact-line {
  margin: 0;
  font-size: .9rem;
  line-height: 1.75;
  color: #C4CADC;
  max-width: 72ch;
}
.site-footer__note {
  margin: 0;
  font-size: .82rem;
  line-height: 1.7;
  color: #8E96AF;
  max-width: 66ch;
}
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .6rem 1.5rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(196, 202, 220, .18);
  font-family: var(--mono);
  font-size: .76rem;
  letter-spacing: .06em;
  color: #8E96AF;
}
.site-footer__bottom p { margin: 0; max-width: none; }
.site-footer__legal { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.1rem; }

/* ---------- 8. 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .72rem 1.3rem;
  border: 1px solid transparent;
  border-radius: 4px;
  font-family: var(--sans);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--tu); color: #F3F8F7; }
.btn--primary:hover { background: var(--tu-mid); }
.btn--ghost { background: transparent; color: var(--tu); border-color: rgba(15, 90, 85, .45); }
.btn--ghost:hover { background: var(--tu-pale); border-color: var(--tu); }
.btn--saffron { background: var(--saff); color: #FFFFFF; }
.btn--saffron:hover { background: #8C1F18; }

/* ---------- 9. 眉标 / 导语 / 旁注 / 编号 ---------- */
.eyebrow {
  display: inline-block;
  padding: .3rem 0;
  border-top: 1px solid var(--copper);
  border-bottom: 1px solid var(--copper);
  font-family: var(--mono);
  font-size: .72rem;
  line-height: 1.4;
  letter-spacing: .18em;
  color: var(--tu-mid);
}
.lede { font-size: 1.06rem; line-height: 1.8; color: var(--rock-mid); max-width: 32em; }
.note { font-size: .88rem; line-height: 1.7; color: var(--rock-mid); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: .7rem 1.5rem;
  padding-bottom: .85rem;
  border-bottom: var(--hair-strong);
  margin-bottom: clamp(1.2rem, 2.6vw, 2rem);
}
.rule-line {
  display: block;
  width: 100%;
  height: 1px;
  margin: 0;
  border: 0;
  background: var(--copper);
  transform-origin: left center;
}
.flag-rule {
  display: block;
  width: 100%;
  height: 3px;
  border: 0;
  margin: 0;
  background: repeating-linear-gradient(90deg, var(--copper) 0 18px, transparent 18px 26px, var(--saff) 26px 38px, transparent 38px 54px);
}

/* ---------- 10. 面包屑 ---------- */
.breadcrumb { padding-block: 1rem .2rem; }
.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .08em;
  color: var(--rock-mid);
}
.breadcrumb__list > li { display: inline-flex; align-items: center; }
.breadcrumb__list > li + li::before { content: "/"; margin-right: .35rem; color: var(--copper); }
.breadcrumb__link { color: var(--tu-mid); text-decoration: none; }
.breadcrumb__link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 11. 正文容器 ---------- */
.prose { max-width: 34em; }
.prose > * + * { margin-top: 1.05em; }
.prose h2 { margin-top: 2.1em; }
.prose h3 { margin-top: 1.7em; }
.prose ul, .prose ol { list-style: revert; padding-left: 1.4em; }
.prose li { max-width: 34em; }
.prose li + li { margin-top: .4em; }
.prose a { color: var(--tu-mid); text-decoration-color: var(--copper); text-underline-offset: 3px; }
.prose blockquote {
  margin: 1.6em 0;
  padding: .2em 0 .2em 1.1em;
  border-left: 3px solid var(--saff);
  color: var(--rock-mid);
  font-family: var(--serif);
}

/* ---------- 12. 网格 ---------- */
.layout-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1rem, 2.4vw, 2rem);
}
.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-12 { grid-column: span 12; }

/* ---------- 13. 图片容器 ---------- */
.media {
  position: relative;
  overflow: hidden;
  border: var(--hair);
  border-radius: 4px;
  background: var(--tu-pale);
  box-shadow: var(--shadow-card);
}
.media img, .media svg, .media video { width: 100%; height: 100%; object-fit: cover; }
.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--1x1 { aspect-ratio: 1 / 1; }
.media--tall { aspect-ratio: 3 / 4; }
.media--annotate::after {
  content: "";
  position: absolute;
  inset: 8% 6%;
  border: 1px dashed var(--saff);
  border-radius: 2px;
  pointer-events: none;
}
.media__caption {
  margin-top: .55rem;
  font-size: .82rem;
  line-height: 1.6;
  color: var(--rock-mid);
  max-width: none;
}

/* ---------- 14. 卡片 ---------- */
.card {
  background: #FFFFFF;
  border: var(--hair);
  border-radius: 4px;
  padding: clamp(1.05rem, 2.2vw, 1.6rem);
  box-shadow: var(--shadow-card);
  transition: box-shadow .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.card:hover { box-shadow: var(--shadow-lift); border-color: rgba(15, 90, 85, .38); }
.card__title { margin-bottom: .5rem; }
.card--tint { background: var(--tu-pale); border-color: rgba(15, 90, 85, .22); }
.card--rule { border-left: 3px solid var(--saff); }

/* ---------- 15. 标签 ---------- */
.tag {
  display: inline-block;
  padding: .18rem .55rem;
  border: 1px solid rgba(15, 90, 85, .35);
  border-radius: 2px;
  background: #FFFFFF;
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .1em;
  line-height: 1.6;
  color: var(--tu);
}
.tag--saffron { background: var(--saff-pale); border-color: rgba(163, 39, 31, .35); color: var(--saff); }

/* ---------- 16. 筛选 ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: .5rem; padding-block: .35rem; }
.filter-btn {
  padding: .42rem .85rem;
  border: 1px solid rgba(15, 90, 85, .38);
  border-radius: 4px;
  background: #FFFFFF;
  color: var(--tu);
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .1em;
  cursor: pointer;
  transition: background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.filter-btn:hover { background: var(--tu-pale); }
.filter-btn[aria-pressed="true"] { background: var(--tu); border-color: var(--tu); color: #F3F8F7; }

/* ---------- 17. 折叠面板 ---------- */
.disclosure {
  border: var(--hair);
  border-radius: 4px;
  background: #FFFFFF;
  box-shadow: var(--shadow-card);
}
.disclosure + .disclosure { margin-top: .8rem; }
.disclosure__trigger {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .95rem 1.15rem;
  background: none;
  border: 0;
  text-align: left;
  font-family: var(--sans);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--rock);
  cursor: pointer;
}
.disclosure__trigger::after {
  content: "+";
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 1.1rem;
  color: var(--saff);
}
.disclosure__trigger[aria-expanded="true"]::after { content: "–"; }
.disclosure__panel {
  padding: .2rem 1.15rem 1.15rem;
  border-top: var(--hair);
  font-size: .95rem;
  color: var(--rock);
}

/* ---------- 18. 显现与细线生长 ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .24s var(--ease), transform .24s var(--ease);
}
.js [data-reveal].is-revealed { opacity: 1; transform: none; }
.js [data-reveal] .rule-line { transform: scaleX(0); transition: transform .32s var(--ease); }
.js [data-reveal].is-revealed .rule-line { transform: scaleX(1); }

/* ---------- 19. 进度线与回到顶部 ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 150;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--tu) 0%, var(--copper) 58%, var(--saff) 100%);
  pointer-events: none;
}
.to-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 140;
  padding: .6rem .9rem;
  border: 1px solid rgba(242, 220, 217, .4);
  border-radius: 4px;
  background: var(--indigo);
  color: #F2DCD9;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .12em;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s var(--ease), background-color .18s var(--ease);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--tu); }

/* ---------- 20. 平板 ---------- */
@media (max-width: 900px) {
  .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: span 12; }
  .site-footer__top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer__brand { grid-column: 1 / -1; }
}

/* ---------- 21. 移动 ---------- */
@media (max-width: 860px) {
  body { font-size: 16.5px; }
  .header-utility__inner { justify-content: flex-start; gap: .3rem .9rem; }
  .brand__tagline { letter-spacing: .22em; }

  .primary-nav__bar { justify-content: space-between; gap: .75rem; min-height: 0; padding-block: .55rem; }
  .nav-toggle { display: inline-flex; }
  .primary-nav__list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 60;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .3rem var(--gutter) .7rem;
    background: var(--paper);
    border-bottom: 1px solid rgba(15, 90, 85, .28);
    box-shadow: 0 14px 26px rgba(35, 43, 74, .14);
  }
  [data-nav][data-open] .primary-nav__list { display: flex; }
  .primary-nav__list > li { width: 100%; border-top: var(--hair); }
  .primary-nav__list > li:first-child { border-top: 0; }
  .primary-nav__link { width: 100%; padding: .78rem 0; font-size: 1rem; }
  .primary-nav__link::after { bottom: .5rem; }

  .site-footer__bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  .site-footer__top { grid-template-columns: 1fr; }
  .brand__name { letter-spacing: .01em; }
  .site-footer__legal { gap: .4rem .9rem; }
}

/* ---------- 22. 动效降级 ---------- */
@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;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .js [data-reveal] .rule-line { transform: scaleX(1); }
  .to-top { transform: none; }
}
