/* ==========================================================================
   /assets/site.css — 齐发·CN 共享外壳样式
   暖纸 / 深墨蓝 / 赭红 / 沙金 / 青绿 五色节奏
   ========================================================================== */

:root {
  --paper: #F5EFE4;
  --paper-deep: #ECE3D3;
  --ink: #152433;
  --ink-soft: #24384B;
  --ochre: #A53D2A;
  --ochre-deep: #7E2B1F;
  --sand: #D9A24B;
  --teal: #2E8B7F;
  --charcoal: #1C1B18;
  --stone: #6D685F;
  --mist: #F2DBAA;
  --pale-teal: #DCE9E4;

  --rule: rgba(28, 27, 24, 0.14);
  --rule-strong: rgba(21, 36, 51, 0.28);

  --font-display: "Source Han Sans SC Heavy", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-body: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --shell: min(1200px, 100% - 48px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --cut: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
  --cut-sm: polygon(0 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%);
}

/* ---------- reset ---------- */

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--charcoal);
  background-color: var(--paper);
  background-image:
    radial-gradient(120% 58% at 10% -6%, rgba(217, 162, 75, 0.20), rgba(217, 162, 75, 0) 62%),
    radial-gradient(88% 50% at 96% 2%, rgba(165, 61, 42, 0.13), rgba(165, 61, 42, 0) 60%);
  background-repeat: no-repeat;
  background-size: 100% 680px, 100% 680px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.16;
  color: var(--ink);
  margin: 0 0 0.55em;
}

h1 { font-size: clamp(40px, 6.2vw, 92px); }
h2 { font-size: clamp(26px, 3.4vw, 46px); }
h3 { font-size: clamp(19px, 2vw, 26px); letter-spacing: -0.01em; }
h4 { font-size: clamp(16px, 1.4vw, 20px); letter-spacing: 0; }

p {
  margin: 0 0 1em;
}

a {
  color: var(--ochre);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--ochre-deep);
}

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

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- 跳过链接 ---------- */

.skip-link {
  position: fixed;
  top: -90px;
  left: 16px;
  z-index: 300;
  display: inline-block;
  padding: 11px 20px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-decoration: none;
  clip-path: var(--cut-sm);
  transition: top 0.22s var(--ease);
}

.skip-link:focus {
  top: 14px;
  color: var(--mist);
}

/* ---------- 页头 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(245, 239, 228, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

.read-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--ochre) 0%, var(--sand) 62%, var(--teal) 100%);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.15s linear;
  pointer-events: none;
}

.masthead {
  border-bottom: 1px solid var(--rule);
}

.masthead__inner {
  width: var(--shell);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding-block: 16px 14px;
}

.masthead__utility {
  margin: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
}

.masthead__label {
  font-size: 10.5px;
  color: var(--stone);
}

.masthead__version {
  font-size: 14px;
  font-weight: 700;
  color: var(--ochre);
  padding: 1px 7px;
  border: 1px solid rgba(165, 61, 42, 0.35);
  background: rgba(217, 162, 75, 0.18);
  clip-path: var(--cut-sm);
}

.masthead__brand {
  justify-self: center;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  text-decoration: none;
  color: var(--ink);
  padding-inline: 6px;
}

.masthead__brand:hover {
  color: var(--ochre-deep);
}

.masthead__wordmark {
  position: relative;
  display: block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(24px, 2.8vw, 34px);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.masthead__wordmark::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 30px;
  height: 3px;
  transform: translateX(-50%);
  background: var(--ochre);
  clip-path: polygon(0 0, 100% 0, 82% 100%, 18% 100%);
}

.masthead__tagline {
  display: block;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--stone);
}

.masthead__actions {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.masthead__cta {
  padding: 9px 15px;
  font-size: 11.5px;
}

/* ---------- 移动导航按钮 ---------- */

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid var(--rule-strong);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  cursor: pointer;
  clip-path: var(--cut-sm);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.nav-toggle:hover {
  background: rgba(217, 162, 75, 0.2);
  border-color: var(--ochre);
}

.nav-toggle__box {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  width: 16px;
  height: 12px;
}

.nav-toggle__bar {
  display: block;
  height: 2px;
  background: var(--ochre);
  transition: transform 0.24s var(--ease), opacity 0.18s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(5px) rotate(38deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-5px) rotate(-38deg);
}

.nav-toggle__text {
  line-height: 1;
}

/* ---------- 导航 ---------- */

.site-nav {
  position: relative;
}

.site-nav__inner {
  width: var(--shell);
  margin-inline: auto;
}

