/* ============================================================
   千嬴国际官 · 共享样式 /assets/site.css
   框架式导航 + 编号档案视觉系统
   ============================================================ */

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

html, body { margin: 0; padding: 0; }

body {
  background-color: var(--ink-800);
  background-image:
    radial-gradient(1180px 620px at 82% -8%, rgba(20, 52, 77, 0.85), transparent 70%),
    radial-gradient(900px 520px at -8% 18%, rgba(78, 143, 124, 0.12), transparent 66%);
  background-repeat: no-repeat;
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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%; height: auto; }
a { color: var(--paper); text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; }
table { border-collapse: collapse; width: 100%; }

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

/* ---------- 2. 变量 ---------- */
:root {
  --rail-w: 248px;
  --top-h: 68px;
  --maxw: 1280px;

  --ink-900: #07121E;
  --ink-800: #0B1B2B;
  --ink-700: #14344D;
  --paper: #F4F1EA;
  --paper-dim: #E7E3D8;
  --gold: #C9A227;
  --amber: #F2A33A;
  --celadon: #4E8F7C;
  --mist: #8FB3AA;
  --brick: #C2543F;
  --coal: #101820;
  --steel: #6B7A85;

  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --pill: 999px;

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

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --shadow-panel: 0 26px 60px rgba(3, 10, 18, 0.45);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ---------- 3. 排版工具 ---------- */
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mist);
}

.chapter-num {
  font-family: var(--font-mono);
  font-size: clamp(56px, 10vw, 132px);
  line-height: 0.82;
  letter-spacing: -0.02em;
  font-weight: 600;
  color: rgba(201, 162, 39, 0.88);
}

@supports (-webkit-text-stroke: 1px #000) {
  .chapter-num {
    color: transparent;
    -webkit-text-stroke: 1px var(--gold);
  }
  .chapter-num--solid {
    color: var(--gold);
    -webkit-text-stroke: 0;
  }
}

.lede {
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.9;
  color: rgba(231, 227, 216, 0.86);
  max-width: 38em;
}

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

/* ---------- 4. 容器与网格 ---------- */
.shell {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 20px;
}
@media (min-width: 768px) {
  .shell { padding-inline: 32px; }
}

.grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
}

.span-3, .span-4, .span-5, .span-7, .span-8, .span-12 { grid-column: span 4; }
@media (min-width: 900px) {
  .span-3 { grid-column: span 3; }
  .span-4 { grid-column: span 4; }
  .span-5 { grid-column: span 5; }
  .span-7 { grid-column: span 7; }
  .span-8 { grid-column: span 8; }
  .span-12 { grid-column: span 12; }
}

/* ---------- 5. 基础组件 ---------- */
.panel {
  position: relative;
  background: linear-gradient(158deg, #173A56 0%, var(--ink-700) 46%, #10293D 100%);
  border: 1px solid rgba(143, 179, 170, 0.16);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 3.4vw, 40px);
  box-shadow: var(--shadow-panel);
}

.panel--paper {
  background: linear-gradient(170deg, var(--paper) 0%, var(--paper-dim) 100%);
  border-color: rgba(16, 24, 32, 0.12);
  color: var(--coal);
}
.panel--paper .eyebrow,
.panel--paper .mono { color: var(--steel); }
.panel--paper a { color: var(--coal); }

.panel--sunk {
  background: var(--ink-900);
  border-color: rgba(143, 179, 170, 0.12);
  box-shadow: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  border-radius: var(--pill);
  border: 1px solid rgba(143, 179, 170, 0.34);
  background: rgba(20, 52, 77, 0.55);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--paper-dim);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--paper-dim);
}
.status::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--steel);
  box-shadow: 0 0 0 4px rgba(107, 122, 133, 0.2);
  flex: none;
}
.status--ok::before { background: var(--celadon); box-shadow: 0 0 0 4px rgba(78, 143, 124, 0.2); }
.status--warn::before { background: var(--gold); box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.22); }
.status--off::before { background: var(--brick); box-shadow: 0 0 0 4px rgba(194, 84, 63, 0.22); }

.media-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(143, 179, 170, 0.18);
  background:
    linear-gradient(152deg, #1A4059 0%, var(--ink-700) 42%, var(--ink-900) 100%);
}
.media-frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.72) contrast(1.03);
}
.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 4 / 5; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--paper {
  border-color: rgba(16, 24, 32, 0.14);
  background: linear-gradient(152deg, #DCD8CC 0%, var(--paper-dim) 100%);
}
.media-frame--grid::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(143, 179, 170, 0.16) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(0deg, rgba(143, 179, 170, 0.12) 0 1px, transparent 1px 48px);
  pointer-events: none;
}
.media-frame__caption {
  position: absolute;
  left: 16px;
  bottom: 14px;
  max-width: calc(100% - 32px);
  padding: 6px 12px;
  border-radius: var(--pill);
  background: rgba(7, 18, 30, 0.74);
  border: 1px solid rgba(143, 179, 170, 0.26);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--paper-dim);
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--mist);
}
.crumbs__item { color: inherit; }
a.crumbs__item:hover { color: var(--amber); }
.crumbs__item[aria-current="page"] { color: var(--paper); }
.crumbs__sep { color: rgba(143, 179, 170, 0.55); }

