/* ===== 乐橙CN · 共享样式 /assets/site.css ===== */

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

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

body {
  margin: 0;
  padding-left: var(--rail);
  background: #EFE7DC;
  color: #0E1A26;
  font-family: 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; }

:root {
  --rail: 88px;

  --orange: #E8480F;
  --orange-bright: #FF7A33;
  --ink: #0E1A26;
  --ink-2: #1E3145;
  --slate: #5A6E85;
  --mist: #A9B6C4;
  --sand: #EFE7DC;
  --paper: #FBF8F3;
  --teal: #10BFAE;
  --burnt: #8C2A05;

  --font-display: 'HarmonyOS Sans SC', 'Source Han Sans SC', 'PingFang SC', system-ui, sans-serif;
  --font-body: 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  --font-num: 'Sora', 'HarmonyOS Sans SC', 'PingFang SC', sans-serif;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --line: rgba(169, 182, 196, 0.55);
}

@media (max-width: 1023px) {
  :root { --rail: 0px; }
}

/* ---------- 焦点与跳转 ---------- */

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

.skip-link {
  position: fixed;
  top: 10px;
  left: calc(var(--rail) + 10px);
  z-index: 400;
  transform: translateY(-220%);
  padding: 12px 20px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-left: 3px solid var(--orange);
  transition: transform 0.18s var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
}

@media (max-width: 1023px) {
  .skip-link { left: 10px; }
}

#main-content { display: block; }

/* ---------- 通用容器与网格 ---------- */

.wrap {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 64px);
}

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

.grid--7-5 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.grid--5-7 { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.grid--8-4 { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }

@media (max-width: 899px) {
  .grid--7-5,
  .grid--5-7,
  .grid--8-4 { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 通用文字组件 ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-num);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--orange);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--orange);
}

.section-head {
  display: grid;
  gap: 12px;
  align-content: start;
}

.section-head__index {
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--orange);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.section-head__index::after {
  content: "";
  width: 34px;
  height: 2px;
  background: var(--orange);
}

.section-head__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 2.6vw, 34px);
  line-height: 1.28;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.prose {
  max-width: 34em;
  font-size: 17px;
  line-height: 1.75;
  color: var(--slate);
}

.prose > * + * { margin-top: 1.15em; }

.prose h2,
.prose h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
  margin-top: 1.9em;
}

.prose h2 { font-size: clamp(20px, 2.2vw, 26px); }
.prose h3 { font-size: 18px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose ul { padding-left: 1.15em; list-style: none; }
.prose ul li { position: relative; padding-left: 0.2em; }
.prose ul li + li { margin-top: 0.5em; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: -0.95em;
  top: 0.72em;
  width: 6px;
  height: 1px;
  background: var(--orange);
}
.prose a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--orange);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease),
    border-color 0.18s var(--ease);
}

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

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

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

.btn--ghost {
  border-color: var(--mist);
  color: var(--slate);
}

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

.btn__arrow {
  font-family: var(--font-num);
  font-size: 15px;
  line-height: 1;
  transform: translateY(-1px);
}

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

.breadcrumb {
  font-size: 13px;
  color: var(--slate);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb li::after {
  content: "/";
  color: var(--mist);
  font-family: var(--font-num);
}

.breadcrumb li:last-child::after { content: ""; }

.breadcrumb a {
  color: var(--slate);
  text-decoration: none;
  border-bottom: 1px solid var(--mist);
  transition: color 0.16s, border-color 0.16s;
}

.breadcrumb a:hover {
  color: var(--orange);
  border-color: var(--orange);
}

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

/* ---------- 刻线框景与卡片 ---------- */

.tick-frame {
  position: relative;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: clamp(24px, 3.4vw, 56px);
}

.tick-frame::before,
.tick-frame::after {
  content: "";
  position: absolute;
  left: -1px;
  right: -1px;
  height: 8px;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to right,
    rgba(90, 110, 133, 0.5) 0 1px,
    transparent 1px 16px
  );
}

.tick-frame::before { top: -1px; }
.tick-frame::after { bottom: -1px; }

.card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: clamp(20px, 2.4vw, 32px);
  transition: border-color 0.18s var(--ease), transform 0.18s var(--ease);
}

