/* =========================================================
   优发国际服务 · /assets/site.css
   共享层：reset / 变量 / 中文排版 / 头部 / 页脚 / 基础组件
   ========================================================= */

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

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

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd, ul, ol {
  margin: 0;
}

ul, ol { padding: 0; }

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

button { font: inherit; }

:root {
  /* 色彩系统 */
  --ink-900: #081826;
  --ink-850: #0B1F30;
  --ink-800: #10283D;
  --line: #2F465B;
  --line-soft: rgba(47, 70, 91, 0.55);
  --paper: #F1E7D6;
  --paper-2: #E3D5BD;
  --cyan: #38D6C4;
  --amber: #F2A93B;
  --amber-deep: #B86E1E;
  --sage: #8DA79B;
  --ice: #EAF4F7;
  --mist: #B7D8D4;

  /* 字体 */
  --font-sans: "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Courier New", monospace;

  /* 尺寸 */
  --shell-max: 1320px;
  --gutter: clamp(1.15rem, 4vw, 3.5rem);
  --header-h: 74px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (max-width: 1080px) {
  :root { --header-h: 64px; }
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--ink-900);
  color: var(--ice);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#main-content {
  flex: 1 0 auto;
  display: block;
}

p { max-width: 74ch; }

a { color: var(--cyan); }

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

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

.site-header :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--amber);
}

.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: fixed;
  top: -6rem;
  left: 1rem;
  z-index: 400;
  padding: 0.7rem 1.1rem;
  background: var(--amber);
  color: var(--ink-900);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: top 0.22s var(--ease);
}

.skip-link:focus {
  top: 0.7rem;
}

/* ---------- 容器与章节 ---------- */

.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(3rem, 7vw, 6.5rem);
}

.section--tight {
  padding-block: clamp(1.8rem, 4vw, 3.2rem);
}

.section-head {
  max-width: 62ch;
  margin-bottom: clamp(1.6rem, 3vw, 2.8rem);
  display: grid;
  gap: 0.9rem;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cyan);
}

.kicker::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.75;
  flex: 0 0 auto;
}

.display {
  font-size: clamp(2.4rem, 6.2vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 800;
  color: var(--ice);
}

.h2 {
  font-size: clamp(1.5rem, 2.7vw, 2.35rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 750;
  color: var(--ice);
}

.lead {
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  line-height: 1.8;
  color: var(--mist);
  max-width: 64ch;
}

.idx {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--sage);
  text-transform: uppercase;
}

.muted { color: var(--sage); }

.rule {
  height: 1px;
  border: 0;
  background: var(--line-soft);
  margin: 0;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.35rem;
  font-size: 0.9rem;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-decoration: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ice);
  cursor: pointer;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.btn::after {
  content: "\2192";
  font-family: var(--font-mono);
  font-size: 0.9em;
  transition: transform 0.3s var(--ease);
}

.btn:hover::after { transform: translateX(3px); }

.btn--amber {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--ink-900);
}

.btn--amber:hover {
  background: var(--amber-deep);
  border-color: var(--amber-deep);
  color: var(--ice);
}

.btn--ghost {
  border-color: var(--line);
  color: var(--ice);
}

.btn--ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn--cyan {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--ink-900);
}

.btn--cyan:hover {
  background: var(--mist);
  border-color: var(--mist);
  color: var(--ink-900);
}

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

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  color: var(--mist);
  background: transparent;
}

.tag--amber {
  border-color: rgba(242, 169, 59, 0.5);
  color: var(--amber);
  background: rgba(242, 169, 59, 0.08);
}

.tag--cyan {
  border-color: rgba(56, 214, 196, 0.45);
  color: var(--cyan);
  background: rgba(56, 214, 196, 0.07);
}

.tag--sage {
  border-color: rgba(141, 167, 155, 0.45);
  color: var(--sage);
}

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

.panel {
  background: var(--ink-800);
  border: 1px solid var(--line);
  padding: clamp(1.2rem, 2.4vw, 2rem);
}

.panel--paper {
  background: var(--paper);
  border-color: var(--paper-2);
  color: var(--ink-900);
}

.panel--paper .lead,
.panel--paper p {
  color: #2C4053;
}

.panel--paper a {
  color: #1B4B57;
  text-decoration-color: rgba(27, 75, 87, 0.4);
}

.panel--paper .idx {
  color: #6C7A72;
}

/* ---------- 网格 ---------- */

.grid {
  display: grid;
  gap: clamp(1rem, 2.4vw, 2rem);
}