/* ---------- 6. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: var(--pill);
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 160ms var(--ease), color 160ms var(--ease),
    border-color 160ms var(--ease), transform 160ms var(--ease);
}
.btn--amber {
  background: var(--amber);
  color: #1B1206;
  box-shadow: 0 8px 22px rgba(242, 163, 58, 0.22);
}
.btn--amber:hover { background: #FFB856; }
.btn--ghost {
  background: transparent;
  color: var(--paper);
  border-color: rgba(143, 179, 170, 0.45);
}
.btn--ghost:hover {
  border-color: var(--celadon);
  background: rgba(78, 143, 124, 0.16);
  color: #FFFFFF;
}
.btn--paper {
  background: var(--paper);
  color: var(--coal);
}
.btn--paper:hover { background: #FFFFFF; }
.btn--block { width: 100%; }

/* ---------- 7. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 300;
  padding: 10px 20px;
  border-radius: var(--pill);
  background: var(--amber);
  color: #1B1206;
  font-weight: 700;
  font-size: 14px;
  transform: translateY(-180%);
  transition: transform 160ms var(--ease);
}
.skip-link:focus,
.skip-link:focus-visible { transform: translateY(0); }

/* ---------- 8. 框架式页头（移动优先） ---------- */
.frame {
  position: sticky;
  top: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "corner top";
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: rgba(7, 18, 30, 0.96);
  border-bottom: 1px solid rgba(143, 179, 170, 0.2);
  color: var(--paper);
}

.frame__corner {
  grid-area: corner;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: inherit;
}
.brand__mark {
  flex: none;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(148deg, #E0BB3C 0%, var(--gold) 52%, #8A6E14 100%);
  color: var(--ink-900);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.brand__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}
.brand__name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--paper);
}
.brand__note {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--mist);
  white-space: nowrap;
}

.frame__top {
  grid-area: top;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.frame__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--pill);
  border: 1px solid rgba(78, 143, 124, 0.45);
  background: rgba(20, 52, 77, 0.6);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--paper-dim);
  white-space: nowrap;
  transition: border-color 160ms var(--ease), background-color 160ms var(--ease),
    color 160ms var(--ease);
}
.frame__status:hover {
  border-color: var(--celadon);
  background: rgba(78, 143, 124, 0.2);
  color: var(--paper);
}
.frame__status .mono { color: var(--gold); font-size: 12px; }
.frame__status-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--celadon);
  box-shadow: 0 0 0 4px rgba(78, 143, 124, 0.18);
}
.frame__status-sep { color: rgba(143, 179, 170, 0.7); }
.frame__status-text { display: none; }

@media (min-width: 480px) {
  .frame__status-text { display: inline; }
}

.frame__tagline {
  display: none;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--mist);
  white-space: nowrap;
}

.frame__actions {
  display: none;
  align-items: center;
  gap: 10px;
}
.frame__actions .btn--ghost { display: none; }

@media (min-width: 760px) {
  .frame__tagline { display: block; }
  .frame__actions { display: flex; }
  .frame__top { justify-content: space-between; }
}
@media (min-width: 1024px) {
  .frame__actions .btn--ghost { display: inline-flex; }
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--pill);
  border: 1px solid rgba(201, 162, 39, 0.5);
  background: rgba(20, 52, 77, 0.5);
  color: var(--paper);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: border-color 160ms var(--ease), background-color 160ms var(--ease);
}
.nav-toggle:hover { border-color: var(--gold); background: rgba(201, 162, 39, 0.16); }

.nav-toggle__glyph {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  width: 16px;
}
.nav-toggle__glyph > span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
  transition: transform 160ms var(--ease), opacity 160ms var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__glyph > span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__glyph > span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__glyph > span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

.frame__progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--gold), var(--amber) 55%, var(--celadon));
  pointer-events: none;
}