.card:hover {
  border-color: var(--orange);
  transform: translateY(-2px);
}

/* ---------- 图片容器基础规则（页面阶段放入占位图） ---------- */

.media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--ink-2);
  border: 1px solid var(--line);
}

.media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    135deg,
    rgba(251, 248, 243, 0.07) 0 1px,
    transparent 1px 9px
  );
}

.media--cut {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 30px), calc(100% - 30px) 100%, 0 100%);
}

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

.media__caption {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--slate);
}

/* ---------- 显现动效 ---------- */

.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

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

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

.site-header { position: relative; z-index: 110; }

.topbar { display: none; }

/* ---- 桌面侧轨 ---- */

.rail {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 0 18px;
  background: var(--ink);
  color: var(--paper);
  z-index: 150;
}

.rail::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 5px;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(169, 182, 196, 0.3) 0 1px,
    transparent 1px 14px
  );
}

.rail__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 4px 6px;
  text-decoration: none;
  color: var(--paper);
}

.rail__mark {
  width: 16px;
  height: 16px;
  background: var(--orange);
  clip-path: polygon(0 0, 100% 0, 100% 62%, 62% 100%, 0 100%);
  transition: background 0.18s var(--ease);
}

.rail__brand:hover .rail__mark { background: var(--orange-bright); }

.rail__word {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  line-height: 1.1;
  letter-spacing: 0.06em;
}

.rail__word span:last-child {
  font-family: var(--font-num);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--orange-bright);
}

.rail__nav {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  overflow-y: auto;
  scrollbar-width: none;
}

.rail__nav::-webkit-scrollbar { width: 0; height: 0; }

.rail__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.rail__link {
  display: block;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  padding: 8px 6px;
  border-left: 2px solid transparent;
  color: var(--mist);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-decoration: none;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.rail__link:hover {
  color: var(--paper);
  border-left-color: var(--orange-bright);
}

.rail__link[aria-current="page"] {
  color: var(--paper);
  font-weight: 700;
  border-left-color: var(--orange);
}

.rail__cta {
  display: block;
  width: 40px;
  margin-top: 16px;
  padding: 18px 0;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  text-align: center;
  background: var(--orange);
  color: #fff;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-decoration: none;
  transition: background 0.18s var(--ease);
}

.rail__cta:hover { background: var(--orange-bright); }

@media (max-height: 800px) and (min-width: 1024px) {
  .rail { padding-top: 16px; padding-bottom: 14px; }
  .rail__list { gap: 4px; }
  .rail__link { padding: 5px 6px; font-size: 11.5px; letter-spacing: 0.08em; }
  .rail__cta { padding: 14px 0; letter-spacing: 0.16em; }
}

/* ---- 滚动进度 ---- */

.rail__progress {
  position: fixed;
  top: 0;
  left: calc(var(--rail) - 2px);
  width: 2px;
  height: var(--p, 0%);
  background: var(--orange);
  z-index: 300;
  pointer-events: none;
}

/* ---- 遮罩 ---- */

.nav-scrim {
  position: fixed;
  inset: 0;
  background: rgba(14, 26, 38, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease);
  z-index: 140;
}

/* ---- 平板与移动：抽屉 ---- */

@media (max-width: 1023px) {

  body { padding-top: 64px; }

  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    z-index: 160;
  }

  .topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 16px;
    background: var(--ink);
    color: var(--paper);
    border-bottom: 1px solid rgba(169, 182, 196, 0.22);
    position: relative;
    z-index: 170;
  }

  .topbar__brand {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 0.08em;
    text-decoration: none;
    color: var(--paper);
  }

  .topbar__brand span {
    font-family: var(--font-num);
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--orange-bright);
    margin-left: 4px;
  }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: 1px solid rgba(251, 248, 243, 0.3);
    border-radius: 0;
    cursor: pointer;
    transition: border-color 0.18s var(--ease);
  }

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

  .nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--paper);
    transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .rail {
    top: 64px;
    bottom: 0;
    width: min(84vw, 320px);
    align-items: stretch;
    padding: 24px 22px 22px;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.26s var(--ease);
    z-index: 160;
    border-right: 1px solid rgba(169, 182, 196, 0.2);
  }

  .rail::before { display: none; }

  .rail[data-open] { transform: none; }

  .rail__brand {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 0 0 20px;
    border-bottom: 1px solid rgba(169, 182, 196, 0.18);
  }

  .rail__word {
    flex-direction: row;
    align-items: baseline;
    gap: 6px;
    font-size: 17px;
  }

  .rail__word span:last-child { font-size: 11px; }

  .rail__nav {
    flex: 0 0 auto;
    display: block;
    width: 100%;
    margin-top: 18px;
    overflow: visible;
  }

  .rail__list { align-items: stretch; gap: 0; }

  .rail__link {
    writing-mode: horizontal-tb;
    padding: 15px 4px;
    border-left: none;
    border-bottom: 1px solid rgba(169, 182, 196, 0.14);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.02em;
  }

  .rail__link:hover {
    color: var(--paper);
    border-left-color: transparent;
  }

  .rail__link[aria-current="page"] {
    border-left: none;
    padding-left: 12px;
    background: rgba(232, 72, 15, 0.14);
    box-shadow: inset 3px 0 0 var(--orange);
  }

  .rail__cta {
    width: 100%;
    margin-top: 24px;
    padding: 15px 0;
    writing-mode: horizontal-tb;
    text-align: center;
    letter-spacing: 0.16em;
    font-size: 15px;
  }

  .nav-scrim[data-open] {
    opacity: 1;
    pointer-events: auto;
  }

  .rail__progress {
    left: 0;
    top: 0;
    width: var(--p, 0%);
    height: 2px;
    z-index: 320;
  }
}

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