.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--asym { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.grid--rail { grid-template-columns: minmax(0, 3.4fr) minmax(0, 10fr); }

@media (max-width: 900px) {
  .grid--2,
  .grid--3,
  .grid--asym,
  .grid--rail {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- 图片 / 图形容器 ---------- */

.media {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 90% at 18% 0%, rgba(56, 214, 196, 0.16), transparent 60%),
    linear-gradient(160deg, var(--ink-800), var(--ink-900));
}

.media::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(47, 70, 91, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 70, 91, 0.5) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.5;
  pointer-events: none;
}

.media > img,
.media > svg {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media--wide { aspect-ratio: 16 / 9; }
.media--square { aspect-ratio: 1 / 1; }
.media--portrait { aspect-ratio: 3 / 4; }
.media--tall { aspect-ratio: 4 / 5; }

.media__label {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  padding: 0.5rem 0.7rem;
  background: var(--ink-900);
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  color: var(--cyan);
}

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

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding-block: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--sage);
}

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

.breadcrumbs a:hover { color: var(--cyan); }

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

.crumb-sep { color: var(--line); }

/* ---------- 编号轨道 ---------- */

.track {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

.track-item {
  position: relative;
  padding: 0.15rem 0 1.9rem 3rem;
}

.track-item::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 1.9rem;
  bottom: 0;
  width: 1px;
  background: var(--line);
}

.track-item:last-child { padding-bottom: 0; }
.track-item:last-child::before { display: none; }

.track-num {
  position: absolute;
  left: 0;
  top: 0.1rem;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--amber);
  border: 1px solid rgba(242, 169, 59, 0.45);
  background: var(--ink-900);
}

/* ---------- 滚动显现 ---------- */

.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.46s var(--ease), transform 0.46s var(--ease);
  transition-delay: calc(var(--d, 0) * 80ms);
}

.has-js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* =========================================================
   头部
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  color: var(--ice);
  background:
    linear-gradient(180deg, rgba(8, 24, 38, 0.95) 0%, rgba(8, 24, 38, 0.68) 62%, rgba(8, 24, 38, 0) 100%);
  transition: background-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.site-header[data-scrolled] {
  background-color: rgba(8, 24, 38, 0.97);
  background-image: none;
  box-shadow: 0 1px 0 var(--line), 0 22px 44px -36px #000;
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
}

.header-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(47, 70, 91, 0.35);
}

.header-progress-bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--amber));
  transition: width 0.12s linear;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 1.8vw, 1.6rem);
  min-height: var(--header-h);
}

/* 品牌 */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--ice);
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  transition: border-color 0.3s var(--ease);
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(56, 214, 196, 0.55);
}

.brand-mark-core {
  width: 8px;
  height: 8px;
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(242, 169, 59, 0.14), 0 0 14px rgba(242, 169, 59, 0.55);
}

.brand:hover .brand-mark { border-color: var(--cyan); }

.brand-text { display: block; }

.brand-name {
  display: block;
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.02em;
}

.brand-line {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  line-height: 1.4;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sage);
}

/* 主导航 */

.primary-nav { margin-inline: auto; }

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(0.35rem, 1.5vw, 1.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: 0.55rem 0.1rem;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  color: var(--mist);
  text-decoration: none;
  transition: color 0.28s var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0.28rem;
  height: 1px;
  background: var(--cyan);
  transition: right 0.32s var(--ease);
}

.nav-link:hover { color: var(--ice); }
.nav-link:hover::after { right: 0; }

.nav-link[aria-current="page"] { color: var(--ice); }

.nav-link[aria-current="page"]::after {
  right: 0;
  background: var(--amber);
}

.nav-link[aria-current="page"]::before {
  content: "";
  position: absolute;
  top: 0.2rem;
  left: -0.62rem;
  width: 4px;
  height: 4px;
  background: var(--amber);
}

/* 工具区 */

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
}

.util-link,
.util-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  color: var(--ice);
  background: transparent;
  border: 1px solid var(--line);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.28s var(--ease), color 0.28s var(--ease), background-color 0.28s var(--ease);
}

.util-link:hover,
.util-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.util-btn-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border: 1px solid currentColor;
  border-radius: 50%;
  transition: background-color 0.28s var(--ease);
}

.util-btn[aria-pressed="true"] {
  border-color: var(--amber);
  color: var(--amber);
  background: rgba(242, 169, 59, 0.08);
}

.util-btn[aria-pressed="true"] .util-btn-dot {
  background: currentColor;
}