/* 移动端抽屉 */
.frame__rail {
  grid-area: rail;
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  padding: 78px 22px 34px;
  overflow-y: auto;
  background: linear-gradient(180deg, var(--ink-900) 0%, var(--ink-800) 62%, #050D16 100%);
  border-right: 1px solid rgba(143, 179, 170, 0.16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 240ms var(--ease), transform 240ms var(--ease),
    visibility 240ms linear;
}
.frame[data-open="true"] .frame__rail {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

body.nav-locked { overflow: hidden; }

.rail-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.rail-nav__caption {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mist);
}
.rail-nav__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rail-nav__link {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  border-radius: var(--radius-sm);
  border-left: 2px solid transparent;
  color: var(--paper-dim);
  transition: background-color 160ms var(--ease), color 160ms var(--ease),
    border-color 160ms var(--ease);
}
.rail-nav__link:hover {
  background: rgba(20, 52, 77, 0.9);
  color: var(--paper);
}
.rail-nav__link[aria-current="page"] {
  background: rgba(201, 162, 39, 0.12);
  border-left-color: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(201, 162, 39, 0.28);
  color: var(--paper);
}
.rail-nav__link[aria-current="page"] .rail-nav__num { color: var(--amber); }
.rail-nav__num {
  font-size: 12px;
  color: var(--mist);
  letter-spacing: 0.06em;
}
.rail-nav__label {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.rail-nav__cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}
.rail-nav__foot {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(143, 179, 170, 0.16);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--mist);
}

/* 桌面：L 形框架 */
@media (min-width: 1024px) {
  body {
    padding-left: var(--rail-w);
    padding-top: var(--top-h);
  }

  .frame {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: var(--rail-w) minmax(0, 1fr);
    grid-template-rows: var(--top-h) minmax(0, 1fr);
    grid-template-areas:
      "corner top"
      "rail .";
    align-items: stretch;
    gap: 0;
    padding: 0;
    background: none;
    border-bottom: 0;
    pointer-events: none;
  }

  .frame__corner {
    grid-area: corner;
    pointer-events: auto;
    padding: 0 20px;
    background: var(--ink-900);
    border-right: 1px solid rgba(143, 179, 170, 0.16);
    border-bottom: 1px solid rgba(143, 179, 170, 0.16);
  }

  .frame__top {
    grid-area: top;
    pointer-events: auto;
    justify-content: space-between;
    padding: 0 28px;
    background: rgba(7, 18, 30, 0.92);
    border-bottom: 1px solid rgba(143, 179, 170, 0.16);
    backdrop-filter: blur(10px);
  }

  .frame__rail {
    grid-area: rail;
    position: static;
    inset: auto;
    z-index: auto;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    padding: 28px 16px 24px;
    border-right: 1px solid rgba(143, 179, 170, 0.16);
    border-bottom: 0;
    background: var(--ink-900);
    overflow-y: auto;
  }

  .nav-toggle { display: none; }
  .rail-nav__cta { display: none; }
}

/* ---------- 9. 页脚 ---------- */
.site-foot {
  position: relative;
  margin-top: clamp(64px, 9vw, 120px);
  background: linear-gradient(180deg, #0A1725 0%, #050C14 100%);
  border-top: 1px solid rgba(201, 162, 39, 0.3);
  border-radius: 32px 32px 0 0;
  color: var(--paper-dim);
}

.site-foot__inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(40px, 6vw, 76px) clamp(20px, 4vw, 44px) 32px;
  display: grid;
  gap: clamp(30px, 4vw, 52px);
}
@media (min-width: 900px) {
  .site-foot__inner {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: start;
  }
}

.site-foot__lead { min-width: 0; }

.brand--foot .brand__mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  font-size: 22px;
}
.brand--foot .brand__name { font-size: 20px; }

.site-foot__title {
  margin: 20px 0 12px;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.36;
  letter-spacing: -0.01em;
  font-weight: 800;
  color: var(--paper);
}

.site-foot__summary {
  max-width: 34em;
  font-size: 15px;
  line-height: 1.85;
  color: rgba(231, 227, 216, 0.78);
}

.site-foot__stamp {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: var(--mist);
}

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

.foot-col__title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.foot-col__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.foot-col__link {
  display: inline-block;
  padding: 2px 0;
  font-size: 15px;
  color: rgba(244, 241, 234, 0.82);
  border-bottom: 1px solid transparent;
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}
.foot-col__link:hover {
  color: var(--amber);
  border-bottom-color: rgba(242, 163, 58, 0.6);
}

.site-foot__bar {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 22px clamp(20px, 4vw, 44px) 34px;
  border-top: 1px solid rgba(143, 179, 170, 0.16);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 28px;
  font-size: 12.5px;
  line-height: 1.7;
  color: rgba(143, 179, 170, 0.92);
}
.site-foot__copy {
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}

/* ---------- 10. 动效 ---------- */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 420ms var(--ease), transform 420ms var(--ease);
    transition-delay: calc(var(--reveal-i, 0) * 60ms);
  }
  [data-reveal].is-visible {
    opacity: 1;
    transform: none;
  }
}
