/* =========================================================
   久赢平台中心 · /assets/site.css
   共享外壳：书脊轨道头部 + 奶油纸内容 + 三段式页脚
   ========================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

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

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

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

button { font: inherit; color: inherit; }

a { color: inherit; }

/* ---------- 2. Tokens ---------- */
:root {
  --ink: #081826;
  --navy: #0F2D46;
  --paper: #F4EAD5;
  --brown: #241C17;
  --amber: #D6A446;
  --orange: #FF6A3D;
  --cyan: #92AAB5;
  --pale: #DCE8EA;
  --focus: #7FB7D9;
  --warm: #FFF8EA;

  --rail: 118px;
  --shell: 1240px;
  --gutter: clamp(18px, 4.2vw, 60px);
  --edge: 18px;

  --line: rgba(146, 170, 181, .26);
  --line-strong: rgba(146, 170, 181, .45);

  --font-display: "HarmonyOS Sans SC", "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", "SFMono-Regular", ui-monospace, "Courier New", monospace;
  --font-serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
}

/* ---------- 3. Base ---------- */
body {
  min-height: 100vh;
  padding-left: var(--rail);
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.85;
  color: var(--warm);
  background-color: var(--ink);
  background-image:
    radial-gradient(1100px 520px at 88% -12%, rgba(214, 164, 70, .12), transparent 62%),
    radial-gradient(780px 460px at 4% 102%, rgba(15, 45, 70, .85), transparent 72%),
    repeating-linear-gradient(0deg, rgba(146, 170, 181, .05) 0 1px, transparent 1px 64px);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.012em;
  text-wrap: balance;
}

p { text-wrap: pretty; }

main { display: block; min-height: 58vh; }

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

/* ---------- 4. Utilities ---------- */
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--amber);
  line-height: 1.4;
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--amber);
  flex: none;
}

.section-title {
  font-size: clamp(1.7rem, 3.6vw, 2.9rem);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -.02em;
}

.lede {
  max-width: 64ch;
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.85;
  color: var(--pale);
}

.rule {
  height: 0;
  border: 0;
  border-top: 1px solid var(--line);
  margin-block: clamp(24px, 4vw, 44px);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap, 18px);
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--brown);
  background: var(--pale);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%);
}

.tag--amber { background: var(--amber); }
.tag--orange { background: var(--orange); color: #10222F; }

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--cyan);
  line-height: 1.4;
}

.status-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(214, 164, 70, .18);
}

/* ---------- 5. Layout containers ---------- */
.page-shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-block: clamp(22px, 4vw, 52px);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(18px, 2.6vw, 34px);
}

.col-4 { grid-column: span 4; }
.col-6 { grid-column: span 6; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }

/* ---------- 6. Focus ---------- */
:focus { outline: none; }

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible,
.segmented__tab:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(127, 183, 217, .22);
}

/* ---------- 7. Skip link ---------- */
.skip-link {
  position: fixed;
  top: -90px;
  left: 14px;
  z-index: 200;
  padding: 11px 18px;
  background: var(--amber);
  color: var(--ink);
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  transition: top .18s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
  top: 12px;
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

/* ---------- 8. Header · 书脊轨道 ---------- */
.site-header {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 60;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 11px 22px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(146, 170, 181, .35) transparent;
  background: linear-gradient(180deg, #0B1E2E 0%, #0F2D46 55%, #0A1B29 100%);
  border-right: 1px solid var(--line);
}

.site-header::-webkit-scrollbar { width: 4px; }
.site-header::-webkit-scrollbar-thumb { background: rgba(146, 170, 181, .3); }

.rail-top {
  position: relative;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  flex: none;
}

/* 品牌铭牌 */
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--warm);
  text-align: center;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: var(--amber);
  color: var(--ink);
  font-size: 21px;
  font-weight: 900;
  line-height: 1;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 11px), calc(100% - 11px) 100%, 0 100%);
  transition: transform .2s ease, background .2s ease;
}

.brand:hover .brand__mark,
.brand:focus-visible .brand__mark {
  background: var(--warm);
  transform: translateY(-1px);
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.brand__name {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: .08em;
}

.brand__short {
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.3;
  letter-spacing: .2em;
  color: var(--cyan);
  text-transform: uppercase;
}

/* 导航切换按钮（移动端可见） */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  background: rgba(8, 24, 38, .55);
  border: 1px solid rgba(146, 170, 181, .4);
  color: var(--warm);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease;
}

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

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

.nav-toggle__bars i {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform .22s ease;
}

.site-header[data-open="true"] .nav-toggle__bars i:first-child {
  transform: translateY(3px) rotate(45deg);
}

.site-header[data-open="true"] .nav-toggle__bars i:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

/* 导航本体（桌面端为纵向书脊索引） */
.site-nav {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-block: auto;
  flex: none;
}

