/* ============================================================
   亿百中心 · 共享样式表 /assets/site.css
   结构：01 Reset / 02 变量 / 03 中文排版 / 04 头部轨道 / 05 页脚
        06 通用组件 / 07 图片容器 / 08 响应式 / 09 偏好设置
   ============================================================ */

/* ---------- 01 Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
table { width: 100%; border-collapse: collapse; }

/* ---------- 02 变量 ---------- */
:root {
  --soil: #F5F1E8;
  --clay: #E6DCC8;
  --loam: #6B5230;
  --ink: #14181F;
  --cobalt: #1447D6;
  --cobalt-soft: #E3EAFF;
  --orange: #FF6A15;
  --cyan: #16D0C4;
  --grey: #5B6472;
  --white: #FFFFFF;

  --rail-w: 88px;
  --pad: 32px;
  --shell: 1240px;
  --step: 8px;

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

  --ease: cubic-bezier(.22, .7, .24, 1);
  --hair: 1px solid rgba(20, 24, 31, .16);
  --hair-dark: 1px solid rgba(245, 241, 232, .14);
}

/* ---------- 03 中文排版与基础 ---------- */
body {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--ink);
  background: var(--soil);
  padding-left: var(--rail-w);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 {
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(34px, 5.2vw, 64px); }
h2 { font-size: clamp(26px, 3.4vw, 40px); }
h3 { font-size: clamp(20px, 2.1vw, 26px); }
h4 { font-size: 18px; letter-spacing: 0; }
h5 { font-size: 16px; font-weight: 800; }

p { max-width: none; }
strong, b { font-weight: 800; }
small { font-size: 13px; color: var(--grey); }

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

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

.mono, .num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}
.num { margin: 0 .08em; }

.prose { max-width: 34em; }
.prose p + p { margin-top: 1.1em; }
.prose h3 { margin-top: 1.6em; margin-bottom: .5em; }

.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;
}

.is-hidden { display: none !important; }
body.is-locked { overflow: hidden; }

/* ---------- 04 头部：侧边轨道 ---------- */
.skip {
  position: fixed;
  top: 8px;
  left: calc(var(--rail-w) + 8px);
  z-index: 200;
  display: inline-block;
  padding: 10px 18px;
  background: var(--orange);
  color: var(--ink);
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform .16s var(--ease);
}
.skip:focus { transform: none; }

.sitehead {
  position: fixed;
  z-index: 80;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: var(--soil);
  border-right: var(--hair-dark);
}

/* 品牌条 */
.rail__bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 0 14px;
  border-bottom: var(--hair-dark);
}
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.brand__mark {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  width: 30px;
  height: 30px;
}
.brand__mark i { display: block; background: var(--cobalt); }
.brand__mark i:nth-child(2) { background: var(--orange); }
.brand__mark i:nth-child(3) { background: var(--cyan); }
.brand__mark i:nth-child(4) { background: rgba(245, 241, 232, .32); }
.brand__text { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.brand__name {
  writing-mode: vertical-rl;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .22em;
}
.brand__sub { display: none; }

/* 汉堡按钮 */
.navtoggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  background: transparent;
  border: 1px solid rgba(245, 241, 232, .32);
  color: var(--soil);
  font-size: 13px;
  letter-spacing: .12em;
  cursor: pointer;
  transition: background .16s var(--ease), border-color .16s var(--ease);
}
.navtoggle:hover { background: rgba(20, 71, 214, .4); border-color: var(--cobalt); }
.navtoggle__bars { display: flex; flex-direction: column; gap: 4px; width: 16px; }
.navtoggle__bars i {
  display: block; height: 2px; width: 100%;
  background: currentColor;
  transition: transform .18s var(--ease), opacity .18s var(--ease);
}
.sitehead[data-open] .navtoggle__bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.sitehead[data-open] .navtoggle__bars i:nth-child(2) { opacity: 0; }
.sitehead[data-open] .navtoggle__bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* 导航 */
.rail__nav {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: visible;
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 241, 232, .3) transparent;
}
.rail__caption {
  padding: 12px 0 10px;
  font-size: 11px;
  letter-spacing: .24em;
  text-align: center;
  color: rgba(245, 241, 232, .42);
}
.rail__list { display: flex; flex-direction: column; }
.rail__link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 13px 6px;
  color: rgba(245, 241, 232, .74);
  text-decoration: none;
  transition: background .16s var(--ease), color .16s var(--ease);
}
.rail__list li + li .rail__link { border-top: var(--hair-dark); }
.rail__link:hover { background: rgba(20, 71, 214, .34); color: var(--white); }
.rail__link[aria-current="page"] { background: var(--cobalt); color: var(--white); }
.rail__link[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--orange);
}
.rail__idx {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .16em;
  color: rgba(245, 241, 232, .45);
}
.rail__link[aria-current="page"] .rail__idx { color: rgba(255, 255, 255, .9); }
.rail__label {
  writing-mode: vertical-rl;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .2em;
}