.version-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.42rem 0.62rem;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--ink-900);
  background: var(--amber);
  text-decoration: none;
  transition: background-color 0.28s var(--ease), color 0.28s var(--ease);
}

.version-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink-900);
}

.version-badge:hover {
  background: var(--amber-deep);
  color: var(--ice);
}

/* 移动按钮 */

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.62rem;
  font-size: 0.8rem;
  color: var(--ice);
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color 0.28s var(--ease), color 0.28s var(--ease);
}

.nav-toggle:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.nav-toggle-bars {
  display: grid;
  gap: 4px;
  width: 16px;
}

.nav-toggle-bars span {
  display: block;
  height: 1px;
  background: currentColor;
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}

.nav-toggle-label {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
}

/* 移动端导航 */

@media (max-width: 1080px) {
  .header-tools { margin-left: auto; }

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

  .primary-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    padding: 0.4rem var(--gutter) 1.4rem;
    background: var(--ink-850);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 32px 60px -44px #000;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }

  .site-header[data-open] .primary-nav { display: block; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-item { border-top: 1px solid var(--line-soft); }
  .nav-item:first-child { border-top: 0; }

  .nav-link {
    display: block;
    padding: 0.85rem 0.2rem;
    font-size: 1rem;
    color: var(--ice);
  }

  .nav-link::after { display: none; }

  .nav-link[aria-current="page"] { color: var(--amber); }

  .nav-link[aria-current="page"]::before {
    left: auto;
    right: 0.35rem;
    top: 50%;
    width: 5px;
    height: 5px;
    transform: translateY(-50%);
  }

  .site-header[data-open] .nav-toggle-bars span:first-child {
    transform: translateY(2.5px) rotate(45deg);
  }

  .site-header[data-open] .nav-toggle-bars span:last-child {
    transform: translateY(-2.5px) rotate(-45deg);
  }
}

@media (max-width: 860px) {
  .version-badge { display: none; }
}

@media (max-width: 620px) {
  .brand-name { font-size: 0.94rem; }
  .brand-line { letter-spacing: 0.16em; font-size: 0.55rem; }
  .brand-mark { width: 30px; height: 30px; }
  .header-tools { gap: 0.32rem; }
  .util-link,
  .util-btn { padding: 0.42rem 0.48rem; font-size: 0.56rem; letter-spacing: 0.08em; }
}

@media (max-width: 400px) {
  .brand-line { display: none; }
}

/* =========================================================
   页脚
   ========================================================= */

.site-footer {
  position: relative;
  margin-top: auto;
  padding-block: clamp(2.6rem, 5.5vw, 4.6rem) 1.3rem;
  background: var(--ink-900);
  border-top: 1px solid var(--line);
  color: var(--mist);
}

.site-footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), rgba(56, 214, 196, 0) 46%, rgba(242, 169, 59, 0.65));
}

.footer-inner { position: relative; z-index: 1; }

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.8fr) minmax(0, 0.8fr) minmax(0, 1.15fr);
  gap: clamp(1.6rem, 3.6vw, 3rem);
}

.footer-name {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ice);
}

.footer-tag {
  margin-top: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cyan);
}

.footer-about {
  margin-top: 1rem;
  max-width: 34ch;
  font-size: 0.92rem;
  line-height: 1.85;
  color: var(--mist);
}

.footer-cta { margin-top: 1.5rem; }

.footer-col-title {
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sage);
}

.footer-links,
.footer-contact {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-link {
  display: inline-block;
  padding-bottom: 1px;
  font-size: 0.95rem;
  color: var(--ice);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.26s var(--ease), border-color 0.26s var(--ease);
}

.footer-link:hover {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

.footer-contact { gap: 0.7rem; }

.contact-row {
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr);
  gap: 0.55rem;
  font-size: 0.9rem;
  line-height: 1.6;
}

.contact-key {
  padding-top: 0.18rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--sage);
}

.contact-val {
  color: var(--ice);
  word-break: break-word;
}

.contact-note {
  margin-top: 1rem;
  max-width: 30ch;
  font-size: 0.78rem;
  line-height: 1.75;
  color: var(--sage);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem 1.6rem;
  margin-top: clamp(2rem, 4vw, 3.2rem);
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--sage);
}

.footer-copy { margin: 0; }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.legal-link {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--mist);
  text-decoration: none;
  transition: color 0.26s var(--ease);
}

.legal-link:hover { color: var(--cyan); }

.footer-icp {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

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

@media (max-width: 600px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .contact-row { grid-template-columns: 3rem minmax(0, 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;
  }

  .has-js [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .btn:hover::after { transform: none; }
}