.site-nav__note {
  font-family: var(--font-serif);
  font-size: 10px;
  letter-spacing: .24em;
  line-height: 1.5;
  text-align: center;
  color: var(--cyan);
  opacity: .78;
}

.site-nav__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.site-nav__item { display: block; }

.site-nav__link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 7px;
  text-decoration: none;
  color: var(--pale);
  border-left: 2px solid transparent;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.site-nav__link:hover {
  background: rgba(146, 170, 181, .13);
  color: var(--warm);
  border-left-color: var(--cyan);
}

.site-nav__num {
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.2;
  letter-spacing: .12em;
  color: var(--cyan);
  opacity: .8;
}

.site-nav__label {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: .02em;
}

.site-nav__link[aria-current="page"] {
  background: var(--amber);
  color: var(--ink);
  border-left-color: var(--warm);
}

.site-nav__link[aria-current="page"] .site-nav__num {
  color: rgba(8, 24, 38, .68);
  opacity: 1;
}

/* 反馈直通块 · 信号橙专属 */
.rail-cta {
  display: block;
  margin-top: 6px;
  padding: 11px 8px;
  background: var(--orange);
  color: #10222F;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: .04em;
  text-align: center;
  text-decoration: none;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 11px), calc(100% - 11px) 100%, 0 100%);
  transition: filter .2s ease, transform .2s ease;
}

.rail-cta:hover,
.rail-cta:focus-visible {
  filter: drop-shadow(0 0 12px rgba(255, 106, 61, .55));
  transform: translateY(-1px);
}

/* 滚动进度线 */
.rail-progress {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 2px;
  background: rgba(146, 170, 181, .14);
  pointer-events: none;
}

.rail-progress__fill {
  display: block;
  width: 100%;
  height: 0;
  background: linear-gradient(180deg, var(--amber), var(--orange));
  transition: height .12s linear;
}

/* ---------- 9. Breadcrumbs ---------- */
.breadcrumbs {
  padding-top: clamp(14px, 2vw, 22px);
}

.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--cyan);
}

.breadcrumbs__item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.breadcrumbs__item:not(:last-child)::after {
  content: "/";
  color: rgba(146, 170, 181, .5);
}

.breadcrumbs__item a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .16s ease, border-color .16s ease;
}

.breadcrumbs__item a:hover {
  color: var(--warm);
  border-bottom-color: var(--amber);
}

.breadcrumbs__current { color: var(--amber); }

/* ---------- 10. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border: 1px solid transparent;
  background: transparent;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
  transition: transform .18s ease, background .18s ease, color .18s ease, filter .2s ease;
}

.btn:hover { transform: translateY(-2px); }

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

.btn--amber:hover { filter: drop-shadow(0 0 10px rgba(214, 164, 70, .45)); }

.btn--orange {
  background: var(--orange);
  color: #10222F;
}

.btn--orange:hover { filter: drop-shadow(0 0 12px rgba(255, 106, 61, .5)); }

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

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

.btn--paper {
  background: var(--paper);
  color: var(--brown);
}

/* ---------- 11. Panels & media ---------- */
.panel {
  background: var(--paper);
  color: var(--brown);
  padding: clamp(20px, 3vw, 36px);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--edge)), calc(100% - var(--edge)) 100%, 0 100%);
}

.panel--ink {
  background: var(--navy);
  color: var(--warm);
  border: 1px solid var(--line);
}

.media-frame {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background-color: var(--navy);
  background-image:
    repeating-linear-gradient(90deg, rgba(146, 170, 181, .14) 0 1px, transparent 1px 30px),
    repeating-linear-gradient(0deg, rgba(146, 170, 181, .14) 0 1px, transparent 1px 30px);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
}

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

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

.media-frame__caption {
  position: absolute;
  inset: auto auto 0 0;
  padding: 8px 14px;
  background: rgba(8, 24, 38, .86);
  color: var(--pale);
  font-family: var(--font-serif);
  font-size: 12px;
  letter-spacing: .08em;
  line-height: 1.5;
}

/* ---------- 12. Segmented control ---------- */
.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  background: rgba(15, 45, 70, .72);
  border: 1px solid var(--line);
}

.segmented__tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--pale);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .03em;
  line-height: 1.3;
  padding: 9px 16px;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}

.segmented__tab:hover { background: rgba(146, 170, 181, .16); color: var(--warm); }

.segmented__tab[aria-selected="true"] {
  background: var(--amber);
  color: var(--ink);
}

/* ---------- 13. Reveal ---------- */
html[data-reveal="on"] [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
}

html[data-reveal="on"] [data-reveal].is-visible {
  opacity: 1;
  transform: none;
  transition: opacity .52s ease, transform .52s ease;
}