.rail__quick { display: none; }

.rail__foot {
  padding: 16px 10px 20px;
  border-top: var(--hair-dark);
}
.rail__tagline {
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: .1em;
  color: rgba(245, 241, 232, .58);
}
.rail__meta {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.5;
  color: rgba(245, 241, 232, .4);
  word-break: break-all;
}

/* 滚动刻度 */
.rail__meter {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 3px;
  background: rgba(245, 241, 232, .1);
}
.rail__meter-fill {
  display: block;
  width: 100%;
  height: calc(var(--sp, 0) * 100%);
  background: var(--cyan);
}

/* ---------- 05 页脚 ---------- */
.sitefoot {
  position: relative;
  background: var(--clay);
  color: var(--ink);
  border-top: 1px solid var(--ink);
}
.foot__ticks {
  height: 12px;
  background-image:
    repeating-linear-gradient(to right, var(--ink) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(to right, var(--ink) 0 1px, transparent 1px 8px);
  background-size: 100% 12px, 100% 5px;
  background-position: left top, left top;
  background-repeat: repeat-x, repeat-x;
  opacity: .4;
}
.foot__inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 56px var(--pad) 8px;
}
.foot__top {
  display: grid;
  grid-template-columns: 1.65fr 1fr 1fr 1fr;
  gap: 40px 24px;
}

.foot__eyebrow {
  font-size: 12px;
  letter-spacing: .24em;
  color: var(--loam);
}
.foot__wordmark {
  margin-top: 14px;
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -.01em;
}
.foot__lead {
  margin-top: 16px;
  max-width: 26em;
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--grey);
}
.foot__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.badge {
  padding: 6px 10px;
  border: 1px solid var(--ink);
  background: var(--soil);
  font-size: 12px;
  letter-spacing: .08em;
}

.foot__coltitle {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(20, 24, 31, .2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .24em;
  color: var(--loam);
}
.foot__links { margin-top: 8px; }
.foot__links a {
  display: block;
  padding: 8px 0;
  font-size: 15px;
  text-decoration: none;
  transition: color .16s var(--ease), transform .16s var(--ease);
}
.foot__links a::before {
  content: "→";
  margin-right: 8px;
  color: var(--cobalt);
  opacity: .35;
  transition: opacity .16s var(--ease);
}
.foot__links a:hover { color: var(--cobalt); transform: translateX(3px); }
.foot__links a:hover::before { opacity: 1; }

.foot__contact {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid rgba(20, 24, 31, .2);
}
.copy-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.copy {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 14px;
  background: var(--white);
  border: 1px solid var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color .16s var(--ease), background .16s var(--ease), transform .16s var(--ease);
}
.copy:hover { transform: translateY(-2px); border-color: var(--cobalt); }
.copy__k {
  flex: 0 0 auto;
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--loam);
}
.copy__v {
  flex: 1 1 auto;
  font-family: var(--font-mono);
  font-size: 13.5px;
  word-break: break-all;
}
.copy__s {
  flex: 0 0 auto;
  padding-left: 10px;
  border-left: 1px solid rgba(20, 24, 31, .18);
  font-size: 12px;
  color: var(--cobalt);
}
.copy.is-done { background: rgba(22, 208, 196, .14); border-color: var(--cyan); }
.copy.is-done .copy__s { color: var(--ink); font-weight: 800; }

.foot__hint {
  margin-top: 16px;
  font-size: 13px;
  color: var(--grey);
}