.site-footer {
  position: relative;
  margin-top: clamp(56px, 9vw, 120px);
  background: var(--ink);
  color: var(--mist);
  border-top: 1px solid rgba(169, 182, 196, 0.2);
  padding-top: clamp(48px, 7vw, 88px);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--orange) 0 14%,
    var(--orange-bright) 14% 20%,
    var(--ink-2) 20% 100%
  );
}

.footer__inner {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 64px);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.3fr 1fr;
  gap: clamp(28px, 4vw, 56px);
}

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

.footer__mark-glyph {
  width: 14px;
  height: 14px;
  background: var(--orange);
  clip-path: polygon(0 0, 100% 0, 100% 62%, 62% 100%, 0 100%);
}

.footer__mark-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.06em;
}

.footer__line {
  margin-top: 14px;
  max-width: 22em;
  font-size: 14px;
  line-height: 1.7;
  color: var(--slate);
}

.footer__title {
  margin-bottom: 16px;
  font-family: var(--font-num);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--orange-bright);
}

.footer__links li + li { margin-top: 10px; }

.footer__links a {
  position: relative;
  display: inline-block;
  color: var(--paper);
  font-size: 15px;
  text-decoration: none;
  transition: color 0.16s var(--ease), padding-left 0.16s var(--ease);
}

.footer__links a:hover {
  color: var(--orange-bright);
  padding-left: 8px;
}

.footer__contact dt {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--slate);
}

.footer__contact dd {
  margin: 2px 0 14px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--paper);
  word-break: break-all;
}

.footer__contact dd:last-child { margin-bottom: 0; }

.footer__base {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  margin-top: clamp(40px, 6vw, 72px);
  padding: 22px 0 26px;
  border-top: 1px solid rgba(169, 182, 196, 0.2);
  font-size: 13px;
  color: var(--slate);
}

.footer__copy { margin: 0; }

.footer__icp {
  margin: 0;
  text-align: center;
  font-family: var(--font-num);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--mist);
}

.footer__bookmark {
  justify-self: end;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid rgba(169, 182, 196, 0.6);
  border-radius: 0;
  color: var(--mist);
  font-size: 12px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: border-color 0.16s var(--ease), color 0.16s var(--ease);
}

.footer__bookmark:hover {
  border-color: var(--orange);
  color: var(--orange-bright);
}

.footer__hint {
  min-height: 20px;
  padding-bottom: 22px;
  font-size: 12px;
  color: var(--orange-bright);
}

@media (max-width: 1023px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 639px) {
  .footer__grid { grid-template-columns: 1fr; }
  .footer__base {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 12px;
  }
  .footer__bookmark { justify-self: center; }
}

/* ---------- 动效降级 ---------- */

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