/* ==========================================================================
   乐盈登录口 · 共享站点样式  /assets/site.css
   骨架：错位页头 — 编号章节 — 索引尾栏
   ========================================================================== */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--text-ink);
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.85;
  letter-spacing: .01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: inherit; }

button { font: inherit; color: inherit; }

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

ul, ol { margin: 0; padding: 0; list-style: none; }

table { border-collapse: collapse; }

/* ---------- 2. 变量 ---------- */
:root {
  --ink-900: #08213A;
  --ink-700: #103A63;
  --teal: #0FBFA8;
  --teal-soft: #8FE3D6;
  --mist: #E1EDF1;
  --paper: #F6F8FA;
  --orange: #FF7A34;
  --orange-deep: #C8501C;
  --text-ink: #0F1F2A;
  --line: #9FB6C0;

  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
    system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", "Courier New", monospace;

  --shell: 1220px;
  --gutter: 24px;
  --brand-bar-h: 76px;

  --dur: 320ms;
  --ease: cubic-bezier(.22, .61, .36, 1);

  --shadow-lift: 8px 8px 0 0 rgba(15, 191, 168, .20);
  --shadow-lift-hover: 11px 11px 0 0 rgba(15, 191, 168, .32);
}

/* ---------- 3. 焦点与无障碍 ---------- */
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: -140px;
  left: 20px;
  z-index: 999;
  padding: 12px 22px;
  background: var(--orange);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .06em;
  text-decoration: none;
  transition: top 180ms var(--ease);
}

.skip-link:focus {
  top: 16px;
  color: #fff;
}

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

#main-content { display: block; }

/* ---------- 4. 布局骨架 ---------- */
.shell {
  width: min(var(--shell), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.section { padding: 76px 0; }
.section--tight { padding: 48px 0; }
.section--mist { background: var(--mist); }
.section--ink { background: var(--ink-900); color: var(--paper); }

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

.stack > * + * { margin-top: 16px; }

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

/* ---------- 5. 排版工具 ---------- */
.lede {
  max-width: 62ch;
  font-size: 19px;
  line-height: 1.9;
  color: var(--ink-700);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .22em;
  color: var(--ink-700);
  text-transform: uppercase;
}

.mono {
  font-family: var(--font-mono);
  letter-spacing: .06em;
}

.text-ink { color: var(--ink-900); }
.text-muted { color: var(--ink-700); }

/* ---------- 6. 头部 · 双层结构 ---------- */
.site-header {
  position: sticky;
  top: calc(var(--brand-bar-h) * -1);
  z-index: 80;
}

/* 6.1 顶层品牌条 */
.brand-bar { background: var(--ink-900); }

.brand-bar__inner {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: var(--brand-bar-h);
  padding-block: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  color: var(--paper);
  text-decoration: none;
}

.brand__mark {
  width: 12px;
  height: 12px;
  flex: none;
  background: var(--teal);
  transform: rotate(45deg);
}

.brand__name {
  font-size: 25px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.01em;
}

.brand__en {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  letter-spacing: .28em;
  color: var(--teal-soft);
}

.brand__tagline {
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: .04em;
  color: var(--teal-soft);
  white-space: nowrap;
}

.brand-bar__side {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  flex: none;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid rgba(143, 227, 214, .42);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--teal-soft);
  white-space: nowrap;
}

.status-chip__dot {
  width: 7px;
  height: 7px;
  flex: none;
  background: var(--teal);
}

.mini-cta {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  background: var(--orange);
  border: 1px solid var(--orange);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .05em;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.mini-cta:hover {
  background: var(--orange-deep);
  border-color: var(--orange-deep);
}

/* 6.2 下层栏目导航 */
.nav-bar {
  position: relative;
  background: var(--mist);
  border-bottom: 1px solid var(--line);
}

.site-header[data-scrolled] .nav-bar {
  box-shadow: 0 12px 26px rgba(8, 33, 58, .14);
}

.nav-bar__inner {
  display: flex;
  align-items: stretch;
}

.nav { flex: 1 1 auto; }

.nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}

.nav__item { display: flex; }

.nav__link {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  border-right: 1px solid var(--line);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .02em;
  color: var(--ink-700);
  text-decoration: none;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

.nav__link:hover {
  background: var(--teal-soft);
  color: var(--ink-900);
}

.nav__link[aria-current="page"] {
  background: var(--teal);
  color: var(--ink-900);
  box-shadow: inset 0 0 0 2px var(--orange);
}

.nav__link[aria-current="page"]:hover {
  background: var(--teal);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 15px 4px;
  background: transparent;
  border: 0;
  color: var(--ink-900);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .06em;
  cursor: pointer;
}

.nav-toggle__bars {
  position: relative;
  width: 20px;
  height: 2px;
  flex: none;
  background: var(--ink-900);
  transition: background 200ms var(--ease);
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--ink-900);
  transition: transform 200ms var(--ease);
}

.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-toggle__text { white-space: nowrap; }

/* 6.3 阅读进度细线 */
.progress-rail {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  overflow: hidden;
  pointer-events: none;
}

.progress-rail > span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* ---------- 7. 页脚 · 四段式收束 ---------- */
.site-footer {
  margin-top: 96px;
  background: var(--ink-900);
  border-top: 4px solid var(--teal);
  color: var(--paper);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr 1.4fr;
  gap: 48px;
  padding: 64px 0 8px;
}

.footer__heading {
  margin-bottom: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .22em;
  color: var(--teal);
}

.footer__list {
  display: grid;
  gap: 11px;
}

.footer__list a {
  font-size: 15px;
  line-height: 1.7;
  text-decoration: none;
  color: var(--paper);
  opacity: .85;
  transition: color 160ms var(--ease), opacity 160ms var(--ease);
}

.footer__list a:hover {
  color: var(--orange);
  opacity: 1;
}

.footer__list--split {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px 20px;
}

.footer__contact { gap: 14px; }

.footer__contact li {
  display: grid;
  gap: 3px;
}

.footer__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--teal-soft);
}