.foot__base { margin-top: 48px; background: var(--ink); color: rgba(245, 241, 232, .68); }
.foot__baseinner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 20px var(--pad);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 28px;
  font-size: 13px;
}
.foot__copy { color: rgba(245, 241, 232, .68); }
.foot__legal { font-family: var(--font-mono); letter-spacing: .04em; }
.foot__links-inline { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.foot__links-inline a {
  color: rgba(245, 241, 232, .88);
  text-decoration: none;
  border-bottom: 1px solid rgba(245, 241, 232, .28);
  padding-bottom: 1px;
  transition: color .16s var(--ease), border-color .16s var(--ease);
}
.foot__links-inline a:hover { color: var(--cyan); border-color: var(--cyan); }

/* ---------- 06 通用组件 ---------- */
.container {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.section { padding: 72px 0; }
.section--tight { padding: 40px 0; }
.section--ruled { border-top: var(--hair); }

.section__label {
  writing-mode: vertical-rl;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .24em;
  color: var(--loam);
}
.section__head { display: flex; gap: 20px; align-items: flex-start; }

.grid12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
}
.c-3 { grid-column: span 3; }
.c-4 { grid-column: span 4; }
.c-5 { grid-column: span 5; }
.c-6 { grid-column: span 6; }
.c-7 { grid-column: span 7; }
.c-8 { grid-column: span 8; }
.c-9 { grid-column: span 9; }
.c-12 { grid-column: span 12; }

.panel {
  background: var(--white);
  border: 1px solid var(--ink);
  padding: 28px;
}
.panel--clay { background: var(--clay); }
.panel--soft { background: var(--cobalt-soft); }
.panel--ink { background: var(--ink); color: var(--soil); border-color: var(--ink); }

.stack { position: relative; }
.stack::before {
  content: "";
  position: absolute;
  inset: -8px 8px 8px -8px;
  border: 1px solid rgba(20, 24, 31, .22);
  pointer-events: none;
}

.frame {
  position: relative;
  padding: 40px;
  background: var(--white);
  border: 1px solid var(--ink);
}
.frame::after {
  content: "";
  position: absolute;
  inset: -9px;
  pointer-events: none;
  background-image:
    linear-gradient(var(--ink), var(--ink)),
    linear-gradient(var(--ink), var(--ink)),
    linear-gradient(var(--ink), var(--ink)),
    linear-gradient(var(--ink), var(--ink)),
    linear-gradient(var(--ink), var(--ink)),
    linear-gradient(var(--ink), var(--ink)),
    linear-gradient(var(--ink), var(--ink)),
    linear-gradient(var(--ink), var(--ink));
  background-repeat: no-repeat;
  background-size: 16px 1px, 1px 16px, 16px 1px, 1px 16px, 16px 1px, 1px 16px, 16px 1px, 1px 16px;
  background-position: left top, left top, right top, right top, left bottom, left bottom, right bottom, right bottom;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: var(--white);
  border: 1px solid var(--ink);
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .16s var(--ease), background .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--cobalt); border-color: var(--cobalt); color: var(--white); }
.btn--primary:hover { background: #0F35A8; border-color: #0F35A8; }
.btn--accent { background: var(--orange); border-color: var(--orange); color: var(--ink); }
.btn--ghost { background: transparent; }
.btn--sm { padding: 10px 15px; font-size: 14px; }

.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid rgba(20, 24, 31, .3);
  background: var(--soil);
  font-size: 13px;
  letter-spacing: .06em;
  text-decoration: none;
  transition: background .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease);
}
.chip:hover { background: var(--cobalt); border-color: var(--cobalt); color: var(--white); }
.chip--rail {
  background: transparent;
  border-color: rgba(245, 241, 232, .3);
  color: rgba(245, 241, 232, .86);
}

.tag {
  display: inline-block;
  padding: 4px 9px;
  border: 1px solid var(--loam);
  color: var(--loam);
  font-size: 12px;
  letter-spacing: .08em;
}

.filterbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.filter {
  padding: 10px 16px;
  background: var(--clay);
  border: 1px solid var(--ink);
  color: var(--ink);
  font-size: 14px;
  letter-spacing: .06em;
  cursor: pointer;
  transition: background .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease);
}
.filter:hover { border-color: var(--cobalt); color: var(--cobalt); }
.filter[aria-pressed="true"] { background: var(--cobalt); border-color: var(--cobalt); color: var(--white); }
.filter__count {
  margin-left: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--loam);
}