.site-nav__list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.site-nav__link {
  position: relative;
  display: inline-block;
  padding: 11px 13px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.site-nav__link:hover {
  color: var(--ochre-deep);
  background: rgba(217, 162, 75, 0.22);
}

.site-nav__link[aria-current="page"] {
  color: var(--ochre);
  font-weight: 700;
}

.site-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 5px;
  height: 3px;
  background: var(--ochre);
  clip-path: polygon(0 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}

.site-nav__sep {
  width: 1px;
  height: 15px;
  margin-inline: 10px;
  background: var(--rule-strong);
  transform: rotate(14deg);
}

/* ---------- 按钮 ---------- */

.btn {
  --btn-bg: var(--ochre);
  --btn-fg: var(--paper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  clip-path: var(--cut-sm);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  background: var(--ochre-deep);
  color: var(--paper);
}

.btn:active {
  background: var(--ochre-deep);
}

.btn:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 4px;
  box-shadow: inset 0 0 0 2px rgba(46, 139, 127, 0.55);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  border-color: var(--rule-strong);
}

.btn--ghost:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.btn--sand {
  --btn-bg: var(--sand);
  --btn-fg: var(--ink);
}

.btn--sand:hover {
  background: var(--mist);
  color: var(--ink);
}

.btn--teal {
  --btn-bg: var(--teal);
  --btn-fg: #FFFFFF;
}

.btn--teal:hover {
  background: #246F66;
  color: #FFFFFF;
}

/* ---------- 页脚 ---------- */

.site-footer {
  position: relative;
  overflow: hidden;
  margin-top: clamp(64px, 9vw, 128px);
  background-color: var(--ink);
  color: rgba(245, 239, 228, 0.78);
  font-size: 14px;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    116deg,
    rgba(217, 162, 75, 0.10) 0 1px,
    transparent 1px 28px
  );
  pointer-events: none;
}

.site-footer::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--ochre) 0 36%, var(--sand) 36% 70%, var(--teal) 70% 100%);
  clip-path: polygon(0 0, 100% 0, 100% 34%, 0 100%);
}

.site-footer__inner {
  position: relative;
  z-index: 1;
  width: var(--shell);
  margin-inline: auto;
  padding-block: clamp(48px, 6vw, 76px) clamp(32px, 4vw, 48px);
  display: grid;
  grid-template-columns: minmax(180px, 0.85fr) minmax(0, 2.2fr);
  gap: clamp(28px, 4vw, 64px);
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer__wordmark {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(26px, 3.4vw, 38px);
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--paper);
}

.site-footer__tagline {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--sand);
}

.site-footer__note {
  margin: 0;
  max-width: 26ch;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(245, 239, 228, 0.58);
}

.site-footer__cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.footer-col {
  min-width: 0;
}

.footer-col__title {
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(217, 162, 75, 0.30);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--sand);
}

.footer-col__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-col__list--plain {
  gap: 11px;
}

.footer-col__link {
  display: inline-block;
  color: rgba(245, 239, 228, 0.82);
  font-size: 13.5px;
  text-decoration: none;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-col__link:hover {
  color: var(--mist);
  padding-left: 4px;
}

.footer-col__line {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(245, 239, 228, 0.64);
  overflow-wrap: anywhere;
}

.footer-col__line--mono {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--sand);
}

.site-footer__base {
  position: relative;
  z-index: 1;
  width: var(--shell);
  margin-inline: auto;
  padding-block: 18px 26px;
  border-top: 1px solid rgba(245, 239, 228, 0.16);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(245, 239, 228, 0.55);
}

.site-footer__copy,
.site-footer__icp {
  margin: 0;
}

.to-top {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  padding: 8px 15px;
  background: transparent;
  color: var(--sand);
  border: 1px solid rgba(217, 162, 75, 0.45);
  cursor: pointer;
  clip-path: var(--cut-sm);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.to-top:hover {
  background: rgba(217, 162, 75, 0.18);
  color: var(--mist);
}

.to-top:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 4px;
  box-shadow: inset 0 0 0 2px var(--teal);
}

/* ---------- 布局工具 ---------- */

.page-shell {
  width: var(--shell);
  margin-inline: auto;
}

.section {
  padding-block: clamp(48px, 7vw, 96px);
}

.section--tight {
  padding-block: clamp(28px, 4vw, 56px);
}

.section--ink {
  background: var(--ink);
  color: rgba(245, 239, 228, 0.85);
}

.section--ink h2,
.section--ink h3 {
  color: var(--paper);
}

.grid {
  display: grid;
  gap: clamp(20px, 3vw, 36px);
}

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

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

/* ---------- 文本组件 ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ochre);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: currentColor;
  clip-path: polygon(0 0, 100% 0, 92% 100%, 0 100%);
}

.lede {
  max-width: 62ch;
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.8;
  color: var(--stone);
}

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
}

/* ---------- 面包屑 ---------- */

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 18px 0 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--stone);
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
}

.breadcrumbs li::after {
  content: "/";
  margin-left: 8px;
  color: rgba(109, 104, 95, 0.55);
}

.breadcrumbs li:last-child::after {
  content: "";
  margin: 0;
}

.breadcrumbs a {
  color: var(--stone);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--ochre);
  text-decoration: underline;
}