.footer__value {
  font-size: 15px;
  line-height: 1.7;
  color: var(--paper);
  opacity: .9;
  word-break: break-word;
}

.footer__legal {
  margin-top: 44px;
  padding-top: 30px;
  border-top: 1px solid rgba(143, 227, 214, .22);
}

.footer__list--inline {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
}

.footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 32px;
  padding: 22px 0 36px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--teal-soft);
}

.footer__copy,
.footer__icp { margin: 0; }

.footer__icp {
  font-family: var(--font-mono);
  letter-spacing: .04em;
}

/* ---------- 8. 通用内容组件 ---------- */
.chapter {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.chapter__index {
  font-family: var(--font-mono);
  font-size: 42px;
  font-weight: 700;
  line-height: .95;
  letter-spacing: -.04em;
  color: var(--teal);
}

.chapter__body > * + * { margin-top: 16px; }

.chapter__title {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.02em;
  color: var(--ink-900);
}

.chapter__note {
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-700);
}

.paper-card {
  position: relative;
  padding: 30px 32px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lift);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.paper-card:hover {
  transform: translate(-2px, -2px);
  border-color: var(--ink-700);
  box-shadow: var(--shadow-lift-hover);
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.7;
  letter-spacing: .08em;
}

.tag--teal { background: var(--teal); border-color: var(--teal); color: var(--ink-900); }
.tag--orange { background: var(--orange); border-color: var(--orange); color: #fff; }
.tag--paper { background: var(--mist); border-color: var(--line); color: var(--ink-700); }
.tag--ink { background: var(--ink-900); border-color: var(--ink-900); color: var(--paper); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .04em;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
    border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.btn--primary { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn--primary:hover { background: var(--orange-deep); border-color: var(--orange-deep); }

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

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

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

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--ink-700);
}

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

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

.breadcrumbs__sep { color: var(--line); }

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

/* 8.1 主题筛选按钮组 */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-700);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease), color var(--dur) var(--ease);
}

.filter-btn:hover {
  background: var(--teal-soft);
  border-color: var(--teal);
  color: var(--ink-900);
}