.crumbs { font-size: 13px; color: var(--grey); }
.crumbs__list { display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs__list li + li::before { content: "/"; margin-right: 8px; color: var(--loam); }
.crumbs a {
  color: var(--grey);
  text-decoration: none;
  border-bottom: 1px solid rgba(91, 100, 114, .35);
}
.crumbs a:hover { color: var(--cobalt); border-color: var(--cobalt); }
.crumbs [aria-current="page"] { color: var(--ink); font-weight: 800; }

/* ---------- 07 图片容器基础（页面阶段放占位图） ---------- */
.media {
  position: relative;
  display: block;
  width: 100%;
  background: var(--clay);
  border: 1px solid var(--ink);
  overflow: hidden;
}
.media img { width: 100%; height: 100%; object-fit: cover; }
.media--wide { aspect-ratio: 16 / 9; }
.media--tile { aspect-ratio: 4 / 3; }
.media--tall { aspect-ratio: 3 / 4; }
.media--band { aspect-ratio: 21 / 9; }
.media__tag {
  position: absolute;
  top: 0; left: 0;
  padding: 6px 10px;
  background: var(--ink);
  color: var(--soil);
  font-family: var(--font-mono);
  font-size: 12px;
}
.media__cap {
  margin-top: 10px;
  font-size: 12.5px;
  letter-spacing: .04em;
  color: var(--grey);
}

/* 进入视口浮现 */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .42s var(--ease), transform .42s var(--ease);
  transition-delay: var(--d, 0ms);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- 08 响应式 ---------- */
@media (max-width: 1024px) {
  :root { --rail-w: 0px; --pad: 20px; }
  body { padding-top: 64px; }

  .skip { left: 12px; }

  .sitehead {
    top: 0; left: 0; right: 0; bottom: auto;
    width: auto;
    height: 64px;
    flex-direction: row;
    align-items: center;
    padding: 0 16px;
    border-right: 0;
    border-bottom: var(--hair-dark);
  }
  .rail__bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 12px;
    padding: 0;
    border-bottom: 0;
  }
  .brand { flex-direction: row; gap: 10px; }
  .brand__mark { width: 24px; height: 24px; gap: 2px; }
  .brand__text { flex-direction: column; align-items: flex-start; gap: 1px; }
  .brand__name { writing-mode: horizontal-tb; font-size: 15px; letter-spacing: .1em; }
  .brand__sub { display: block; font-size: 11px; letter-spacing: .04em; color: rgba(245, 241, 232, .55); }

  .navtoggle { display: inline-flex; }

  .rail__nav {
    position: fixed;
    left: 0; right: 0; top: 64px; bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 28px 20px 56px;
    overflow-y: auto;
    background: var(--ink);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity .18s var(--ease), transform .18s var(--ease), visibility .18s linear;
  }
  .sitehead[data-open] .rail__nav {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .rail__caption { padding: 0; text-align: left; }
  .rail__link {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 6px 16px 14px;
  }
  .rail__label { writing-mode: horizontal-tb; font-size: 22px; letter-spacing: .04em; }
  .rail__idx { order: 2; font-size: 12px; color: rgba(245, 241, 232, .5); }
  .rail__quick { display: block; }
  .rail__foot { display: block; margin-top: auto; padding: 20px 0 0; }

  .rail__meter {
    position: fixed;
    top: auto; left: 0; right: 0; bottom: 0;
    width: auto;
    height: 3px;
  }
  .rail__meter-fill { width: calc(var(--sp, 0) * 100%); height: 100%; }

  .foot__top { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
  .foot__head { grid-column: span 2; }
  .copy-list { grid-template-columns: 1fr; }
  .grid12 { gap: 20px; }
  .c-3, .c-4, .c-5, .c-6, .c-7, .c-8, .c-9 { grid-column: span 12; }
  .section { padding: 56px 0; }
}

@media (max-width: 640px) {
  body { font-size: 17px; }
  .foot__top { grid-template-columns: 1fr; }
  .foot__head { grid-column: span 1; }
  .foot__inner { padding-top: 40px; }
  .foot__baseinner { flex-direction: column; align-items: flex-start; gap: 8px; }
  .frame { padding: 24px; }
  .panel { padding: 20px; }
  .brand__sub { display: none; }
}

@media (max-height: 860px) and (min-width: 1025px) {
  .rail__foot { display: none; }
}

/* ---------- 09 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .btn:hover, .copy:hover, .foot__links a:hover { transform: none; }
}