.breadcrumbs [aria-current="page"] {
  color: var(--ink);
}

/* ---------- 面板 ---------- */

.panel {
  position: relative;
  padding: clamp(20px, 2.6vw, 34px);
  background: #FBF7EF;
  border: 1px solid var(--rule);
  clip-path: var(--cut);
}

.panel--ink {
  background: var(--ink);
  border-color: rgba(245, 239, 228, 0.16);
  color: rgba(245, 239, 228, 0.85);
}

.panel--ink h2,
.panel--ink h3 {
  color: var(--paper);
}

.panel--sand {
  background: var(--mist);
  border-color: rgba(217, 162, 75, 0.5);
  color: var(--ink);
}

.panel--teal {
  background: var(--pale-teal);
  border-color: rgba(46, 139, 127, 0.35);
  color: var(--ink);
}

/* ---------- 标签 ---------- */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.4;
  color: var(--ink);
  background: var(--mist);
  border: 1px solid rgba(217, 162, 75, 0.5);
  text-decoration: none;
  cursor: pointer;
  clip-path: var(--cut-sm);
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.tag:hover {
  border-color: var(--ochre);
  color: var(--ochre-deep);
}

.tag--teal {
  background: var(--pale-teal);
  border-color: rgba(46, 139, 127, 0.45);
  color: #1B5D55;
}

.tag.is-active {
  background: var(--teal);
  border-color: var(--teal);
  color: #FFFFFF;
}

/* ---------- 媒体容器（页面阶段放图 / 内联 SVG） ---------- */

.media {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: linear-gradient(150deg, #EFE6D6 0%, #E3D8C4 55%, #D8CCB4 100%);
  border: 1px solid var(--rule);
}

.media__frame {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.media__frame img,
.media__frame svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media__caption {
  margin: 0;
  padding: 10px 14px;
  border-top: 1px solid var(--rule);
  background: rgba(245, 239, 228, 0.72);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--stone);
}

.media--cut {
  border: 0;
  clip-path: var(--cut);
}

.media--wide .media__frame {
  aspect-ratio: 21 / 9;
}

.media--square .media__frame {
  aspect-ratio: 1 / 1;
}

/* ---------- 动效钩子 ---------- */

[data-reveal] {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.55s ease, transform 0.55s var(--ease);
}

[data-reveal].is-hidden {
  opacity: 0;
  transform: translateY(18px);
}

[data-spy-link] {
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

[data-spy-link].is-active {
  color: var(--ochre);
  border-color: var(--ochre);
}

/* ---------- 响应式 ---------- */

@media (max-width: 980px) {
  .site-footer__inner {
    grid-template-columns: 1fr;
  }

  .site-footer__cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 24px;
  }

  .site-footer__note {
    max-width: 46ch;
  }
}

@media (max-width: 900px) {
  .masthead__inner {
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding-block: 12px;
  }

  .masthead__utility {
    display: none;
  }

  .masthead__brand {
    justify-self: start;
    align-items: flex-start;
    padding-inline: 0;
  }

  .masthead__wordmark::after {
    left: 0;
    transform: none;
  }

  .masthead__tagline {
    margin-top: 10px;
    font-size: 9.5px;
    letter-spacing: 0.12em;
  }

  .masthead__actions {
    justify-self: end;
  }

  .masthead__cta {
    display: none;
  }

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

  .site-nav {
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    border-top: 1px solid var(--rule);
    background: var(--paper-deep);
    transition: max-height 0.34s var(--ease), visibility 0s linear 0.34s;
  }

  .site-nav[data-open="true"] {
    visibility: visible;
    max-height: 76vh;
    overflow-y: auto;
    transition: max-height 0.34s var(--ease), visibility 0s linear 0s;
  }

  .site-nav__inner {
    width: 100%;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 10px 20px 20px;
  }

  .site-nav__link {
    display: block;
    padding: 13px 6px;
    font-size: 13px;
    border-bottom: 1px solid var(--rule);
  }

  .site-nav__link[aria-current="page"] {
    background: rgba(217, 162, 75, 0.26);
    padding-left: 14px;
  }

  .site-nav__link[aria-current="page"]::after {
    display: none;
  }

  .site-nav__sep {
    display: none;
  }
}

@media (max-width: 860px) {
  .grid--2,
  .grid--3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  :root {
    --shell: min(1200px, 100% - 32px);
  }

  body {
    font-size: 15.5px;
  }

  .site-footer__cols {
    grid-template-columns: 1fr;
  }

  .site-footer__base {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .to-top {
    align-self: flex-start;
  }

  .panel {
    padding: 20px 18px;
  }
}

/* ---------- 减少动效 ---------- */

@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;
    scroll-behavior: auto !important;
  }

  [data-reveal],
  [data-reveal].is-hidden {
    opacity: 1;
    transform: none;
  }

  .read-progress {
    transition: none;
  }

  .site-nav,
  .site-nav[data-open="true"] {
    transition: none;
  }
}