.filter-btn[aria-pressed="true"] {
  background: var(--teal);
  border-color: var(--orange);
  box-shadow: inset 0 0 0 1px var(--orange);
  color: var(--ink-900);
}

[data-filter-item][data-filtered-out] { display: none !important; }

/* 8.2 左侧服务清单索引细列 */
.rail {
  display: grid;
  gap: 4px;
  align-content: start;
}

.rail__label {
  padding-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .24em;
  color: var(--ink-700);
}

.rail__item {
  display: block;
  padding: 10px 14px;
  border-left: 3px solid transparent;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-700);
  text-decoration: none;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
    color var(--dur) var(--ease);
}

.rail__item:hover {
  background: var(--mist);
  border-left-color: var(--teal);
  color: var(--ink-900);
}

.rail__item[aria-current="page"] {
  background: var(--teal-soft);
  border-left-color: var(--orange);
  color: var(--ink-900);
  font-weight: 700;
}

/* 8.3 图片容器基础规则 */
.media-frame {
  position: relative;
  overflow: hidden;
  background: var(--ink-700);
  border: 1px solid var(--line);
}

.media-frame picture { display: contents; }

.media-frame img,
.media-frame svg,
.media-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame[data-ratio="21x9"] { aspect-ratio: 21 / 9; }
.media-frame[data-ratio="16x9"] { aspect-ratio: 16 / 9; }
.media-frame[data-ratio="4x3"] { aspect-ratio: 4 / 3; }
.media-frame[data-ratio="1x1"] { aspect-ratio: 1 / 1; }

.media-frame__placeholder {
  position: absolute;
  inset: 0;
  background-color: var(--ink-700);
  background-image: repeating-linear-gradient(
    135deg,
    rgba(15, 191, 168, .18) 0 12px,
    rgba(15, 191, 168, 0) 12px 26px
  );
}

.media-frame__caption {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 6px 14px;
  background: var(--ink-900);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
}

.media-frame--slant {
  clip-path: polygon(0 3%, 100% 0, 100% 97%, 0 100%);
}

/* ---------- 9. 滚动显现 ---------- */
.js-on [data-reveal] {
  opacity: 0;
  transform: translate3d(-20px, 20px, 0);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

.js-on [data-reveal][data-visible] {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* ---------- 10. 平板 ---------- */
@media (max-width: 1024px) {
  :root { --brand-bar-h: 68px; }

  .brand__tagline { display: none; }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px;
  }
}

/* ---------- 11. 移动端导航 ---------- */
@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  .nav-bar__inner { justify-content: flex-start; }

  .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    background: var(--paper);
    border-bottom: 2px solid var(--ink-900);
    box-shadow: 0 18px 32px rgba(8, 33, 58, .18);
  }

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

  .nav__list {
    flex-direction: column;
    flex-wrap: nowrap;
  }

  .nav__item { display: block; }

  .nav__link {
    padding: 16px 24px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav__link[aria-current="page"] {
    box-shadow: inset 3px 0 0 var(--orange);
  }
}

/* ---------- 12. 手机 ---------- */
@media (max-width: 720px) {
  :root {
    --brand-bar-h: 62px;
    --gutter: 18px;
  }

  body {
    font-size: 16px;
    line-height: 1.8;
  }

  .brand__en { display: none; }
  .status-chip { display: none; }
  .mini-cta { padding: 8px 14px; font-size: 12px; }

  .section { padding: 56px 0; }
  .section--tight { padding: 36px 0; }

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

  .lede { font-size: 17px; }

  .chapter {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .chapter__index { font-size: 34px; }
  .chapter__title { font-size: 24px; }

  .paper-card {
    padding: 22px 20px;
    box-shadow: 6px 6px 0 0 rgba(15, 191, 168, .2);
  }

  .footer__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
    padding-top: 48px;
  }

  .footer__list--split { grid-template-columns: minmax(0, 1fr); }
  .footer__legal { margin-top: 32px; padding-top: 24px; }
  .footer__base { padding-bottom: 30px; }

  .btn { width: 100%; }
  .cluster .btn { width: auto; }
}

/* ---------- 13. 减少动态偏好 ---------- */
@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-on [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .paper-card:hover { transform: none; }
}