/* ---------- 14. Footer ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 9vw, 120px);
  padding: clamp(34px, 5vw, 64px) var(--gutter) clamp(22px, 3vw, 32px);
  background: linear-gradient(180deg, #0A1C2B 0%, #081826 100%);
  border-top: 1px solid var(--line-strong);
  color: var(--pale);
  font-size: 14px;
  line-height: 1.75;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--amber) 0 64px, var(--orange) 64px 100px, transparent 100px);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(24px, 3.4vw, 52px);
  max-width: var(--shell);
  margin-inline: auto;
}

.footer-col { min-width: 0; }
.footer-col--brand { grid-column: span 4; }
.footer-col--nav { grid-column: span 3; }
.footer-col--meta { grid-column: span 5; }

.footer-col__title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--cyan);
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.footer-brand__mark {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: .02em;
  color: var(--warm);
}

.footer-brand__line {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  line-height: 1.6;
  color: var(--amber);
}

.footer-note {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--cyan);
  max-width: 40ch;
}

.footer-feedback {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 12px 18px;
  background: var(--orange);
  color: #10222F;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .04em;
  text-decoration: none;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
  transition: filter .22s ease, transform .2s ease;
}

.footer-feedback::after {
  content: "→";
  font-family: var(--font-mono);
  font-size: 13px;
}

.footer-feedback:hover,
.footer-feedback:focus-visible {
  transform: translateY(-2px);
  filter: drop-shadow(0 0 14px rgba(255, 106, 61, .55));
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-list__item {
  font-size: 13px;
  line-height: 1.7;
  color: var(--pale);
  overflow-wrap: anywhere;
}

.footer-link {
  color: var(--pale);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .16s ease, border-color .16s ease;
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--amber);
  border-bottom-color: var(--amber);
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  max-width: var(--shell);
  margin: clamp(28px, 4vw, 46px) auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.site-footer__bottom .footer-note { margin-top: 0; }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.footer-legal__link {
  font-size: 13px;
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .16s ease, border-color .16s ease;
}

.footer-legal__link:hover,
.footer-legal__link:focus-visible {
  color: var(--warm);
  border-bottom-color: var(--amber);
}

/* ---------- 15. Responsive ---------- */
@media (max-width: 1100px) and (min-width: 901px) {
  :root { --rail: 100px; }
  .site-nav__label { font-size: 11px; }
  .brand__name { font-size: 11px; }
}

@media (max-width: 900px) {
  body { padding-left: 0; }

  .site-header {
    position: sticky;
    top: 0;
    bottom: auto;
    width: auto;
    height: auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 10px clamp(14px, 4vw, 24px);
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
    background: linear-gradient(180deg, #0B1E2E 0%, #0F2D46 100%);
  }

  .rail-top {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 12px;
  }

  .brand {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    text-align: left;
  }

  .brand__mark { width: 34px; height: 34px; font-size: 17px; }
  .brand__text { gap: 1px; }
  .brand__name { font-size: 13px; }

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

  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 70;
    margin: 0;
    gap: 20px;
    padding: 78px clamp(20px, 6vw, 34px) 34px;
    overflow-y: auto;
    background:
      radial-gradient(620px 320px at 90% 0%, rgba(214, 164, 70, .16), transparent 65%),
      rgba(8, 24, 38, .985);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity .24s ease, transform .26s ease, visibility 0s linear .26s;
  }

  .site-header[data-open="true"] .site-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .24s ease, transform .26s ease, visibility 0s;
  }

  .site-nav__note {
    text-align: left;
    font-size: 11px;
    letter-spacing: .3em;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
  }

  .site-nav__list { gap: 2px; }

  .site-nav__link {
    flex-direction: row;
    align-items: baseline;
    gap: 14px;
    padding: 14px 4px;
    border-left: 0;
    border-bottom: 1px solid rgba(146, 170, 181, .16);
  }

  .site-nav__link:hover { border-left: 0; }
  .site-nav__num { font-size: 11px; min-width: 22px; }
  .site-nav__label { font-size: 19px; font-weight: 800; letter-spacing: .01em; }

  .site-nav__link[aria-current="page"] {
    border-left: 0;
    padding-left: 12px;
  }

  .rail-cta {
    margin-top: 8px;
    padding: 16px 12px;
    font-size: 15px;
    letter-spacing: .06em;
  }

  .rail-progress { display: none; }

  .grid-12 { grid-template-columns: minmax(0, 1fr); }
  .col-4, .col-6, .col-8, .col-12 { grid-column: 1 / -1; }

  .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-col--brand { grid-column: 1 / -1; }
  .footer-col--nav,
  .footer-col--meta { grid-column: span 1; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }

  .site-footer__grid { grid-template-columns: minmax(0, 1fr); }
  .footer-col--nav,
  .footer-col--meta { grid-column: 1 / -1; }

  .site-footer__bottom { flex-direction: column; align-items: flex-start; }

  .breadcrumbs__list { font-size: 10px; letter-spacing: .06em; }
}

/* ---------- 16. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  .rail-progress__fill { transition: none; }
  html[data-reveal="on"] [data-reveal] { opacity: 1; transform: none; }
  .btn:hover,
  .rail-cta:hover,
  .footer-feedback:hover { transform: none; }
}
